Code-Craft: Hierarchical Graph-Based Code Summarization for Enhanced Context Retrieval
Not on the map. Why?
Abstract (arXiv)
Understanding and navigating large-scale codebases remains a significant challenge in software engineering. Existing methods often treat code as flat text or focus primarily on local structural relationships, limiting their ability to provide holistic, context-aware information retrieval. We present Hierarchical Code Graph Summarization (HCGS), a novel approach that constructs a multi-layered representation of a codebase by generating structured summaries in a bottom-up fashion from a code graph. HCGS leverages the Language Server Protocol for language-agnostic code analysis and employs a parallel level-based algorithm for efficient summary generation. Through extensive evaluation on five diverse codebases totaling 7,531 functions, HCGS demonstrates significant improvements in code retrieval accuracy, achieving up to 82 percentage relative improvement in top-1 retrieval precision for large codebases like libsignal (27.15 percentage points), and perfect Pass@3 scores for smaller repositories. The system's hierarchical approach consistently outperforms traditional code-only retrieval across all metrics, with particularly substantial gains in larger, more complex codebases where understanding function relationships is crucial.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). First posted on arXiv 11 Apr 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 2; 2026: 2.
4 papers.
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 23
- 2026Automated QoR improvement in OpenROAD with coding agentscited by 3
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebasescited by 2
- 2025Natural Language Summarization Enables Multi-Repository Bug Localization by LLMs in Microservice Architecturescited by 1
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebases1 Jul 2026
- 2026Automated QoR improvement in OpenROAD with coding agents9 Jan 2026
- 2025Natural Language Summarization Enables Multi-Repository Bug Localization by LLMs in Microservice Architectures5 Dec 2025
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025