TL;DR
This paper introduces KELog, a novel approach for detecting network anomalies using log data. KELog uniquely incorporates keyword information, extracted from abnormal logs, into log representations. This method bypasses the need for traditional log parsing, a common bottleneck, and achieves state-of-the-art performance in anomaly detection.
What Problem Does This Paper Address?
In complex IT systems, especially those operated by telecommunications companies, logs are crucial for understanding system behavior and diagnosing issues. However, the sheer volume of log data makes manual analysis impractical. Anomaly detection in these logs is vital to prevent performance degradation, data corruption, and revenue loss. Existing methods often rely on log parsing to extract structured event templates. This process can be error-prone, especially with evolving systems, leading to missed anomalies. Furthermore, these methods sometimes overlook the significance of specific keywords that can strongly indicate system status.
Methods
The core of KELog is its novel keyword embedding strategy. Instead of relying on log parsing, KELog first extracts keywords that are indicative of anomalies by comparing words present in abnormal logs versus normal logs. This forms a "keyword library." This library is then used in a multi-stage architecture:
- Bottom Encoder Layer: This layer captures basic lexical and syntactic information from both log text and the identified keywords.
- Information Fusion Layer: This crucial layer integrates the keyword information with the log text representations. It fuses heterogeneous features of tokens and keywords to create a richer representation.
- Top Encoder Layer: A deep, multi-layer bidirectional transformer encoder further processes these fused representations to learn complex semantic patterns.
- Masked Keyword Information Task: To enhance the model's understanding of keyword importance, an auxiliary task is introduced. This task involves randomly masking keywords and training the model to predict them, similar to BERT's Masked Language Model (MLM) task. This helps the model learn to integrate keyword information effectively.
- Classification: Finally, a simple linear classifier with a sigmoid activation function is used for binary classification (normal vs. abnormal log).
Datasets
The paper utilizes two datasets:
- Dataset A: A real-world log dataset from a Chinese communications operator. It contains 1,000,000 log messages, with 950,000 normal and 50,000 abnormal logs. This dataset was manually annotated by experts.
- Dataset B: Provided by the 5G+AI network application competition, this dataset also comes from a Chinese communications operator. It consists of 1,419,918 normal logs for training and 47,870 logs in the test set, divided into time slices. Anomaly detection is performed at the time slice level.
Key Insights and Ideas
- Keyword Importance: The paper highlights that specific keywords, often overlooked by parsing-based methods, are highly predictive of system anomalies.
- Bypassing Log Parsing: KELog's ability to achieve high performance without relying on log parsing is a significant advantage, as it avoids the errors and limitations associated with parsing.
- Information Fusion: The novel information fusion layer effectively combines textual and keyword information, leading to more robust log representations.
- Transformer Power: The use of a deep transformer encoder allows KELog to capture complex semantic relationships within the fused log representations.
- Auxiliary Task Effectiveness: The masked keyword information task demonstrably improves the model's ability to leverage keyword semantics for anomaly detection.
Key Results
KELog achieved state-of-the-art results on both datasets:
- On Dataset A: KELog demonstrated significant improvements over traditional machine learning methods (PCA, SVM, Invariant Mining), with an F1 score increase of up to 0.341. It also outperformed deep learning methods like DeepLog and LogBERT, achieving an F1 score increase of 0.039 and 0.01, respectively. The paper reports an F1 score of 0.834 for KELog.
- On Dataset B: KELog achieved a perfect F1 score of 1.0, winning first place in the 5G+AI network application competition. This was 0.021 higher than the second-place entry, which used DeepLog.
Limitations and Future Work
- Limitations: The paper acknowledges that the datasets used are from Linux operating systems and are from Chinese communications operators. While the authors claim generalization ability, further validation on diverse operating systems and network environments would be beneficial. The manual screening of keywords after initial extraction might introduce some subjectivity.
- Future Work: The authors suggest exploring the integration of log parsing or log sequences into their model to further investigate potential improvements in anomaly detection performance.
Summary updated