TY - GEN
T1 - A Pattern-Driven and LLM-Assisted Approach for Decomposing Monolithic ML-Based Systems into Microservices
AU - Ghlissi, Hakim
AU - Boukhatem, Mohamed El Hadi
AU - Abdellatif, Manel
AU - Moha, Naouel
N1 - Publisher Copyright:
© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2026.
PY - 2026
Y1 - 2026
N2 - The evolution of software systems has witnessed a marked shift from monolithic architectures to microservices. This migration is driven by the need to improve the scalability and maintainability of monolithic software systems. However, this shift is most noticeable in Machine Learning (ML)-based systems, where adding learning components brings extra layers of complexity. As ML becomes increasingly embedded in diverse application domains, the challenges of evolving, scaling, and maintaining these systems demand novel architectural solutions. While microservices have proven effective in addressing such challenges in traditional systems, a principled and systematic decomposition strategy tailored specifically to ML-based monoliths remains underexplored. In this paper, we introduce an automated approach for decomposing ML-based monolithic systems into microservices. Leveraging ML-specific architectural patterns, our method employs Large Language Models (LLMs) to detect ML layers, transformer embeddings to capture semantic similarities, and clustering to form coherent microservice candidates. We validate our approach on three monolithic ML-based systems and compare our decomposition results with two baseline approaches from the literature. The results demonstrate the effectiveness of our method in producing modular and ML-aware decompositions, with a precision of 84% and a recall of 65%, outperforming the baseline approaches.
AB - The evolution of software systems has witnessed a marked shift from monolithic architectures to microservices. This migration is driven by the need to improve the scalability and maintainability of monolithic software systems. However, this shift is most noticeable in Machine Learning (ML)-based systems, where adding learning components brings extra layers of complexity. As ML becomes increasingly embedded in diverse application domains, the challenges of evolving, scaling, and maintaining these systems demand novel architectural solutions. While microservices have proven effective in addressing such challenges in traditional systems, a principled and systematic decomposition strategy tailored specifically to ML-based monoliths remains underexplored. In this paper, we introduce an automated approach for decomposing ML-based monolithic systems into microservices. Leveraging ML-specific architectural patterns, our method employs Large Language Models (LLMs) to detect ML layers, transformer embeddings to capture semantic similarities, and clustering to form coherent microservice candidates. We validate our approach on three monolithic ML-based systems and compare our decomposition results with two baseline approaches from the literature. The results demonstrate the effectiveness of our method in producing modular and ML-aware decompositions, with a precision of 84% and a recall of 65%, outperforming the baseline approaches.
UR - https://www.scopus.com/pages/publications/105028277821
U2 - 10.1007/978-981-95-5012-8_16
DO - 10.1007/978-981-95-5012-8_16
M3 - Contribution to conference proceedings
AN - SCOPUS:105028277821
SN - 9789819550111
T3 - Lecture Notes in Computer Science
SP - 221
EP - 229
BT - Service-Oriented Computing - 23rd International Conference, ICSOC 2025, Proceedings
A2 - Aiello, Marco
A2 - Georgievski, Ilche
A2 - Deng, Shuiguang
A2 - Murillo, Juan-Manuel
A2 - Benatallah, Boualem
A2 - Wang, Zhongjie
PB - Springer Science and Business Media Deutschland GmbH
T2 - 23rd International Conference on Service-Oriented Computing, ICSOC 2025
Y2 - 1 December 2025 through 4 December 2025
ER -