KASER: Knowledge-Aligned Student Error Simulator for Open-Ended Coding Tasks

📅 2026-01-10
🏛️ arXiv.org
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge of mode collapse in large language models when simulating diverse student-like errors in open-ended programming tasks, where balancing syntactic correctness, stylistic variation, and solution diversity remains difficult. The authors propose a reinforcement learning–based approach for erroneous code generation that explicitly aligns student knowledge states with error patterns. A novel hybrid reward mechanism is introduced, integrating code similarity, error fidelity, and generation diversity to guide the learning process. Experimental results on two real-world datasets demonstrate that the proposed method significantly improves error prediction accuracy at the individual student–problem level and enhances both error coverage and output diversity across problems, effectively mitigating mode collapse.

Technology Category

Application Category

📝 Abstract
Open-ended tasks, such as coding problems that are common in computer science education, provide detailed insights into student knowledge. However, training large language models (LLMs) to simulate and predict possible student errors in their responses to these problems can be challenging: they often suffer from mode collapse and fail to fully capture the diversity in syntax, style, and solution approach in student responses. In this work, we present KASER (Knowledge-Aligned Student Error Simulator), a novel approach that aligns errors with student knowledge. We propose a training method based on reinforcement learning using a hybrid reward that reflects three aspects of student code prediction: i) code similarity to the ground-truth, ii) error matching, and iii) code prediction diversity. On two real-world datasets, we perform two levels of evaluation and show that: At the per-student-problem pair level, our method outperforms baselines on code and error prediction; at the per-problem level, our method outperforms baselines on error coverage and simulated code diversity.
Problem

Research questions and friction points this paper is trying to address.

student error simulation
open-ended coding tasks
large language models
code diversity
mode collapse
Innovation

Methods, ideas, or system contributions that make the work stand out.

Knowledge-Aligned Error Simulation
Reinforcement Learning
Hybrid Reward
Student Code Diversity
Open-Ended Coding Tasks