Abstract
Log anomaly detection (LAD) is essential to ensure the safe and stable operation of modern software systems. Although current LAD methods show potential in addressing unstable log events and temporal sequence patterns, they often struggle with detection efficiency and generalization when dealing with evolving systems. We propose OMLog, a semi-supervised online meta-learning method designed to effectively tackle the distribution shift issue caused by changes in log event types and frequencies. Specifically, we introduce a Maximum Mean Discrepancy (MMD)-based distribution shift detection method to identify changes in unseen log sequences. Depending on the identified distribution gap, the method automatically triggers either online fine-grained detection or fast offline inference. Furthermore, we design an online learning mechanism based on meta-learning to enhance the model's generalization ability to evolving data. Extensive experiments on the HDFS and BGL datasets validate OMLog's effectiveness, achieving F1-Scores of 93.7% and 64.9%, respectively, while demonstrating superior detection efficiency.
Introduction
Monitoring modern software systems is like trying to hit a moving target. As systems evolve through updates, patches, and configuration changes, the logs they generate change as well. New event types appear, old ones vanish, and the frequency of sequences shifts. This "distribution shift" makes traditional log anomaly detection (LAD) models—which assume data patterns remain static—obsolete almost as soon as they are deployed.
Offline models are typically fast but fail when the system evolves because they cannot recognize new log types. Conversely, online models attempt to update continuously but often face computational bottlenecks and overfitting on noisy, short-term data. OMLog introduces a framework designed to handle these shifts gracefully by combining distribution shift detection with meta-learning, balancing real-time adaptation with high computational efficiency.
Methodology
OMLog utilizes a three-stage pipeline to address the challenges of evolving system logs:
Distribution Shift Detection (DSD)
Instead of updating the model for every log sequence, OMLog uses Maximum Mean Discrepancy (MMD) to compare the statistical distribution of a new batch of logs against historical data. If the MMD value is below a certain threshold, the system assumes the environment is stable and uses fast offline inference. If a significant shift is detected, it triggers the online update mechanism.
Normality Filtering
To remain semi-supervised (using only normal data for training), OMLog employs an auto-encoder to identify "high-confidence normal" samples from the current test batch. These samples are then used to fine-tune the anomaly detector without requiring manual labels.
Online Meta-learning Detection (OMD)
Inspired by Model-Agnostic Meta-Learning (MAML), OMLog organizes high-confidence normal samples into "meta-tasks" based on a temporal nearest-neighbor principle. By learning how to learn from these local, repetitive patterns, the model generalizes much faster to the specific "new normal" of the evolved system.
Experimental Evaluation
The authors evaluated OMLog on two classic datasets: HDFS (a stable baseline) and BGL (a dynamic dataset from a BlueGene/L supercomputer with over 7,000 log types).
Visualizing the Shift
T-SNE visualizations of the BGL dataset prove that log patterns change drastically over time. As shown in the figure below, the clusters for different time periods shift significantly, confirming that the Independent and Identically Distributed (IID) assumption used in most machine learning fails in evolving systems.
Key Results
OMLog demonstrated superior performance, especially in evolving scenarios:
- Accuracy: On the evolving BGL dataset, OMLog achieved an F1-Score of 64.9%, significantly higher than other semi-supervised online methods.
- Efficiency: Compared to standard online learning (updating per sample), OMLog's batch-based meta-learning and DSD trigger made it orders of magnitude faster. For BGL, it reduced detection time from over 9,000 seconds to just 158 seconds.
- Stability: On the HDFS dataset, OMLog maintained a high F1-Score of 93.7%, proving that its adaptive mechanisms do not degrade performance in stable environments.
Conclusion and Future Work
OMLog successfully addresses the distribution shift problem in log anomaly detection through intelligent shift detection and meta-learning. While effective, future work is needed to address the inference bottleneck in systems with massive log event vocabularies and to improve the robustness of the initial normality model to prevent "poisoning" during the meta-learning stage. The team also aims to investigate better handling of "cold start" problems when entirely new functional modules are introduced to a system.
Summary updated