Attention-Enhanced Multivariate Forecasting for Intelligent Microservice Autoscaling

Authors

  • Nur Saifuddin Universitas Nahdlatul Ulama Sunan Giri
  • Mula Agung Barata Universitas Nahdlatul Ulama Sunan Giri
  • Ifnu Wisma Dwi Prastya Universitas Nahdlatul Ulama Sunan Giri

DOI:

https://doi.org/10.30871/jaic.v10i3.12662

Keywords:

attention mechanism, cloud-native microservices, multivariate forecasting, proactive autoscaling, resource utilization prediction

Abstract

Proactive autoscaling in cloud-native microservices requires anticipatory decisions because reactive controllers often lag under abrupt workload shifts. This study aims to improve autoscaling decision quality through a two-stage machine learning pipeline. The research adopts an experimental design using production-grade microservice traces, with strict time-respecting train-validation-test splits and training-only fitting for preprocessing and oracle-threshold estimation to prevent leakage. In the first stage, multivariate forecasting models predict future CPU and memory utilization from engineered temporal features. In the second stage, the predicted signals are combined with observed features to classify three autoscaling actions: scale down, hold, and scale up. Benchmarking shows recurrent neural models are strong baselines, while an attention-enhanced encoder-decoder performs best. The best Bahdanau-attention model with residual connection reduces test CPU RMSE from 0.030977 to 0.028924 and memory RMSE from 0.010322 to 0.005452 relative to the strongest BiLSTM baseline. For decision learning, the optimized Extreme Gradient Boosting model using prediction-augmented features achieves an accuracy of 0.950602 and an F1 score of 0.951026. Supporting downstream validation also yields lower SLO violation rates than horizontal and vertical baselines while maintaining zero downtime in the evaluated scenarios. These findings indicate that improving forecasting quality and explicitly transferring predictive signals to the decision stage strengthens proactive autoscaling performance.

Downloads

Download data is not yet available.

References

[1] Kubernetes Authors, “Horizontal Pod Autoscaling,” Kubernetes Documentation. 2025. Accessed: Dec. 08, 2025. [Online]. Available: https://kubernetes.io/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/

[2] H. Ahmad, C. Treude, M. Wagner, and C. Szabo, “Towards resource-efficient reactive and proactive auto-scaling for microservice architectures,” Journal of Systems and Software, vol. 225, p. 112390, 2025, doi: https://doi.org/10.1016/j.jss.2025.112390.

[3] Kubernetes Authors, “Vertical Pod Autoscaling,” Kubernetes Documentation. 2025. Accessed: Dec. 08, 2025. [Online]. Available: https://kubernetes.io/docs/concepts/workloads/autoscaling/vertical-pod-autoscale/

[4] Z. Wang, S. Zhu, J. Li, W. Jiang, K. K. Ramakrishnan, Y. Zheng, M. Yan, X. Zhang, and A. X. Liu, “DeepScaling: microservices autoscaling for stable CPU utilization in large scale cloud systems,” in Proceedings of the 13th Symposium on Cloud Computing, 2022, pp. 16–30. doi: 10.1145/3542929.3563469.

[5] P. B. Guruge and Y. H. P. P. Priyadarshana, “Time series forecasting-based Kubernetes autoscaling using Facebook Prophet and Long Short-Term Memory,” Frontiers in Computer Science, vol. Volume 7-2025, 2025, doi: 10.3389/fcomp.2025.1509165.

[6] J. Yoo and U. Kang, “Attention-Based Autoregression for Accurate and Efficient Multivariate Time Series Forecasting,” in Proceedings of the 2021 SIAM International Conference on Data Mining (SDM), pp. 531–539. doi: 10.1137/1.9781611976700.60.

[7] Y. Li and D. C. Anastasiu, “Multivariate Segment Expandable Encoder-Decoder Model for Time Series Forecasting,” IEEE Access, vol. 12, pp. 185012–185026, 2024, doi: 10.1109/ACCESS.2024.3513256.

[8] T. Vanderschueren, T. Verdonck, B. Baesens, and W. Verbeke, “Predict-then-optimize or predict-and-optimize? An empirical evaluation of cost-sensitive learning strategies,” Information Sciences, vol. 594, pp. 400–415, 2022, doi: https://doi.org/10.1016/j.ins.2022.02.021.

[9] J. Mandi, J. Kotary, S. Berden, M. Mulamba, V. Bucarey, T. Guns, and F. Fioretto, “Decision-Focused Learning: Foundations, State of the Art, Benchmark and Future Opportunities,” J. Artif. Int. Res., vol. 80, Sep. 2024, doi: 10.1613/jair.1.15320.

[10] Alibaba Open Source, “Alibaba Cluster Trace: Microservices v2021,” GitHub, 2021. Accessed: Dec. 08, 2025. [Online]. Available: https://github.com/alibaba/clusterdata/tree/master/cluster-trace-microservices-v2021

[11] S. Luo, H. Xu, C. Lu, K. Ye, G. Xu, L. Zhang, Y. Ding, J. He, and C. Xu, “Characterizing Microservice Dependency and Performance: Alibaba Trace Analysis,” in Proceedings of the ACM Symposium on Cloud Computing, 2021, pp. 412–426. doi: 10.1145/3472883.3487003.

[12] D. Huye, L. Liu, and R. R. Sambasivan, “Systemizing and Mitigating Topological Inconsistencies in Alibaba’s Microservice Call-graph Datasets,” in Proceedings of the 15th ACM/SPEC International Conference on Performance Engineering, 2024, pp. 276–285. doi: 10.1145/3629526.3645043.

[13] H. Zhou, S. Zhang, J. Peng, S. Zhang, J. Li, H. Xiong, and W. Zhang, “Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting,” Proceedings of the AAAI Conference on Artificial Intelligence, vol. 35, no. 12, pp. 11106–11115, May 2021, doi: 10.1609/aaai.v35i12.17325.

[14] S. Almaghrabi, M. Rana, M. Hamilton, and M. S. Rahaman, “Multidimensional dynamic attention for multivariate time series forecasting,” Applied Soft Computing, vol. 167, p. 112350, 2024, doi: https://doi.org/10.1016/j.asoc.2024.112350.

[15] B. Bischl, M. Binder, M. Lang, T. Pielok, J. Richter, S. Coors, J. Thomas, T. Ullmann, M. Becker, A.-L. Boulesteix, D. Deng, and M. Lindauer, “Hyperparameter optimization: Foundations, algorithms, best practices, and open challenges,” WIREs Data Mining and Knowledge Discovery, vol. 13, no. 2, p. e1484, 2023, doi: https://doi.org/10.1002/widm.1484.

[16] Optuna Contributors, “Optuna: A hyperparameter optimization framework,” Optuna Documentation, 2025. Accessed: Dec. 25, 2025. [Online]. Available: https://optuna.readthedocs.io/en/stable/

[17] A. Bali, Y. El Houm, A. Gherbi, and M. Cheriet, “Automatic data featurization for enhanced proactive service auto-scaling: Boosting forecasting accuracy and mitigating oscillation,” Journal of King Saud University - Computer and Information Sciences, vol. 36, no. 2, p. 101924, 2024, doi: https://doi.org/10.1016/j.jksuci.2024.101924.

[18] Z. Pan, Y. Wang, Y. Zhang, S. Bin Yang, Y. Cheng, P. Chen, C. Guo, Q. Wen, X. Tian, Y. Dou, Z. Zhou, C. Yang, A. Zhou, and B. Yang, “MagicScaler: Uncertainty-Aware, Predictive Autoscaling,” Proc. VLDB Endow., vol. 16, no. 12, pp. 3808–3821, Aug. 2023, doi: 10.14778/3611540.3611566.

[19] M. Mekki, B. Brik, A. Ksentini, and C. Verikoukis, “XAI-Enabled Fine Granular Vertical Resources Autoscaler,” in 2023 IEEE 9th International Conference on Network Softwarization (NetSoft), Jun. 2023, pp. 161–169. doi: 10.1109/NetSoft57336.2023.10175438.

[20] H. Hewamalage, K. Ackermann, and C. Bergmeir, “Forecast evaluation for data scientists: common pitfalls and best practices,” Data Mining and Knowledge Discovery, vol. 37, no. 2, pp. 788–832, 2023, doi: 10.1007/s10618-022-00894-5.

[21] scikit-learn developers, “Common pitfalls and recommended practices,” scikit-learn Documentation, 2025. Accessed: Dec. 25, 2025. [Online]. Available: https://scikit-learn.org/stable/common_pitfalls.html

[22] scikit-learn developers, “Metrics and scoring: quantifying the quality of predictions,” scikit-learn Documentation, 2025. Accessed: Dec. 08, 2025. [Online]. Available: https://scikit-learn.org/stable/modules/model_evaluation.html

[23] M. A. Barata, D. Irnawati, I. Wisma, D. Prastya, and D. I. Hastuti, “Hydrogen Sulfide Leak Detection Using The C4.5 Algorithm: Optimizing Feature Extraction For Enhanced Accuracy,” PROCEEDING Al Ghazali Internasional Conference, vol. 1, pp. 348–358, 2025, doi: https://doi.org/10.52802/aicp.v1i1.1352.

[24] M. A. Barata, E. Noersasongko, Purwanto, and M. A. Soeleman, “Improving the Accuracy of C4.5 Algorithm with Chi-Square Method on Pure Tea Classification Using Electronic Nose,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 7, no. 2 SE-Computer Science Applications, Mar. 2023, doi: 10.29207/resti.v7i2.4687.

[25] M. J. Vikri, I. Wisma, D. Prastya, U. P. Sanjaya, and M. A. Barata, “Rice Quality Identification For Indonesian Food Standards Based On Electronic Nose Berdasarkan Standar Pangan Indonesia Berbasis,” INOVTEK Polbeng - Seri Informatika, vol. 10, no. 1, 2025, doi: https://doi.org/10.35314/0y0xct32.

[26] scikit-learn developers, “SVR,” scikit-learn Documentation, 2025. Accessed: Jan. 05, 2026. [Online]. Available: https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVR.html

[27] scikit-learn developers, “MultiOutputRegressor,” scikit-learn Documentation, 2025. Accessed: Jan. 05, 2026. [Online]. Available: https://scikit-learn.org/stable/modules/generated/sklearn.multioutput.MultiOutputRegressor.html

[28] Keras Developers, “LSTM layer,” Keras Documentation, 2025. Accessed: Jan. 05, 2026. [Online]. Available: https://keras.io/api/layers/recurrent_layers/lstm/

[29] Keras Developers, “GRU layer,” Keras Documentation, 2025. Accessed: Jan. 05, 2026. [Online]. Available: https://keras.io/api/layers/recurrent_layers/gru/

[30] Keras Developers, “Bidirectional layer,” Keras Documentation, 2025. Accessed: Jan. 05, 2026. [Online]. Available: https://keras.io/api/layers/recurrent_layers/bidirectional/

[31] A. C. R. Klaar, S. F. Stefenon, L. O. Seman, V. C. Mariani, and L. dos S. Coelho, “Optimized EWT-Seq2Seq-LSTM with Attention Mechanism to Insulators Fault Prediction,” Sensors, vol. 23, no. 6, 2023, doi: 10.3390/s23063202.

[32] G. Zerveas, S. Jayaraman, D. Patel, A. Bhamidipaty, and C. Eickhoff, “A Transformer-based Framework for Multivariate Time Series Representation Learning,” in Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, 2021, pp. 2114–2124. doi: 10.1145/3447548.3467401.

[33] xgboost developers, “XGBoost Parameters,” XGBoost Documentation, 2025. Accessed: Dec. 25, 2025. [Online]. Available: https://xgboost.readthedocs.io/en/stable/parameter.html

[34] scikit-learn developers, “RandomForestClassifier,” scikit-learn Documentation, 2025. Accessed: Feb. 15, 2026. [Online]. Available: https://sklearn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html

[35] scikit-learn developers, “LogisticRegression,” scikit-learn Documentation, 2026. Accessed: Feb. 15, 2026. [Online]. Available: https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html

[36] scikit-learn developers, “DecisionTreeClassifier,” scikit-learn Documentation, 2026. Accessed: Apr. 25, 2026. [Online]. Available: https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html

[37] E. F. Laili, Z. Alawi, R. Rohmah, and M. A. Barata, “Komparasi Algoritma Decision Tree Dan Support Vector Machine (SVM) Dalam Klasifikasi Serangan Jantung,” Jurnal Sistem Informasi dan Informatika, vol. 8, no. 1 SE-Articles, pp. 67–76, doi: 10.47080/simika.v8i1.3683.

[38] R. Shwartz-Ziv and A. Armon, “Tabular data: Deep learning is not all you need,” Information Fusion, vol. 81, pp. 84–90, 2022, doi: https://doi.org/10.1016/j.inffus.2021.11.011.

Downloads

Published

2026-06-10

How to Cite

[1]
N. Saifuddin, M. A. Barata, and I. W. Dwi Prastya, “Attention-Enhanced Multivariate Forecasting for Intelligent Microservice Autoscaling”, JAIC, vol. 10, no. 3, pp. 2376–2390, Jun. 2026.

Most read articles by the same author(s)

Similar Articles

1 2 3 4 5 > >> 

You may also start an advanced similarity search for this article.