arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1907.02136cs.SEcs.LG
收藏

学习混合,精确的语义程序嵌入

Learning Blended, Precise Semantic Program Embeddings

Visa Research(Visa研究院);ETH Zurich(苏黎世联邦理工学院)

Ke Wang, Zhendong Su

摘要:

学习神经程序嵌入是在程序语言研究中利用深度神经网络的关键--精确和高效的程序表示使深度模型能够应用于广泛的程序分析任务。现有的方法主要是从源代码中学习嵌入程序,因此,它们不能捕获深入,精确的程序语义。另一方面,从运行时信息中学习的模型严重依赖于程序执行的质量,从而导致训练的模型具有高度变化的质量。本文通过引入一种新的深度神经网络\liger来解决现有方法的这些固有弱点,该网络可以从符号和具体执行轨迹的混合中学习程序表示。我们已经在\coset上评估了\liger,这是最近提出的用于评估神经程序嵌入的基准套件。结果表明,\liger(1)在程序语义分类方面比基于语法的门控图神经网络和code2vec模型准确得多;(2)比动态模型\dypro平均少10倍的执行次数,覆盖的路径少74%.此外,我们扩展了\liger,从其主体的向量表示预测方法的名称。在相同的函数集(总共超过170K)上学习,\liger的性能明显优于code2seq,后者是之前最先进的方法名称预测方法。

英文摘要:

Learning neural program embeddings is key to utilizing deep neural networks in program languages research --- precise and efficient program representations enable the application of deep models to a wide range of program analysis tasks. Existing approaches predominately learn to embed programs from their source code, and, as a result, they do not capture deep, precise program semantics. On the other hand, models learned from runtime information critically depend on the quality of program executions, thus leading to trained models with highly variant quality. This paper tackles these inherent weaknesses of prior approaches by introducing a new deep neural network, \liger, which learns program representations from a mixture of symbolic and concrete execution traces. We have evaluated \liger on \coset, a recently proposed benchmark suite for evaluating neural program embeddings. Results show \liger (1) is significantly more accurate than the state-of-the-art syntax-based models Gated Graph Neural Network and code2vec in classifying program semantics, and (2) requires on average 10x fewer executions covering 74\% fewer paths than the state-of-the-art dynamic model \dypro. Furthermore, we extend \liger to predict the name for a method from its body's vector representation. Learning on the same set of functions (more than 170K in total), \liger significantly outperforms code2seq, the previous state-of-the-art for method name prediction.

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

↑