mlsanityData to 14 Oct 2026

Transformer with Tree-order Encoding for Neural Program Generation

arXiv 2206.13354 ↗First posted 30 May 2022cs.CL cs.AIcited by 3

Not on the map. Why?

Abstract (arXiv)

While a considerable amount of semantic parsing approaches have employed RNN architectures for code generation tasks, there have been only few attempts to investigate the applicability of Transformers for this task. Including hierarchical information of the underlying programming language syntax has proven to be effective for code generation. Since the positional encoding of the Transformer can only represent positions in a flat sequence, we have extended the encoding scheme to allow the attention mechanism to also attend over hierarchical positions in the input. Furthermore, we have realized a decoder based on a restrictive grammar graph model to improve the generation accuracy and ensure the well-formedness of the generated code. While we did not surpass the state of the art, our findings suggest that employing a tree-based positional encoding in combination with a shared natural-language subword vocabulary improves generation performance over sequential positional encodings.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 20 of its 30 references that are in the map. First posted on arXiv 30 May 2022.

Builds on

20 of 30 references.

References · 20

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,989
  3. 2018Self-Attention with Relative Position Representationscited by 1,120
  4. 2018Subword Regularization: Improving Neural Network Translation Models with Multiple Subword Candidatescited by 639
  5. 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
  6. 2016Language to Logical Form with Neural Attentioncited by 158
  7. 2016Data Recombination for Neural Semantic Parsingcited by 111
  8. 2018Tree-to-tree Neural Networks for Program Translationcited by 93
  9. 2017Abstract Syntax Networks for Code Generation and Semantic Parsingcited by 92
  10. 2018TRANX: A Transition-based Neural Abstract Syntax Parser for Semantic Parsing and Code Generationcited by 88
  11. 2016Latent Predictor Networks for Code Generationcited by 73
  12. 2019Tree Transformer: Integrating Tree Structures into Self-Attentioncited by 68
8 more
  1. 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
  2. 2018Retrieval-Based Neural Code Generationcited by 41
  3. 2020Incorporating External Knowledge through Pre-training for Natural Language to Code Generationcited by 36
  4. 2020Tree-structured Attention with Hierarchical Accumulationcited by 30
  5. 2018A Grammar-Based Structural CNN Decoder for Code Generationcited by 29
  6. 2018Learning to Map Context-Dependent Sentences to Executable Formal Queriescited by 23
  7. 2019Tree-Transformer: A Transformer-Based Method for Correction of Tree-Structured Datacited by 20
  8. 2019Learning Programmatic Idioms for Scalable Semantic Parsingcited by 17

Built on by

Cited by year (2026 to 14 Oct)

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

3 papers.