Abstract
Most log-based anomaly detectors assume that logs are stable, although in reality they are often unstable due to software or environmental changes. Anomaly Detection on Unstable Logs (ULAD) is therefore a more realistic, yet under-investigated challenge. Current approaches predominantly employ Machine Learning (ML) models, which often require extensive labeled data for training. To mitigate data insufficiency, we propose FlexLog, a novel hybrid approach for ULAD that combines ML models—decision tree, k-nearest neighbors, and a feedforward neural network—with a Large Language Model (Mistral) through ensemble learning.FlexLog also incorporates a cache and Retrieval-Augmented Generation (RAG) to further enhance efficiency and effectiveness. To evaluate FlexLog, we configured four datasets for ULAD, namely ADFA-U, LOGEVOL-U, SynHDFS-U, and SYNEVOL-U.FlexLog outperforms all baselines by at least 1.2 percentage points (pp) in F1 score while using much less labeled data (62.87 pp reduction). When trained on the same amount of data as the baselines, FlexLog achieves up to a 13 pp increase in F1 score on ADFA-U across varying training dataset sizes. Additionally, FlexLog maintains inference time under one second per log sequence, making it suitable for most applications, except latency-sensitive systems. Further analysis reveals the positive impact of FlexLog’s key components: cache, RAG, and ensemble learning.
| Original language | English |
|---|---|
| Article number | 216 |
| Journal | ACM Transactions on Software Engineering and Methodology |
| Volume | 35 |
| Issue number | 8 |
| DOIs | |
| Publication status | Published - 16 Jul 2026 |
Keywords
- anomaly detection
- data efficiency
- ensemble learning
- large language models
- unstable logs
Fingerprint
Dive into the research topics of 'LLM Meets ML: Data-efficient Anomaly Detection on Unstable Logs'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver