mlsanityData to 7 Oct 2026

Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?

arXiv 2312.00413 ↗First posted 1 Dec 2023cs.SE cs.AI cs.CLcited by 5

Not on the map. Why?

Abstract (arXiv)

Programming language understanding and representation (a.k.a code representation learning) has always been a hot and challenging task in software engineering. It aims to apply deep learning techniques to produce numerical representations of the source code features while preserving its semantics. These representations can be used for facilitating subsequent code-related tasks. The abstract syntax tree (AST), a fundamental code feature, illustrates the syntactic information of the source code and has been widely used in code representation learning. However, there is still a lack of systematic and quantitative evaluation of how well AST-based code representation facilitates subsequent code-related tasks. In this paper, we first conduct a comprehensive empirical study to explore the effectiveness of the AST-based code representation in facilitating follow-up code-related tasks. To do so, we compare the performance of models trained with code token sequence (Token for short) based code representation and AST-based code representation on three popular types of code-related tasks. Surprisingly, the overall quantitative statistical results demonstrate that models trained with AST-based code representation consistently perform worse across all three tasks compared to models trained with Token-based code representation. Our further quantitative analysis reveals that models trained with AST-based code representation outperform models trained with Token-based code representation in certain subsets of samples across all three tasks. We also conduct comprehensive experiments to evaluate and reveal the impact of the choice of AST parsing/preprocessing/encoding methods on AST-based code representation and subsequent code-related tasks. Our study provides future researchers with detailed guidance on how to select solutions at each stage to fully exploit AST.

Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 45 of its 102 references that are in the map. First posted on arXiv 1 Dec 2023.

Builds on

45 of 102 references.

References · 45

  1. 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,282
  2. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  3. 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,016
  4. 2015Microsoft COCO Captions: Data Collection and Evaluation Servercited by 1,447
  5. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  6. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  7. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  8. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  9. 2015Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networkscited by 305
  10. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
  11. 2018code2vec: Learning Distributed Representations of Codecited by 249
  12. 2017Learning to Represent Programs with Graphscited by 219
33 more
  1. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
  2. 2020A Transformer-based Approach for Source Code Summarizationcited by 129
  3. 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 99
  4. 2018Tree-to-tree Neural Networks for Program Translationcited by 93
  5. 2020Improved Code Summarization via a Graph Neural Networkcited by 79
  6. 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 76
  7. 2021On the Evaluation of Neural Code Summarizationcited by 47
  8. 2019Multi-Modal Attention Network Learning for Semantic Source Code Retrievalcited by 40
  9. 2021TreeBERT: A Tree-Based Pre-Trained Model for Programming Languagecited by 40
  10. 2019Retrieve and Refine: Exemplar-based Neural Comment Generationcited by 36
  11. 2021CAST: Enhancing Code Summarization with Hierarchical Splitting and Reconstruction of Abstract Syntax Treescited by 31
  12. 2020Code Summarization with Structure-induced Transformercited by 29
  13. 2018A General Path-Based Representation for Predicting Program Propertiescited by 28
  14. 2019Automatic Source Code Summarization with Extended Tree-LSTMcited by 28
  15. 2021Project-Level Encoding for Neural Source Code Summarization of Subroutinescited by 24
  16. 2021CoCoSum: Contextual Code Summarization with Multi-Relational Graph Neural Networkcited by 22
  17. 2020A Multi-Perspective Architecture for Semantic Code Searchcited by 20
  18. 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splittingcited by 19
  19. 2021A Multi-Modal Transformer-based Code Summarization Approach for Smart Contractscited by 16
  20. 2021GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Searchcited by 15
  21. 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
  22. 2022Source Code Summarization with Structural Relative Position Guided Transformercited by 14
  23. 2022M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarizationcited by 14
  24. 2020CRaDLe: Deep Code Retrieval Based on Semantic Dependency Learningcited by 12
  25. 2021Multimodal Representation for Neural Code Searchcited by 11
  26. 2022Code Search based on Context-aware Code Translationcited by 11
  27. 2021API2Com: On the Improvement of Automatically Generated Code Comments Using API Documentationscited by 10
  28. 2020Authorship Attribution of Source Code: A Language-Agnostic Approach and Applicability in Software Engineeringcited by 9
  29. 2022Learning Program Semantics with Code Representations: An Empirical Studycited by 6
  30. 2022Learning Program Representations with a Tree-Structured Transformercited by 6
  31. 2022CSRS: Code Search with Relevance Matching and Semantic Matchingcited by 4
  32. 2022Unified Abstract Syntax Tree Representation Learning for Cross-Language Program Classificationcited by 2
  33. 2022Evaluating the Impact of Source Code Parsers on ML4SE Modelscited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 2; 2026: 3.

5 papers.