用真实学生编程日志训练可模拟学习过程的代码模型。
Teaching Language Models How to Code Like Learners: Conversational Serialization for Student Simulation
- 将学生编程日志转为对话格式,模拟调试交互过程。
- 在真实数据上训练的模型更贴近学生实际调试行为。
- 适合教育系统评估与个性化辅导研究者使用。
人工学生——模拟学习者在教育系统中行为和反应的模型——是大规模评估辅导策略与反馈机制的有力工具。然而,现有方法多依赖大型专有语言模型的提示,难以适配特定课程,且存在隐私、成本和依赖性问题。本文提出一种框架,直接从真实的学生产程数据训练开源权重的人工编程学习者。方法将时间序列日志转换为对话形式,将学生代码提交与环境反馈(如测试结果、成绩、错误信息)作为交替对话回合,使模型能学习迭代调试过程。我们还引入结合监督微调与偏好优化的训练流程,使模型对齐真实学生的调试行为。在大规模真实学生提交数据集上,训练了4B和8B规模的Qwen模型。结果表明,加入环境反馈显著提升模型对学生产生行为的还原能力,在功能一致性和代码相似性上均优于仅基于代码的先前方法及提示型大模型基线。代码已公开以支持复现。
原文摘要 · Abstract (English)
Artificial students -- models that simulate how learners act and respond within educational systems -- are a promising tool for evaluating tutoring strategies and feedback mechanisms at scale. However, most existing approaches rely on prompting large, proprietary language models, limiting adaptability to specific courses and raising concerns around privacy, cost, and dependence. In this work, we propose a framework for training open-weight artificial programming learners directly from authentic student process data. Our approach serializes temporal log traces into a conversational format, representing each student's problem-solving process as a dialogue between the learner and their automated assessment system. Student code submissions and environment feedback, such as test outcomes, grades, and error traces, form alternating conversational turns, enabling models to learn from the iterative debugging process. We additionally introduce a training pipeline combining supervised fine-tuning with preference optimization to align models with authentic student debugging behavior. We evaluate our framework by training Qwen models at 4B and 8B scales on a large-scale dataset of real student submissions to Python programming assignments. Our results show that incorporating environment feedback strengthens models' ability to replicate student debugging behavior, improving over both prior code-only approaches and prompted large language models baselines in functional alignment and code similarity. We release our code to support reproducibility.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。