Understanding student errors in the programming is a cornerstone of programming education, yet obtaining a representative set of student errors for any newly designed task remains slow and costly, since authentic submissions only accumulate after extensive classroom deployment. This paper explores whether large language models (LLMs) can serve as scalable proxies for students by simulating realistic logical errors in code submissions. Using the CodeWorkout dataset of 74,000+ unique student Java submissions across 37 problems, we evaluate five LLMs under three mainstream prompting strategies: Input-Output (IO), Chain-of-Thought (CoT), and iterative Self-Refine. We assess performance along two key dimensions: diversity (the range of distinct error patterns) and alignment (alignment with authentic student mistakes), and examine how these vary by struggling level of programming tasks. Our quantitative findings reveal that while all models generate diverse errors, their alignment to human submissions diverges: Claude Sonnet 4 achieves the most balanced performance. In addition, we conducted a blinded expert annotation study (N = 401) comparing synthetic and authentic errors. This qualitative analysis confirms that the generated errors are functionally indistinguishable from authentic student errors. Moreover, higher-struggling-level problems elicit more diverse but less student-like errors. These results highlight trade-offs in using LLMs to simulate human learners and suggest design considerations for integrating synthetic errors into teachable agents, intelligent tutoring systems, and large-scale learning analytics.


翻译:理解学生在编程中的错误是编程教育的基石,然而,对于任何新设计的任务,获取具有代表性的学生错误集仍然既缓慢又昂贵,因为真实的提交数据只有在经过广泛的课堂部署后才能积累。本文探究了大语言模型(LLMs)能否通过模拟代码提交中的真实逻辑错误,作为学生的可扩展替代方案。利用包含74,000余份学生针对37个问题的独特Java提交数据的CodeWorkout数据集,我们评估了五种LLM在三种主流提示策略下的表现:输入-输出(IO)、思维链(CoT)和迭代式自我优化。我们从两个关键维度评估性能:多样性(不同错误模式的范围)和一致性(与真实学生错误的匹配程度),并考察了这些指标如何随编程任务的困难程度而变化。我们的定量研究结果表明,虽然所有模型都能生成多样化的错误,但它们与人类提交数据的一致性存在差异:Claude Sonnet 4 取得了最均衡的表现。此外,我们开展了一项盲法专家标注研究(N = 401),对合成错误与真实错误进行了比较。这项定性分析证实,生成的错误在功能上与真实学生错误难以区分。而且,困难程度更高的任务会引发更多样化但更不似学生的错误。这些结果揭示了使用大语言模型模拟人类学习者的权衡,并为将合成错误整合到可教学代理、智能辅导系统和大规模学习分析中提供了设计考量。

0
下载
关闭预览

相关内容

人们为了让计算机解决各种棘手的问题,使用编程语言 编写程序代码并通过计算机运算得到最终结果的过程。
大语言模型机器遗忘综述
专知会员服务
18+阅读 · 2025年11月2日
大型语言模型系统中提示缺陷的分类学
专知会员服务
8+阅读 · 2025年9月19日
【ETZH博士论文】语言模型编程
专知会员服务
25+阅读 · 2025年6月14日
大型语言模型(LLMs),附Slides与视频
专知会员服务
71+阅读 · 2024年6月30日
《大型语言模型代码生成》综述
专知会员服务
70+阅读 · 2024年6月4日
掌握使用Python的大型语言模型
专知会员服务
63+阅读 · 2024年5月22日
大型语言模型对齐
专知会员服务
120+阅读 · 2023年9月27日
大语言模型简明指南
专知会员服务
143+阅读 · 2023年7月29日
绝对干货!NLP预训练模型:从transformer到albert
新智元
13+阅读 · 2019年11月10日
一大批中文(BERT等)预训练模型等你认领!
PaperWeekly
15+阅读 · 2019年6月25日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
用模型不确定性理解模型
论智
11+阅读 · 2018年9月5日
NLP通用模型诞生?一个模型搞定十大自然语言常见任务
人工智能头条
10+阅读 · 2018年6月29日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关VIP内容
大语言模型机器遗忘综述
专知会员服务
18+阅读 · 2025年11月2日
大型语言模型系统中提示缺陷的分类学
专知会员服务
8+阅读 · 2025年9月19日
【ETZH博士论文】语言模型编程
专知会员服务
25+阅读 · 2025年6月14日
大型语言模型(LLMs),附Slides与视频
专知会员服务
71+阅读 · 2024年6月30日
《大型语言模型代码生成》综述
专知会员服务
70+阅读 · 2024年6月4日
掌握使用Python的大型语言模型
专知会员服务
63+阅读 · 2024年5月22日
大型语言模型对齐
专知会员服务
120+阅读 · 2023年9月27日
大语言模型简明指南
专知会员服务
143+阅读 · 2023年7月29日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员