TL;DR
Log-based anomaly detection models are often bogged down by massive volumes of redundant or noisy log data, leading to slow inference and degraded accuracy. This paper presents an empirical study showing that over 70% of log events can be eliminated without hurting performance. Based on these insights, the authors introduce LogCleaner, an automated middleware tool that filters out useless logs, speeding up inference by ~300% while actually improving anomaly detection accuracy.
What Problem Does This Paper Address?
Modern, large-scale software systems generate massive streams of runtime logs. Reliability engineers rely heavily on automated anomaly detection models to parse these logs and flag system failures before they cause major downtime.
However, current state-of-the-art models suffer from two practical challenges:
- Inefficient Inference: Processing every single log line slows down detection pipelines and wastes computational resources.
- Misleading Noise: Not all logs are useful. Many are low-quality or completely irrelevant to system health, which can confuse machine learning models and trigger false positives or negatives.
While log reduction seems like an obvious fix, its quantitative impact on anomaly detection models hadn't been systematically studied. This paper fills that gap by investigating exactly how much log data can be stripped away before detection performance degrades.
Methods
The authors first conducted an empirical study using two distinct log-reduction strategies to establish performance baselines:
- Retry-based approach: An iterative method that removes one log event type at a time, retrains the model, and checks if the F1-score drops past a strict threshold ($\alpha = 0.02$). If performance holds, the log event type is permanently discarded.
- Clustering-based approach: Because retraining models thousands of times is computationally expensive, the authors designed a faster clustering approach for large datasets. It evaluates the predictive power of each log event individually and uses K-Means clustering to separate relevant events from irrelevant ones.
Introducing LogCleaner
Armed with insights from their empirical study, the authors built LogCleaner, an automated, model-agnostic middleware tool. LogCleaner operates in two phases:
- Profiling Phase: It analyzes historical logs using TF-IDF to filter out rare, sporadic events. Next, an Anti-Event Optimizer uses mutual information to strip away distracting noise logs. Finally, a Duplicative-Event Separator builds a co-occurrence graph and applies the OPTICS density-based clustering algorithm to merge redundant log events.
- Online Phase: It sits directly between the software system and the anomaly detection model, filtering raw logs in real-time based on the reduced event set. If the underlying system code changes, LogCleaner triggers an automated re-profiling step to adapt to new log formats.
Datasets
The approach was evaluated using three widely recognized, large-scale production log datasets from the open-source Loghub repository:
- HDFS: 11,175,629 log messages collected from over 200 Amazon EC2 nodes (2.93% anomalous).
- BGL: 4,747,963 log messages gathered from a BlueGene/L supercomputer system (7.34% anomalous).
- Thunderbird: A massive dataset from the Thunderbird supercomputer. The authors utilized a continuous subset of 10 million log lines (3.53% anomalous).
Key Insights and Ideas
The most compelling takeaway from this research is the formulation of a new log event taxonomy based on how logs impact machine learning models:
- Anti-events: These are logs that appear with nearly identical frequencies in both normal and abnormal system states (e.g., routine block transfers). They act as pure distractors. Removing them actually improves model accuracy.
- Duplicative-events: These logs carry redundant information because they always co-occur with other logs. They can be safely substituted and removed without any loss of information.
- Key-events: These are the critical logs that contain unique, complementary information essential for identifying system failures.
In an extreme case study on the Thunderbird dataset, the authors discovered that out of 1,406 original log event types, models like LR, SVM, and RobustLog only needed a single remaining log event (E1210) to achieve over 98.5% accuracy. This single event explicitly flagged a catastrophic hardware property failure, rendering the other 1,405 event types completely superfluous for anomaly detection.
Key Results
The authors evaluated LogCleaner across six representative anomaly detection models (including Linear Regression, SVM, Decision Tree, Isolation Forest, RobustLog, and PLELog).
- Massive Data Reduction: LogCleaner successfully reduced the number of unique log events by 48.28% on HDFS, 73.13% on BGL, and 69.91% on Thunderbird.
- 3x Inference Speedup: By shrinking the log volume, the inference speed across all models improved dramatically, with processing times dropping by roughly 300% on average.
- Universal Performance Gains: Filtering out the "anti-events" consistently boosted model accuracy. For example, RobustLog’s F1-score on the Thunderbird dataset soared from 69.25% to 99.31%. Isolation Forest on BGL saw its F1-score improve from 26.10% to 38.11%.
Limitations and Future Work
While the results are promising, the authors note a few limitations:
- Model and Dataset Scope: The empirical study was restricted to six models and three standard datasets. While these are industry benchmarks, they may not fully capture the messy, unpredictable nature of all enterprise production logs.
- Future Directions: The authors plan to explore reinforcement learning to make the log reduction thresholds even more dynamic and precise. Additionally, they aim to integrate Large Language Models (LLMs) during the profiling phase to better understand log semantics and pinpoint key events automatically.
Summary updated