mlsanityData to 14 Oct 2026

Learning Program Representations with a Tree-Structured Transformer

arXiv 2208.08643 ↗First posted 18 Aug 2022cs.SE cs.LGcited by 6

Not on the map. Why?

Abstract (arXiv)

Learning vector representations for programs is a critical step in applying deep learning techniques for program understanding tasks. Various neural network models are proposed to learn from tree-structured program representations, e.g., abstract syntax tree (AST) and concrete syntax tree (CST). However, most neural architectures either fail to capture long-range dependencies which are ubiquitous in programs, or cannot learn effective representations for syntax tree nodes, making them incapable of performing the node-level prediction tasks, e.g., bug localization. In this paper, we propose Tree-Transformer, a novel recursive tree-structured neural network to learn the vector representations for source codes. We propose a multi-head attention mechanism to model the dependency between siblings and parent-children node pairs. Moreover, we propose a bi-directional propagation strategy to allow node information passing in two directions, bottom-up and top-down along trees. In this way, Tree-Transformer can learn the information of the node features as well as the global contextual information. The extensive experimental results show that our Tree-Transformer significantly outperforms the existing tree-based and graph-based program representation learning approaches in both the tree-level and node-level prediction tasks.

Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 35 of its 51 references that are in the map. First posted on arXiv 18 Aug 2022.

Builds on

35 of 51 references.

References · 35

  1. 2017Attention Is All You Needcited by 60,361
  2. 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,361
  3. 2018How Powerful are Graph Neural Networks?cited by 4,393
  4. 2017Neural Message Passing for Quantum Chemistrycited by 3,487
  5. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  6. 2015Gated Graph Sequence Neural Networkscited by 796
  7. 2017Dynamic Routing Between Capsulescited by 689
  8. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  9. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
  10. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
  11. 2015Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networkscited by 306
  12. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 272
23 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. 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 200
  5. 2020Rethinking Positional Encoding in Language Pre-trainingcited by 197
  6. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 179
  7. 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 100
  8. 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNNcited by 89
  9. 2020Detecting Code Clones with Graph Neural Networkand Flow-Augmented Abstract Syntax Treecited by 69
  10. 2021Language-Agnostic Representation Learning of Source Code from Structure and Contextcited by 63
  11. 2018Structured Neural Summarizationcited by 54
  12. 2019Multi-Modal Attention Network Learning for Semantic Source Code Retrievalcited by 41
  13. 2021TreeBERT: A Tree-Based Pre-Trained Model for Programming Languagecited by 41
  14. 2019Neural Program Repair by Jointly Learning to Localize and Repaircited by 40
  15. 2020Exploring Software Naturalness through Neural Language Modelscited by 32
  16. 2020Typilus: Neural Type Hintscited by 29
  17. 2020Improving BERT with Syntax-aware Local Attentioncited by 26
  18. 2020TreeCaps: Tree-Based Capsule Networks for Source Code Processingcited by 16
  19. 2021Learning Structural Edits via Incremental Tree Transformationscited by 16
  20. 2021GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Searchcited by 15
  21. 2020Learning to Represent Programs with Heterogeneous Graphscited by 14
  22. 2021GraphCode2Vec: Generic Code Embedding via Lexical and Program Dependence Analysescited by 11
  23. 2021Modular Tree Network for Source Code Representation Learningcited by 8

Built on by

Cited by year (2026 to 14 Oct)

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

6 papers.