arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1904.11968cs.LGcs.PLcs.SEstat.ML
收藏

基于Siamese神经网络的Source Code语义向量表示学习

Learning Semantic Vector Representations of Source Code via a Siamese Neural Network

Iowa State University(爱荷华州立大学);Rensselaer Polytechnic Institute(伦斯勒理工学院);Massachusetts Institute of Technology(麻省理工学院);IBM

David Wehr, Halley Fede, Eleanor Pence, Bo Zhang, Guilherme Ferreira, John Walczyk, Joseph Hughes

摘要:

丰富的开源代码,加上深度学习在自然语言处理方面的最新进展,已经产生了机器学习在源代码中的有前途的新应用。在这项工作中,我们探索使用暹罗循环神经网络模型的Python源代码创建向量捕捉代码的语义。我们通过识别代码解决的编程竞赛问题来评估嵌入的质量。我们的模型显着优于一袋令牌嵌入,提供了有前途的结果,以改善代码嵌入,可用于未来的软件工程任务。

英文摘要:

The abundance of open-source code, coupled with the success of recent advances in deep learning for natural language processing, has given rise to a promising new application of machine learning to source code. In this work, we explore the use of a Siamese recurrent neural network model on Python source code to create vectors which capture the semantics of code. We evaluate the quality of embeddings by identifying which problem from a programming competition the code solves. Our model significantly outperforms a bag-of-tokens embedding, providing promising results for improving code embeddings that can be used in future software engineering tasks.

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

↑