arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1603.06129cs.PLcs.AIcs.LGcs.SE
收藏

用循环神经网络自动校正程序设计中的误差

Automated Correction for Syntax Errors in Programming Assignments using Recurrent Neural Networks

Netaji Subhas Institute of Technology(内塔吉·苏巴斯理工学院);Microsoft Research(微软研究院)

Sahil Bhatia, Rishabh Singh

摘要:

我们提出了一种方法,用于自动生成修复反馈的语法错误的介绍性编程问题。在我们从edX上的MOOC课程中获得的学生提交数据集中,错误构成了最大的错误类别之一(34%)。以前用于生成编程作业的自动反馈的技术集中在学生程序的功能正确性和风格考虑上。这些技术分析程序的程序AST,然后执行一些动态和符号分析来计算修复反馈。不幸的是,它是不可能的生成AST的学生程序与语法错误,因此,以前的反馈技术是不适用于修复语法错误。我们提出了一种技术,用于提供反馈的语法错误,使用循环神经网络(RNNs)的模型语法有效的令牌序列。我们的方法是从最近的工作学习大代码(大代码语料库)语言模型的启发。对于给定的编程作业,我们首先学习RNN,使用语法正确的学生提交集对所有有效的令牌序列进行建模。然后,对于有语法错误的学生提交,我们用前缀- ken序列查询学习的RNN模型,以预测可以通过在错误位置替换或插入预测的令牌序列来修复错误的令牌序列。我们评估了超过14000名学生提交的语法错误我们的技术。我们的技术可以完全修复31.69%(4501/14203)的提交与语法错误,此外部分纠正6.39%(908/14203)的提交。

英文摘要:

We present a method for automatically generating repair feedback for syntax errors for introductory programming problems. Syntax errors constitute one of the largest classes of errors (34%) in our dataset of student submissions obtained from a MOOC course on edX. The previous techniques for generating automated feed- back on programming assignments have focused on functional correctness and style considerations of student programs. These techniques analyze the program AST of the program and then perform some dynamic and symbolic analyses to compute repair feedback. Unfortunately, it is not possible to generate ASTs for student pro- grams with syntax errors and therefore the previous feedback techniques are not applicable in repairing syntax errors. We present a technique for providing feedback on syntax errors that uses Recurrent neural networks (RNNs) to model syntactically valid token sequences. Our approach is inspired from the recent work on learning language models from Big Code (large code corpus). For a given programming assignment, we first learn an RNN to model all valid token sequences using the set of syntactically correct student submissions. Then, for a student submission with syntax errors, we query the learnt RNN model with the prefix to- ken sequence to predict token sequences that can fix the error by either replacing or inserting the predicted token sequence at the error location. We evaluate our technique on over 14, 000 student submissions with syntax errors. Our technique can completely re- pair 31.69% (4501/14203) of submissions with syntax errors and in addition partially correct 6.39% (908/14203) of the submissions.

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

↑