代码向量:通过嵌入的抽象符号痕迹理解程序
Code Vectors: Understanding Programs Through Embedded Abstracted Symbolic Traces
摘要:
随着机器学习的兴起,人们对将程序视为要馈送给学习算法的数据有很大的兴趣。然而,程序并不是以一种可以立即适用于大多数现成的学习技术的形式开始的。相反,有必要在应用学习技术之前将程序转换为合适的表示。在本文中,我们使用的符号执行程序的表示学习词嵌入获得的痕迹的抽象。我们在数百个参数化下训练了各种词嵌入,并在一系列不同的任务中评估了每个学习到的嵌入。在我们的评估中,我们在一个基准测试中获得了93%的top-1准确率,该基准测试由从Linux内核中提取的19,000多个API使用类比组成。此外,我们发现,嵌入学习(主要)语义抽象提供了近三倍的准确性,那些学习(主要)语法抽象。
英文摘要:
With the rise of machine learning, there is a great deal of interest in treating programs as data to be fed to learning algorithms. However, programs do not start off in a form that is immediately amenable to most off-the-shelf learning techniques. Instead, it is necessary to transform the program to a suitable representation before a learning technique can be applied. In this paper, we use abstractions of traces obtained from symbolic execution of a program as a representation for learning word embeddings. We trained a variety of word embeddings under hundreds of parameterizations, and evaluated each learned embedding on a suite of different tasks. In our evaluation, we obtain 93% top-1 accuracy on a benchmark consisting of over 19,000 API-usage analogies extracted from the Linux kernel. In addition, we show that embeddings learned from (mainly) semantic abstractions provide nearly triple the accuracy of those learned from (mainly) syntactic abstractions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。