Skip to content
Conference

Architecture Recovery Revisited: A Hybrid Knowledge Graph and LLM-Based Approach

Jul 2026 · Annual International Computer Software and Applications Conference · pp. 493-502 · 0 citations · 22 references

Abstract

Software architecture recovery has long been central to research in program understanding and reengineering. Understanding and modernizing large-scale legacy software requires accurate reconstruction of its architectural structure. Traditional recovery approaches based on code clustering or template matching struggle to deliver semantically meaningful decompositions, especially in the face of architectural drift and inadequate documentation. We present a hybrid architecture recovery method that integrates Large Language Models (LLMs) with a property-based Knowledge Graph derived directly from source code. Our approach iteratively explores, proposes, and refines component boundaries through a three-phase process: Explore, Allocate, and Shift. This process combines structural analysis with semantic reasoning and prompt engineering to produce coherent component hierarchies. We evaluate our system on three real-world C codebases (cJSON, SQLite, and Bash), and compare the recovered architectures against established reference architectures and gold standards.

View source

Similar papers

Book Apr 2026

Semantic-Enhanced Automatic Refinement of Architecture Recovery Results Using LLMs

Understanding the architecture is crucial for effectively maintaining and managing large software systems. However, discrepancies often exist between the designed and implemented architectures, which can pose significant risks. To identify these discrepancies, architects need to extract the architecture from the system implementation, which is both time-consuming and error-prone. To simplify this procedure, many automatic architecture recovery techniques have been developed. Yet, their accuracy is often limited. Architects must still invest significant effort in refining recovery results to ensure they accurately reflect the implemented architecture. To reduce such manual effort, we introduce SemRef, a framework that combines LLMs with dependency analysis to automatically refine architectures recovered by existing architecture recovery tools. By leveraging the LLM’s semantic understanding capabilities and integrating structural dependencies, SemRef enhances both the accuracy and the comprehension of recovered architectures. To evaluate SemRef, we tested on 9 projects with published ground-truth architectures and 10 state-of-the-art architecture recovery tools. 5 commonly used metrics are adopted to evaluate the effectiveness of SemRef. The results show that SemRef improves accuracy across various metrics, with normalized gains ranges from 17.72% to 43.35%. Specifically, for MoJoFM and a2aadj metrics, SemRef achieves relative improvements of 118.57% and 100.41%, respectively. Moreover, SemRef is highly scalable. It maintains stable performance across projects ranging from thousands to trillions of lines of code with the cost scale linearly with project size. Further, we test SemRef on various LLMs to demonstrate its generalizability across different models. Beyond improving accuracy, the integration of LLMs enables SemRef to provide a structured module hierarchy and hierarchical module summaries, which further enhance the comprehensibility of recovered architectures.

Yiran Zhang, Chengwei Liu, Yuqiang Sun et al. · 1 citation
Aug 2026

Balancing Richness and Reliability: An Explore-Construct-Verify Framework for API Knowledge Graph Construction

This work proposes Explore-Construct-Verify (ECV), a three-stage framework for API KG construction using large language models (LLMs), which preserves LLMs’ ability to discover domain-specific knowledge while enabling efficient post-hoc validation.

Yanbang Sun, Qing Huang, Zhenchang Xing et al. · 0 citations
Review Open access Jul 2026

Automating Institutional Knowledge: A Dynamic, AI-Driven Knowledge Graph Architecture for Safety-Critical Codebases

Safety-critical software systems in the automotive, aerospace, and industrial sectors have grown to millions of lines of source code, making traditional approaches to software documentation, architecture comprehension, and knowledge transfer increasingly impractical. As continuous integration and rapid release cycles accelerate software evolution, organizations face persistent challenges related to technical drift, loss of domain expertise, fragmented architectural knowledge, and the dependence on a small number of senior developers. Conventional code discovery techniques based on lexical or keyword searches provide limited support because they identify only literal text rather than the underlying functional semantics of software artifacts. This paper proposes the Dynamic Code Wiki, an intelligent software knowledge architecture that automatically transforms large codebases into continuously evolving, semantically searchable knowledge repositories. The proposed framework integrates Abstract Syntax Tree (AST) parsing, vector-based semantic embeddings, retrieval-augmented generation (RAG), and automated knowledge graph construction to generate structured documentation directly from source code and development artifacts. The architecture further strengthens compliance with functional safety standards by automatically linking software requirements to implementation components and performing call-graph analysis to identify subsystems affected by code modifications. In addition, engineering knowledge embedded within commit messages, code review discussions, defect reports, and software evolution history is preserved as a permanent, searchable organizational knowledge graph independent of individual developers. By combining semantic code understanding with automated documentation and traceability, the proposed framework significantly improves software maintainability, architectural transparency, impact analysis, and long-term knowledge preservation. The Dynamic Code Wiki provides a scalable engineering solution for modern safety-critical software development, enabling organizations to reduce knowledge loss, accelerate developer onboarding, strengthen regulatory compliance, and support continuous software evolution without relying solely on manually maintained documentation or the institutional memory of experienced engineers

Parth Govind Vanparia · 0 citations
Conference Jul 2026

PathRAG: A Graph-Based Reasoning Approach for Enhancing Retrieval in Software User Manuals

In modern software systems, large-scale technical manuals and complex user workflows impose a significant cognitive barrier for end-users, particularly children and the elderly. While integrated automated assistants have emerged as a promising service paradigm to abstract these system complexities, traditional Retrieval-Augmented Generation (RAG) and existing GraphRAG architectures heavily focus on relational knowledge, failing to capture the strict conditional execution paths and procedural control-flows necessary for accurate system orchestration. To bridge this gap, we propose PathRAG, a lightweight, service-oriented graph reasoning framework designed to enable adaptive, condition-aware guide services over structured software procedures. Rather than processing manuals as flat textual chunks, PathRAG models software tasks as an explicit Conditional Directed Graph, enabling a single-pass graph traversal service that efficiently navigates non-linear software states. Experiments show that PathRAG achieves high accuracy in graph construction (F1 up to 0.956 for nodes and 0.936 for edges) and strong performance in path reasoning (Average Path F1 of 0.82 on simple and 0.63 on complex cases). Notably, the low average path distance (1.53) suggests that most errors correspond to minor deviations from the ground-truth sequence. Despite promising results, limitations include a small dataset, domain specificity, and reliance on rule-based parsing, which may affect generalization to noisy or multi-document scenarios.

Ly-Huynh Phan, Dinh-Dat Nguyen, Huy-Vu Luu · 0 citations
Book Open access Jul 2026

CODENS: Transforming Code Changes into Living, Accessible, and Queryable Documentation

Results show that CODENS produces highly relevant and well-grounded answers, while qualitative feedback highlights a remaining challenge in concise, documentation-oriented synthesis.

Abdelhak Kelious, Chyrine Tahri, E. Bardet · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.