mlsanityData to 7 Oct 2026

TreeCaps: Tree-Based Capsule Networks for Source Code Processing

arXiv 2009.09777 ↗First posted 5 Sep 2020cs.SE cs.AI cs.PLcited by 16

Not on the map. Why?

Abstract (arXiv)

Recently program learning techniques have been proposed to process source code based on syntactical structures (e.g., Abstract Syntax Trees) and/or semantic information (e.g., Dependency Graphs). Although graphs may be better at capturing various viewpoints of code semantics than trees, constructing graph inputs from code needs static code semantic analysis that may not be accurate and introduces noise during learning. Although syntax trees are precisely defined according to the language grammar and easier to construct and process than graphs, previous tree-based learning techniques have not been able to learn semantic information from trees to achieve better accuracy than graph-based techniques. We propose a new learning technique, named TreeCaps, by fusing together capsule networks with tree-based convolutional neural networks, to achieve learning accuracy higher than existing graph-based techniques while it is based only on trees. TreeCaps introduces novel variable-to-static routing algorithms into the capsule networks to compensate for the loss of previous routing algorithms. Aside from accuracy, we also find that TreeCaps is the most robust to withstand those semantic-preserving program transformations that change code syntax without modifying the semantics. Evaluated on a large number of Java and C/C++ programs, TreeCaps models outperform prior deep learning models of program source code, in terms of both accuracy and robustness for program comprehension tasks such as code functionality classification and function name prediction

Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). First posted on arXiv 5 Sep 2020.

Builds on

No reference list yet.

Built on by

Cited by year

Citing papers per year: 2021: 1; 2022: 5; 2023: 5; 2024: 4; 2025: 1.

16 papers.

Sort:

By area:

  1. 2024HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scalecited by 61
  2. 2024AgileCoder: Dynamic Collaborative Agents for Software Development based on Agile Methodologycited by 45
  3. 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generationcited by 20
  4. 2022HierarchyNet: Learning to Summarize Source Code with Heterogeneous Representationscited by 9
  5. 2024CodeArt: Better Code Models by Attention Regularization When Symbols Are Lackingcited by 7
  6. 2022Multi-View Graph Representation for Programming Language Processing: An Investigation into Algorithm Detectioncited by 6
  7. 2022Learning Program Semantics with Code Representations: An Empirical Studycited by 6
  8. 2022Learning Program Representations with a Tree-Structured Transformercited by 6
  9. 2023TransformCode: A Contrastive Learning Framework for Code Embedding via Subtree Transformationcited by 4
  10. 2022Leveraging Artificial Intelligence on Binary Code Comprehensioncited by 3
  11. 2021Energy-bounded Learning for Robust Models of Codecited by 1
  12. 2023Implant Global and Local Hierarchy Information to Sequence based Code Representation Modelscited by 1
4 more
  1. 2023Heterogeneous Directed Hypergraph Neural Network over abstract syntax tree (AST) for Code Classificationcited by 1
  2. 2024ParseCaps: An Interpretable Parsing Capsule Network for Medical Image Diagnosiscited by 1
  3. 2025TreeGPT: Pure TreeFFN Encoder-Decoder Architecture for Structured Reasoning Without Attention Mechanismscited by 1
  4. 2023Test Case Recommendations with Distributed Representation of Code Syntactic Featurescited by 0