StructCoder: Structure-Aware Transformer for Code Generation
Not on the map. Why?
Abstract (arXiv)
There has been a recent surge of interest in automating software engineering tasks using deep learning. This paper addresses the problem of code generation, where the goal is to generate target code given source code in a different language or a natural language description. Most state-of-the-art deep learning models for code generation use training strategies primarily designed for natural language. However, understanding and generating code requires a more rigorous comprehension of the code syntax and semantics. With this motivation, we develop an encoder-decoder Transformer model where both the encoder and decoder are explicitly trained to recognize the syntax and data flow in the source and target codes, respectively. We not only make the encoder structure-aware by leveraging the source code's syntax tree and data flow graph, but we also support the decoder in preserving the syntax and data flow of the target code by introducing two novel auxiliary tasks: AST (Abstract Syntax Tree) paths prediction and data flow prediction. To the best of our knowledge, this is the first work to introduce a structure-aware Transformer decoder that models both syntax and data flow to enhance the quality of generated code. The proposed StructCoder model achieves state-of-the-art performance on code translation and text-to-code generation tasks in the CodeXGLUE benchmark, and improves over baselines of similar size on the APPS code generation benchmark. Our code is publicly available at https://github.com/reddy-lab-code-research/StructCoder/.
Key facts. Cited by 33 papers in the map (data through 7 Oct 2026). Builds on 27 of its 37 references that are in the map. First posted on arXiv 10 Jun 2022.
Builds on
27 of 37 references.
References · 27
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
15 more
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2020Unsupervised Translation of Programming Languagescited by 262
- 2017Abstract Syntax Networks for Code Generation and Semantic Parsingcited by 92
- 2020Code Prediction by Feeding Trees to Transformerscited by 70
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2021Language-Agnostic Representation Learning of Source Code from Structure and Contextcited by 63
- 2021CoTexT: Multi-task Learning with Code-Text Transformercited by 61
- 2018Generative Code Modeling with Graphscited by 59
- 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
- 2017Code Completion with Neural Attention and Pointer Networkscited by 49
- 2021Improving Tree-Structured Decoder Training for Code Generation via Mutual Learningcited by 10
- 2021Exploring Dynamic Selection of Branch Expansion Orders for Code Generationcited by 10
Built on by
Citing papers per year: 2023: 12; 2024: 12; 2025: 7; 2026: 2.
33 papers.
Sort:
By area:
- 2023Execution-based Code Generation using Deep Reinforcement Learningcited by 95
- 2024AST-T5: Structure-Aware Pretraining for Code Generation and Understandingcited by 32
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 28
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Taskscited by 27
- 2024IRCoder: Intermediate Representations Make Language Models Robust Multilingual Code Generatorscited by 21
- 2025cAST: Enhancing Code Retrieval-Augmented Generation with Structural Chunking via Abstract Syntax Treecited by 17
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysiscited by 16
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Modelscited by 15
- 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoningcited by 14
- 2023Understanding Programs by Exploiting (Fuzzing) Test Casescited by 13
- 2023Program Translation via Code Distillationcited by 10
- 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completioncited by 10
21 more
- 2023Multilingual Code Co-Evolution Using Large Language Modelscited by 9
- 2023Code Representation Pre-training with Complements from Program Executionscited by 8
- 2023Exploring Data Augmentation for Code Generation Taskscited by 7
- 2024GALLa: Graph Aligned Large Language Models for Improved Source Code Understandingcited by 7
- 2023Automatic Unit Test Data Generation and Actor-Critic Reinforcement Learning for Code Synthesiscited by 4
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
- 2023Neural Machine Translation for Code Generationcited by 3
- 2024Structured Code Representations Enable Data-Efficient Adaptation of Code Language Modelscited by 3
- 2024Enhancing AI-based Generation of Software Exploits with Contextual Informationcited by 3
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluationcited by 3
- 2025SketchAgent: Generating Structured Diagrams from Hand-Drawn Sketchescited by 3
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generationcited by 3
- 2023A Comprehensive Review of State-of-The-Art Methods for Java Code Generation from Natural Language Textcited by 2
- 2023ASTormer: An AST Structure-aware Transformer Decoder for Text-to-SQLcited by 2
- 2024Learning Metadata-Agnostic Representations for Text-to-SQL In-Context Example Selectioncited by 2
- 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositoriescited by 2
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Codecited by 1
- 2023Untargeted Code Authorship Evasion with Seq2Seq Transformationcited by 0
- 2024CogNarr Ecosystem: Facilitating Group Cognition at Scalecited by 0
- 2024Towards Trustworthy Web Attack Detection: An Uncertainty-Aware Ensemble Deep Kernel Learning Modelcited by 0
- 2025Kodezi Chronos: A Debugging-First Language Model for Repository-Scale Code Understandingcited by 0
- 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositories8 Apr 2026
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation14 Jan 2026
- 2025SketchAgent: Generating Structured Diagrams from Hand-Drawn Sketches2 Aug 2025
- 2025Kodezi Chronos: A Debugging-First Language Model for Repository-Scale Code Understanding14 Jul 2025
- 2025cAST: Enhancing Code Retrieval-Augmented Generation with Structural Chunking via Abstract Syntax Tree18 Jun 2025
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Tasks22 May 2025
- 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoning19 Apr 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysis18 Dec 2024
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validation31 Oct 2024
- 2024Learning Metadata-Agnostic Representations for Text-to-SQL In-Context Example Selection17 Oct 2024
21 more
- 2024Towards Trustworthy Web Attack Detection: An Uncertainty-Aware Ensemble Deep Kernel Learning Model10 Oct 2024
- 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completion23 Sep 2024
- 2024GALLa: Graph Aligned Large Language Models for Improved Source Code Understanding6 Sep 2024
- 2024Enhancing AI-based Generation of Software Exploits with Contextual Information5 Aug 2024
- 2024CogNarr Ecosystem: Facilitating Group Cognition at Scale11 Jul 2024
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Models29 Jun 2024
- 2024IRCoder: Intermediate Representations Make Language Models Robust Multilingual Code Generators6 Mar 2024
- 2024Structured Code Representations Enable Data-Efficient Adaptation of Code Language Models19 Jan 2024
- 2024AST-T5: Structure-Aware Pretraining for Code Generation and Understanding5 Jan 2024
- 2023Untargeted Code Authorship Evasion with Seq2Seq Transformation26 Nov 2023
- 2023ASTormer: An AST Structure-aware Transformer Decoder for Text-to-SQL28 Oct 2023
- 2023Automatic Unit Test Data Generation and Actor-Critic Reinforcement Learning for Code Synthesis20 Oct 2023
- 2023Program Translation via Code Distillation17 Oct 2023
- 2023Code Representation Pre-training with Complements from Program Executions4 Sep 2023
- 2023Multilingual Code Co-Evolution Using Large Language Models27 Jul 2023
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Code5 Jul 2023
- 2023A Comprehensive Review of State-of-The-Art Methods for Java Code Generation from Natural Language Text10 Jun 2023
- 2023Understanding Programs by Exploiting (Fuzzing) Test Cases23 May 2023
- 2023Neural Machine Translation for Code Generation22 May 2023
- 2023Exploring Data Augmentation for Code Generation Tasks5 Feb 2023
- 2023Execution-based Code Generation using Deep Reinforcement Learning31 Jan 2023
- 2023Execution-based Code Generation using Deep Reinforcement Learningcited by 95
- 2024AST-T5: Structure-Aware Pretraining for Code Generation and Understandingcited by 32
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 28
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Taskscited by 27
- 2024IRCoder: Intermediate Representations Make Language Models Robust Multilingual Code Generatorscited by 21
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysiscited by 16
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Modelscited by 15
- 2023Understanding Programs by Exploiting (Fuzzing) Test Casescited by 13
- 2023Program Translation via Code Distillationcited by 10
- 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completioncited by 10
- 2023Multilingual Code Co-Evolution Using Large Language Modelscited by 9
- 2023Code Representation Pre-training with Complements from Program Executionscited by 8
12 most cited of 28 All 28 (JSON)
- 2025SketchAgent: Generating Structured Diagrams from Hand-Drawn Sketches2 Aug 2025
- 2025Kodezi Chronos: A Debugging-First Language Model for Repository-Scale Code Understanding14 Jul 2025
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Tasks22 May 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysis18 Dec 2024
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validation31 Oct 2024
- 2024Learning Metadata-Agnostic Representations for Text-to-SQL In-Context Example Selection17 Oct 2024
- 2024Towards Trustworthy Web Attack Detection: An Uncertainty-Aware Ensemble Deep Kernel Learning Model10 Oct 2024
- 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completion23 Sep 2024
- 2024Enhancing AI-based Generation of Software Exploits with Contextual Information5 Aug 2024
- 2024CogNarr Ecosystem: Facilitating Group Cognition at Scale11 Jul 2024
12 newest of 28 All 28 (JSON)