# Code-DKT: A Code-based Knowledge Tracing Model for Programming Tasks

arXiv: https://arxiv.org/abs/2206.03545 · HTML: https://mlsanity.com/paper/2206.03545/

## Key facts

- Cited by 16 papers in the map (data through 14 Oct 2026).
- Builds on 18 of its 63 references that are in the map.
- First posted on arXiv 7 Jun 2022.

## Builds on (most cited first, 18 of 18)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Show, Attend and Tell: Neural Image Caption Generation with Visual Attention](https://mlsanity.com/paper/1502.03044/) (2015)
- [CodeBERT: A Pre-Trained Model for Programming and Natural Languages](https://mlsanity.com/paper/2002.08155/) (2020)
- [Deep Knowledge Tracing](https://mlsanity.com/paper/1506.05908/) (2015)
- [code2vec: Learning Distributed Representations of Code](https://mlsanity.com/paper/1803.09473/) (2018)
- [Context-Aware Attentive Knowledge Tracing](https://mlsanity.com/paper/2007.12324/) (2020)
- [A Self-Attentive model for Knowledge Tracing](https://mlsanity.com/paper/1907.06837/) (2019)
- [EKT: Exercise-aware Knowledge Tracing for Student Performance Prediction](https://mlsanity.com/paper/1906.05658/) (2019)
- [EdNet: A Large-Scale Hierarchical Dataset in Education](https://mlsanity.com/paper/1912.03072/) (2019)
- [A Convolutional Attention Network for Extreme Summarization of Source Code](https://mlsanity.com/paper/1602.03001/) (2016)
- [Towards an Appropriate Query, Key, and Value Computation for Knowledge Tracing](https://mlsanity.com/paper/2002.07033/) (2020)
- [SAINT+: Integrating Temporal Features for EdNet Correctness Prediction](https://mlsanity.com/paper/2010.12042/) (2020)
- [A General Path-Based Representation for Predicting Program Properties](https://mlsanity.com/paper/1803.09544/) (2018)
- [pyBKT: An Accessible Python Library of Bayesian Knowledge Tracing Models](https://mlsanity.com/paper/2105.00385/) (2021)
- [Toward Semi-Automatic Misconception Discovery Using Code Embeddings](https://mlsanity.com/paper/2103.04448/) (2021)
- [Extending the Hint Factory for the assistance dilemma: A novel, data-driven HelpNeed Predictor for proactive problem-solving help](https://mlsanity.com/paper/2010.04124/) (2020)

## Built on by (most cited first, 16 of 16)

- [Test Case-Informed Knowledge Tracing for Open-ended Coding Tasks](https://mlsanity.com/paper/2410.10829/) (2024)
- [Students' Perceptions and Preferences of Generative Artificial Intelligence Feedback for Programming](https://mlsanity.com/paper/2312.11567/) (2023)
- [Automated Knowledge Component Generation for Interpretable Knowledge Tracing in Coding Problems](https://mlsanity.com/paper/2502.18632/) (2025)
- [Automated Identification of Logical Errors in Programs: Advancing Scalable Analysis of Student Misconceptions](https://mlsanity.com/paper/2505.10913/) (2025)
- [Pattern-based Knowledge Component Extraction from Student Code Using Representation Learning](https://mlsanity.com/paper/2508.09281/) (2025)
- [Authoring Worked Examples for Java Programming with Human-AI Collaboration](https://mlsanity.com/paper/2312.02105/) (2023)
- [Interpreting Latent Student Knowledge Representations in Programming Assignments](https://mlsanity.com/paper/2405.08213/) (2024)
- [Estimating Difficulty Levels of Programming Problems with Pre-trained Model](https://mlsanity.com/paper/2406.08828/) (2024)
- [Knowledge Tracing in Programming Education Integrating Students' Questions](https://mlsanity.com/paper/2502.10408/) (2025)
- [Deep Learning for Educational Data Science](https://mlsanity.com/paper/2404.19675/) (2024)
- [From Prediction to Application: Language Model-based Code Knowledge Tracing with Domain Adaptive Pre-Training and Automatic Feedback System with Pedagogical Prompting for Comprehensive Programming Education](https://mlsanity.com/paper/2409.00323/) (2024)
- [Denoising Programming Knowledge Tracing with a Code Graph-based Tuning Adaptor](https://mlsanity.com/paper/2506.11107/) (2025)
- [Detecting Struggling Student Programmers using Proficiency Taxonomies](https://mlsanity.com/paper/2508.17353/) (2025)
- [CodeGENCAT: Generative Computerized Adaptive Testing for Open-ended Coding Problems](https://mlsanity.com/paper/2602.20020/) (2026)
- [Ensuring Reliability in Programming Knowledge Tracing: A Re-evaluation of Attention-augmented Models and Experimental Protocols](https://mlsanity.com/paper/2605.04727/) (2026)
- [A Dataset for Modeling Iterative Problem-Solving](https://mlsanity.com/paper/2609.00940/) (2026)

## Abstract (arXiv)

Knowledge tracing (KT) models are a popular approach for predicting students' future performance at practice problems using their prior attempts. Though many innovations have been made in KT, most models including the state-of-the-art Deep KT (DKT) mainly leverage each student's response either as correct or incorrect, ignoring its content. In this work, we propose Code-based Deep Knowledge Tracing (Code-DKT), a model that uses an attention mechanism to automatically extract and select domain-specific code features to extend DKT. We compared the effectiveness of Code-DKT against Bayesian and Deep Knowledge Tracing (BKT and DKT) on a dataset from a class of 50 students attempting to solve 5 introductory programming assignments. Our results show that Code-DKT consistently outperforms DKT by 3.07-4.00% AUC across the 5 assignments, a comparable improvement to other state-of-the-art domain-general KT models over DKT. Finally, we analyze problem-specific performance through a set of case studies for one assignment to demonstrate when and how code features improve Code-DKT's predictions.
