ast2vec: Utilizing Recursive Neural Encodings of Python Programs

ast2vec: Utilizing Recursive Neural Encodings of Python Programs
复制标题

DOI:
10.5281/zenodo.5634224
复制
发表时间:
2021-03
期刊:
ArXiv
影响因子:
--
通讯作者:
Benjamin Paassen;Jessica McBroom;Bryn Jeffries;I. Koprinska;K. Yacef
Benjamin Paassen;Jessica McBroom;Bryn Jeffries;I. Koprinska;K. Yacef
中科院分区:
其他
文献类型:
--
作者:
Benjamin Paassen;Jessica McBroom;Bryn Jeffries;I. Koprinska;K. Yacef

文献摘要

被引文献

相似文献

教育数据挖掘涉及数据挖掘技术在学生活动中的应用。然而,在计算机编程的上下文中,许多数据挖掘技术不能应用,因为它们需要向量形状的输入,而计算机程序具有语法树的形式。在本文中,我们介绍了ast 2 vec,一个将Python语法树映射到向量并返回的神经网络,从而实现了大约100种以前不适用的数据挖掘技术。Ast 2 vec已经在近50万个新手程序员的程序上进行了培训,并且旨在在无需重新培训的情况下应用于学习任务,这意味着用户可以在不需要深度学习的情况下应用它。我们证明了在三个设置的ast 2 vec的一般性。首先,我们提供了使用ast 2 vec在教室大小的数据集上进行的示例分析,涉及两种新技术,即用于可视化的进度方差投影和用于预测的动态系统分析。在这些例子中,我们还解释了如何将ast 2 vec用于教育决策。其次,我们考虑了ast 2 vec从训练数据和其他两个大规模编程数据集的向量表示中恢复原始语法树的能力。最后,我们评估了ast 2 vec之上的线性动力系统的预测能力,获得了与直接在语法树上工作的技术相似的结果,同时速度更快(常数-而不是线性时间处理)。我们希望ast 2 vec能通过使计算机程序的分析更容易、更丰富和更有效来增强教育数据挖掘工具包。
Educational data mining involves the application of data mining techniques to student activity. However, in the context of computer programming, many data mining techniques can not be applied because they require vector-shaped input, whereas computer programs have the form of syntax trees. In this paper, we present ast2vec, a neural network that maps Python syntax trees to vectors and back, thereby enabling about a hundred data mining techniques that were previously not applicable. Ast2vec has been trained on almost half a million programs of novice programmers and is designed to be applied across learning tasks without re-training, meaning that users can apply it without any need for deep learning. We demonstrate the generality of ast2vec in three settings. First, we provide example analyses using ast2vec on a classroom-sized dataset, involving two novel techniques, namely progress-variance projection for visualization and a dynamical systems analysis for prediction. In these examples, we also explain how ast2vec can be utilized for educational decisions. Second, we consider the ability of ast2vec to recover the original syntax tree from its vector representation on the training data and two other large-scale programming datasets. Finally, we evaluate the predictive capability of a linear dynamical system on top of ast2vec, obtaining similar results to techniques that work directly on syntax trees while being much faster (constant- instead of linear-time processing). We hope ast2vec can augment the educational data mining toolkit by making analyses of computer programs easier, richer, and more efficient.