Embedding API Dependency Graph for Neural Code Generation
Not on the map. Why?
Abstract (arXiv)
The problem of code generation from textual program descriptions has long been viewed as a grand challenge in software engineering. In recent years, many deep learning based approaches have been proposed, which can generate a sequence of code from a sequence of textual program description. However, the existing approaches ignore the global relationships among API methods, which are important for understanding the usage of APIs. In this paper, we propose to model the dependencies among API methods as an API dependency graph (ADG) and incorporate the graph embedding into a sequence-to-sequence (Seq2Seq) model. In addition to the existing encoder-decoder structure, a new module named ``embedder" is introduced. In this way, the decoder can utilize both global structural dependencies and textual program description to predict the target code. We conduct extensive code generation experiments on three public datasets and in two programming languages (Python and Java). Our proposed approach, called ADG-Seq2Seq, yields significant improvements over existing state-of-the-art methods and maintains its performance as the length of the target code increases. Extensive ablation tests show that the proposed ADG embedding is effective and outperforms the baselines.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 34 of its 64 references that are in the map. First posted on arXiv 29 Mar 2021.
Builds on
34 of 64 references.
References · 34
- 2017Attention Is All You Needcited by 60,361
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,361
- 2017Inductive Representation Learning on Large Graphscited by 6,320
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
- 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,057
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,986
- 2014CIDEr: Consensus-based Image Description Evaluationcited by 2,046
- 2016node2vec: Scalable Feature Learning for Networkscited by 1,918
- 2014DeepWalk: Online Learning of Social Representationscited by 1,547
- 2015Show, Attend and Tell: Neural Image Caption Generation with Visual Attentioncited by 1,423
- 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,026
22 more
- 2015Gated Graph Sequence Neural Networkscited by 796
- 2017Convolutional Sequence to Sequence Learningcited by 552
- 2014Recurrent Models of Visual Attentioncited by 349
- 2017Learning to Represent Programs with Graphscited by 220
- 2019Graph Matching Networks for Learning the Similarity of Graph Structured Objectscited by 205
- 2016Language to Logical Form with Neural Attentioncited by 158
- 2015Multi-task Sequence to Sequence Learningcited by 94
- 2017Abstract Syntax Networks for Code Generation and Semantic Parsingcited by 92
- 2016Latent Predictor Networks for Code Generationcited by 73
- 2020Detecting Code Clones with Graph Neural Networkand Flow-Augmented Abstract Syntax Treecited by 69
- 2019Code Generation as a Dual Task of Code Summarizationcited by 62
- 2018Generative Code Modeling with Graphscited by 60
- 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
- 2018Retrieval-Based Neural Code Generationcited by 41
- 2019Multi-Modal Attention Network Learning for Semantic Source Code Retrievalcited by 41
- 2016Character-based Neural Machine Translationcited by 33
- 2018A Grammar-Based Structural CNN Decoder for Code Generationcited by 29
- 2017Dynamic Neural Program Embedding for Program Repaircited by 23
- 2015Grid Long Short-Term Memorycited by 20
- 2019Automatic Generation of Pull Request Descriptionscited by 13
- 2018Convolutional Neural Networks over Control Flow Graphs for Software Defect Predictioncited by 8
- 2015On End-to-End Program Generation from User Intention by Deep Neural Networkscited by 6
Built on by
Citing papers per year: 2022: 1; 2023: 2; 2024: 1; 2025: 1.
5 papers.
- 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
- 2024Iterative Refinement of Project-Level Code Context for Precise Code Generation with Compiler Feedbackcited by 46
- 2023RepoFusion: Training Code Models to Understand Your Repositorycited by 40
- 2023Better Context Makes Better Code Language Models: A Case Study on Function Call Argument Completioncited by 14
- 2025Towards an Understanding of Context Utilization in Code Intelligencecited by 10
- 2025Towards an Understanding of Context Utilization in Code Intelligence11 Apr 2025
- 2024Iterative Refinement of Project-Level Code Context for Precise Code Generation with Compiler Feedback25 Mar 2024
- 2023RepoFusion: Training Code Models to Understand Your Repository19 Jun 2023
- 2023Better Context Makes Better Code Language Models: A Case Study on Function Call Argument Completion1 Jun 2023
- 2022Repository-Level Prompt Generation for Large Language Models of Code26 Jun 2022