Improved Automatic Summarization of Subroutines via Attention to File Context
Not on the map. Why?
Abstract (arXiv)
Software documentation largely consists of short, natural language summaries of the subroutines in the software. These summaries help programmers quickly understand what a subroutine does without having to read the source code him or herself. The task of writing these descriptions is called "source code summarization" and has been a target of research for several years. Recently, AI-based approaches have superseded older, heuristic-based approaches. Yet, to date these AI-based approaches assume that all the content needed to predict summaries is inside subroutine itself. This assumption limits performance because many subroutines cannot be understood without surrounding context. In this paper, we present an approach that models the file context of subroutines (i.e. other subroutines in the same file) and uses an attention mechanism to find words and concepts to use in summaries. We show in an experiment that our approach extends and improves several recent baselines.
Key facts. Cited by 34 papers in the map (data through 7 Oct 2026). First posted on arXiv 10 Apr 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 9; 2022: 9; 2023: 10; 2024: 3; 2025: 2; 2026: 1.
34 papers.
Sort:
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
- 2021On the Evaluation of Neural Code Summarizationcited by 47
- 2021Multilingual training for Software Engineeringcited by 43
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
- 2023Distilled GPT for Source Code Summarizationcited by 30
- 2021Project-Level Encoding for Neural Source Code Summarization of Subroutinescited by 24
- 2021A Survey on Machine Learning Techniques for Source Code Analysiscited by 23
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022Deep Learning Meets Software Engineering: A Survey on Pre-Trained Models of Source Codecited by 20
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splittingcited by 19
- 2022Pop Quiz! Can a Large Language Model Help With Reverse Engineering?cited by 13
- 2022An Exploratory Study on Code Attention in BERTcited by 12
22 more
- 2021API2Com: On the Improvement of Automatically Generated Code Comments Using API Documentationscited by 10
- 2022Learning to Parallelize in a Shared-Memory Environment with Transformerscited by 10
- 2025Towards an Understanding of Context Utilization in Code Intelligencecited by 10
- 2023Towards Modeling Human Attention from Eye Movements for Neural Source Code Summarizationcited by 8
- 2021HAConvGNN: Hierarchical Attention Based Convolutional Graph Neural Network for Code Documentation Generation in Jupyter Notebookscited by 6
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
- 2021Learning to Generate Code Comments from Class Hierarchiescited by 5
- 2022GypSum: Learning Hybrid Representations for Code Summarizationcited by 5
- 2023Semantic Similarity Loss for Neural Source Code Summarizationcited by 5
- 2023A Comprehensive Evaluation of Parameter-Efficient Fine-Tuning on Software Engineering Taskscited by 5
- 2023Revisiting File Context for Source Code Summarizationcited by 3
- 2022Adding Context to Source Code Representations for Deep Learningcited by 2
- 2023APIContext2Com: Code Comment Generation by Incorporating Pre-Defined API Documentationcited by 2
- 2023Statement-based Memory for Neural Source Code Summarizationcited by 2
- 2022LAMNER: Code Comment Generation Using Character Language Model and Named Entity Recognitioncited by 1
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Codecited by 1
- 2024Beyond Self-learned Attention: Mitigating Attention Bias in Transformer-based Models Using Attention Guidancecited by 1
- 2021Code Representation Learning with Pr"ufer Sequencescited by 0
- 2022Meta Learning for Code Summarizationcited by 0
- 2024CONCORD: Towards a DSL for Configurable Graph Code Representationcited by 0
- 2025Simple and Effective Baselines for Code Summarisation Evaluationcited by 0
- 2026On the Impact of Code Comments for Automated Bug-Fixing: An Empirical Studycited by 0
- 2026On the Impact of Code Comments for Automated Bug-Fixing: An Empirical Study30 Jan 2026
- 2025Simple and Effective Baselines for Code Summarisation Evaluation26 May 2025
- 2025Towards an Understanding of Context Utilization in Code Intelligence11 Apr 2025
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2024Beyond Self-learned Attention: Mitigating Attention Bias in Transformer-based Models Using Attention Guidance26 Feb 2024
- 2024CONCORD: Towards a DSL for Configurable Graph Code Representation31 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023A Comprehensive Evaluation of Parameter-Efficient Fine-Tuning on Software Engineering Tasks25 Dec 2023
- 2023Revisiting File Context for Source Code Summarization5 Sep 2023
- 2023Distilled GPT for Source Code Summarization28 Aug 2023
- 2023Semantic Similarity Loss for Neural Source Code Summarization14 Aug 2023
- 2023Statement-based Memory for Neural Source Code Summarization21 Jul 2023
22 more
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Code5 Jul 2023
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?22 May 2023
- 2023Towards Modeling Human Attention from Eye Movements for Neural Source Code Summarization16 May 2023
- 2023APIContext2Com: Code Comment Generation by Incorporating Pre-Defined API Documentation3 Mar 2023
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Context20 Dec 2022
- 2022Adding Context to Source Code Representations for Deep Learning30 Jul 2022
- 2022Deep Learning Meets Software Engineering: A Survey on Pre-Trained Models of Source Code24 May 2022
- 2022Learning to Parallelize in a Shared-Memory Environment with Transformers27 Apr 2022
- 2022GypSum: Learning Hybrid Representations for Code Summarization26 Apr 2022
- 2022An Exploratory Study on Code Attention in BERT5 Apr 2022
- 2022LAMNER: Code Comment Generation Using Character Language Model and Named Entity Recognition5 Apr 2022
- 2022Pop Quiz! Can a Large Language Model Help With Reverse Engineering?2 Feb 2022
- 2022Meta Learning for Code Summarization20 Jan 2022
- 2021Multilingual training for Software Engineering3 Dec 2021
- 2021Code Representation Learning with Pr"ufer Sequences14 Nov 2021
- 2021A Survey on Machine Learning Techniques for Source Code Analysis18 Oct 2021
- 2021On the Evaluation of Neural Code Summarization15 Jul 2021
- 2021HAConvGNN: Hierarchical Attention Based Convolutional Graph Neural Network for Code Documentation Generation in Jupyter Notebooks31 Mar 2021
- 2021Learning to Generate Code Comments from Class Hierarchies24 Mar 2021
- 2021Project-Level Encoding for Neural Source Code Summarization of Subroutines22 Mar 2021
- 2021API2Com: On the Improvement of Automatically Generated Code Comments Using API Documentations19 Mar 2021
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splitting14 Mar 2021
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
- 2021On the Evaluation of Neural Code Summarizationcited by 47
- 2021Multilingual training for Software Engineeringcited by 43
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
- 2023Distilled GPT for Source Code Summarizationcited by 30
- 2021Project-Level Encoding for Neural Source Code Summarization of Subroutinescited by 24
- 2021A Survey on Machine Learning Techniques for Source Code Analysiscited by 23
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022Deep Learning Meets Software Engineering: A Survey on Pre-Trained Models of Source Codecited by 20
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splittingcited by 19
- 2022Pop Quiz! Can a Large Language Model Help With Reverse Engineering?cited by 13
- 2022An Exploratory Study on Code Attention in BERTcited by 12
12 most cited of 34 All 34 (JSON)
- 2026On the Impact of Code Comments for Automated Bug-Fixing: An Empirical Study30 Jan 2026
- 2025Simple and Effective Baselines for Code Summarisation Evaluation26 May 2025
- 2025Towards an Understanding of Context Utilization in Code Intelligence11 Apr 2025
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2024Beyond Self-learned Attention: Mitigating Attention Bias in Transformer-based Models Using Attention Guidance26 Feb 2024
- 2024CONCORD: Towards a DSL for Configurable Graph Code Representation31 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023A Comprehensive Evaluation of Parameter-Efficient Fine-Tuning on Software Engineering Tasks25 Dec 2023
- 2023Revisiting File Context for Source Code Summarization5 Sep 2023
- 2023Distilled GPT for Source Code Summarization28 Aug 2023
- 2023Semantic Similarity Loss for Neural Source Code Summarization14 Aug 2023
- 2023Statement-based Memory for Neural Source Code Summarization21 Jul 2023
12 newest of 34 All 34 (JSON)