mlsanityData to 7 Oct 2026

TreeGen: A Tree-Based Transformer Architecture for Code Generation

arXiv 1911.09983 ↗First posted 22 Nov 2019cs.LG cs.SEcited by 58

Not on the map. Why?

Abstract (arXiv)

A code generation system generates programming language code based on an input natural language description. State-of-the-art approaches rely on neural networks for code generation. However, these code generators suffer from two problems. One is the long dependency problem, where a code element often depends on another far-away code element. A variable reference, for example, depends on its definition, which may appear quite a few lines before. The other problem is structure modeling, as programs contain rich structural information. In this paper, we propose a novel tree-based neural architecture, TreeGen, for code generation. TreeGen uses the attention mechanism of Transformers to alleviate the long-dependency problem, and introduces a novel AST reader (encoder) to incorporate grammar rules and AST structures into the network. We evaluated TreeGen on a Python benchmark, HearthStone, and two semantic parsing benchmarks, ATIS and GEO. TreeGen outperformed the previous state-of-the-art approach by 4.5 percentage points on HearthStone, and achieved the best accuracy among neural network-based approaches on ATIS (89.1%) and GEO (89.6%). We also conducted an ablation test to better understand each component of our model.

Key facts. Cited by 58 papers in the map (data through 7 Oct 2026). First posted on arXiv 22 Nov 2019.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 12; 2022: 12; 2023: 12; 2024: 6; 2025: 13; 2026: 3.

58 papers.

Sort:

By area:

  1. 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
  2. 2021A Syntax-Guided Edit Decoder for Neural Program Repaircited by 57
  3. 2025CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generationcited by 55
  4. 2023Large Language Model-Aware In-Context Learning for Code Generationcited by 42
  5. 2021TreeBERT: A Tree-Based Pre-Trained Model for Programming Languagecited by 40
  6. 2021CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoningcited by 39
  7. 2024Automatic Programming: Large Language Models and Beyondcited by 35
  8. 2022StructCoder: Structure-Aware Transformer for Code Generationcited by 33
  9. 2023Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Reviewcited by 32
  10. 2023Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Modelscited by 28
  11. 2022Transformers over Directed Acyclic Graphscited by 23
  12. 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
38 more
  1. 2024IRCoder: Intermediate Representations Make Language Models Robust Multilingual Code Generatorscited by 21
  2. 2023Hierarchical Programmatic Reinforcement Learning via Learning to Compose Programscited by 20
  3. 2024NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variationscited by 19
  4. 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunitiescited by 17
  5. 2022M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarizationcited by 14
  6. 2023KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repaircited by 13
  7. 2022CodeEditor: Learning to Edit Source Code with Pre-trained Modelscited by 12
  8. 2022Incorporating Domain Knowledge through Task Augmentation for Front-End JavaScript Code Generationcited by 11
  9. 2021Improving Tree-Structured Decoder Training for Code Generation via Mutual Learningcited by 10
  10. 2021Exploring Dynamic Selection of Branch Expansion Orders for Code Generationcited by 10
  11. 2022On the Effectiveness of Pretrained Models for API Learningcited by 9
  12. 2023Exploiting Code Symmetries for Learning Program Semanticscited by 9
  13. 2021Automatic Code Generation using Pre-Trained Language Modelscited by 8
  14. 2021Reading StackOverflow Encourages Cheating: Adding Question Text Improves Extractive Code Generationcited by 8
  15. 2021Generalized Equivariance and Preferential Labeling for GNN Node Classificationcited by 7
  16. 2022CodePAD: Sequence-based Code Generation with Pushdown Automatoncited by 7
  17. 2024CodeArt: Better Code Models by Attention Regularization When Symbols Are Lackingcited by 7
  18. 2025RANGER -- Repository-Level Agent for Graph-Enhanced Retrievalcited by 7
  19. 2021Embedding API Dependency Graph for Neural Code Generationcited by 5
  20. 2025Grammar-Based Code Representation: Is It a Worthy Pursuit for LLMs?cited by 5
  21. 2021Lyra: A Benchmark for Turducken-Style Code Generationcited by 4
  22. 2024Showing LLM-Generated Code Selectively Based on Confidence of LLMscited by 4
  23. 2025RefleXGen:The unexamined code is not worth usingcited by 4
  24. 2022A Survey on Artificial Intelligence for Source Code: A Dialogue Systems Perspectivecited by 3
  25. 2022Domain-Adaptive Text Classification with Structured Knowledge from Unlabeled Datacited by 3
  26. 2022Transformer with Tree-order Encoding for Neural Program Generationcited by 3
  27. 2023Neural Machine Translation for Code Generationcited by 3
  28. 2024Structured Code Representations Enable Data-Efficient Adaptation of Code Language Modelscited by 3
  29. 2021A Globally Normalized Neural Model for Semantic Parsingcited by 2
  30. 2022Can NMT Understand Me? Towards Perturbation-based Evaluation of NMT Models for Code Generationcited by 2
  31. 2023ASTormer: An AST Structure-aware Transformer Decoder for Text-to-SQLcited by 2
  32. 2025UniGenCoder: Merging Seq2Seq and Seq2Tree Paradigms for Unified Code Generationcited by 2
  33. 2025Speculative Decoding for Verilog: Speed and Quality, All in Onecited by 2
  34. 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Modelscited by 2
  35. 2025In-depth Research Impact Summarization through Fine-Grained Temporal Citation Analysiscited by 2
  36. 2023Transformer Models for Type Inference in the Simply Typed Lambda Calculus: A Case Study in Deep Learning for Codecited by 1
  37. 2025Seamlessly Integrating Tree-Based Positional Embeddings into Transformer Models for Source Code Representationcited by 1
  38. 2025TreeGPT: Pure TreeFFN Encoder-Decoder Architecture for Structured Reasoning Without Attention Mechanismscited by 1

50 most cited of 58 All 58 (JSON)