Beyond Window-Based Detection: A Graph-Centric Framework for Discrete Log Anomaly Detection

Jiaxing Qi, Chang Zeng, Zhongzhi Luan, Shaohan Huang, Shu Yang, Yao Lu, Hailong Yang, Depei QianarXiv 2025 · DOI

TL;DR

TempoLog moves beyond traditional window-based log anomaly detection by representing system logs as a continuous-time dynamic graph. By replacing fixed-size windows with a multi-scale temporal graph network, the framework achieves state-of-the-art event-level precision, eliminating the "context bias" and "fuzzy localization" issues that plague current industry standards.

The Problem: The Limitations of Windowing

Most existing log anomaly detection tools, such as DeepLog or LogBert, rely on windowing—grouping logs into fixed-size chunks based on count (e.g., every 100 logs) or time (e.g., every 30 minutes). This approach suffers from two fundamental flaws:

  1. Context Bias: Performance is highly sensitive to window size. Small windows may miss long-range dependencies, while large windows can drown out critical signals in noise.
  2. Fuzzy Localization: Window-based models typically flag an entire window as anomalous. This leaves site reliability engineers (SREs) with the arduous task of manually searching through hundreds of entries to find the specific root cause.
Challenges of window-based detection: context bias and the need for manual localization.

The goal of TempoLog is to achieve event-level detection, identifying specific anomalous log entries without the constraints of artificial boundaries.

The TempoLog Framework

TempoLog leverages Continuous-Time Dynamic Graphs (CTDGs) to model log sequences. The framework operates in four primary stages:

  • Template2Vec: Raw logs are parsed into templates and converted into dense semantic vectors using a pre-trained BERT model. This ensures the model captures the underlying meaning of log messages rather than just treating them as arbitrary IDs.
  • Multi-scale CTDG Construction: Logs are represented as nodes in a graph where edges denote temporal relationships. The "multi-scale" approach captures both local dependencies (immediate transitions) and global dependencies (long-range patterns).
  • Rich Edge Features: Edges incorporate semantic similarity, co-occurrence frequency, time intervals, and log severity levels (e.g., INFO vs. FATAL).
  • Link Prediction for Detection: A Temporal Graph Network (TGN) with a memory module tracks the system state. Anomalies are detected via link prediction: the model predicts whether a specific log "edge" should exist at a given time. Deviations from these predictions are flagged as event-level anomalies.
The TempoLog architecture, illustrating the transition from log templates to multi-scale graph representation and link prediction.

Experimental Setup

The framework was evaluated on three large-scale public datasets:

  • BGL: Logs from a BlueGene/L supercomputer.
  • Spirit: Data from a high-performance computing cluster.
  • Thunderbird: A supercomputing system dataset characterized by an extremely low anomaly ratio (~0.05%).

Key Results and Insights

TempoLog significantly outperformed popular baselines, including DeepLog, LogAnomaly, PLELog, LogRobust, and the transformer-based LogBert.

  • Superior Accuracy: On the BGL dataset, TempoLog achieved an F1-score of 0.986, vastly outperforming DeepLog (0.226) and LogBert (0.920).
  • Robustness to Imbalance: On the Thunderbird dataset, where anomalies are rare, TempoLog maintained an F1-score of 0.987, while the best baseline reached only 0.637.
  • Importance of Semantics and Scale: Ablation studies revealed that removing BERT-based semantic information led to a ~75% drop in F1-score on the Spirit dataset. Similarly, removing multi-hop connections (H=0) significantly degraded performance, proving that long-range temporal dependencies are crucial.

Discussion and Future Work

While TempoLog offers a significant leap in precision and reduces manual effort for SREs, it faces challenges:

  • Training Stability: Performance oscillations were observed during training on certain datasets, likely due to noise sensitivity.
  • Scalability: "Template explosion" in complex systems can increase GPU memory demands for the graph's memory module.

Future research will focus on optimizing training efficiency and enhancing the scalability of dynamic graph construction for massive production environments.

Summary updated

BibTeX
@misc{qi2025beyond,
  author = {Jiaxing Qi and Chang Zeng and Zhongzhi Luan and Shaohan Huang and Shu Yang and Yao Lu and Hailong Yang and Depei Qian},
  title = {{Beyond Window-Based Detection: A Graph-Centric Framework for Discrete Log Anomaly Detection}},
  year = {2025},
  eprint = {2501.12166},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.12166},
}
Figure