Anomaly Detection in Software System Logs Using Machine Learning
Abstract
Modern software systems generate large volumes of logs that record events, states, errors, and user or component activities. Manual inspection is increasingly unable to support timely fault diagnosis, performance monitoring, and security analysis. This review examines how machine learning is used to detect anomalies in software system logs, with emphasis on the full pipeline from raw log messages to operational alerts. It first explains software logs, event templates, anomaly types, labels, and commonly used evaluation measures. It then compares log parsing, window construction, count-based features, semantic embeddings, classical machine learning, deep sequence models, self-supervised learning, and parser-free approaches. Recent journal studies show that model accuracy depends not only on architecture but also on parsing distinguishability, feature representation, window design, label quality, dataset imbalance, and cross-system differences. Traditional models can remain competitive when features and tuning are appropriate, while transformer, contrastive, and end-to-end methods improve semantic modeling and adaptation to unseen events. However, data drift, limited labels, inconsistent benchmarks, false alarms, interpretability, privacy, and deployment cost remain important barriers. Future work should prioritize adaptive, transferable, explainable, and privacy-aware systems that combine accurate detection with practical maintenance needs.
References
- Landauer, M., Onder, S., Skopik, F., & Wurzenberger, M. (2023). Deep learning for anomaly detection in log data: A survey.Machine Learning with Applications, 12, 100470. https://doi.org/10.1016/j.mlwa.2023.100470
- Wu, X., Li, H., & Khomh, F. (2023). On the effectiveness of log representation for log-based anomaly detection.Empirical Software Engineering, 28(6), Article 137. https://doi.org/10.1007/s10664-023-10364-1
- Khan, Z. A., Shin, D., Bianculli, D., & Briand, L. C. (2024). Impact of log parsing on deep learning-based anomaly detection.Empirical Software Engineering, 29(6), Article 139. https://doi.org/10.1007/s10664-024-10533-w
- Zhang, C., Wang, X., Zhang, H., Zhang, J., Zhang, H., Liu, C., & Han, P. (2023). LayerLog: Log sequence anomaly detection based on hierarchical semantics.Applied Soft Computing, 132, 109860. https://doi.org/10.1016/j.asoc.2022.109860
- Xiao, R., Li, W., Lu, J., & Jin, S. (2024). ContexLog: Non-parsing log anomaly detection with all information preservation and enhanced contextual representation.IEEE Transactions on Network and Service Management, 21(4), 4750-4762. https://doi.org/10.1109/TNSM.2024.3400283
- Qi, J., Luan, Z., Huang, S., Fung, C., Yang, H., Li, H., Zhu, D., & Qian, D. (2023). LogEncoder: Log-based contrastive representation learning for anomaly detection.IEEE Transactions on Network and Service Management, 20(2), 1378-1391. https://doi.org/10.1109/TNSM.2023.3239522
- Yin, Z., Kong, X., & Yin, C. (2024). Semi-supervised log anomaly detection based on bidirectional temporal convolution network.Computers & Security, 140, 103808. https://doi.org/10.1016/j.cose.2024.103808
- Yang, L., Chen, J., Gao, S., Gong, Z., Zhang, H., Kang, Y., & Li, H. (2024). Try with simpler - An evaluation of improved principal component analysis in log-based anomaly detection.ACM Transactions on Software Engineering and Methodology, 33(5), Article 115, 1-27. https://doi.org/10.1145/3644386
- Hashemi, S., & Mäntylä, M. (2024). OneLog: Towards end-to-end software log anomaly detection.Automated Software Engineering, 31(2), Article 37. https://doi.org/10.1007/s10515-024-00428-x
- Almodovar, C., Sabrina, F., Karimi, S., & Azad, S. (2024). LogFiT: Log anomaly detection using fine-tuned language models.IEEE Transactions on Network and Service Management, 21(2), 1715-1723. https://doi.org/10.1109/TNSM.2024.3358730
- Gong, K., Luo, S., Pan, L., Zhang, L., Zhang, Y., & Yu, H. (2024). LogETA: Time-aware cross-system log-based anomaly detection with inter-class boundary optimization.Future Generation Computer Systems, 157, 16–28. https://doi.org/10.1016/j.future.2024.03.028
- Wang, P., Zhang, X., Cao, Z., Xu, W., & Li, W. (2024). LogGT: Cross-system log anomaly detection via heterogeneous graph feature and transfer learning.Expert Systems with Applications, 251, 124082. https://doi.org/10.1016/j.eswa.2024.124082
- Yu, B., Yao, J., Fu, Q., Zhong, Z., Xie, H., Wu, Y., Ma, Y., & He, P. (2024). Deep learning or classical machine learning? An empirical study on log-based anomaly detection. In2024 IEEE/ACM 46th International Conference on Software Engineering (ICSE)(pp. 403–415). Association for Computing Machinery. https://doi.org/10.1145/3597503.3623308
- Mylläri, J., Aalto, T., & Nurminen, J. K. (2025). Ladle: A method for unsupervised anomaly detection across log types.Automated Software Engineering, 32(2), Article 34. https://doi.org/10.1007/s10515-025-00504-w
- Li, W., Wu, Y., Huang, W., Zhou, F., Ou, W., Wang, H., & Deng, L. (2025). System log anomaly detection based on contrastive learning and retrieval augmented.Scientific Reports, 15, Article 38370. https://doi.org/10.1038/s41598-025-22208-7