# Generative AI-based Adaptation in Microservices Architectures: A Systematic Mapping Study

Brell Sanwouo, Paul Temple, Clément Quinton

► To cite this version:

Brell Sanwouo, Paul Temple, Clément Quinton. Generative AI-based Adaptation in Microservices Architectures: A Systematic Mapping Study. ICWS'25 - International Conference on Web Services, Jul 2025, Helsinki, Finland. pp.1-8. hal-05082732v2

HAL Id: hal-05082732

https://hal.science/hal-05082732v2

Submitted on 5 Jun 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Generative AI-based Adaptation in Microservices Architectures: A Systematic Mapping Study

Brell Sanwouo

Univ. Lille, CNRS, Inria,
UMR 9189 CRISTAL, F-59000

Lille, France

brell.sanwouo@inria.fr

Paul Temple

Univ. Rennes, CNRS, Inria, IRISA

Rennes, France

paul.temple@irisa.fr

Clément Quinton

Univ. Lille, CNRS, Inria,
UMR 9189 CRISTAL, F-59000

Lille, France

clement.quinton@univ-lille.fr

**Abstract**—Microservices have seen widespread adoption in academia and industry. Despite their benefits, challenges persist in resilience, performance, scalability, and adaptation to dynamic contexts. Generative AI (GenAI) has emerged as a promising approach to address these issues, though concerns remain about the suitability of various models and potential drawbacks. To assess the state of the art, we conducted a systematic mapping study analyzing 22 primary studies. Results reveal significant potential of GenAI in enhancing microservice adaptation, with emphasis on Large Language Models and optimization techniques. Applications primarily target maintenance and monitoring, especially anomaly management. This study also highlights research gaps and outlines future directions to advance GenAI integration for more resilient and autonomous microservices architectures.

**Index Terms**—Microservice, Adaptation, Generative AI, LLM.

## I. INTRODUCTION

Microservices architectures have emerged as a dominant paradigm for developing distributed systems, wherein a software system is decomposed into a set of small, independently deployable services [1]–[4]. While microservices architectures offer significant advantages such as modularity, scalability, and flexibility, they also introduce challenges in deployment, management, latency optimization, security, and testing. Ad-dressing these challenges requires efficient strategies for au-tomation, error diagnosis, and system reliability, particularly in dynamic environments. A promising approach to overcome these issues is the integration of (self-)adaptive systems, which can adjust their behavior in response to environmental changes. Adaptive systems consist of both a managing and a managed system, with the former typically relying on feedback control loops [5], [6]. The MAPE-K (Monitor, Analyze, Plan, Execute, Knowledge) loop is a widely adopted and well-suited model for microservices self-adaptation, where the managing system continuously adapts the underlying microservices architecture.

Previous work has demonstrated that integrating machine learning techniques into the MAPE-K loop can enhance adaptability [7]. For instance, Araújo et al. [8] developed Finch, a tool that employs machine learning to automate the configuration and optimization of REST systems, and thus reduce manual intervention. Similarly, Weyns et al. [9] explored the synergy between MAPE-K, control theory, and machine learning, showing that such integrations yield more robust

and efficient adaptive systems. Ouareth et al. [10] leveraged reinforcement learning to enable dynamic adjustments within MAPE-K loops, while Lecheheb et al. [11] proposed a hybrid approach combining machine learning and deep learning to enhance the accuracy of the Analyze phase. Recently, the emergence of GenAI models have enhanced capabilities and are able to cope with more difficult interactions than previous models. Most GenAI models, such as diffusion models [12], incorporate transformers-based mechanisms [13] similar to those used in BERT [14] or GPT [15].

Given their generative nature and ability to take into account more heterogeneous pieces of information to propose a decision, these models offer an interesting alternative to traditional machine learning methods for self-adaptive systems. Li et al. [16] investigated the integration of generative models within the MAPE-K loop, showing improvements in system autonomy, adaptability, and precision. By embedding generative models in each phase of the loop, adaptation strategies can be dynamically optimized, novel system configurations can be generated, and resource requirements can be anticipated more effectively. Such enhancements have demonstrated applicability across various fields, including autonomic computing [17]–[20], cloud computing [19], [21], [22], IoT and cyber-physical environments [21], [23], [24], networking and telecommunications [17], [25], [26], cybersecurity [27]–[29], software engineering [30], [31], and green computing [32], [33]. In this context, GenAI emerges as a promising approach to enhance microservice adaptation, offering advanced learning and predictive capabilities and enabling more flexible and autonomous adaptation.

The objective of this study is to explore the role of GenAI in microservice adaptation. To achieve this, we conducted a systematic literature mapping, addressing two research questions through an analysis of 22 studies published between 2022 and 2024 across four digital libraries. Our contributions include: (i) a comprehensive analysis of existing approaches to understand how microservices benefit from GenAI, and (ii) a discussion of current limitations, outlining potential future research directions.
<table><caption>TABLE I
SEARCH STRINGS</caption><thead><tr><th>Group</th><th>String</th></tr></thead><tbody><tr><td>Microservice</td><td>("Microservices Systems" OR "cloud Microservices" OR "micro services" OR "micro-services" OR "microservices" OR "microservices architecture")</td></tr><tr><td>Self-adaptation</td><td>("adaptation" OR "adaptative" OR "adaptive systems" OR "autonomic computing" OR "self adaptation" OR "self adaptative" OR "self*")</td></tr><tr><td>Generative AI</td><td>("GANs" OR "Generative Adversarial Networks" OR "LLM" OR "LLMs" OR "Language model" OR "Large language models" OR "VAE" OR "AE" OR "Auto Encoders" OR "artificial intelligence" OR "AI" OR "diffusion models" OR "generative Artificial Intelligence" OR "Gen AI" OR "GenAI" OR "Generative AI" OR "transformers")</td></tr></tbody></table>

<table><caption>TABLE II
SEARCH RESULTS AT EACH SELECTION PHASE</caption><thead><tr><th>Database</th><th>P1</th><th>P2</th><th>P3</th><th>P4 (#Snowballing)</th></tr></thead><tbody><tr><td>IEEE</td><td>60</td><td>3</td><td>2</td><td>0</td></tr><tr><td>ACM Digital Library</td><td>383</td><td>6</td><td>5</td><td>1</td></tr><tr><td>SpringerLink</td><td>439</td><td>4</td><td>3</td><td>0</td></tr><tr><td>Scopus</td><td>1858</td><td>12</td><td>11</td><td>0</td></tr><tr><td>Total</td><td>2740</td><td>25</td><td>21</td><td>22</td></tr></tbody></table>

## II. SYSTEMATIC LITERATURE REVIEW

To conduct our systematic mapping study, we followed the process used by Filho et al. [34], inspired by Petersen et al. [35] and guided by Kitchenham et al. [36]. It comprises three phases: planning, conducting, and reporting the mapping.

### A. Planning the mapping

The process includes (i) formulation of research questions, (ii) search strategy, and (iii) study selection criteria.

1) **Research Questions:** This literature review seeks to provide an overview of GenAI use for microservice adaptation by addressing the following research questions:

**RQ1:** What are the main applications of GenAI in microservice adaptation?

**RQ2:** How do GenAI models support adaptation across the microservices lifecycle?

2) **Search Strategy:** Following Zhang et al. [37], we focused on databases, subjects, search strings, and time periods. An automatic search was performed on four digital libraries and indexing systems (ACM Digital Library, IEEE Xplore, Scopus, Springer Link). These sources were chosen for their scientific reliability and peer-reviewed content in software engineering [38]. Backward and forward snowballing was applied as per Keele et al. [39]. Open-access repositories were not included to ensure metadata consistency. Keywords were grouped into microservices, adaptation, and GenAI (see Table I), and then concatenated into a single search string applied uniformly across all sources. Due to the novelty of GenAI models, the search was limited to January 2022–October 2024, the study’s initiation date.

3) **Study Selection:** We defined one inclusion and five exclusion criteria to systematically select papers from the search results. The inclusion criterion required papers to address GenAI-based adaptation in microservices. Exclusion criteria removed: (i) short summaries, (ii) non-English papers,

(iii) non-open access studies, (iv) duplicates, and (v) papers mentioning adaptation without focus on microservices. Papers meeting inclusion and no exclusion criteria were deemed relevant.

### B. Conducting the Mapping

Table II reports the number of retrieved paper per platform. A total of 2740 papers<fnref n="1" /> were retrieved: 1858 from Scopus, 439 from SpringerLink, 383 from ACM DL, and 60 from IEEE Xplore. Manual filtering excluded papers lacking at least one keyword from each group and duplicates, leaving 25 papers. Titles, abstracts, and keywords of selected papers were reviewed by two randomly assigned authors to minimize bias. Conflicts were resolved by a third author vote. This yielded 21 potentially relevant papers; 4 were removed due to inaccessibility. A final full-text reading confirmed relevance. Snowballing added one paper, resulting in a final pool of 22 relevant studies.

## III. APPLICATIONS OF GENAI IN MICROSERVICES
ADAPTATION

This section addresses our first research question regarding the main applications of GenAI in microservices adaptation and their distribution among the retrieved papers from our search. To this end, we examine the used adaptation strategies and the type of GenAI they rely on.

### A. Overview of the selected studies

Table III summarizes the selected studies, classified according to the MAPE-K steps covered, the mentioned GenAI model, the training, validation and implementation methods, and the type of adaptation. Information was manually extracted from the selected articles. When specific data was not explicitly provided, it was recorded as Not specified.

### B. Adaptation strategies

Last column of Table III reports the adaptation strategies employed in the studied papers. Most of them use reactive adaptation (68%), meaning that the proposed solutions trigger adaptations in reaction to problems. Five studies (23%) employs a proactive approach, as their solutions try to foresee the occurrence of problems to prevent them. Two others studies (9%) propose an hybrid solution that is both reactive and proactive. Regarding the phase of the MAPE-K loop on which

<footnote n="1">¹Available at https://doi.org/10.5281/zenodo.15513529</footnote>
<table><caption>TABLE III SELECTED STUDIES</caption><thead><tr><th>ID & Ref.</th><th>MAPE-K Step</th><th>AI Model</th><th>Training</th><th>Validation</th><th>Implementation</th><th>Adaptation</th></tr></thead><tbody><tr><td>S1 [40]</td><td>M, A, P, E, K</td><td>LLM (unspecified)</td><td>Prompt engineering, Fine-tuning, and Few-shot learning</td><td>Review of generated data, Functional correctness</td><td>Use of a pre-trained model</td><td>Reactive</td></tr><tr><td>S2 [41]</td><td>A, E, K</td><td>LLM (ChatGPT)</td><td>Prompt engineering</td><td>ARGUELAUNCHER</td><td>Not specified</td><td>Reactive</td></tr><tr><td>S3 [42]</td><td>M, A</td><td>DistilBERT</td><td>Fine-tuning</td><td>Metrics (Precision, Recall, F1-score, Accuracy)</td><td>Self-hosting of a pre-trained model</td><td>Reactive</td></tr><tr><td>S4 [43]</td><td>A, P</td><td>AutoEncoder</td><td>Supervised learning</td><td>Dataset, MSE, Functional tests</td><td>Self-hosting of a pre-trained model</td><td>Reactive</td></tr><tr><td>S5 [44]</td><td>M, A, K</td><td>GPT-x (Codex, Code-davinci-002)</td><td>Fine-tuning</td><td>Not specified</td><td>Not specified</td><td>Proactive</td></tr><tr><td>S6 [45]</td><td>M, A, K</td><td>ChatGPT 3.5</td><td>In-context learning, Prompt engineering</td><td>F1-score, Precision, Recall, Statistics</td><td>Third-party API</td><td>Reactive</td></tr><tr><td>S7 [46]</td><td>M, A, P, E, K</td><td>GPT-4</td><td>Zero-shot learning, RAG</td><td>Dataset and Statistics</td><td>Third-party API and Langchain framework</td><td>Reactive</td></tr><tr><td>S8 [47]</td><td>A, P</td><td>BERT</td><td>Not specified</td><td>Precision, Recall, F1-score</td><td>Not specified</td><td>Reactive</td></tr><tr><td>S9 [48]</td><td>M, A, P, K</td><td>AutoEncoder</td><td>Unsupervised learning and Fine-tuning</td><td>Dataset, Accuracy</td><td>Not specified</td><td>Hybrid</td></tr><tr><td>S10 [49]</td><td>M, A, P, E</td><td>AutoEncoder</td><td>Supervised learning</td><td>Dataset, MAE, RMSE, MAPE</td><td>Training from scratch</td><td>Hybrid</td></tr><tr><td>S11 [50]</td><td>M, A, P, E, K</td><td>GPT-4</td><td>Few-shot learning, Prompt engineering</td><td>Manual tests, Average precision, Functional correctness</td><td>Third-party API</td><td>Reactive</td></tr><tr><td>S12 [51]</td><td>M, A, E</td><td>LLM(CodexBERT, Codex, GPT-Neo, GPT-NeoX, LLaMA, GPT-3)</td><td>Fine-tuning, Zero-shot, few-shot, In-Context Learning</td><td>Manual tests, Lexical and semantic metrics</td><td>Not specified</td><td>Reactive</td></tr><tr><td>S13 [52]</td><td>M, A</td><td>AutoEncoder</td><td>Step-wise learning decay scheduler</td><td>Dataset, MSE</td><td>Training from scratch</td><td>Proactive</td></tr><tr><td>S14 [53]</td><td>M, A, K</td><td>AutoEncoder</td><td>Adversarial learning</td><td>Dataset, recall, F1-score</td><td>Not specified</td><td>Proactive</td></tr><tr><td>S15 [54]</td><td>A, P, E</td><td>LLM, BERT</td><td>Fine-tuning</td><td>Dataset, MRP, MAP, Precision, Recall</td><td>Self-hosted and external API</td><td>Reactive</td></tr><tr><td>S16 [55]</td><td>M, A</td><td>Transformer</td><td>Supervised-learning</td><td>Precision, Recall, F1-score</td><td>Training from scratch</td><td>Reactive</td></tr><tr><td>S17 [56]</td><td>M, A, P, E, K</td><td>Transformer</td><td>Supervised-learning</td><td>MAE</td><td>Training from scratch</td><td>Proactive</td></tr><tr><td>S18 [57]</td><td>M, A</td><td>BERT</td><td>Semi-supervised training</td><td>Dataset, Precision, Recall, F1-score</td><td>Pre-trained model</td><td>Reactive</td></tr><tr><td>S19 [58]</td><td>M, A, P, E</td><td>LLM(GPT-3.5, GPT-4, CodeLlama, Llama2)</td><td>Prompt engineering</td><td>4 test scenarios</td><td>Framework integration</td><td>Reactive</td></tr><tr><td>S20 [59]</td><td>M, A</td><td>Transformer</td><td>Self-supervised training</td><td>Dataset, Precision, Recall, F1-score</td><td>Pre-trained model</td><td>Reactive</td></tr><tr><td>S21 [60]</td><td>A, P, E</td><td>AutoEncoder</td><td>Semi-supervised training</td><td>Functional tests and Modularity metrics</td><td>Not specified</td><td>Reactive</td></tr><tr><td>S22 [61]</td><td>M, A, P</td><td>Transformer</td><td>Self-supervised training</td><td>Dataset, Precision, Recall, F1-score</td><td>Not specified</td><td>Proactive</td></tr></tbody></table>

<figure><img src="image_2.png" /><figcaption>Fig. 1. MAPE-K loop addressed phases</figcaption></figure>

GenAI is applied, most studies focus on the monitoring (77%) and analysis (100%) phases as illustrated in Figure 1. That is, most studies use GenAIs to analyze a context through data that are usually monitored. Other phases like planning (59%), execution (45%) and knowledge (41%) are less considered. Finally, only four studies (18%) address all phases of the MAPE-K loop for microservice adaptation.

### C. Generative AI techniques

Table IV presents the studies grouped by GenAI techniques. GPT models are the most represented, with eight studies (36%). *AutoEncoder* (AE) and BERT are mentioned respectively in six (27%) and five studies (23%). Transformer-only models are used in four studies (18%). LLaMA models are included in three studies (13%), and one study involves LLMs without specifying their architecture. Note that some studies combine different approaches to leverage the strengths of each technology. For instance, [S12] explores GPT, BERT, and LLaMA, while [S15] integrates both GPT and BERT. Table IV also shows the methods used to leverage GenAI for microservices adaptation. Since LLM-type GenAI models (i.e., GPT, BERT, and LLaMA) require tremendous amount of data and energy, none of them are trained from scratch in our set of 22 studies. They are either fine-tuned or used as they
<table><caption>TABLE IV
GENAIS MODELS USED IN THE SELECTED STUDIES</caption><thead><tr><th>Generative AI</th><th>#</th><th>Studies</th><th>Methods</th></tr></thead><tbody><tr><td>GPT</td><td>8</td><td>S2, S5, S6, S7, S11, S12, S15, S19</td><td>RAG (S7), Prompt engineering (S2, S6, S11, S12, S19), Fine-tuning (S5, S12, S15), In-context learning (S6, S12), Zero-shot learning (S7, S12), Few-shot learning (S11, S12)</td></tr><tr><td>AutoEncoders</td><td>6</td><td>S4, S9, S10, S13, S14, S21</td><td>Supervised learning (S4, S10), Unsupervised learning (S9), Fine-tuning (S9), Step-wise learning decay scheduler (S13), Semi-supervised learning (S21), Adversarial learning (S14)</td></tr><tr><td>BERT</td><td>5</td><td>S3, S8, S12, S15, S18</td><td>Fine-tuning (S3, S12, S15), None (S8), Semi-supervised learning (S18)</td></tr><tr><td>Transformer</td><td>4</td><td>S16, S17, S20, S22</td><td>Supervised learning (S16, S17), Self-supervised learning (S20, S22)</td></tr><tr><td>LLaMA</td><td>2</td><td>S12, S19</td><td>Fine-tuning (S12), Zero-shot learning (S12), Few-shot learning (S12), In-context learning (S12), Prompt engineering (S12, S19)</td></tr><tr><td>Not specified LLM</td><td>1</td><td>S1</td><td>Prompt engineering (S1), Fine-tuning (S1), Few-shot learning (S1)</td></tr></tbody></table>

<figure><img src="image_3.png" /><figcaption>Fig. 2. Methods used to leverage GenAI</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>Fig. 3. Adaptation challenges and GenAI models used to address them</figcaption></figure>

are through prompt engineering. On the other hand, models based on AE and Transformers usually go through a complete training phase, using conventional training methods such as supervised or unsupervised learning.

Overall, methods based on GenAI can be categorized into four families, as depicted by Figure 2. “Traditional” Learning approaches, which implement the training process from scratch with annotated or non-annotated data includes supervised learning, unsupervised learning, semi-supervised learning, and self-supervised learning. Fitting pre-trained models gather methods used to fit pre-trained model, i.e., fine-tuning, prompt engineering, and Retrieval Augmented Generation (RAG). Low-resource learning approaches, which perform fitting with few or no examples, includes few-shot learning, zero-shot learning, and in-context learning. Finally, training optimization methods are the ones performing optimization during training, such as step-wise learning decay scheduler, or adversarial learning. Regarding validation, some authors rely on specific datasets to evaluate model training or optimization, while others favor classification and regression metrics, such as Mean Squared Error (MSE), Mean Absolute Error (MAE), or Precision and Recall, to measure the performances of a model. These include [S16] which uses Precision, Recall and F1-score or [S17] which uses MAE. In addition, some studies such as [S1] or [S11] evaluate models using more specific metrics, such as functional correctness or average correctness, to analyze their effectiveness in specific application contexts. Regarding implementation, different approaches are observed. Some studies ([S6], [S7], [S11], [S15]) integrate models via third-party APIs, simplifying their integration into the microservices architecture. In contrast, others studies prefer to host the models themselves ([S3], [S4], [S15]) for better con-

trol and optimization specific to the system's needs. Finally, some studies ([S7]) adopt frameworks such as LangChain or LlamaIndex to facilitate the integration and management of GenAI models within microservices, underlining a trend towards modular and flexible solutions.

## IV. LEVERAGING GENAI TO ADDRESS ADAPTATION CHALLENGES IN MICROSERVICES

This section addresses RQ2, i.e., it investigates how GenAI models are leveraged to address adaptation in microservice life cycle. In particular, we analyze what adaptation challenges are tackled, which phases of a microservice life cycle are considered, and which methods are used to leverage GenAI.

### A. Addressed challenges

Table V summarizes the challenges addressed by GenAI in the selected studies and methods used for each models to perform microservices adaptation. Some studies address several challenges at once. For example, [S9] addresses both anomaly management and security. Anomaly management, which concerns studies that detects or resolves anomalies, is the most addressed challenge, with seven studies (32%). Similarly, performance optimization is mentioned in seven studies (32%). Security is mentioned in six studies (27%).
<table><caption>TABLE V
CHALLENGES ADDRESSED IN THE SELECTED STUDIES</caption><thead><tr><th>Challenges</th><th>#</th><th>Studies</th><th>Methods</th></tr></thead><tbody><tr><td>Anomaly Management</td><td>7</td><td>S1, S9, S14, S17, S18, S19, S20</td><td>Fine-tuning (S1, S9), Prompt engineering (S1, S9), Few-shot learning (S1), Unsupervised learning (S9), Adversarial learning (S14), Supervised learning (S17), Semi-supervised learning (S18), Self-supervised learning (S20)</td></tr><tr><td>Performance Optimization</td><td>7</td><td>S4, S5, S6, S8, S10, S13, S22</td><td>Fine-tuning (S5), Prompt engineering (S6), In-context learning (S6), Supervised learning (S4, 10), Step-wise learning decay scheduler (S13), Self-supervised learning (S22), None (S8)</td></tr><tr><td>Security</td><td>6</td><td>S3, S7, S9, S14, S16, S19</td><td>Fine-tuning (S3, S9), RAG (S7), Zero-shot learning (S7), Unsupervised learning (S9), Adversarial learning (S14), Supervised learning (S16), Prompt engineering (S19)</td></tr><tr><td>Architecture Management</td><td>4</td><td>S2, S5, S6, S15</td><td>Prompt engineering (S2, S6), Fine-tuning (S5, S15), In-context learning (S6)</td></tr><tr><td>Remediation</td><td>3</td><td>S1, S11, S12</td><td>Fine-tuning (S1, S12), Prompt engineering (S1, S11, S12), Few-shot learning (S1, S11, S12), Zero-shot learning (S12), In-context learning (S12)</td></tr><tr><td>Reliability and Robustness</td><td>2</td><td>S11, S12</td><td>Fine-tuning (S12), Prompt engineering (S11), Few-shot learning (S11, S12), Zero-shot learning (S12)</td></tr></tbody></table>

Architecture management is explored in four studies (18%) and, remediation appear in only three studies (14%). Finally, reliability and robustness is mentioned in only two studies (9%). This shows that GenAI in microservices architectures places particular emphasis on anomaly management, performance and security.

Figure 3 focuses on the types of GenAI models used to address specific challenges in microservices adaptation. Among them, GPT models are the most widely used, appearing across all categories. BERT models also appear in all categories but their use is less explored, with only one reference reported per category. AE have been particularly used to tackle security, anomaly management, and performance optimization. In each of these areas, multiple studies propose solutions based on AE. Similarly, Transformers target the same set of challenges, though fewer studies have adopted them. LLaMA models have been employed to address various challenges, including less frequently tackled areas such as remediation, reliability, and robustness. Nonetheless, their overall usage remains limited. In summary, while GPT models demonstrate broad applicability, other models—such as AE, BERT, and Transformers—tend to be more specialized, each contributing to specific domains within microservices adaptation. Figure 4 shows how often grouped methods (cf. Section III-C) are used to leverage GenAI in addressing microservices-related challenges across the collected studies. Methods for fitting pre-trained models are the most commonly used, followed by low-resource learning ones. In contrast, traditional learning methods and training optimization techniques are less frequently applied. This is likely due to the prohibitive cost of collecting and annotating data, as well as the substantial computational resources required to train a GenAI model from scratch—especially when compared to fine-tuning a pre-trained model, which, while more accessible, can still demand significant effort and resources.

## B. Addressed microservices' life cycle phases

Figure 5 presents the GenAI models employed at various phases of the microservices life cycle. GPT models largely dominate all phases, particularly Development, Maintenance

<figure><img src="image_5.png" /><figcaption>Fig. 4. Training methods of GenAI models addressing the challenges reported in Table V</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Fig. 5. GenAI Models in MSA Life Cycle</figcaption></figure>

and Evolution. AE and BERT are also well represented in these phases, contrarily to Transformers and LLaMA. Interestingly, the Deployment phase remains less explored, with only one of the selected studies addressing it—using a GPT model as well. Overall, this distribution shows a clear preference for GPT models across all phases of the microservices life cycle. Figure 6 illustrates the frequency with which grouped methods are applied to leverage GenAI for improving the microservices life cycle. Methods for fitting pre-trained models are mostly used. Traditional learning and low-resource learning methods are moderately used, while training optimization methods are the least represented.
<table><caption>TABLE VI
OVERVIEW OF THE RELATIONSHIP WITH INDUSTRY IN SELECTED PAPERS</caption><thead><tr><td>Industry Relation</td><td>#</td><td>Studies</td></tr></thead><tbody><tr><td>Industrial publications</td><td>3</td><td>S7, S12, S17</td></tr><tr><td>Industrial data</td><td>6</td><td>S7, S9, S13, S16, S17, S22</td></tr><tr><td>Industry Applications</td><td>3</td><td>S7, S12, S17</td></tr><tr><td>Benchmarks</td><td>7</td><td>S4, S6, S10, S12, S16, S20, S21</td></tr></tbody></table>

<figure><img src="image_7.png" /><figcaption>Fig. 6. Training methods of GenAI models from studies considering MSA life cycle phase(s)</figcaption></figure>

## V. GENAI AND MICROSERVICES ADAPTATION: WHAT'S NEXT ?

As GenAI continues to evolve, its role in microservice adaptation remains an open research area. This section explores the maturity of existing solutions and outlines future directions, including more advanced self-adaptation mechanisms, optimization strategies, and the integration of intelligent agents for enhanced autonomy.

### A. Solutions maturity

Various techniques leveraging GenAI for microservice adaptation differ in maturity. To evaluate this, we consider three criteria: (i) frequency of GenAI model usage, (ii) implementation frequency of specific GenAI techniques, and (iii) applicability in industrial or real-world contexts, including publications, experiments, and benchmarks. LLM-based solutions, notably GPT, BERT, and LLaMA—with GPT architectures leading—demonstrate the highest maturity, appearing in 12 of 22 studies (Table IV). Their versatility in tasks like code generation, documentation, and log analysis underpins their prominence across all microservice lifecycle stages (Figures 3, 5). Regarding training, fine-tuning and prompt engineering are the most mature adaptation strategies (Figure 2), preferred over traditional or low-resource learning. These methods effectively address challenges such as anomaly detection, architecture management, optimization, security, and performance, especially within LLM-based solutions, by customizing models without full retraining. Finally, regarding the third criterion, Table VI indicates that although some solutions align with industry via real datasets, domain-specific concepts, benchmarks, or infrastructure evaluations, none have been deployed in production. This gap underscores challenges including ensuring model robustness to real-world variations, adaptability in dynamic environments, and compliance with industrial performance and reliability requirements. Overcoming these limitations is essential for widespread integration into production microservices architectures.

### B. GenAI and Adaptation: Opportunities

**Agent-based adaptation.** A promising direction lies in agent-based adaptation. The AWARE framework (Assess, Weigh, Act, Reflect, Enrich) [62] exemplifies this shift, offering a decentralized alternative to the traditional MAPE-K loop. In AWARE, intelligent agents powered by GenAI models collaborate to monitor services, evaluate trade-offs, and dynamically adapt configurations. This paradigm supports the development of scalable, proactive, and self-improving adaptive systems,

and opens new possibilities for improving autonomy and learning into complex microservices environments.

**Deployment.** The Deployment phase remains significantly less explored than other phases in the reviewed literature (cf. Figure 5). An important opportunity for future work is to leverage GenAI capabilities to dynamically generate deployment configurations that adapt to runtime conditions, such as system load, infrastructure status, or Quality of Service requirements. Such automation would enhance the adaptability, resilience, and self-management capabilities of microservices architectures.

**Optimization.** Many GenAI approaches rely on large pre-trained models, yet their practical integration in microservices architectures often requires targeted optimization. Techniques like Cache-Augmented Generation (CAG) [63] reduce latency by caching relevant context and minimizing costly external retrieval. Additionally, deploying lightweight or task-specific models—through methods such as knowledge distillation [64], which transfer knowledge from larger models—can effectively meet specific goals like anomaly detection or configuration tuning, with minimal degradation in performance.

## VI. CONCLUSION

With the growing capabilities of GenAI models, their integration into self-adaptive microservice systems shows strong potential. This study reviewed 22 relevant works from an initial pool of 2,740 papers (January 2022 – October 2024), revealing that GenAI is mainly used in reactive adaptation, particularly for monitoring and analysis, with limited focus on execution. Adaptation strategies rely on pre-trained models like GPT or BERT, often enhanced through RAG or prompt engineering, and primarily target reliability, performance, and anomaly management. However, current approaches remain immature for large-scale deployment and various research directions remain open to improve them, including agent-based adaptation, which relies on autonomous agents to collaborate for a more proactive approach. Additionally, optimization techniques such as CAG and knowledge distillation can be considered to reduce latency and adapt large language models to lightweight and task-specific settings, enabling more efficient and focused microservices self-adaptation.

## ACKNOWLEDGMENTS

This work was supported by a French government grant managed by the Agence Nationale de la Recherche under the France 2030 program, reference “ANR-23-PECL-0008”.
REFERENCES

[1] A. Balalaie, A. Heydarnoori, P. Jamshidi, D. A. Tamburri, and T. Lynn, "Microservices migration patterns," Software: Practice and Experience, vol. 48, no. 11, pp. 2019-2042, 2018.

[2] P. S. de Sousa, N. P. Nogueira, R. C. dos Santos, P. H. M. Maia, and J. T. de Souza, "Building a prototype based on microservices and blockchain technologies for notary's office: An academic experience report," in 2020 IEEE International Conference on Software Architecture Companion (ICSA-C). IEEE, 2020, pp. 122-129.

[3] L. Sun, Y. Li, and R. A. Memon, "An open iot framework based on microservices architecture," China Communications, vol. 14, no. 2, pp. 154-162, 2017.

[4] C.-Y. Fan and S.-P. Ma, "Migrating monolithic mobile application to microservice architecture: An experiment report," in 2017 ieee international conference on ai & mobile services (aims). IEEE, 2017, pp. 109-112.

[5] C. Krupitzer, F. M. Roth, S. VanSyckel, G. Schiele, and C. Becker, "A survey on engineering approaches for self-adaptive systems," Pervasive and Mobile Computing, vol. 17, pp. 184-206, 2015.

[6] D. Weyns, B. Schmerl, V. Grassi, S. Malek, R. Mirandola, C. Prehofer, J. Wuttke, J. Andersson, H. Giese, and K. M. Göschka, "On patterns for decentralized control in self-adaptive systems," in Software Engineering for Self-Adaptive Systems II: International Seminar, Dagstuhl Castle, Germany, October 24-29, 2010 Revised Selected and Invited Papers. Springer, 2013, pp. 76-107.

[7] A. Metzger, C. Quinton, Z. Á. Mann, L. Baresi, and K. Pohl, "Realizing self-adaptive systems via online reinforcement learning and feature-model-guided exploration," Computing, vol. 106, no. 4, pp. 1251-1272, 2024.

[8] R. Araújo and R. Holmes, "Lightweight self-adaptive configuration using machine learning," in Proceedings of the 31st Annual International Conference on Computer Science and Software Engineering, 2021, pp. 133-142.

[9] D. Weyns, B. Schmerl, M. Kishida, A. Leva, M. Litoiu, N. Ozay, C. Paterson, and K. Tei, "Towards better adaptive systems by combining mape, control theory, and machine learning," in 2021 International Symposium on Software Engineering for Adaptive and Self-Managing Systems (SEAMS). IEEE, 2021, pp. 217-223.

[10] S. Ouareth, S. Boulehouache, and M. Smaine, "Self-adaptation through reinforcement learning using a feature model," International Journal of Organizational and Collective Intelligence (IJOCI), vol. 12, no. 4, pp. 1-20, 2022.

[11] S. Lecheheb, S. Boulehouache, and S. Brahimi, "Improving self-adaptation by combining mape-k, machine and deep learning," in 2022 2nd International Conference on New Technologies of Information and Communication (NTIC). IEEE, 2022, pp. 1-6.

[12] J. Ho, A. Jain, and P. Abbeel, "Denoising diffusion probabilistic models," Advances in neural information processing systems, vol. 33, pp. 6840-6851, 2020.

[13] A. Vaswani, "Attention is all you need," Advances in Neural Information Processing Systems, 2017.

[14] J. D. M.-W. C. Kenton and L. K. Toutanova, "Bert: Pre-training of deep bidirectional transformers for language understanding," in Proceedings of naacl-HLT, vol. 1, no. 2. Minneapolis, Minnesota, 2019.

[15] T. Brown, B. Mann, N. Ryder, M. Subbiah, J. D. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell et al., "Language models are few-shot learners," Advances in neural information processing systems, vol. 33, pp. 1877-1901, 2020.

[16] J. Li, M. Zhang, N. Li, D. Weyns, Z. Jin, and K. Tei, "Generative ai for self-adaptive systems: State of the art and research roadmap," ACM Transactions on Autonomous and Adaptive Systems, vol. 19, no. 3, pp. 1-60, 2024.

[17] E. Lara, L. Aguilar, M. A. Sanchez, and J. A. García, "Adaptive security based on mape-k: A survey," Applied Decision-Making: Applications in Computer Sciences and Engineering, pp. 157-183, 2019.

[18] I. Abdennadher, "Daacs: a decision approach for autonomic computing systems," The Journal of Supercomputing, vol. 78, no. 3, pp. 3883-3904, 2022.

[19] M. Maurer, I. Breskovic, V. C. Emeakaroha, and I. Brandic, "Revealing the mape loop for the autonomic management of cloud infrastructures," in IEEE symposium on computers and communications. IEEE, 2011, pp. 147-152.

[20] E. Rutten, N. Marchand, and D. Simon, "Feedback control as mape-k loop in autonomic computing," in Software Engineering for Self-Adaptive Systems III. Assurances: International Seminar, Dagstuhl Castle, Germany, December 15-19, 2013, Revised Selected and Invited Papers. Springer, 2017, pp. 349-373.

[21] J. Oh, C. Raibulet, and J. Leest, "Analysis of mape-k loop in self-adaptive systems for cloud, iot and cps," in International Conference on Service-Oriented Computing. Springer, 2022, pp. 130-141.

[22] J. P. Karol Santos Nunes, S. Nejati, M. Sabetzadeh, and E. Y. Nakagawa, "Self-adaptive, requirements-driven autoscaling of microservices," in Proceedings of the 19th International Symposium on Software Engineering for Adaptive and Self-Managing Systems, 2024, pp. 168-174.

[23] M. Riegler, J. Sametinger, and M. Vierhauser, "A distributed mape-k framework for self-protective iot devices," in 18th Symposium on Software Engineering for Adaptive and Self-Managing Systems, 2023, pp. 202-208.

[24] R. Ben Halima, M. Hachicha, A. Jemal, and A. Hadj Kacem, "Mape-k patterns for self-adaptation in cyber-physical systems," The Journal of Supercomputing, vol. 79, no. 5, pp. 4917-4943, 2023.

[25] R. Eyckerman, P. Reiter, S. Mercelis, S. Latré, J. Marquez-Barja, and P. Hellinckx, "A generalized approach for practical task allocation using a mape-k control loop," in International Conference on Information and Communication Technology Convergence. IEEE, 2021, pp. 779-784.

[26] J. Song, J. Kang, S. Hyun, E. Jee, and D.-H. Bae, "Continuous verification of system of systems with collaborative mape-k pattern and probability model slicing," Information and Software Technology, vol. 147, p. 106904, 2022.

[27] S. Jamshidi, A. Amirnia, A. Nikanjam, and F. Khomh, "Enhancing security and energy efficiency of cyber-physical systems using deep reinforcement learning," Procedia Computer Science, vol. 238, pp. 1074-1079, 2024.

[28] M. Stadler, J. Sametinger, and M. Riegler, "Cyber-resilient edge computing: a holistic approach with multi-level mape-k loops," in IEEE 21st International Conference on Software Architecture Companion, 2024, pp. 79-83.

[29] S. Jahan, I. Riley, C. Walter, R. F. Gamble et al., "Mape-k/mape-sac: An interaction framework for adaptive systems with security assurance cases," Future Generation Computer Systems, vol. 109, pp. 197-209, 2020.

[30] H. Jilderda and C. Raibulet, "Mape-k based guidelines for designing reactive and proactive self-adaptive systems," in Software Architecture. ECSA 2023 Tracks, Workshops, and Doctoral Symposium, 2023, pp. 53-68.

[31] C. Quinton, M. Vierhauser, R. Rabiser, L. Baresi, P. Grünbacher, and C. Schuhmayer, "Evolution in dynamic software product lines," Journal of software: evolution and process, vol. 33, no. 2, p. e2293, 2021.

[32] L. Malburg, M. Hoffmann, and R. Bergmann, "Applying mape-k control loops for adaptive workflow management in smart factories," Journal of Intelligent Information Systems, vol. 61, no. 1, pp. 83-111, 2023.

[33] J. Cleland-Huang, A. Agrawal, M. Vierhauser, M. Murphy, and M. Prieto, "Extending mape-k to support human-machine teaming," in Proceedings of the 17th Symposium on Software Engineering for Adaptive and Self-Managing Systems, 2022, pp. 120-131.

[34] E. Pimentel, W. Pereira, P. H. M. Maia, M. I. Cortés et al., "Self-adaptive microservice-based systems-landscape and research opportunities," in 2021 International Symposium on Software Engineering for Adaptive and Self-Managing Systems (SEAMS). IEEE, 2021, pp. 167-178.

[35] K. Petersen, S. Vakkalanka, and L. Kuzniarz, "Guidelines for conducting systematic mapping studies in software engineering: An update," Information and software technology, vol. 64, pp. 1-18, 2015.

[36] B. A. Kitchenham, D. Budgen, and P. Brereton, Evidence-based software engineering and systematic reviews. CRC press, 2015, vol. 4.

[37] H. Zhang, M. A. Babar, and P. Tell, "Identifying relevant studies in software engineering," Information and Software Technology, vol. 53, no. 6, pp. 625-637, 2011.

[38] P. Brereton, B. A. Kitchenham, D. Budgen, M. Turner, and M. Khalil, "Lessons from applying the systematic literature review process within the software engineering domain," Journal of systems and software, vol. 80, no. 4, pp. 571-583, 2007.

[39] S. Keele et al., "Guidelines for performing systematic literature reviews in software engineering," Technical report, ver. 2.3 ebse technical report. ebse. Tech. Rep., 2007.

[40] K. Sarda, Z. Namrud, R. Rouf, H. Ahuja, M. Rasolroveicy, M. Litoiu, L. Shwartz, and I. Watts, "Adarma auto-detection and auto-remediation
of microservice anomalies by leveraging large language models,” in Proceedings of the 33rd Annual International Conference on Computer Science and Software Engineering, 2023, pp. 200–205.

[41] M. Lenz, L. Dumani, R. Schenkel, and R. Bergmann, “Argservices: A microservice-based architecture for argumentation machines,” in Conference on Advances in Robust Argumentation Machines. Springer, 2024, pp. 352–369.

[42] L. Nige, C. Lu, Z. Lei, T. Zhenning, W. Zhiqiang, S. Yiyang, and G. Xiaolin, “A web attack detection method based on distilbert and feature fusion for power micro-application server,” in 2023 2nd International Conference on Advanced Electronics, Electrical and Green Energy (AEEGE). IEEE, 2023, pp. 6–12.

[43] M. S. H. Chy, K. Sooksatra, J. Yero, and T. Cerny, “Benchmarking micro2micro transformation: an approach with gnn andvae,” Cluster Computing, pp. 1–15, 2024.

[44] G. Somashekar and R. Kumar, “Enhancing the configuration tuning pipeline of large-scale distributed applications using large language models (idea paper),” in Companion of the 2023 ACM/SPEC International Conference on Performance Engineering, 2023, pp. 39–44.

[45] E. Quevedo, A. S. Abdelfattah, A. Rodriguez, J. Yero, and T. Cerny, “Evaluating chatgpt’s proficiency in understanding and answering microservice architecture queries using source code insights,” SN Computer Science, vol. 5, no. 4, p. 422, 2024.

[46] D. Roy, X. Zhang, R. Bhave, C. Bansal, P. Las-Casas, R. Fonseca, and S. Rajmohan, “Exploring llm-based agents for root cause analysis,” in Companion Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering, 2024, pp. 208–219.

[47] D. Bajaj, U. Bharti, I. Gupta, P. Gupta, and A. Yadav, “Gtmi-cro—microservice identification approach based on deep nlp transformer model for greenfield developments,” International Journal of Information Technology, pp. 1–11, 2024.

[48] Y. Sun, Z. Lin, B. Shi, S. Zhang, S. Ma, P. Jin, Z. Zhong, L. Pan, Y. Guo, and D. Pei, “Interpretable failure localization for microservice systems based on graph autoencoder,” ACM Transactions on Software Engineering and Methodology, 2024.

[49] J. Dogani, F. Khunjush, and M. Seydali, “K-agrued: A container autoscaling technique for cloud-based web applications in kubernetes using attention-based gru encoder-decoder,” Journal of Grid Computing, vol. 20, no. 4, p. 40, 2022.

[50] Z. Namrud, K. Sarda, M. Litoiu, L. Shwartz, and I. Watts, “Kubeplay-book: A repository of ansible playbooks for kubernetes auto-remediation with llms,” in Companion of the 15th ACM/SPEC International Conference on Performance Engineering, 2024, pp. 57–61.

[51] K. Sarda, Z. Namrud, M. Litoiu, L. Shwartz, and I. Watts, “Leveraging large language models for the auto-remediation of microservice applications: An experimental study,” in Companion Proceedings of the

32nd ACM International Conference on the Foundations of Software Engineering, 2024, pp. 358–369.

[52] D. Alqahtani, “Leveraging sparse auto-encoding and dynamic learning rate for efficient cloud workloads prediction,” IEEE Access, vol. 11, pp. 64 586–64 599, 2023.

[53] Y. Xie and K. Yang, “Log anomaly detection by adversarial autoencoders with graph feature fusion,” IEEE Transactions on Reliability, 2023.

[54] A. S. Alsayed, H. K. Dam, and C. Nguyen, “Microrec: Leveraging large language models for microservice recommendation,” in 2024 IEEE/ACM 21st International Conference on Mining Software Repositories (MSR). IEEE, 2024, pp. 419–430.

[55] J. Wang, Y. Li, Q. Qi, Y. Lu, and B. Wu, “Multilayered fault detection and localization with transformer for microservice systems,” IEEE Transactions on Reliability, 2024.

[56] H. Luo, Y. Zheng, K. Chen, and S. Zhao, “Probabilistic temporal fusion transformers for large-scale kpi anomaly detection,” IEEE Access, 2024.

[57] D. Zaojian, L. Yong, C. Mu, C. Liang, F. Wengao, and L. Ziang, “Semi-supervised power microservices log anomaly detection based on bilstm and bert with attention,” in 2023 2nd International Conference on Advanced Electronics, Electrical and Green Energy (AEEGE). IEEE, 2023, pp. 82–87.

[58] M. Almutawa, Q. Ghabrah, and M. Canini, “Towards llm-assisted system testing for microservices,” in 2024 IEEE 44th International Conference on Distributed Computing Systems Workshops (ICDCSW). IEEE, 2024, pp. 29–34.

[59] S. Zhang, D. Fan, L. He, Y. Liu, and D. Chen, “Twlog: Task workflow-based log anomaly detection,” in Asia-Pacific Web (APWeb) and Web-Age Information Management (WAIM) Joint International Conference on Web and Big Data. Springer, 2024, pp. 3–16.

[60] K. Sooksatra, M. S. H. Chy, M. A. R. Arju, T. Cerny, and P. Rivas, “Us-ing static analysis to aid monolith to microservice system transformation: Tuning fuzzy c-means in a vae-based gnn approach,” in Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering Workshops, 2024, pp. 43–53.

[61] Z. Ding, B. Feng, and W. Yu, “Work-in-progress-a large-scale workload forecasting model for containers,” in 2023 IEEE International Conference on Web Services (ICWS). IEEE, 2023, pp. 725–727.

[62] B. P. Sanwouo, C. Quinton, and P. Temple, “Breaking the loop: Aware is the new mape-k,” in FSE’25-International Conference on the Foundations of Software Engineering, 2025.

[63] B. J. Chan, C.-T. Chen, J.-H. Cheng, and H.-H. Huang, “Don’t do rag: When cache-augmented generation is all you need for knowledge tasks,” arXiv preprint arXiv:2412.15605, 2024.

[64] X. Xu, M. Li, C. Tao, T. Shen, R. Cheng, J. Li, C. Xu, D. Tao, and T. Zhou, “A survey on knowledge distillation of large language models,” arXiv preprint arXiv:2402.13116, 2024.