Multi-View Graph Representation for Programming Language Processing: An Investigation into Algorithm Detection

Ting Long, Yutong Xie, Xianyu Chen, Weinan Zhang, Qinxiang Cao +1 more
2/25/2022
cs.LGcs.PLcs.SE
gnn

Official code: githubg0/mvg (13 stars, Python, last commit 2023-06-05).

Abstract

Program representation, which aims at converting program source code into vectors with automatically extracted features, is a fundamental problem in programming language processing (PLP). Recent work tries to represent programs with neural networks based on source code structures.

Show full abstract

However, such methods often focus on the syntax and consider only one single perspective of programs, limiting the representation power of models. This paper proposes a multi-view graph (MVG) program representation method. MVG pays more attention to code semantics and simultaneously includes both data flow and control flow as multiple views. These views are then combined and processed by a graph neural network (GNN) to obtain a comprehensive program representation that covers various aspects. We thoroughly evaluate our proposed MVG approach in the context of algorithm detection, an important and challenging subfield of PLP. Specifically, we use a public dataset POJ-104 and also construct a new challenging dataset ALG-109 to test our method. In experiments, MVG outperforms previous methods significantly, demonstrating our model's strong capability of representing source code.

View on arXivView PDF

Code Implementations(1)

githubg0/mvgOfficial100%
131Python, C++Feb 24, 20223 years ago

Similar Papers

Cite this paper

@article{long2022multiview,
  title  = {Multi-View Graph Representation for Programming Language Processing: An Investigation into Algorithm Detection},
  author = {Ting Long and Yutong Xie and Xianyu Chen and Weinan Zhang and Qinxiang Cao and Yong Yu},
  year   = {2022},
  eprint = {2202.12481},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2202.12481}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2202.12481.svg)](https://codeofpaper.com/paper/2202.12481)

Discussion