Method for Automated Decomposition of Monolithic Software Systems Based on Graph Neural Networks
Abstract
1. Introduction
2. Materials and Methods
2.1. The Method of Structural Transformation of the Dependency Graph of the Software System
- Construction of an abstract syntax tree (AST).
- Formation of a directed graph of dependencies between system components.
- Calculation of the centrality of nodes (to determine structurally important modules of the system).
- Identification of bridges and points of articulation that ensure the integrity of the architectural model.
- Determination of weighting coefficients for edges and nodes.
- Graph structure transformation.
- is the number of incoming connections of node v;
- is the number of outgoing connections of node v;
- is the total number of nodes in the graph excluding node v itself.
- is the total number of shortest paths between nodes s and t in the graph;
- is the number of such shortest paths passing through node v.
- and are the mean value and standard deviation of Degree Centrality;
- and are the mean value and standard deviation of Betweenness Centrality.
- —the discovery time of node v;
- —the minimum discovery time of any vertex reachable from v through DFS tree edges and back edges, including v itself.
- is the discovery time of node v during DFS;
- is the low value of a child node w of vertex v in the DFS tree;
- is the discovery time of a node u connected to v by a back edge.
- If vertex v is the root of a DFS tree and has more than one child.
- If the following condition holds for any child:
- —weight of the corresponding type of edge.
- Its incoming and outgoing connections;
- Its role in data flow between other modules;
- Its frequency of use as a dependency in other modules.
- is the set of all strongly connected components in the graph, where for every pair of vertices , there exists a directed path from u to v and a directed path from v to u;
- is a separate subgraph (one SCC);
- k is the number of SCCs found.
- is the number of edges within the SCC;
- is the number of nodes within the SCC.
- —a directed edge from node to vertex ;
- C—the set of edges forming a specific cycle in the graph;
- —edge weight;
- —node weight of ;
- —the centrality of node in the graph structure;
- —a constant to avoid division by zero.
- —the set of edges in the SCC;
- —an edge between nodes and in the SCC;
- —the weight of the edge between vertices and ;
- and —node weighting coefficients representing the importance or influence of each node;
- —the average weight of the nodes connected by edge .
- —edge weight threshold.
- —the mean value of calculated across all detected strongly connected components;
- —the standard deviation of values calculated across all detected strongly connected components.
2.2. Dynamic Selection Method of the Clustering Algorithm
- (1)
- the intra-cluster connectivity (cohesion) within each is maximized;
- —the weight of the edge between classes u and v;
- —the number of elements in the cluster.
- (2)
- the inter-cluster connectivity (coupling) between and other is minimized.
- —the weight of the external edge between classes u and v.
2.3. Cluster Structure Refinement Method
- —fixed threshold.
2.4. Graph Neural Network-Based Decomposition Model
- In-degree centrality of the node;
- Out-degree centrality of the node;
- Betweenness centrality of the node;
- Local clustering coefficient:where:
- —the number of edges between the neighbors of node v;
- —the number of neighbors.
- PageRank coefficient:where:
- d—damping factor;
- —the number of nodes in the dependency graph;
- —the set of incoming neighbors of vertex v, i.e., vertices from which edges are directed to v;
- —the number of edges between node u and other components of the dependency graph.
- Node weight;
- A binary feature indicating resource usage, which captures whether a component participates in data access operations and is important for modeling data sharing across clusters:
- —cross-entropy, which measures the difference between the predicted and target probability distributions of clusters;
- —average number of output dependencies of cluster nodes;
- —average number of internal connections between nodes of the same cluster;
- —determined based on the vector similarity of class names, tags, and attributes, i.e., the extent to which objects in the same cluster have a similar subject entity.
3. Results
3.1. Experimental Setup
3.2. Experimental Evaluation of Dynamic Clustering Algorithm Selection
3.3. Experimental Evaluation of the Graph-Based Decomposition Approach
- Number of nodes (classes/modules)—345;
- Number of oriented edges (dependencies)—641.
- Global graph density—;
- —;
- Shared Resource Ratio (SRR)—;
- Normalized betweenness centrality —.
3.4. Evaluation of Cluster Structure Refinement Method
3.5. Evaluation of the Graph Neural Network-Based Decomposition Model
3.6. Comparative Analysis with Existing Approaches
- k—the number of clusters;
- —the number of edges inside cluster i;
- —the number of classes in cluster i;
- —the number of edges between clusters i and j;
- —the number of classes in cluster j.
- —the total number of calls (edges) between different clusters;
- —the total number of calls (edges) within clusters.
3.7. Complexity and Scalability Analysis
4. Discussion
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Dragoni, N.; Giallorenzo, S.; Lluch Lafuente, A.; Mazzara, M.; Montesi, F.; Mustafin, R.; Safina, L. Microservices: Yesterday, Today, and Tomorrow. In Present and Ulterior Software Engineering; Springer: Berlin/Heidelberg, Germany, 2017; pp. 195–216. [Google Scholar]
- Mazlami, G.; Cito, J.; Leitner, P. Extraction of Microservices from Monolithic Software Architectures. In 2017 IEEE International Conference on Web Services (ICWS); IEEE: New York, NY, USA, 2017. [Google Scholar]
- Martínez Saucedo, A.; Rodríguez, G.; Gomes Rocha, F.; Pereira dos Santos, R. Migration of Monolithic Systems to Microservices: A Systematic Mapping Study. Inf. Softw. Technol. 2024, 177, 107590. [Google Scholar] [CrossRef]
- Seedat, M.; Abbas, Q.; Ahmad, N. Systematic Mapping of Monolithic Applications to Microservices Architecture. arXiv 2023, arXiv:2309.03796. [Google Scholar]
- Abdelfattah, A.S.; Cerny, T. The Microservice Dependency Matrix. In Service-Oriented and Cloud Computing; Springer: Berlin/Heidelberg, Germany, 2023; Volume 14183, pp. 276–288. [Google Scholar]
- Zhong, C.; Zhang, H.; Li, C.; Huang, H.; Feitosa, D. On Measuring Coupling Between Microservices. J. Syst. Softw. 2023, 200, 111670. [Google Scholar] [CrossRef]
- Taibi, D.; Systä, K. A Decomposition and Metric-Based Evaluation Framework for Microservices. In Software Architecture; Springer: Berlin/Heidelberg, Germany, 2019. [Google Scholar]
- Trabelsi, I.; Mahmoudi, B.; Minani, J.B.; Moha, N.; Guéhéneuc, Y.-G. A Systematic Literature Review of Machine Learning Approaches for Migrating Monolithic Systems to Microservices. IEEE Trans. Softw. Eng. 2025, 51, 2972–2995. [Google Scholar] [CrossRef]
- Desai, U.; Bandyopadhyay, S.; Tamilselvam, S. Graph Neural Network to Dilute Outliers for Refactoring Monolith Application. Proc. AAAI Conf. Artif. Intell. 2021, 35, 72–80. [Google Scholar] [CrossRef]
- Qian, L.; Li, J.; He, X.; Gu, R.; Shao, J.; Lu, Y. Microservice extraction using graph deep clustering based on dual view fusion. Inf. Softw. Technol. 2023, 158, 107171. [Google Scholar] [CrossRef]
- Yedida, R.; Krishna, R.; Kalia, A.; Menzies, T.; Xiao, J.; Vukovic, M. An Expert System for Redesigning Software for Cloud Applications. Expert Syst. Appl. 2023, 219, 119673. [Google Scholar] [CrossRef]
- Sellami, K.; Saied, M.A.; Ouni, A. A Hierarchical DBSCAN Method for Extracting Microservices from Monolithic Applications. In Proceedings of the 26th International Conference on Evaluation and Assessment in Software Engineering (EASE ’22); Association for Computing Machinery: New York, NY, USA, 2022. [Google Scholar]
- Ziabakhsh, A.; Rezaee, M.; Eskandari, M.; Goudarzi, M. Mo2oM: Extracting Overlapping Microservices from Monolithic Code via Deep Semantic Embeddings and Graph Neural Network–Based Soft Clustering. arXiv 2025, arXiv:2508.07486. [Google Scholar]
- Chaieb, M.; Saied, M.A. Migration to Microservices: A Comparative Study of Decomposition Strategies and Analysis Metrics. arXiv 2024, arXiv:2402.08481. [Google Scholar]
- Maharjan, R.; Sooksatra, K.; Cerny, T.; Rajbhandari, Y.; Shrestha, S. A Case Study on Monolith to Microservices Decomposition with Variational Autoencoder-Based Graph Neural Network. Future Internet 2025, 17, 303. [Google Scholar] [CrossRef]
- Krause, A.; Zirkelbach, C.; Hasselbring, W.; Lenga, S.; Kröger, D. Microservice Decomposition via Static and Dynamic Analysis of the Monolith. In IEEE International Conference on Software Architecture Companion (ICSA Companion); IEEE: New York, NY, USA, 2020; pp. 9–16. [Google Scholar]
- Mohottige, T.I.; Polyvyanyy, A.; Fidge, C.; Buyya, R.; Barros, A. Reengineering Software Systems into Microservices: State-of-the-Art and Future Directions. Inf. Softw. Technol. 2025, 183, 107732. [Google Scholar]
- Oumoussa, I.; Saidi, R. Evolution of Microservices Identification in Monolith Decomposition: A Systematic Review. IEEE Access 2024, 12, 107732. [Google Scholar] [CrossRef]




| Edge Type | Weight | Description |
|---|---|---|
| Function call | 0.5 | The main mechanism of interaction between modules. |
| Class usage | 0.7 | One module contains a class of another module. |
| Class inheritance | 1.0 | A class inherits from another class, forming a strong coupling. |
| Interface usage | 0.4 | Interaction between components through API. |
| Shared database usage | 0.4 | Modules interact through the database, but not directly. |
| Conditions Based on Graph Metrics | Recommended Clustering Algorithm |
|---|---|
| Spectral Clustering | |
| Infomap | |
| Louvain (all other cases) | |
| Label Propagation | |
| Girvan–Newman | |
| Markov Clustering (MCL) |
| Group (Number of Nodes) | N | Top-1 (pcs) | Top-1 (%) | Top-2 (pcs) | Top-2 (%) | Mistakes (pcs) | Average Deviation of the Cohesion Value | Average Deviation of the Coupling Value |
|---|---|---|---|---|---|---|---|---|
| All | 30 | 22 | 73.3 | 26 | 86.7 | 8 | ||
| 10 | 8 | 80.0 | 8 | 80.0 | 2 | |||
| 10 | 7 | 70.0 | 9 | 90.0 | 3 | |||
| 10 | 7 | 70.0 | 9 | 90.0 | 3 |
| Method | SM | ICP |
|---|---|---|
| CoGCN | 0.027 | 0.559 |
| DEEPLY | 0.040 | 0.546 |
| HyDEC | 0.080 | 0.425 |
| GDC-DVF | 0.041 | 0.446 |
| Mono2Micro | 0.030 | 0.658 |
| Proposed approach | 0.129 | 0.295 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Kornaga, Y.; Hubariev, O.; Yevseiev, S.; Yablonskyi, P.; Pyrohovska, T. Method for Automated Decomposition of Monolithic Software Systems Based on Graph Neural Networks. Axioms 2026, 15, 498. https://doi.org/10.3390/axioms15070498
Kornaga Y, Hubariev O, Yevseiev S, Yablonskyi P, Pyrohovska T. Method for Automated Decomposition of Monolithic Software Systems Based on Graph Neural Networks. Axioms. 2026; 15(7):498. https://doi.org/10.3390/axioms15070498
Chicago/Turabian StyleKornaga, Yaroslav, Oleksandr Hubariev, Serhii Yevseiev, Petro Yablonskyi, and Tetiana Pyrohovska. 2026. "Method for Automated Decomposition of Monolithic Software Systems Based on Graph Neural Networks" Axioms 15, no. 7: 498. https://doi.org/10.3390/axioms15070498
APA StyleKornaga, Y., Hubariev, O., Yevseiev, S., Yablonskyi, P., & Pyrohovska, T. (2026). Method for Automated Decomposition of Monolithic Software Systems Based on Graph Neural Networks. Axioms, 15(7), 498. https://doi.org/10.3390/axioms15070498

