arXiv:2609.11212cs.SESep 2026

Manuscript Offprint

arXiv:2609.11212

TripleBound: Triplet-Guided Heterogeneous Graph Learning for Microservice Decomposition

Mineth Weerasinghe, Himindu Kularathne, Methmini Madhushika, Danuka Lakshan, Nisansa de Silva, Adeesha Wijayasiri, Srinath Perera

Mineth Weerasinghe*, Himindu Kularathne*, Methmini Madhushika*, Danuka Lakshan*

Nisansa de Silva*, Adeesha Wijayasiri*, Srinath Perera†

*Department of Computer Science and Engineering, University of Moratuwa, Sri Lanka

Email: {mineth.21, himindu.21, methmini.21, dhanuka.21, NisansaDdS, adeeshaw}@cse.mrt.ac.lk

†WSO2 LLC

Email: srinath@wso2.com

Abstract—Cloud computing and DevOps have made microservices a common architecture for scalable, maintainable software systems. However, migrating monoliths to microservices remains challenging due to tight coupling and unclear service boundaries. Existing decomposition approaches typically rely on either structural dependencies or semantic similarity signals, but rarely integrate both within a unified representation learning objective. This paper proposes TripleBound, a hybrid framework for automated monolith-to-microservices decomposition that augments a heterogeneous graph neural network with weakly supervised triplet constraints derived from parser-inferred service groups based on package structure, naming conventions, and code location. Rather than combining independently trained structural and organizational representations after training, TripleBound injects triplet-based constraints directly into the shared structural latent space, enabling both signals to be jointly optimized during representation learning. Structural dependencies are captured using CHGNN, which models the monolith as a heterogeneous graph with program nodes, resource nodes, CALL edges, and CRUD edges. Semantic relationships are incorporated through triplet constraints generated from service groups inferred by a parser using cues such as package structure, naming conventions, and code location. Evaluation on AcmeAir, DayTrader, PlantsByWebSphere, and JPetStore shows that TripleBound achieves the highest composite decomposition score under the selected weighting on AcmeAir, DayTrader, and JPetStore compared to CHGNN and MonoEmbed, while CHGNN remains stronger on PlantsByWebSphere. Per-metric analysis reveals trade-offs: gains in structural modularity and inter-partition coupling are accompanied by higher entity distribution imbalance on some datasets. Alternative composite weightings preserve TripleBound's first-place ranking on AcmeAir and DayTrader but not on JPetStore, showing that the aggregate ranking is metric-dependent.

Index Terms—Microservices, Software Architecture, Monolith Decomposition, Graph Neural Networks

I. INTRODUCTION

Enterprise systems often begin as monoliths because they are simple to build, but become difficult to maintain, scale, and extend as they grow. The widespread adoption of cloud computing [1] and DevOps practices [2, 3] has further accelerated demand for modular, independently deployable architectures. Microservices address these challenges by decomposing applications into small, focused services [4–6]. Systematic mapping studies show that microservice research has grown around cloud deployment, architecture recovery, service identification, and migration support [7, 8]. Despite its advantages, migrating monoliths to microservices remains complex [9–11] and requires careful identification of service boundaries and granularity [12–15].

Current decomposition techniques mainly rely on either structural dependencies or semantic analysis of source code. Structural approaches [16–19] analyze call graphs and dependency networks to capture interactions between software components. Semantic approaches use embeddings derived from source code to capture contextual similarities between components. However, approaches that rely on a single signal often fail to capture the full characteristics of software systems. Structural methods may ignore semantic relationships between components, while semantic methods may overlook critical dependency structures.

To address these limitations, this paper proposes TripleBound, a hybrid decomposition framework that integrates structural and source-level organizational signals through joint representation learning. The structural view is captured using a heterogeneous graph neural network [20], which represents the monolithic system as a heterogeneous graph capable of modeling structural and behavioral relationships [21] among software components. The organizational view is incorporated through weakly supervised triplet constraints derived from inferred service groups, encouraging related code elements to cluster more closely within the shared structural representation space. By optimizing these complementary signals within a unified training objective, TripleBound aims to generate cohesive and architecturally consistent microservices.

The evaluation uses four open-source Java monoliths frequently examined in decomposition and modernization research [22–25]. AcmeAir represents a REST-based airline reservation system, DayTrader is a comparatively larger Java EE transaction-processing application, PlantsByWebSphere models an online nursery, and JPetStore is a compact MyBatis-based commerce application. Together, they provide variation in application size, framework, dependency structure, and source-code organization; their detailed characteristics are reported in the experimental evaluation. The main contributions of this paper are:

(1) A hybrid monolith-to-microservices decomposition framework that jointly integrates heterogeneous graph-based structural learning and weakly supervised triplet-

TABLE I COMPARISON OF RELATED APPROACHES

ApproachStruct.Sem.Limitation
CHGNN [20]✓-Does not explicitly model semantic similarity.
MonoEmbed [26]Limited✓Limited awareness of architectural dependencies.
Mono2Micro [22]✓PartialUses multiple signals, but not through joint representation learning.
CoGCN [27]✓-Mainly focuses on graph structure and ignores semantic constraints.
TripleBound✓✓Depends on the quality of inferred triplets.

based constraint learning within a unified representation learning process.

(2) We introduce a parser-inferred triplet-guided graph embedding strategy in which weakly supervised triplet constraints are injected directly into the structural embedding space, rather than combining structural outputs with independently trained representations.

(3) We formulate a joint optimization objective that combines node reconstruction, edge reconstruction, clustering consistency, semantic triplet loss, and communication-aware coupling reduction to learn microservice embeddings.

(4) We evaluate TripleBound on four benchmark monoliths and compare it against available structural and semantic baselines using Structural Modularity (SM), Interface Number (IFN), Inter-Partition Communication (ICP), Non-Extreme Distribution (NED), and a composite score.

References (72)