arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1903.03804cs.AI
收藏

基于门控图注意力神经网络的在线编程服务程序分类

Program Classification Using Gated Graph Attention Neural Network for Online Programming Service

Central South University(中南大学);Tianjin University(天津大学)

Mingming Lu, Dingwu Tan, Naixue Xiong, Zailiang Chen, Haifeng Li

摘要:

在线编程服务,如Github,TopCoder和EduCoder,促进了服务用户之间的大量社交互动。然而,现有的社会互动是相当有限的,效率低下,由于快速增长的源代码库,这是很难探索手动。源代码挖掘的出现为分析源代码提供了一种很有前途的方法,使得这些源代码可以相对容易地被理解并在服务用户之间共享。在所有的源代码挖掘尝试中,程序分类为与源代码理解相关的各种任务奠定了基础,因为如果机器不能正确地对程序进行分类,则它不可能理解计算机程序。虽然已经提出了许多机器学习模型,例如基于自然语言处理(NLP)的模型和基于抽象树(AST)的模型,以基于其对应的源代码对计算机程序进行分类,但是现有的工作不能从语法和语义信息的角度来完全表征源代码。为了解决这个问题,我们提出了一种基于图神经网络(GNN)的模型,该模型将数据流和函数调用信息集成到AST中,并将改进的GNN模型应用于集成图,以达到最先进的程序分类准确性。实验结果表明,本文提出的方法可以达到97%以上的分类准确率。

英文摘要:

The online programing services, such as Github,TopCoder, and EduCoder, have promoted a lot of social interactions among the service users. However, the existing social interactions is rather limited and inefficient due to the rapid increasing of source-code repositories, which is difficult to explore manually. The emergence of source-code mining provides a promising way to analyze those source codes, so that those source codes can be relatively easy to understand and share among those service users. Among all the source-code mining attempts,program classification lays a foundation for various tasks related to source-code understanding, because it is impossible for a machine to understand a computer program if it cannot classify the program correctly. Although numerous machine learning models, such as the Natural Language Processing (NLP) based models and the Abstract Syntax Tree (AST) based models, have been proposed to classify computer programs based on their corresponding source codes, the existing works cannot fully characterize the source codes from the perspective of both the syntax and semantic information. To address this problem, we proposed a Graph Neural Network (GNN) based model, which integrates data flow and function call information to the AST,and applies an improved GNN model to the integrated graph, so as to achieve the state-of-art program classification accuracy. The experiment results have shown that the proposed work can classify programs with accuracy over 97%.

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

↑