Scalable and Adaptive Log-based Anomaly Detection: A Synergistic Approach
System logs are critical for software reliability. While many automated log-based anomaly detection methods exist, they often falter in large-scale cloud systems due to high resource consumption and poor adaptability to evolving logs. In this paper, we present SeaLog, an accurate, lightweight, and adaptive log-based anomaly detection framework that synergistically integrates the efficiency of traditional data-driven methods with the zero/few-shot learning ability of large language models (LLMs). SeaLog consists of a lightweight detection agent and a backbone analyzer. The detection agent utilizes an n-gram probabilistic tree (NPT) for efficient anomaly detection. The backbone analyzer employs an LLM enhanced by in-context learning (ICL) to provide accurate and adaptive predictions, especially for unseen log data. Both components continuously benefit from anomalies confirmed by on-site engineers. We evaluate SeaLog on three public datasets (BGL, Thunderbird, and HDFS) and an industrial dataset, with multiple LLM backbones, including open-source models, to assess its robustness to model choice. SeaLog achieves strong effectiveness across all datasets (F1 scores of 0.949–0.999), runs 2× to 5× faster, and consumes only 5% to 41% of the memory resources. Furthermore, we have successfully deployed SeaLog in Huawei Cloud, from which we share our insights and experiences during this deployment.
Authors
- C. Q. Feng (ORCID: https://orcid.org/0009-0000-5556-4004)
- Junjie Huang (ORCID: https://orcid.org/0009-0004-6962-5292)
- Jiazhen Gu (ORCID: https://orcid.org/0000-0002-5831-9474)
- Zhuangbin Chen (ORCID: https://orcid.org/0000-0001-5158-6716)
- Zhihan Jiang (ORCID: https://orcid.org/0009-0003-1988-6219)
- Michael R. Lyu (ORCID: https://orcid.org/0000-0002-3666-5798)
- Yintong Huo (ORCID: https://orcid.org/0009-0006-8798-5667)
- Jinyang Liu (ORCID: https://orcid.org/0000-0003-0037-1912)
- Minzhi Yan
Institutions
- Sun Yat-sen University (CN)
- Chinese University of Hong Kong (HK)
- Huawei Technologies (China) (CN)
- Singapore Management University (SG)
Publication Details
- Journal
- ACM Transactions on Software Engineering and Methodology
- Published
- 2026-09-15
- DOI
- https://doi.org/10.1145/3846182
- Primary Topic
- Software System Performance and Reliability
- Type
- article
- Field-Weighted Citation Impact
- 0.00