mlsanityData to 14 Oct 2026

Embedding API Dependency Graph for Neural Code Generation

arXiv 2103.15361 ↗First posted 29 Mar 2021cs.SE cs.AIcited by 5

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  3. 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,361
  4. 2017Inductive Representation Learning on Large Graphscited by 6,320
  5. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
  6. 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,057
  7. 2014Sequence to Sequence Learning with Neural Networkscited by 2,986
  8. 2014CIDEr: Consensus-based Image Description Evaluationcited by 2,046
  9. 2016node2vec: Scalable Feature Learning for Networkscited by 1,918
  10. 2014DeepWalk: Online Learning of Social Representationscited by 1,547
  11. 2015Show, Attend and Tell: Neural Image Caption Generation with Visual Attentioncited by 1,423
  12. 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,026
22 more
  1. 2015Gated Graph Sequence Neural Networkscited by 796
  2. 2017Convolutional Sequence to Sequence Learningcited by 552
  3. 2014Recurrent Models of Visual Attentioncited by 349
  4. 2017Learning to Represent Programs with Graphscited by 220
  5. 2019Graph Matching Networks for Learning the Similarity of Graph Structured Objectscited by 205
  6. 2016Language to Logical Form with Neural Attentioncited by 158
  7. 2015Multi-task Sequence to Sequence Learningcited by 94
  8. 2017Abstract Syntax Networks for Code Generation and Semantic Parsingcited by 92
  9. 2016Latent Predictor Networks for Code Generationcited by 73
  10. 2020Detecting Code Clones with Graph Neural Networkand Flow-Augmented Abstract Syntax Treecited by 69
  11. 2019Code Generation as a Dual Task of Code Summarizationcited by 62
  12. 2018Generative Code Modeling with Graphscited by 60
  13. 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
  14. 2018Retrieval-Based Neural Code Generationcited by 41
  15. 2019Multi-Modal Attention Network Learning for Semantic Source Code Retrievalcited by 41
  16. 2016Character-based Neural Machine Translationcited by 33
  17. 2018A Grammar-Based Structural CNN Decoder for Code Generationcited by 29
  18. 2017Dynamic Neural Program Embedding for Program Repaircited by 23
  19. 2015Grid Long Short-Term Memorycited by 20
  20. 2019Automatic Generation of Pull Request Descriptionscited by 13
  21. 2018Convolutional Neural Networks over Control Flow Graphs for Software Defect Predictioncited by 8
  22. 2015On End-to-End Program Generation from User Intention by Deep Neural Networkscited by 6

Built on by

Cited by year

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

5 papers.