An Extractive-and-Abstractive Framework for Source Code Summarization
Not on the map. Why?
Abstract (arXiv)
(Source) Code summarization aims to automatically generate summaries/comments for a given code snippet in the form of natural language. Such summaries play a key role in helping developers understand and maintain source code. Existing code summarization techniques can be categorized into extractive methods and abstractive methods. The extractive methods extract a subset of important statements and keywords from the code snippet using retrieval techniques, and generate a summary that preserves factual details in important statements and keywords. However, such a subset may miss identifier or entity naming, and consequently, the naturalness of generated summary is usually poor. The abstractive methods can generate human-written-like summaries leveraging encoder-decoder models from the neural machine translation domain. The generated summaries however often miss important factual details. To generate human-written-like summaries with preserved factual details, we propose a novel extractive-and-abstractive framework. The extractive module in the framework performs a task of extractive code summarization, which takes in the code snippet and predicts important statements containing key factual details. The abstractive module in the framework performs a task of abstractive code summarization, which takes in the entire code snippet and important statements in parallel and generates a succinct and human-written-like natural language summary. We evaluate the effectiveness of our technique, called EACS, by conducting extensive experiments on three datasets involving six programming languages. Experimental results show that EACS significantly outperforms state-of-the-art techniques in terms of all three widely used metrics, including BLEU, METEOR, and ROUGH-L.
Key facts. Cited by 18 papers in the map (data through 14 Oct 2026). Builds on 56 of its 129 references that are in the map. First posted on arXiv 15 Jun 2022.
Builds on
56 of 129 references.
References · 56
- 2017Attention Is All You Needcited by 60,361
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,893
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2014On the Properties of Neural Machine Translation: Encoder-Decoder Approachescited by 1,304
- 2017Get To The Point: Summarization with Pointer-Generator Networkscited by 1,292
- 2019PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarizationcited by 1,102
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
38 more
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2016SummaRuNNer: A Recurrent Neural Network based Sequence Model for Extractive Summarization of Documentscited by 246
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 221
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 179
- 2018Fast Abstractive Summarization with Reinforce-Selected Sentence Rewritingcited by 158
- 2020A Transformer-based Approach for Source Code Summarizationcited by 133
- 2019Fine-tune BERT for Extractive Summarizationcited by 122
- 2016Neural Summarization by Extracting Sentences and Wordscited by 116
- 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 100
- 2019On Extractive and Abstractive Neural Document Summarization with Transformer Language Modelscited by 83
- 2020Improved Code Summarization via a Graph Neural Networkcited by 79
- 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 77
- 2018Learning to Extract Coherent Summary via Deep Reinforcement Learningcited by 64
- 2019Code Generation as a Dual Task of Code Summarizationcited by 62
- 2021CoTexT: Multi-task Learning with Code-Text Transformercited by 61
- 2017A parallel corpus of Python functions and documentation strings for automated code documentation and code generationcited by 57
- 2018Neural Document Summarization by Jointly Learning to Score and Select Sentencescited by 56
- 2018Structured Neural Summarizationcited by 54
- 2021On the Evaluation of Neural Code Summarizationcited by 48
- 2018A Unified Model for Extractive and Abstractive Summarization using Inconsistency Losscited by 47
- 2019Recommendations for Datasets for Source Code Summarizationcited by 46
- 2018Neural Abstractive Text Summarization with Sequence-to-Sequence Modelscited by 39
- 2019Retrieve and Refine: Exemplar-based Neural Comment Generationcited by 36
- 2021CAST: Enhancing Code Summarization with Hierarchical Splitting and Reconstruction of Abstract Syntax Treescited by 32
- 2020Code to Comment "Translation": Data, Metrics, Baselining & Evaluationcited by 29
- 2020Code Summarization with Structure-induced Transformercited by 29
- 2019Automatic Source Code Summarization with Extended Tree-LSTMcited by 28
- 2021Project-Level Encoding for Neural Source Code Summarization of Subroutinescited by 24
- 2021CoCoSum: Contextual Code Summarization with Multi-Relational Graph Neural Networkcited by 22
- 2021Adversarial Robustness of Deep Code Comment Generationcited by 22
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splittingcited by 19
- 2019Automatic Code Summarization: A Systematic Literature Reviewcited by 18
- 2021A Multi-Modal Transformer-based Code Summarization Approach for Smart Contractscited by 16
- 2022Source Code Summarization with Structural Relative Position Guided Transformercited by 14
- 2022Code Search based on Context-aware Code Translationcited by 14
- 2022M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarizationcited by 14
- 2021Action Word Prediction for Neural Source Code Summarizationcited by 11
- 2021API2Com: On the Improvement of Automatically Generated Code Comments Using API Documentationscited by 10
50 most cited of 56 All 56 (JSON)
Built on by
Citing papers per year: 2023: 4; 2024: 4; 2025: 8; 2026: 2.
18 papers.
Sort:
By area:
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrievalcited by 34
- 2024Source Code Summarization in the Era of Large Language Modelscited by 31
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Taskscited by 11
- 2023A Prompt Learning Framework for Source Code Summarizationcited by 9
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 8
- 2025Show Me Your Code! Kill Code Poisoning: A Lightweight Method Based on Code Naturalnesscited by 8
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5
- 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarizationcited by 3
- 2024Beyond Dataset Watermarking: Model-Level Copyright Protection for Code Summarization Modelscited by 2
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebasescited by 2
- 2025Secure Resource Allocation via Constrained Deep Reinforcement Learningcited by 1
6 more
- 2025Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Modelscited by 1
- 2023Understanding Code Semantics: An Evaluation of Transformer Models in Summarizationcited by 0
- 2025Simple and Effective Baselines for Code Summarisation Evaluationcited by 0
- 2025Towards Generalized and Stealthy Watermarking for Generative Code Modelscited by 0
- 2025Enhancing Neural Code Representation with Additional Contextcited by 0
- 2026Securing Code Understanding: Detecting Natural Backdoor Vulnerability in Code Language Modelscited by 0
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebases1 Jul 2026
- 2026Securing Code Understanding: Detecting Natural Backdoor Vulnerability in Code Language Models9 Jun 2026
- 2025Enhancing Neural Code Representation with Additional Context14 Oct 2025
- 2025Towards Generalized and Stealthy Watermarking for Generative Code Models26 Jun 2025
- 2025Simple and Effective Baselines for Code Summarisation Evaluation26 May 2025
- 2025Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Models14 May 2025
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks15 Mar 2025
- 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarization13 Mar 2025
- 2025Show Me Your Code! Kill Code Poisoning: A Lightweight Method Based on Code Naturalness20 Feb 2025
- 2025Secure Resource Allocation via Constrained Deep Reinforcement Learning20 Jan 2025
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrieval19 Nov 2024
- 2024Beyond Dataset Watermarking: Model-Level Copyright Protection for Code Summarization Models18 Oct 2024
6 more
- 2024Source Code Summarization in the Era of Large Language Models9 Jul 2024
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2023A Prompt Learning Framework for Source Code Summarization26 Dec 2023
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?1 Dec 2023
- 2023Understanding Code Semantics: An Evaluation of Transformer Models in Summarization25 Oct 2023
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?22 May 2023
- 2025Show Me Your Code! Kill Code Poisoning: A Lightweight Method Based on Code Naturalnesscited by 8
- 2024Beyond Dataset Watermarking: Model-Level Copyright Protection for Code Summarization Modelscited by 2
- 2025Towards Generalized and Stealthy Watermarking for Generative Code Modelscited by 0
- 2026Securing Code Understanding: Detecting Natural Backdoor Vulnerability in Code Language Modelscited by 0
- 2026Securing Code Understanding: Detecting Natural Backdoor Vulnerability in Code Language Models9 Jun 2026
- 2025Towards Generalized and Stealthy Watermarking for Generative Code Models26 Jun 2025
- 2025Show Me Your Code! Kill Code Poisoning: A Lightweight Method Based on Code Naturalness20 Feb 2025
- 2024Beyond Dataset Watermarking: Model-Level Copyright Protection for Code Summarization Models18 Oct 2024
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrievalcited by 34
- 2024Source Code Summarization in the Era of Large Language Modelscited by 31
- 2023A Prompt Learning Framework for Source Code Summarizationcited by 9
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 8
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5
- 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarizationcited by 3
- 2025Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Modelscited by 1
- 2023Understanding Code Semantics: An Evaluation of Transformer Models in Summarizationcited by 0
- 2025Simple and Effective Baselines for Code Summarisation Evaluationcited by 0
- 2025Enhancing Neural Code Representation with Additional Contextcited by 0
- 2025Enhancing Neural Code Representation with Additional Context14 Oct 2025
- 2025Simple and Effective Baselines for Code Summarisation Evaluation26 May 2025
- 2025Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Models14 May 2025
- 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarization13 Mar 2025
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrieval19 Nov 2024
- 2024Source Code Summarization in the Era of Large Language Models9 Jul 2024
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2023A Prompt Learning Framework for Source Code Summarization26 Dec 2023
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?1 Dec 2023
- 2023Understanding Code Semantics: An Evaluation of Transformer Models in Summarization25 Oct 2023
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?22 May 2023