Intelligent Software Architecture Recovery Using Large Language Models and Graph Neural Networks for Legacy System Modernization
DOI:
https://doi.org/10.63282/3050-9262.IJAIDSML-V5I4P129Keywords:
Software Architecture Recovery, Legacy System Modernization, Large Language Models, Graph Neural Networks, Software Knowledge Graph, Reverse Engineering, Microservices Migration, Technical Debt, Software Comprehension, Architecture ReconstructionAbstract
Legacy software systems remain central to banking, healthcare, insurance, government, retail, telecommunications, and enterprise resource planning environments, yet many of these systems evolve for years without corresponding architectural documentation. The absence of reliable architectural knowledge increases maintenance cost, slows digital transformation, weakens software reliability, and creates substantial risk during cloud migration, microservices decomposition, regulatory remediation, and DevOps modernization. Traditional software architecture recovery techniques rely heavily on static dependencies, clustering heuristics, call graphs, package structures, and manual expert interpretation. Although these methods provide useful structural views, they often fail to capture the semantic intent, business capability alignment, hidden cross-cutting concerns, and modernization feasibility of legacy modules. This paper proposes an intelligent architecture recovery framework that combines Large Language Models (LLMs) and Graph Neural Networks (GNNs) to recover, explain, and operationalize architectural knowledge from legacy software repositories. The proposed framework constructs a heterogeneous software knowledge graph from source code, build files, configuration artifacts, database scripts, dependency metadata, API traces, commit history, and documentation fragments. LLMs are used to infer semantic roles, business capabilities, domain concepts, anti-patterns, and modernization constraints from code and natural language artifacts, while GNNs learn structural and semantic representations of software entities to identify architectural components, boundary violations, dependency risks, and migration candidates. The paper presents a research-oriented framework, algorithmic workflow, graph schema, training strategy, evaluation protocol, and modernization decision model. Unlike purely review-based studies, the contribution of this paper is a proposed recover-and-modernize architecture intelligence pipeline that transforms legacy software comprehension into actionable modernization recommendations. The framework is intended to support architects and engineering teams in microservices decomposition, cloud migration planning, technical debt prioritization, service boundary discovery, impact analysis, and reliability improvement. The study argues that hybrid LLM-GNN architecture recovery can bridge the gap between structural reverse engineering and semantically grounded modernization governance.
References
[1] T. J. Biggerstaff, "Design Recovery for Maintenance and Reuse," Computer, vol. 22, no. 7, pp. 36-49, July 1989, doi: 10.1109/2.30731.
[2] S. D. Sivva, R. R. Thalakanti, S. S. G. Bandari, and S. D. R. Yettapu, "AI-Driven Decision Intelligence for Agile Software Lifecycle Governance: An Architecture-Centered Framework Integrating Machine Learning Defect Prediction and Automated Testing," International Journal of Emerging Trends in Computer Science and Information Technology, vol. 4, no. 4, pp. 167-172, 2023, doi: 10.63282/3050-9246.IJETCSIT-V4I4P118.
[3] B. S. Mitchell and S. Mancoridis, "On the Automatic Modularization of Software Systems Using the Bunch Tool," IEEE Transactions on Software Engineering, vol. 32, no. 3, pp. 193-208, Mar. 2006, doi: 10.1109/TSE.2006.31.
[4] V. Tzerpos and R. C. Holt, "ACDC: An Algorithm for Comprehension-Driven Clustering," in Proceedings of the Seventh Working Conference on Reverse Engineering, 2000, pp. 258-267, doi: 10.5555/832307.837118.
[5] O. Maqbool and H. A. Babri, "Hierarchical Clustering for Software Architecture Recovery," IEEE Transactions on Software Engineering, vol. 33, no. 11, pp. 759-780, Nov. 2007, doi: 10.1109/TSE.2007.70732.
[6] Gunda SK, Yettapu SDR, Bodakunti S, Bikki SB, "Decision Intelligence Methodology for AI-Driven Agile Software Lifecycle Governance and Architecture-Centered Project Management," 2023 Mar. 30, vol. 4, no. 1, pp. 102-108, doi: 10.63282/3050-9262.IJAIDSML-V4I1P112.
[7] A. Vaswani et al., "Attention Is All You Need," in Advances in Neural Information Processing Systems, vol. 30, 2017, pp. 5998-6008.
[8] Z. Feng et al., "CodeBERT: A Pre-Trained Model for Programming and Natural Languages," in Findings of the Association for Computational Linguistics: EMNLP 2020, 2020, pp. 1536-1547, doi: 10.18653/v1/2020.findings-emnlp.139.
[9] D. Guo et al., "GraphCodeBERT: Pre-Training Code Representations with Data Flow," in Proceedings of the International Conference on Learning Representations, 2021.
[10] F. Scarselli, M. Gori, A. C. Tsoi, M. Hagenbuchner, and G. Monfardini, "The Graph Neural Network Model," IEEE Transactions on Neural Networks, vol. 20, no. 1, pp. 61-80, Jan. 2009, doi: 10.1109/TNN.2008.2005605.
[11] T. N. Kipf and M. Welling, "Semi-Supervised Classification with Graph Convolutional Networks," in Proceedings of the International Conference on Learning Representations, 2017.
[12] W. L. Hamilton, R. Ying, and J. Leskovec, "Inductive Representation Learning on Large Graphs," in Advances in Neural Information Processing Systems, vol. 30, 2017, pp. 1024-1034.
[13] P. Veli?kovi?, G. Cucurull, A. Casanova, A. Romero, P. Liò, and Y. Bengio, "Graph Attention Networks," in Proceedings of the International Conference on Learning Representations, 2018.
[14] Gudi, S. R., "Design and Evaluation of Secure Microservices Architecture for HIPAA-Compliant Prescription Processing on AWS and OpenShift," International Journal of Artificial Intelligence, Data Science, and Machine Learning, vol. 5, no. 2, pp. 144-149, 2024, doi: 10.63282/3050-9262.IJAIDSML-V5I2P116.
[15] Thalakanti, R. R., and S. S. Goud Bandari, "Intelligent Continuous Integration and Delivery for Banking Systems using Machine Learning Driven Risk Detection with Real World Deployment Evaluation," International Journal of AI, BigData, Computational and Management Studies, vol. 5, no. 4, pp. 168-175, 2024, doi: 10.63282/3050-9416.IJAIBDCMS-V5I4P118.
[16] S. K. Gunda, "Comparative Analysis of Machine Learning Models for Software Defect Prediction," in 2024 International Conference on Power, Energy, Control and Transmission Systems (ICPECTS), Chennai, India, 2024, pp. 1-6, doi: 10.1109/ICPECTS62210.2024.10780167.
[17] Mutyam, N., "Graph-based modeling of service dependencies for predicting failure propagation in distributed systems," International Journal of Multidisciplinary Evolutionary Research, vol. 5, no. 1, pp. 113-116, 2024, doi: 10.54660/IJMER.2024.5.1.113-116.
[18] Bandari, S. S. G., S. D. Sivva, and R. R. Thalakanti, "Regulatory Grade Fraud Detection using Explainable Artificial Intelligence with Auditable Decision Pathways and Empirical Validation on Banking Data," International Journal of Artificial Intelligence, Data Science, and Machine Learning, vol. 5, no. 3, pp. 139-147, 2024, doi: 10.63282/3050-9262.IJAIDSML-V5I3P115.
[19] Gunda, S. K. G., "The Future of Software Development and the Expanding Role of ML Models," International Journal of Emerging Research in Engineering and Technology, vol. 4, no. 2, pp. 126-129, 2023, doi: 10.63282/3050-922X.IJERET-V4I2P113.
[20] Gudi, S. R., "AI-Driven Fax-to-Digital Prescription Automation: A Cloud-Native Framework Using OCR, Machine Learning, and Microservices for Pharmacy Operations," International Journal of Emerging Research in Engineering and Technology, vol. 5, no. 1, pp. 111-116, 2024, doi: 10.63282/3050-922X.IJERET-V5I1P113.
[21] Thalakanti, R. R., S. S. Goud Bandari, and S. D. Sivva, "Federated Learning for Privacy Preserving Fraud Detection across Financial Institutions: Architecture Protocols and Operational Governance," International Journal of Emerging Research in Engineering and Technology, vol. 5, no. 2, pp. 108-114, 2024, doi: 10.63282/3050-922X.IJERET-V5I2P111.
[22] T. Lutellier, D. Chollak, J. Garcia, L. Tan, D. Rayside, N. Medvidovic, and R. Kroeger, "Comparing Software Architecture Recovery Techniques Using Accurate Dependencies," in Proceedings of the 37th International Conference on Software Engineering, 2015, pp. 69-78, doi: 10.1109/ICSE.2015.22.
[23] Gudi, S. R., "Leveraging Predictive Analytics and Redis-Backed Caching to Optimize Specialty Medication Fulfillment and Pharmacy Inventory Management," International Journal of AI, BigData, Computational and Management Studies, vol. 5, no. 3, pp. 155-160, 2024, doi: 10.63282/3050-9416.IJAIBDCMS-V5I3P116.
[24] S. K. Gunda, "Fault Prediction Unveiled: Analyzing the Effectiveness of Random Forest, Logistic Regression, and KNeighbors," in 2024 2nd International Conference on Self Sustainable Artificial Intelligence Systems (ICSSAS), Erode, India, 2024, pp. 107-113, doi: 10.1109/ICSSAS64001.2024.10760620.
[25] N. Anquetil and T. C. Lethbridge, "Experiments with Clustering as a Software Remodularization Method," in Proceedings of the Sixth Working Conference on Reverse Engineering, 1999, pp. 235-255, doi: 10.5555/832306.837051.
[26] Gudi, S. R., "Enhancing Reliability in Java Enterprise Systems through Comparative Analysis of Automated Testing Frameworks," International Journal of Emerging Trends in Computer Science and Information Technology, vol. 4, no. 2, pp. 151-160, 2023, doi: 10.63282/3050-9246.IJETCSIT-V4I2P115.
[27] Z. Wu, S. Pan, F. Chen, G. Long, C. Zhang, and P. S. Yu, "A Comprehensive Survey on Graph Neural Networks," IEEE Transactions on Neural Networks and Learning Systems, vol. 32, no. 1, pp. 4-24, Jan. 2021, doi: 10.1109/TNNLS.2020.2978386.
[28] Sivva, S. D., "An end-to-end AI-based systems engineering paradigm for lifecycle governance, predictive quality assurance, automation economics, and cybersecurity intelligence," Journal of Frontiers in Multidisciplinary Research, vol. 4, no. 1, pp. 600-604, 2023, doi: 10.54660/.JFMR.2023.4.1.600-604.
[29] T. B. Brown et al., "Language Models are Few-Shot Learners," in Advances in Neural Information Processing Systems, vol. 33, 2020, pp. 1877-1901.
[30] Balerao, M., "A converged artificial intelligence architecture for innovation, software lifecycle optimization, and cybersecurity risk mitigation," International Journal of Multidisciplinary Futuristic Development, vol. 4, no. 1, pp. 117-120, 2023, doi: 10.54660/IJMFD.2023.4.1.117-120.
[31] M. Chen et al., "Evaluating Large Language Models Trained on Code," arXiv:2107.03374, 2021.
[32] Manga I, Sivva SD, Manga VK, "The Adaptive Intelligence in Cloud Systems: A Unified Architecture for AI Enhanced Observability and Automated Root Cause Analysis," 2024 Mar. 30, vol. 5, no. 1, pp. 160-166, available at: https://ijaidsml.org/index.php/ijaidsml/article/view/366.
[33] S. D. Sivva, R. R. Thalakanti, S. S. G. Bandari, and S. D. R. Yettapu, "AI-Driven Decision Intelligence for Agile Software Lifecycle Governance: An Architecture-Centered Framework Integrating Machine Learning Defect Prediction and Automated Testing," International Journal of Emerging Trends in Computer Science and Information Technology, vol. 4, no. 4, pp. 167-172, 2023, doi: 10.63282/3050-9246.IJETCSIT-V4I4P118.
[34] Bandari, S. S. G., Sivva, S. D., and Thalakanti, R. R., "Regulatory Grade Fraud Detection using Explainable Artificial Intelligence with Auditable Decision Pathways and Empirical Validation on Banking Data," International Journal of Artificial Intelligence, Data Science, and Machine Learning, vol. 5, no. 3, pp. 139-147, 2024, doi: 10.63282/3050-9262.IJAIDSML-V5I3P115.










