mlsanityData to 14 Oct 2026

Learning Program Semantics with Code Representations: An Empirical Study

arXiv 2203.11790 ↗First posted 22 Mar 2022cs.SE cs.LG cs.PLcited by 6

Not on the map. Why?

Abstract (arXiv)

Program semantics learning is the core and fundamental for various code intelligent tasks e.g., vulnerability detection, clone detection. A considerable amount of existing works propose diverse approaches to learn the program semantics for different tasks and these works have achieved state-of-the-art performance. However, currently, a comprehensive and systematic study on evaluating different program representation techniques across diverse tasks is still missed. From this starting point, in this paper, we conduct an empirical study to evaluate different program representation techniques. Specifically, we categorize current mainstream code representation techniques into four categories i.e., Feature-based, Sequence-based, Tree-based, and Graph-based program representation technique and evaluate its performance on three diverse and popular code intelligent tasks i.e., {Code Classification}, Vulnerability Detection, and Clone Detection on the public released benchmark. We further design three {research questions (RQs)} and conduct a comprehensive analysis to investigate the performance. By the extensive experimental results, we conclude that (1) The graph-based representation is superior to the other selected techniques across these tasks. (2) Compared with the node type information used in tree-based and graph-based representations, the node textual information is more critical to learning the program semantics. (3) Different tasks require the task-specific semantics to achieve their highest performance, however combining various program semantics from different dimensions such as control dependency, data dependency can still produce promising results.

Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 31 of its 71 references that are in the map. First posted on arXiv 22 Mar 2022.

Builds on

31 of 71 references.

References · 31

  1. 2017Attention Is All You Needcited by 60,361
  2. 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,361
  3. 2017Graph Attention Networkscited by 8,923
  4. 2016XGBoost: A Scalable Tree Boosting Systemcited by 5,166
  5. 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,057
  6. 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,474
  7. 2016Convolutional Neural Networks on Graphs with Fast Localized Spectral Filteringcited by 2,089
  8. 2015Teaching Machines to Read and Comprehendcited by 1,049
  9. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  10. 2015Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networkscited by 306
  11. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 272
  12. 2020Unsupervised Translation of Programming Languagescited by 263
19 more
  1. 2018code2vec: Learning Distributed Representations of Codecited by 250
  2. 2019Deep Graph Library: A Graph-Centric, Highly-Performant Package for Graph Neural Networkscited by 242
  3. 2017Learning to Represent Programs with Graphscited by 220
  4. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 179
  5. 2020A Transformer-based Approach for Source Code Summarizationcited by 133
  6. 2018Automated Vulnerability Detection in Source Code Using Deep Representation Learningcited by 114
  7. 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNNcited by 89
  8. 2020Improved Code Summarization via a Graph Neural Networkcited by 79
  9. 2020Detecting Code Clones with Graph Neural Networkand Flow-Augmented Abstract Syntax Treecited by 69
  10. 2018Structured Neural Summarizationcited by 54
  11. 2020Typilus: Neural Type Hintscited by 29
  12. 2019Automatic Source Code Summarization with Extended Tree-LSTMcited by 28
  13. 2019ATOM: Commit Message Generation Based on Abstract Syntax Tree and Hybrid Rankingcited by 25
  14. 2021SPI: Automated Identification of Security Patches via Commitscited by 19
  15. 2020TreeCaps: Tree-Based Capsule Networks for Source Code Processingcited by 16
  16. 2021GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Searchcited by 15
  17. 2019CORE: Automating Review Recommendation for Code Changescited by 14
  18. 2019LEOPARD: Identifying Vulnerable Code for Vulnerability Assessment through Program Metricscited by 10
  19. 2018Towards Automating Precision Studies of Clone Detectorscited by 1

Built on by

Cited by year

Citing papers per year: 2023: 3; 2024: 2; 2025: 1.

6 papers.