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

Learning to Represent Student Knowledge on Programming Exercises Using Deep Learning

Lisa Wang, Angela Sy, Larry Liu, Chris PiechEDM 2017

Introduction

In traditional classrooms, instructors can observe a student's problem-solving process to identify specific misconceptions. However, in Massive Open Online Courses (MOOCs), this "teacher’s eye" is often lost. While standard Knowledge Tracing (KT) models track binary success/failure outcomes, they often fail to capture the nuances of the programming process. This research introduces a deep learning approach to automatically represent student knowledge directly from raw code submission history, enabling real-time identification of struggling students without manual feature engineering.

Methodology

The researchers developed a pipeline that treats a student's series of code attempts as a temporal trajectory. This process involves two primary components:

  1. Program Embeddings: To handle the vast diversity of possible code solutions, the model uses a recursive neural network to convert Abstract Syntax Trees (ASTs)—the structural representation of code—into compact vector embeddings. This captures the functional logic of the code rather than just its textual content.
  2. Recurrent Neural Networks (LSTMs): These embeddings are fed into a three-layer Long Short-Term Memory (LSTM) network. LSTMs are designed to remember patterns over time, making them ideal for tracking how a student's code evolves through successive submissions.
The LSTM architecture processes a sequence of program submissions to predict student outcomes.

The model was trained on two tasks: predicting if a student will pass the next exercise based on their current trajectory (Task A), and predicting at every step whether the student will eventually succeed or fail in the current exercise (Task B).

Pedagogical Insights and Personas

By analyzing the learned representations using t-SNE visualization, the authors identified five distinct clusters of students, representing different "pedagogical personas."

t-SNE visualization of student embeddings reveals distinct pedagogical clusters (A-E) associated with future performance.
  • Cluster A (Logical Debuggers): Students who made consistent, logical progress toward a solution.
  • Clusters C and E (Random Guessers): Students who appeared to be "hardcoding" solutions or guessing randomly to pass specific test cases without understanding the underlying logic.

The model successfully differentiated between students who failed but were likely to succeed later (due to "lucky guesses") and those with deep conceptual gaps.

Results

The study utilized data from over 1.26 million submissions on Code.org's "Hour of Code." Key results include:

  • Superior Accuracy: The LSTM outperformed standard baselines by approximately 5% in test accuracy for predicting future success.
  • High-Fidelity Embeddings: The embedding model predicted code output with 96% accuracy, confirming it captured actual program logic.
  • Early Warning Capabilities: The LSTM showed significantly higher recall for identifying failing students compared to logistic regression, with performance improving as the number of attempts increased.

Conclusion and Future Work

This work demonstrates that the sequence of student attempts contains rich information for tracking knowledge. While currently focused on single complex exercises, future research aims to trace knowledge across entire curricula and "close the loop" by using these predictions to trigger automated, personalized interventions.

Summary updated

BibTeX
@inproceedings{wang2017learning,
  author = {Lisa Wang and Angela Sy and Larry Liu and Chris Piech},
  title = {{Learning to Represent Student Knowledge on Programming Exercises Using Deep Learning}},
  booktitle = {EDM},
  year = {2017},
}
Figure