Classification of Anomalies in Microservices Using an XGBoost-Based Approach With Data Balancing and Hyperparameter Tuning
Open Access
- 16 October 2025
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Open Journal of the Computer Society
- Vol. 6, 1673-1685
Abstract
Microservice architecture has emerged as a leading paradigm for decomposing large monolithic applications into smaller, autonomous services. Although this approach offers many advantages, its complexity, distributed nature, and substantial scale create significant challenges for monitoring and anomaly detection. The vast volume of generated data further exacerbates computational load and detection latency, complicating the identification of anomalies. This study analyses the impact of data balancing and hyperparameter tuning on anomaly classification in microservices and introduces ADMXGB - Anomaly Detection in Microservices using XGBoost, a XGBoost-based framework tailored for anomaly detection in microservices that seamlessly integrates data balancing with hyperparameter tuning. We propose guidelines to determine appropriate threshold values that balance sensitivity with false positives, and show that the framework is model-agnostic, enabling integration with different machine learning algorithms beyond XGBoost. Validation was performed using a four-stage process encompassing preprocessing, training, validation, and testing. ADMXGB demonstrated improvements in both Accuracy and F1-Score, reaching 99.96% in both metrics on the TraceRCA dataset, outperforming the baseline XGBoost method by a margin of 1.46% in Accuracy and 45.62% in F1-Score. Moreover, ADMXGB achieves reductions in execution time (-86.3%) and memory usage (-21.7%), while maintaining an acceptable CPU overhead. These findings highlight the robustness of ADMXGB in delivering high-accuracy classification in a microservice environment.Keywords
Funding Information
- FCT/MECI through national funds
- EU funds (UID/50008)
- Instituto de Telecomunicações
- WATERMARK project (No. 2024.07356, RE-C05-i08.M04)
- Recovery and Resilience Plan
- R&D Projects (UID/04516/NOVA)
- NOVA Laboratory for Computer Science and Informatics
This publication has 39 references indexed in Scilit:
- TinyML-Based Intrusion Detection System for Handling Class Imbalance in IoT-Edge Domain Using Siamese Neural Network on MCU2025
- Anomaly detection for microservice system via augmented multimodal data and hybrid graph representationsInformation Fusion, 2025
- Understanding Microservice Runtime Monitoring Data for Anomaly Detection with Structural Equation Modeling2024
- An effective parallel convolutional anomaly multi-classification model for fault diagnosis in microservice systemSoftware Quality Journal, 2024
- An Anomaly Detection Framework for System Logs Based on Ensemble Learning2023
- Trace-Based Anomaly Detection with Contextual Sequential Invocations2023
- An anomaly prediction framework for financial IT systems using hybrid machine learning methodsJournal of Ambient Intelligence and Humanized Computing, 2019
- Learning from class-imbalanced data: Review of methods and applicationsExpert Systems with Applications, 2017
- Learning from imbalanced data: open challenges and future directionsProgress in Artificial Intelligence, 2016
- Fast Outlier Detection in High Dimensional Spaces2002