mlsanityData to 14 Oct 2026

Code Summarization Beyond Function Level

arXiv 2502.16704 ↗First posted 23 Feb 2025cs.CL cs.AIcited by 8

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2023GPT-4 Technical Reportcited by 18,396
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  4. 2019BERTScore: Evaluating Text Generation with BERTcited by 5,512
  5. 2023Mistral 7Bcited by 3,164
  6. 2017Billion-scale similarity search with GPUscited by 2,497
  7. 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
  8. 2024From Local to Global: A Graph RAG Approach to Query-Focused Summarizationcited by 1,453
  9. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  10. 2020BLEURT: Learning Robust Metrics for Text Generationcited by 1,203
  11. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  12. 2024Gemma: Open Models Based on Gemini Research and Technologycited by 916
13 more
  1. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  2. 2023StarCoder: may the source be with you!cited by 799
  3. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
  4. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  5. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
  6. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
  7. 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 353
  8. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
  9. 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 168
  10. 2024AriGraph: Learning Knowledge Graph World Models with Episodic Memory for LLM Agentscited by 102
  11. 2021CodeTrans: Towards Cracking the Language of Silicon's Code Through Self-Supervised Deep Learning and High Performance Computingcited by 28
  12. 2023Evaluating Code Summarization Techniques: A New Metric and an Empirical Characterizationcited by 21
  13. 2023Revisiting File Context for Source Code Summarizationcited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 7.

8 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Source Code Summarization in the Era of Large Language Models
  2. 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization
  3. 2024Can Large Language Models Serve as Evaluators for Code Summarization?
  4. 2023Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarization
  5. 2026Beyond Code Snippets: Benchmarking LLMs on Repository-Level Question Answering
  6. 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositories
  7. 2021Retrieval Augmented Code Generation and Summarization
  8. 2024A RAG Method for Source Code Inquiry Tailored to Long-Context LLMs