Title: Interpreting Latent Student Knowledge Representations in Programming Assignments
Recent advances in artificial intelligence for education leverage generative large language models, including using them to predict open-ended student responses rather than their correctness only. However, the black-box nature of these models limits the interpretability of the learned student knowledge representations. In this paper, we conduct a first exploration into interpreting latent student knowledge representations by presenting InfoOIRT, an Information regularized Open-ended Item Response Theory model, which encourages the latent student knowledge states to be interpretable while being able to generate student-written code for open-ended programming questions. InfoOIRT maximizes the mutual information between a fixed subset of latent knowledge states enforced with simple prior distributions and generated student code, which encourages the model to learn disentangled representations of salient syntactic and semantic code features including syntactic styles, mastery of programming skills, and code structures. Through experiments on a real-world programming education dataset, we show that InfoOIRT can both accurately generate student code and lead to interpretable student knowledge representations.  more » « less
Award ID(s):
2215193
PAR ID:
10598956
Author(s) / Creator(s):
;
Editor(s):
Benjamin, Paaßen; Carrie, Demmans Epp
Publisher / Repository:
International Educational Data Mining Society
Date Published:
Subject(s) / Keyword(s):
Right(s):
Creative Commons Attribution 4.0 International
Sponsoring Org:
National Science Foundation
More Like this
  1. Botelho, Anthony; T Rodrigo, Maria Mercedes; Singla, Adish; Ogata, Hiroaki; So, Hyojeong; Cho, Young Hoan (Ed.)
    Abstract: Personalized instruction aims to provide learners with support that adapts to their individual knowledge. Discovering and tracing Knowledge Components (KCs) is an important step in building accurate models of student learning. However, KC discovery in computer science education is challenging due to the open-ended nature of programming, wide variability in student solutions, and intertwined use of programming structures in code. We address these challenges with a pattern-based KC discovery method that uses a data-driven approach to define KCs as recurring structural patterns in student code that reveal persistent patterns of struggle and mastery in students' solutions. We then evaluate the discovered KCs using expert evaluation and statistical student modeling to demonstrate their effectiveness in capturing student learning and struggles. We propose a framework for modeling students' learning by deriving pattern-based KCs from student code through a three-stage process. First, an attention-based code representation model identifies Abstract Syntax Tree subtrees most relevant to code correctness. Second, a Variational Autoencoder abstracts these subtrees into a smooth latent space, capturing structural similarity across student submissions. Third, the resulting representations are clustered into pattern-based KCs. To assess the effectiveness of pattern-based KCs for modeling students' learning, we adapt the Deep Knowledge Tracing model to incorporate these KCs, demonstrating significant improvements in predictive performance over baseline KT methods. Additionally, the learning curve analysis showed alignment between the derived KCs and learning theory. 
    more » « less
  2. Botelho, Anthony; T Rodrigo, Maria Mercedes; Singla, Adish; Ogata, Hiroaki; So, Hyojeong; Cho, Young Hoan (Ed.)
    Abstract: Learning to program involves repeated trial-and-error attempts, leading to substantial heterogeneity in learning behavior across student cohorts and course offerings. Code-aware knowledge tracing (KT) models aim to capture how students' programming knowledge evolves over time. However, most existing KT studies rely on data from individual courses, where student interactions are often sparse and insufficient for modeling robust performance patterns. Centralizing student data across classrooms or institutions to address this limitation is often constrained by the risk of privacy breach of sensitive code submission data, limiting the impact of existing KT methods. Federated learning (FL) provides a privacy-preserving alternative by enabling collaborative model training without sharing raw data, and recent work has shown that model personalization can further improve federated KT performance. However, the interaction between model personalization and code representation has not been systematically studied. In this paper, we present a comparative analysis of code-aware KT representations under personalized federated learning (pFL) framework, using two semesters of CodeWorkout data treated as separate clients. Our results show that personalization consistently improves predictive accuracy under federated training, but the magnitude and consistency of these improvements depend on how student code is represented. In particular, code representations that capture richer structural information and syntax-aware encodings exhibit more reliable performance gains and promise more stable learning trajectories across assignments and semesters, especially for more complex programming tasks. These findings provide practical insights for EDM researchers and practitioners on how representation choice shapes the effectiveness of personalization when deploying privacy-preserving knowledge tracing models in programming education. 
    more » « less
  3. Large language models have achieved remarkable progress in generating human-like text, yet their outputs often lack structural diversity, limiting personalized expression. Recent advances in diffusion models offer new opportunities for text generation, surpassing the limitations of autoregressive paradigms. Building on the idea of hierarchical modeling, we develop a syntax-guided diffusion language model that incorporates latent syntactic variables to enhance text quality, diversity, and personalized conditioning. The proposed framework decomposes the text distribution into a syntactic prior and a conditional text distribution, enabling interpretable control over both syntactic and lexical components. We design a cascaded diffusion process for syntax-to-text generation and extend it to a generalized noncascaded formulation with a unified attention mechanism. To achieve fine-grained personalization, we introduce shared-latent representations that integrate information across users to capture style-specific lexical and syntactic patterns, supporting zero-shot inference. Extensive experiments demonstrate that the proposed approach consistently improves multiple empirical measures of fluency, diversity, and stylistic fidelity. Further qualitative analyses highlight its interpretability and flexibility in learning personalized patterns. 
    more » « less
  4. Novice programmers can greatly improve their understanding of challenging programming concepts by studying worked examples that demonstrate the implementation of these concepts. Despite the extensive repositories of effective worked examples created by CS education experts, a key challenge remains: identifying the most relevant worked example for a given programming problem and the specific difficulties a student faces solving the problem. Previous studies have explored similar example recommendation approaches. Our research introduces a novel method by utilizing deep learning code representation models to generate code vectors, capturing both syntactic and semantic similarities among programming examples. Driven by the need to provide relevant and personalized examples to programming students, our approach emphasizes similarity assessment and clustering techniques to identify similar code problems, examples, and challenges. This method aims to deliver more accurate and contextually relevant recommendations based on individual learning needs. Providing tailored support to students in real-time facilitates better problem-solving strategies and enhances students' learning experiences, contributing to the advancement of programming education. 
    more » « less
  5. Automated analysis of programming data using code representation methods offers valuable services for programmers, from code completion to clone detection to bug detection. Recent studies show the effectiveness of Abstract Syntax Trees (AST), pre-trained Transformer-based models, and graph-based embeddings in programming code representation. However, pre-trained large language models lack interpretability, while other embedding-based approaches struggle with extracting important information from large ASTs. This study proposes a novel Subtree-based Attention Neural Network (SANN) to address these gaps by integrating different components: an optimized sequential subtree extraction process using Genetic algorithm optimization, a two-way embedding approach, and an attention network. We investigate the effectiveness of SANN by applying it to two different tasks: program correctness prediction and algorithm detection on two educational datasets containing both small and large-scale code snippets written in Java and C, respectively. The experimental results show SANN's competitive performance against baseline models from the literature, including code2vec, ASTNN, TBCNN, CodeBERT, GPT-2, and MVG, regarding accurate predictive power. Finally, a case study is presented to show the interpretability of our model prediction and its application for an important human-centered computing application, student modeling. Our results indicate the effectiveness of the SANN model in capturing important syntactic and semantic information from students' code, allowing the construction of accurate student models, which serve as the foundation for generating adaptive instructional support such as individualized hints and feedback. 
    more » « less