LogDP: Combining Dependency and Proximity for Log-Based Anomaly Detection

Yongzheng Xie, Hongyu Zhang, Bo Zhang, Muhammad Ali Babar, Sha Lu

Abstract

LogDP is a novel semi-supervised anomaly detection method that integrates event dependency analysis with sequence proximity. By learning both the inter-relationships between log events and their expected frequencies, LogDP addresses the limitations of existing models that focus on only one of these aspects. Evaluated across diverse real-world datasets, LogDP significantly outperforms state-of-the-art benchmarks, demonstrating high robustness and accuracy.

Introduction

In modern large-scale software systems, logs serve as the primary diagnostic tool for troubleshooting and performance monitoring. However, the exponential growth in log volume makes manual inspection unfeasible. Automated log-based anomaly detection has emerged as a critical research area, yet existing solutions face two primary challenges: label scarcity and incomplete modeling. Supervised models require extensive labeled anomalous data, which is difficult to obtain in production environments. Meanwhile, semi-supervised or unsupervised methods often focus exclusively on either event dependencies (sequential relationships) or event proximity (frequency patterns), leading to false negatives when an anomaly violates the unmodeled dimension.

Methodology

LogDP (Dependency and Proximity) is a semi-supervised framework designed to learn normal system behavior from unlabeled "normal" log data. The workflow is divided into three primary stages: preprocessing, hybrid training, and anomaly detection.

Preprocessing

Raw log messages are first parsed into structured templates (log events). These events are then grouped into sequences based on time windows or session identifiers. The final output of this stage is an Event Count Matrix (ECM), where each row represents a sequence and each column represents the count of a specific log event type within that sequence.

Log parsing process and the resulting Event Count Matrix (ECM).

Hybrid Training Phase

The core innovation of LogDP lies in its hybrid approach to modeling event behavior. Log events are categorized into two groups:

  1. Dependent Events: For events that exhibit clear relationships with others, LogDP utilizes the Markov Blanket concept from Bayesian Networks to identify a minimal set of predictor events. A Multi-Layer Perceptron (MLP) regressor is then trained to predict the count of a focused event based on the counts of its neighbors in the Markov Blanket.
  2. Independent Events: For events without significant dependencies, LogDP employs a mean prediction model to learn the expected frequency (proximity) of the event during normal operation.

Anomaly Detection

During the inference phase, the model predicts the expected count for every event in a new log sequence. Anomaly detection is performed by calculating the "pattern deviation"—the difference between actual and predicted counts. If this deviation exceeds a learned threshold, the sequence is flagged as anomalous.

Evaluation

The effectiveness of LogDP was evaluated using three prominent public datasets: HDFS (Hadoop Distributed File System), BGL (BlueGene/L supercomputer), and Spirit (high-performance computing). To ensure robustness, the researchers generated seven distinct dataset configurations using various grouping strategies, including fixed time windows and session-based partitioning.

LogDP was compared against six state-of-the-art benchmarks, including DeepLog, PCA, and Invariant Mining. LogDP consistently achieved the highest F1-scores across all seven experimental settings. Notably, on the HDFS dataset, LogDP reached an F1-score of 0.987, significantly surpassing DeepLog's 0.945. Furthermore, LogDP demonstrated superior robustness; while traditional methods like Invariant Mining struggled with time-windowed logs, LogDP maintained high performance regardless of the partitioning strategy.

Discussion and Conclusion

The success of LogDP highlights the importance of modeling both dependency and proximity. System failures are diverse: some disrupt the logical flow of operations, while others manifest as unusual event frequencies. By combining MLP-based dependency modeling with mean-based proximity modeling, LogDP provides comprehensive coverage. Additionally, the use of Markov Blankets ensures computational efficiency by focusing on the most informative features.

While LogDP represents a significant advancement, future work could address its reliance on clean training data and the computational overhead of training multiple MLPs in systems with vast numbers of log templates. Nevertheless, LogDP offers a robust and highly accurate solution for modern log-based anomaly detection.

Summary updated

BibTeX
@inproceedings{xie2021logdp,
  author = {Yongzheng Xie and Hongyu Zhang and Bo Zhang and Muhammad Ali Babar and Sha Lu},
  title = {{LogDP: Combining Dependency and Proximity for Log-Based Anomaly Detection}},
  booktitle = {ICSOC},
  year = {2021},
  url = {https://openreview.net/forum?id=J01ljBPtVU},
}
Figure