arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.19407cs.SEcs.CL
收藏

学习代码编辑嵌入以建模学生调试行为

Learning Code-Edit Embedding to Model Student Debugging Behavior

University of Massachusetts Amherst(马萨诸塞大学阿默斯特分校)

Hasnain Heickal, Andrew Lan

AI总结:

提出基于编码器-解码器的模型,通过学习连续代码提交间的代码编辑嵌入并微调LLMs,捕捉学生调试行为,实现个性化代码建议并揭示常见错误模式。

摘要:

在计算机科学教育中,为编程作业提供有效反馈具有挑战性:学生通过迭代提交代码、执行代码,并利用编译器或自动评分器提供的有限反馈来进行调试以解决问题。分析此过程中的学生调试行为可能会揭示关于其知识水平的重要见解,并为更好的个性化支持工具提供参考。在本研究中,我们提出一个基于编码器-解码器的模型,该模型学习连续学生代码提交之间有意义的代码编辑嵌入,以捕捉其调试行为。我们的模型利用学生代码提交是否通过每个测试用例的信息,来微调大型语言模型(LLMs)以学习代码编辑表示。它能够提供个性化的下一步代码建议,这些建议在保持学生编码风格的同时提高了测试用例的正确性。我们的模型还使我们能够使用聚类技术分析学生的代码编辑模式,以揭示常见的学生错误和调试行为。在真实世界的学生代码提交数据集上的实验结果表明,我们的模型在代码重构和个性化代码建议方面表现出色,同时揭示了学生调试行为中的有趣模式。

英文摘要:

Providing effective feedback for programming assignments in computer science education can be challenging: students solve problems by iteratively submitting code, executing it, and using limited feedback from the compiler or the auto-grader to debug. Analyzing student debugging behavior in this process may reveal important insights into their knowledge and inform better personalized support tools. In this work, we propose an encoder-decoder-based model that learns meaningful code-edit embeddings between consecutive student code submissions, to capture their debugging behavior. Our model leverages information on whether a student code submission passes each test case to fine-tune large language models (LLMs) to learn code editing representations. It enables personalized next-step code suggestions that maintain the student's coding style while improving test case correctness. Our model also enables us to analyze student code-editing patterns to uncover common student errors and debugging behaviors, using clustering techniques. Experimental results on a real-world student code submission dataset demonstrate that our model excels at code reconstruction and personalized code suggestion while revealing interesting patterns in student debugging behavior.

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

↑