[论文解读] ProtoTransformer: A Meta-Learning Approach to Providing Student Feedback
ProtoTransformer 提出了一种元学习框架,通过基于 Transformer 的架构,在少量样本分类的基础上,为学生编程代码生成高精度反馈,在未见过的大学考试题目上实现了 88% 的平均精确率——超过助教(82%)并优于标准监督方法(65%),并成功部署以实现对 16,000 名学生的规模化反馈。
High-quality computer science education is limited by the difficulty of providing instructor feedback to students at scale. While this feedback could in principle be automated, supervised approaches to predicting the correct feedback are bottlenecked by the intractability of annotating large quantities of student code. In this paper, we instead frame the problem of providing feedback as few-shot classification, where a meta-learner adapts to give feedback to student code on a new programming question from just a few examples annotated by instructors. Because data for meta-training is limited, we propose a number of amendments to the typical few-shot learning framework, including task augmentation to create synthetic tasks, and additional side information to build stronger priors about each task. These additions are combined with a transformer architecture to embed discrete sequences (e.g. code) to a prototypical representation of a feedback class label. On a suite of few-shot natural language processing tasks, we match or outperform state-of-the-art performance. Then, on a collection of student solutions to exam questions from an introductory university course, we show that our approach reaches an average precision of 88% on unseen questions, surpassing the 82% precision of teaching assistants. Our approach was successfully deployed to deliver feedback to 16,000 student exam-solutions in a programming course offered by a tier 1 university. This is, to the best of our knowledge, the first successful deployment of a machine learning based feedback to open-ended student code.
研究动机与目标
- 解决在大学级计算机科学课程中为学生编程代码提供高质量反馈的可扩展性挑战。
- 克服监督学习在少样本设置下的局限性,即标注数据稀缺且难以泛化到新问题。
- 开发一种元学习框架,高效利用少量专家标注的示例,以泛化到新的编程问题和学生代码。
- 通过引入任务增强、辅助信息和鲁棒序列编码,改进少样本学习在代码特定挑战(如变量名多样性)中的表现。
提出的方法
- 将反馈预测建模为少样本分类问题,即模型仅使用少量标注的学生代码示例即可适应新编程问题。
- 采用基于 Transformer 的架构,将编程代码序列编码为密集嵌入表示,条件依赖于问题描述和评分标准。
- 通过每类反馈类别(如“语法错误”、“缺少变量”)的所有支持样本的平均嵌入计算类别原型。
- 引入辅助信息(如评分标准描述和问题嵌入)以增强归纳偏置,提升少样本泛化能力。
- 通过程序混淆和字节对编码实施任务增强,生成合成任务并提升元训练期间的数据多样性。
- 使用元学习目标进行模型训练,以最小化在少样本适应阶段的新任务上的分类误差。
实验结果
研究问题
- RQ1元学习方法是否能在仅使用少量标注示例的情况下,实现对学生成绩代码反馈分类的人类水平精度?
- RQ2任务增强和辅助信息在提升代码反馈预测的少样本泛化能力方面效果如何?
- RQ3基于 Transformer 的模型结合原型嵌入,在真实世界大学级编程作业上,是否能显著优于标准监督方法和先前的元学习方法?
- RQ4在真实部署环境中,该模型在未见过的编程问题上的表现,与助教及基线模型相比如何?
主要发现
- ProtoTransformer 在未见过的编程考试题目上实现了 88% 的平均精确率,显著优于助教(82%)和标准监督基线(65%)。
- 该模型能有效泛化到元训练期间未见过的新编程问题,展现出强大的少样本泛化能力。
- 通过程序混淆和合成任务生成实现的任务增强,显著提升了模型的鲁棒性和性能,尤其在低数据场景下效果明显。
- 引入辅助信息(如评分标准和问题嵌入)显著提升了模型性能,通过提供更强的归纳偏置实现。
- 该模型已成功规模化部署,在一所顶尖大学的课程中为 16,000 名学生的考试作答提供了反馈——这是首个在开放性学生代码上成功实现大规模真实世界部署的基于机器学习的反馈系统。
- 消融实验确认,每个组件(Transformer 架构、辅助信息、任务增强)均对最终性能有显著贡献,完整模型优于所有消融变体。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。