# Identifying Appropriately-Sized Services with Deep Reinforcement Learning

arXiv: https://arxiv.org/abs/2512.20381 · HTML: https://mlsanity.com/paper/2512.20381/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Placed in RL for energy, networks and operations, one of 15 directions in Deep reinforcement learning methods.
- Builds on 8 of its 69 references that are in the map.
- First posted on arXiv 23 Dec 2025.

## Placed in

- Deep reinforcement learning methods / [RL for energy, networks and operations](https://mlsanity.com/deeprl/rl-for-energy-networks-and-operations/)

## Builds on (most cited first, 8 of 8)

- [Proximal Policy Optimization Algorithms](https://mlsanity.com/paper/1707.06347/) (2017)
- [The Surprising Effectiveness of PPO in Cooperative, Multi-Agent Games](https://mlsanity.com/paper/2103.01955/) (2021)
- [Graph Neural Network to Dilute Outliers for Refactoring Monolith Application](https://mlsanity.com/paper/2102.03827/) (2021)
- [CARGO: AI-Guided Dependency Analysis for Migrating Monolithic Applications to Microservices Architecture](https://mlsanity.com/paper/2207.11784/) (2022)
- [Mono2Micro: A Practical and Effective Tool for Decomposing Monolithic Java Applications to Microservices](https://mlsanity.com/paper/2107.09698/) (2021)
- [Microservices: How To Make Your Application Scale](https://mlsanity.com/paper/1702.07149/) (2017)
- [Microservice Decomposition via Static and Dynamic Analysis of the Monolith](https://mlsanity.com/paper/2003.02603/) (2020)
- [Modular Monolith: Is This the Trend in Software Architecture?](https://mlsanity.com/paper/2401.11867/) (2024)

## Abstract (arXiv)

Service-based architecture (SBA) has gained attention in industry and academia as a means to modernize legacy systems. It refers to a design style that enables systems to be developed as suites of small, loosely coupled, and autonomous components (services) that encapsulate functionality and communicate via language-agnostic APIs. However, defining appropriately sized services that capture cohesive subsets of system functionality remains challenging. Existing work often relies on the availability of documentation, access to project personnel, or a priori knowledge of the target number of services, assumptions that do not hold in many real-world scenarios. Our work addresses these limitations using a deep reinforcement learning-based approach to identify appropriately sized services directly from implementation artifacts. We present Rake, a reinforcement learning-based technique that leverages available system documentation and source code to guide service decomposition at the level of implementation methods. Rake does not require specific documentation or access to project personnel and is language-agnostic. It also supports a customizable objective function that balances modularization quality and business capability alignment, i.e., the degree to which a service covers the targeted business capability. We applied Rake to four open-source legacy projects and compared it with two state-of-the-art techniques. On average, Rake achieved 7-14 percent higher modularization quality and 18-22 percent stronger business capability alignment. Our results further show that optimizing solely for business context can degrade decomposition quality in tightly coupled systems, highlighting the need for balanced objectives.
