NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Knowledge Tracing in Programming Education Integrating Students' Questions

Doyoun Kim, Suin Kim, Yohan Jo

Abstract

Traditional Knowledge Tracing (KT) models predict student success based on historical performance but often overlook the qualitative reasons behind student struggles. This paper introduces Students' Question-based Knowledge Tracing (SQKT), a model that incorporates natural language questions and automatically extracted programming skills to refine knowledge state estimation. By utilizing student-educator interaction signals, SQKT achieves significant performance gains, including up to a 33.1% absolute improvement in AUC over state-of-the-art baselines.

Introduction: The "Why" Behind the Code

In programming education, identifying a student's specific knowledge gaps is challenging. Code submissions are often ambiguous; identical errors can stem from vastly different misconceptions. While standard KT models rely on static "Q-matrices" to map problems to skills, these manually curated maps fail to capture the nuances of a student's reasoning.

The authors propose that student questions serve as direct indicators of cognitive friction. A question about handling multiple conditions reveals a specific struggle with control flow that code alone might mask. SQKT addresses the technical challenge of fusing unstructured textual questions with structured code and domain-specific skills.

The SQKT Architecture

The SQKT model employs a multi-layered architecture designed to synthesize heterogeneous data streams into a unified prediction.

The SQKT architecture integrates multi-modal inputs through specialized encoders and a fusion layer.

The framework consists of several key components:

  1. Multi-feature Input Encoding: The model processes problem descriptions (BERT), code submissions (CodeBERT), and student questions (CodeT5).
  2. Auxiliary Task Learning: To capture the "educational intent" of a question, the CodeT5 encoder is fine-tuned to predict educator responses. This ensures the embeddings reflect the core confusion being addressed.
  3. Automated Skill Extraction: Utilizing GPT-4o, the researchers developed a rule-based system to identify 36 Python concepts and 19 error types from both questions and solutions, providing a grounded technical context.
  4. Fusion with Triplet Loss: A fusion layer trained with triplet loss ensures that semantically related entities—such as a specific error and its corresponding problem description—are positioned closely in the vector space.
  5. Transformer Encoder: A multi-head self-attention mechanism aggregates the student's historical sequence to predict performance on subsequent tasks.

Datasets and Evaluation

The model was evaluated on two primary datasets:

  • Proprietary Korean Dataset: A comprehensive collection from an online platform (2022–2024) featuring four Python courses. This dataset uniquely pairs code submissions with student-teacher Q&A threads.
  • CSEDM (Public): A standard benchmark used to verify the model's robustness even in the absence of student question data.

Key Results and Generalization

SQKT demonstrates superior performance across various metrics and scenarios. In the Python Introduction course, it achieved an AUC of 93.4%, a substantial increase over the 72.6% achieved by the best baseline.

Generalization performance of SQKT across content structures and data-scarce environments.

Beyond in-domain accuracy, the model exhibits strong generalization capabilities:

  • Cross-Domain Gains: In data-scarce scenarios, such as advanced algorithm courses, SQKT leveraged patterns learned from basic courses to achieve an 11.4% improvement over models trained only on local data.
  • Ablation Insights: Removing question data led to significant performance drops, confirming that natural language signals are the primary drivers of the model's predictive power.

Conclusion and Future Directions

SQKT successfully demonstrates that student questions are high-fidelity signals for knowledge tracing. However, challenges remain regarding "noisy" questions—such as those with mixed language syntax or those unrelated to the actual code error—which account for the majority of mispredictions. Future work will focus on transitioning from rule-based skill extraction to hybrid machine-learning approaches and validating the model across diverse linguistic and cultural contexts.

Summary updated

BibTeX
@inproceedings{kim2025knowledge,
  author = {Doyoun Kim and Suin Kim and Yohan Jo},
  title = {{Knowledge Tracing in Programming Education Integrating Students' Questions}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure