Learning Program Semantics with Code Representations: An Empirical Study
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
- 2017Attention Is All You Needcited by 60,361
- 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,361
- 2017Graph Attention Networkscited by 8,923
- 2016XGBoost: A Scalable Tree Boosting Systemcited by 5,166
- 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,057
- 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,474
- 2016Convolutional Neural Networks on Graphs with Fast Localized Spectral Filteringcited by 2,089
- 2015Teaching Machines to Read and Comprehendcited by 1,049
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2015Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networkscited by 306
- 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 272
- 2020Unsupervised Translation of Programming Languagescited by 263
19 more
- 2018code2vec: Learning Distributed Representations of Codecited by 250
- 2019Deep Graph Library: A Graph-Centric, Highly-Performant Package for Graph Neural Networkscited by 242
- 2017Learning to Represent Programs with Graphscited by 220
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 179
- 2020A Transformer-based Approach for Source Code Summarizationcited by 133
- 2018Automated Vulnerability Detection in Source Code Using Deep Representation Learningcited by 114
- 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNNcited by 89
- 2020Improved Code Summarization via a Graph Neural Networkcited by 79
- 2020Detecting Code Clones with Graph Neural Networkand Flow-Augmented Abstract Syntax Treecited by 69
- 2018Structured Neural Summarizationcited by 54
- 2020Typilus: Neural Type Hintscited by 29
- 2019Automatic Source Code Summarization with Extended Tree-LSTMcited by 28
- 2019ATOM: Commit Message Generation Based on Abstract Syntax Tree and Hybrid Rankingcited by 25
- 2021SPI: Automated Identification of Security Patches via Commitscited by 19
- 2020TreeCaps: Tree-Based Capsule Networks for Source Code Processingcited by 16
- 2021GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Searchcited by 15
- 2019CORE: Automating Review Recommendation for Code Changescited by 14
- 2019LEOPARD: Identifying Vulnerable Code for Vulnerability Assessment through Program Metricscited by 10
- 2018Towards Automating Precision Studies of Clone Detectorscited by 1
Built on by
Citing papers per year: 2023: 3; 2024: 2; 2025: 1.
6 papers.
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5
- 2024A Survey of Source Code Representations for Machine Learning-Based Cybersecurity Taskscited by 5
- 2023xASTNN: Improved Code Representations for Industrial Practicecited by 2
- 2023Redundancy and Concept Analysis for Code-trained Language Modelscited by 1
- 2024Beyond Fidelity: Explaining Vulnerability Localization of Learning-based Detectorscited by 0
- 2025MAGNET: A Multi-Graph Attentional Network for Code Clone Detectioncited by 0
- 2025MAGNET: A Multi-Graph Attentional Network for Code Clone Detection28 Oct 2025
- 2024A Survey of Source Code Representations for Machine Learning-Based Cybersecurity Tasks15 Mar 2024
- 2024Beyond Fidelity: Explaining Vulnerability Localization of Learning-based Detectors5 Jan 2024
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?1 Dec 2023
- 2023Redundancy and Concept Analysis for Code-trained Language Models1 May 2023
- 2023xASTNN: Improved Code Representations for Industrial Practice13 Mar 2023