Code Summarization Beyond Function Level
Not on the map. Why?
Abstract (arXiv)
Code summarization is a critical task in natural language processing and software engineering, which aims to generate concise descriptions of source code. Recent advancements have improved the quality of these summaries, enhancing code readability and maintainability. However, the content of a repository or a class has not been considered in function code summarization. This study investigated the effectiveness of code summarization models beyond the function level, exploring the impact of class and repository contexts on the summary quality. The study involved revising benchmarks for evaluating models at class and repository levels, assessing baseline models, and evaluating LLMs with in-context learning to determine the enhancement of summary quality with additional context. The findings revealed that the fine-tuned state-of-the-art CodeT5+ base model excelled in code summarization, while incorporating few-shot learning and retrieved code chunks from RAG significantly enhanced the performance of LLMs in this task. Notably, the Deepseek Coder 1.3B and Starcoder2 15B models demonstrated substantial improvements in metrics such as BLEURT, METEOR, and BLEU-4 at both class and repository levels. Repository-level summarization exhibited promising potential but necessitates significant computational resources and gains from the inclusion of structured context. Lastly, we employed the recent SIDE code summarization metric in our evaluation. This study contributes to refining strategies for prompt engineering, few-shot learning, and RAG, addressing gaps in benchmarks for code summarization at various levels. Finally, we publish all study details, code, datasets, and results of evaluation in the GitHub repository available at https://github.com/kilimanj4r0/code-summarization-beyond-function-level.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). Builds on 25 of its 31 references that are in the map. First posted on arXiv 23 Feb 2025.
Builds on
25 of 31 references.
References · 25
- 2017Attention Is All You Needcited by 60,361
- 2023GPT-4 Technical Reportcited by 18,396
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,512
- 2023Mistral 7Bcited by 3,164
- 2017Billion-scale similarity search with GPUscited by 2,497
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
- 2024From Local to Global: A Graph RAG Approach to Query-Focused Summarizationcited by 1,453
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2020BLEURT: Learning Robust Metrics for Text Generationcited by 1,203
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2024Gemma: Open Models Based on Gemini Research and Technologycited by 916
13 more
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2023StarCoder: may the source be with you!cited by 799
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 353
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
- 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 168
- 2024AriGraph: Learning Knowledge Graph World Models with Episodic Memory for LLM Agentscited by 102
- 2021CodeTrans: Towards Cracking the Language of Silicon's Code Through Self-Supervised Deep Learning and High Performance Computingcited by 28
- 2023Evaluating Code Summarization Techniques: A New Metric and an Empirical Characterizationcited by 21
- 2023Revisiting File Context for Source Code Summarizationcited by 3
Built on by
Citing papers per year: 2025: 1; 2026: 7.
8 papers.
- 2026Specification-Based Code-Text-Code Reengineering for LLM-Mediated Software Evolutioncited by 5
- 2026CodeGlance: Understanding Code Reasoning Challenges in LLMs through Multi-Dimensional Feature Analysiscited by 1
- 2026Beyond Output Correctness: Benchmarking and Evaluating Large Language Model Reasoning in Coding Taskscited by 1
- 2026Remember Your Trace: Memory-Guided Long-Horizon Agentic Framework for Consistent and Hierarchical Repository-Level Code Documentationcited by 1
- 2025Uncovering Code Insights: Leveraging GitHub Artifacts for Deeper Code Understandingcited by 0
- 2026Prompt-Driven Code Summarization: A Systematic Literature Reviewcited by 0
- 2026Retrieval-Oriented Code Representations in Agentic Bug Localizationcited by 0
- 2026Predicting Program Exit Code with LLMs and Programming Language Semanticscited by 0
- 2026Predicting Program Exit Code with LLMs and Programming Language Semantics1 Sep 2026
- 2026Retrieval-Oriented Code Representations in Agentic Bug Localization13 Jul 2026
- 2026Specification-Based Code-Text-Code Reengineering for LLM-Mediated Software Evolution24 May 2026
- 2026Remember Your Trace: Memory-Guided Long-Horizon Agentic Framework for Consistent and Hierarchical Repository-Level Code Documentation14 May 2026
- 2026Prompt-Driven Code Summarization: A Systematic Literature Review16 Apr 2026
- 2026Beyond Output Correctness: Benchmarking and Evaluating Large Language Model Reasoning in Coding Tasks14 Apr 2026
- 2026CodeGlance: Understanding Code Reasoning Challenges in LLMs through Multi-Dimensional Feature Analysis15 Feb 2026
- 2025Uncovering Code Insights: Leveraging GitHub Artifacts for Deeper Code Understanding5 Nov 2025
Similar, not cited
Close in wording, no citation either way
- 2024Source Code Summarization in the Era of Large Language Models
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization
- 2024Can Large Language Models Serve as Evaluators for Code Summarization?
- 2023Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarization
- 2026Beyond Code Snippets: Benchmarking LLMs on Repository-Level Question Answering
- 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositories
- 2021Retrieval Augmented Code Generation and Summarization
- 2024A RAG Method for Source Code Inquiry Tailored to Long-Context LLMs