ADALog: Adaptive Unsupervised Anomaly detection in Logs with Self-attention Masked Language Model

Przemek Pospieszny, Wojciech Mormul, Karolina Szyndler, Sanjeev Kumar
5/15/2025
cs.AIcs.CLcs.LG

No confident code implementation found for this paper.

Abstract

Modern software systems generate extensive heterogeneous log data with dynamic formats, fragmented event sequences, and varying temporal patterns, making anomaly detection both crucial and challenging. To address these complexities, we propose ADALog, an adaptive, unsupervised anomaly detection framework designed for practical applicability across diverse real-world environments. Unlike traditional methods reliant on log parsing, strict sequence dependencies, or labeled data, ADALog operates on individual unstructured logs, extracts intra-log contextual relationships, and performs adaptive thresholding on normal data. The proposed approach utilizes a transformer-based, pretrained bidirectional encoder with a masked language modeling task, fine-tuned on normal logs to capture domain-specific syntactic and semantic patterns essential for accurate anomaly detection. Anomalies are identified via token-level reconstruction probabilities, aggregated into log-level scores, with adaptive percentile-based thresholding calibrated only on normal data. This allows the model to dynamically adapt to evolving system behaviors while avoiding rigid, heuristic-based thresholds common in traditional systems. We evaluate ADALog on benchmark datasets BGL, Thunderbird, and Spirit, showing strong generalization and competitive performance compared to state-of-the-art supervised and unsupervised methods. Additional ablation studies examine the effects of masking, fine-tuning, and token positioning on model behavior and interpretability.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{pospieszny2025adalog,
  title  = {ADALog: Adaptive Unsupervised Anomaly detection in Logs with Self-attention Masked Language Model},
  author = {Przemek Pospieszny and Wojciech Mormul and Karolina Szyndler and Sanjeev Kumar},
  year   = {2025},
  eprint = {2505.13496},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.13496v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.13496.svg)](https://codeofpaper.com/paper/2505.13496)

Discussion