code2seq: Generating Sequences from Structured Representations of Code
Not on the map. Why?
Abstract (arXiv)
The ability to generate natural language sequences from source code snippets has a variety of applications such as code summarization, documentation, and retrieval. Sequence-to-sequence (seq2seq) models, adopted from neural machine translation (NMT), have achieved state-of-the-art performance on these tasks by treating source code as a sequence of tokens. We present rm scriptsize CODE2SEQ: an alternative approach that leverages the syntactic structure of programming languages to better encode source code. Our model represents a code snippet as the set of compositional paths in its abstract syntax tree (AST) and uses attention to select the relevant paths while decoding. We demonstrate the effectiveness of our approach for two tasks, two programming languages, and four datasets of up to 16M examples. Our model significantly outperforms previous models that were specifically designed for programming languages, as well as state-of-the-art NMT models. An interactive online demo of our model is available at http://code2seq.org. Our code, data and trained models are available at http://github.com/tech-srl/code2seq.
Key facts. Cited by 179 papers in the map (data through 14 Oct 2026). First posted on arXiv 4 Aug 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2020: 1; 2021: 54; 2022: 38; 2023: 38; 2024: 21; 2025: 22; 2026: 5.
179 papers.
Sort:
By area:
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2021Unified Pre-training for Program Understanding and Generationcited by 366
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
- 2021TURINGBENCH: A Benchmark Environment for Turing Test in the Age of Neural Text Generationcited by 120
- 2023CodeBERTScore: Evaluating Code Generation with Pretrained Models of Codecited by 102
- 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNNcited by 89
- 2021CURE: Code-Aware Neural Machine Translation for Automatic Program Repaircited by 86
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2021Language-Agnostic Representation Learning of Source Code from Structure and Contextcited by 63
- 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
38 more
- 2023Stealthy Backdoor Attack for Code Modelscited by 49
- 2021On the Evaluation of Neural Code Summarizationcited by 48
- 2021Multilingual training for Software Engineeringcited by 43
- 2021TreeBERT: A Tree-Based Pre-Trained Model for Programming Languagecited by 41
- 2022Code Generation Tools (Almost) for Free? A Study of Few-Shot, Pre-Trained Language Models on Codecited by 39
- 2024Securing Large Language Models: Threats, Vulnerabilities and Responsible Practicescited by 37
- 2021Neural Transfer Learning for Repairing Security Vulnerabilities in C Codecited by 36
- 2021What do pre-trained code models know about code?cited by 36
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
- 2023Distilled GPT for Source Code Summarizationcited by 31
- 2021Code Completion by Modeling Flattened Abstract Syntax Trees as Graphscited by 30
- 2021Code Structure Guided Transformer for Source Code Summarizationcited by 30
- 2021CodeQA: A Question Answering Dataset for Source Code Comprehensioncited by 30
- 2021How could Neural Networks understand Programs?cited by 26
- 2021Project-Level Encoding for Neural Source Code Summarization of Subroutinescited by 24
- 2021A Survey on Machine Learning Techniques for Source Code Analysiscited by 24
- 2024CodeIP: A Grammar-Guided Multi-Bit Watermark for Large Language Models of Codecited by 24
- 2022Transformers over Directed Acyclic Graphscited by 23
- 2021Generating Adversarial Computer Programs using Optimized Obfuscationscited by 22
- 2021Understanding Neural Code Intelligence Through Program Simplificationcited by 22
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2021On the Evaluation of Commit Message Generation Models: An Experimental Studycited by 20
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splittingcited by 19
- 2021Memorization and Generalization in Neural Code Intelligence Modelscited by 19
- 2023Backdooring Neural Code Searchcited by 19
- 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 18
- 2025cAST: Enhancing Code Retrieval-Augmented Generation with Structural Chunking via Abstract Syntax Treecited by 17
- 2021Shellcode_IA32: A Dataset for Automatic Shellcode Generationcited by 16
- 2024Stable Code Technical Reportcited by 16
- 2021GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Searchcited by 15
- 2023CADTalk: An Algorithm and Benchmark for Semantic Commenting of CAD Programscited by 15
- 2021Long-Range Modeling of Source Code Files with eWASH: Extended Window Access by Syntax Hierarchycited by 14
- 2022Source Code Summarization with Structural Relative Position Guided Transformercited by 14
- 2022M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarizationcited by 14
- 2023A systematic literature review on source code similarity measurement and clone detection: techniques, applications, and challengescited by 14
- 2022Cross-Language Binary-Source Code Matching with Intermediate Representationscited by 13
- 2022A Survey on Pretrained Language Models for Neural Code Intelligencecited by 13
- 2022An Exploratory Study on Code Attention in BERTcited by 12
50 most cited of 179 All 179 (JSON)
- 2026Externalizing Requirement-to-Repair Artifacts as Observable Traces for LLM-Based Program Repair14 Sep 2026
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Study3 Sep 2026
- 2026Bounded Path Context: A Controlled Study of Visible Path History in LLM-Based Knowledge Graph Question Answering26 May 2026
- 2026Specification-Based Code-Text-Code Reengineering for LLM-Mediated Software Evolution24 May 2026
- 2026EyeLayer: Integrating Human Attention Patterns into LLM-Based Code Summarization25 Feb 2026
- 2025From Illusion to Insight: Change-Aware File-Level Software Defect Prediction Using Agentic AI29 Dec 2025
- 2025Bridging Code Graphs and Large Language Models for Better Code Understanding8 Dec 2025
- 2025Auto-SPT: Automating Semantic Preserving Transformations for Code5 Dec 2025
- 2025HGAdapter: Hypergraph-based Adapters in Language Models for Code Summarization and Clone Detection20 Oct 2025
- 2025Leveraging Code Cohesion Analysis to Identify Source Code Supply Chain Attacks16 Oct 2025
- 2025BinCtx: Multi-Modal Representation Learning for Robust Android App Behavior Detection16 Oct 2025
- 2025Signature in Code Backdoor Detection, how far are we?15 Oct 2025
38 more
- 2025RANGER -- Repository-Level Agent for Graph-Enhanced Retrieval27 Sep 2025
- 2025Functional Consistency of LLM Code Embeddings: A Self-Evolving Data Synthesis Framework for Benchmarking27 Aug 2025
- 2025TreeDiff: AST-Guided Code Generation with Diffusion LLMs2 Aug 2025
- 2025Interpreting Performance Profiles with Deep Learning1 Aug 2025
- 2025Seamlessly Integrating Tree-Based Positional Embeddings into Transformer Models for Source Code Representation5 Jul 2025
- 2025Call Me Maybe: Enhancing JavaScript Call Graph Construction using Graph Neural Networks22 Jun 2025
- 2025cAST: Enhancing Code Retrieval-Augmented Generation with Structural Chunking via Abstract Syntax Tree18 Jun 2025
- 2025Contamination Means Overestimation? A Fine-Grained Empirical Study in Code Intelligence3 Jun 2025
- 2025Simple and Effective Baselines for Code Summarisation Evaluation26 May 2025
- 2025AutoGEEval: A Multimodal and Automated Framework for Geospatial Code Generation on GEE with Large Language Models19 May 2025
- 2025Bringing Structure to Naturalness: On the Naturalness of ASTs11 Apr 2025
- 2025Aligning Crowd-sourced Human Feedback for Reinforcement Learning on Code Generation by Large Language Models19 Mar 2025
- 2025CODESYNC: Synchronizing Large Language Models with Dynamic Code Evolution at Scale23 Feb 2025
- 2025Deep Learning-Based Identification of Inconsistent Method Names: How Far Are We?22 Jan 2025
- 2025How to Select Pre-Trained Code Models for Reuse? A Learning Perspective7 Jan 2025
- 2024Leveraging Large Language Models in Code Question Answering: Baselines and Issues5 Nov 2024
- 2024Beyond Dataset Watermarking: Model-Level Copyright Protection for Code Summarization Models18 Oct 2024
- 2024Do Current Language Models Support Code Intelligence for R Programming Language?10 Oct 2024
- 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embedding23 Sep 2024
- 2024Icing on the Cake: Automatic Code Summarization at Ericsson19 Aug 2024
- 2024Can Developers Prompt? A Controlled Experiment for Code Documentation Generation1 Aug 2024
- 2024CodeIP: A Grammar-Guided Multi-Bit Watermark for Large Language Models of Code24 Apr 2024
- 2024CSA-Trans: Code Structure Aware Transformer for AST7 Apr 2024
- 2024Multi-modal Learning for WebAssembly Reverse Engineering4 Apr 2024
- 2024Stable Code Technical Report1 Apr 2024
- 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generation26 Mar 2024
- 2024Securing Large Language Models: Threats, Vulnerabilities and Responsible Practices19 Mar 2024
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar 2024
- 2024Beyond Self-learned Attention: Mitigating Attention Bias in Transformer-based Models Using Attention Guidance26 Feb 2024
- 2024GenCode: A Generic Data Augmentation Framework for Boosting Deep Learning-Based Code Understanding24 Feb 2024
- 2024Studying LLM Performance on Closed- and Open-source Data23 Feb 2024
- 2024EyeTrans: Merging Human and Machine Attention for Neural Code Summarization21 Feb 2024
- 2024LLMs for Coding and Robotics Education9 Feb 2024
- 2024PPM: Automated Generation of Diverse Programming Problems for Benchmarking Code Generation Models28 Jan 2024
- 2024Uncertainty Awareness of Large Language Models Under Code Distribution Shifts: A Benchmark Study12 Jan 2024
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Execution5 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023INSPECT: Intrinsic and Systematic Probing Evaluation for Code Transformers8 Dec 2023
50 newest of 179 All 179 (JSON)
- 2023Stealthy Backdoor Attack for Code Modelscited by 49
- 2024CodeIP: A Grammar-Guided Multi-Bit Watermark for Large Language Models of Codecited by 24
- 2023Backdooring Neural Code Searchcited by 19
- 2024Beyond Dataset Watermarking: Model-Level Copyright Protection for Code Summarization Modelscited by 2
- 2025Signature in Code Backdoor Detection, how far are we?cited by 0
- 2025Signature in Code Backdoor Detection, how far are we?15 Oct 2025
- 2024Beyond Dataset Watermarking: Model-Level Copyright Protection for Code Summarization Models18 Oct 2024
- 2024CodeIP: A Grammar-Guided Multi-Bit Watermark for Large Language Models of Code24 Apr 2024
- 2023Backdooring Neural Code Search27 May 2023
- 2023Stealthy Backdoor Attack for Code Models6 Jan 2023
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2024Stable Code Technical Reportcited by 16
- 2024LLMs for Coding and Robotics Educationcited by 9
- 2024LLMs for Coding and Robotics Education9 Feb 2024
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Unified Pre-training for Program Understanding and Generationcited by 366
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
- 2021TURINGBENCH: A Benchmark Environment for Turing Test in the Age of Neural Text Generationcited by 120
- 2023CodeBERTScore: Evaluating Code Generation with Pretrained Models of Codecited by 102
- 2021CURE: Code-Aware Neural Machine Translation for Automatic Program Repaircited by 86
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2021Language-Agnostic Representation Learning of Source Code from Structure and Contextcited by 63
- 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
- 2021On the Evaluation of Neural Code Summarizationcited by 48
- 2021Multilingual training for Software Engineeringcited by 43
12 most cited of 164 All 164 (JSON)
- 2026Externalizing Requirement-to-Repair Artifacts as Observable Traces for LLM-Based Program Repair14 Sep 2026
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Study3 Sep 2026
- 2026Bounded Path Context: A Controlled Study of Visible Path History in LLM-Based Knowledge Graph Question Answering26 May 2026
- 2026Specification-Based Code-Text-Code Reengineering for LLM-Mediated Software Evolution24 May 2026
- 2026EyeLayer: Integrating Human Attention Patterns into LLM-Based Code Summarization25 Feb 2026
- 2025Bridging Code Graphs and Large Language Models for Better Code Understanding8 Dec 2025
- 2025Auto-SPT: Automating Semantic Preserving Transformations for Code5 Dec 2025
- 2025HGAdapter: Hypergraph-based Adapters in Language Models for Code Summarization and Clone Detection20 Oct 2025
- 2025Leveraging Code Cohesion Analysis to Identify Source Code Supply Chain Attacks16 Oct 2025
- 2025BinCtx: Multi-Modal Representation Learning for Robust Android App Behavior Detection16 Oct 2025
- 2025RANGER -- Repository-Level Agent for Graph-Enhanced Retrieval27 Sep 2025
- 2025TreeDiff: AST-Guided Code Generation with Diffusion LLMs2 Aug 2025
12 newest of 164 All 164 (JSON)