Introduction
Modern software systems generate a staggering volume of logs, which serve as the primary resource for detecting system failures and anomalies. However, the prevailing "more is better" philosophy in data collection is increasingly backfiring. Current log-based anomaly detection models face two significant hurdles: inefficient inference due to the computational expense of processing millions of log lines, and noise interference from irrelevant or misleading "anti-events."
To address these challenges, researchers developed LogCleaner, a middleware tool designed to automatically filter out redundant log data. This empirical study demonstrates that it is possible to remove over 70% of system log data without sacrificing accuracy—and in many cases, significantly improving model performance and inference speed.
Methodology
The researchers first conducted an empirical study using two distinct strategies to identify "reducible" logs: a Retry-based approach, which iteratively removes events to observe performance impacts, and a Clustering-based approach, which groups events by their statistical significance.
Building on these insights, LogCleaner implements a three-stage pipeline:
- TF-IDF Filtering: Eliminates extremely rare, sporadic events that lack sufficient statistical signal.
- Anti-Event Optimizer: Employs Mutual Information (MI) to identify logs that correlate poorly with system status or appear frequently in both normal and abnormal states, confusing the classifier.
- Duplicative-Event Separator: Uses the OPTICS clustering algorithm on a co-occurrence graph to identify redundant events that always occur together, retaining only the most informative event based on MI.
Key Insights: The Taxonomy of Logs
The study categorizes log events into three functional types:
- Key-events: Essential entries required for accurate detection.
- Anti-events: Distractors that actively degrade model performance.
- Duplicative-events: Redundant logs that add no new information.
A striking finding of the study was the "One-Event Revelation" in the Thunderbird dataset. Researchers discovered that a single log event type (E1210) was sufficient for several models to achieve nearly 100% accuracy, rendering the other 1,405 event types unnecessary.
Furthermore, the study proved that "anti-events" are a tangible problem; removing a specific anti-event in the HDFS dataset improved a Linear Regression model's F1-score by 13.49%, confirming that excess data can actively harm model efficacy.
Experimental Results
The study utilized three gold-standard datasets: HDFS (11M+ messages), BGL (4.7M+ messages), and Thunderbird (10M messages). Key results include:
- Massive Data Reduction: LogCleaner reduced log event volume by an average of 70%. In the BGL dataset, a 743MB log file was reduced to just 7.87MB.
- Performance Gains: F1-scores generally improved across six different model types (SVM, Decision Trees, PLELog, etc.). Notably, the RobustLog model on the Thunderbird dataset saw its F1-score jump from 69.25% to 99.31%.
- Inference Speedup: By reducing input size, inference speeds increased by approximately 300% (4x faster).
Conclusion and Future Work
LogCleaner demonstrates that log-based anomaly detection can be made more efficient and accurate by focusing on high-signal events. While the current profiling phase requires labeled data to identify anti-events, future work may explore using Large Language Models (LLMs) to intuitively pinpoint key events or Reinforcement Learning to create adaptive reduction processes for evolving system behaviors.
Summary updated