arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.30610cs.SE
收藏

PyMETA: 基于Python解释器标签的层次化学生代码错误分类基准数据集

PyMETA: Evaluating Student Code Diagnosis on and Beyond the First Execution Error

CircleCat

Ziqi Tang, Chuyue Li, Jingyi Wang, Yu Wu, Kazuma Hashimoto, Lingyu Gao

AI总结:

提出PyMETA数据集,包含48,646份学生提交的Python代码,采用三层层次化错误分类体系,并评估了微调模型和LLM在多级分类任务上的性能。

摘要:

随着大型语言模型(LLM)的进步,代码错误检测已从传统的IDE诊断扩展到教育场景中的上下文敏感调试。然而,现有方法缺乏大规模数据集、多错误分析和统一的错误分类体系。为解决这一问题,我们引入了PyMETA,一个大规模Python代码错误分类数据集,包含48,646份学生提交的代码,所有样本均带有单错误标签,以及一个包含97个专家标注的多错误样本的诊断子集。该数据集采用三层层次化分类体系,从二元错误/无错误划分到基于Python官方异常层次结构的14种细粒度错误类型。我们评估了两个微调模型和四个LLM在多级分类任务上的性能,并比较了它们的分类性能和运行时成本。在多错误提示下,最佳模型Gemini 2.5 Pro在“包含”标准下达到了81.8%的宏F1值。我们观察到:1)提示的LLM仍不如微调的小模型;2)模型在不同错误类型间存在显著差异;3)大多数LLM过度将代码分类为逻辑错误,其中GPT-3.5的逻辑错误过度预测率最高,而Gemini 2.5 Pro最低。我们的工作为基于LLM的代码错误研究建立了数据基础并提供了见解。

英文摘要:

Code-diagnosis evaluation depends on how error supervision is constructed and what that supervision treats as a correct diagnosis. We introduce PyMETA, a dataset of 48,646 Python submissions with execution-derived single-error labels, and a targeted subset of 97 submissions annotated by experts through repair and re-execution. Under the first-outcome protocol, four recent prompted models obtain 87.5-93.8% macro F1, all above the strongest finetuned baseline at 80.6%. This reverses the comparison obtained with the earlier set of prompted models. The expert subset gives a less favorable account of complete diagnosis: exact-set match ranges from 43.3% to 48.5%, although sample F1 is approximately 79-81%. The evaluation setup also changes which behavior is visible. On the same 45 audited submissions without an expert-annotated Logic Error, none of the four recent models predicts that label when restricted to one output, whereas 46.7-57.8% include it under multi-error prompting, usually after an explicit-error label. These findings show that model comparisons and error-bias claims depend on what the gold label represents, which outputs the model is allowed to return, and how those outputs are scored.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑