Skip to main content
QUICK REVIEW

[Paper Review] TransLog: A Unified Transformer-based Framework for Log Anomaly Detection

Hongcheng Guo, Xingyu Lin|arXiv (Cornell University)|Dec 31, 2021
Software System Performance and ReliabilityComputer Science16 citations
TL;DR

TransLog proposes a unified, adapter-based fine-tuning framework for cross-domain log anomaly detection using a pretrained Transformer encoder. By leveraging pretraining on a source domain and efficient adapter modules for target domains, it achieves state-of-the-art performance with significantly fewer trainable parameters and lower training costs, especially in low-resource settings.

ABSTRACT

Log anomaly detection is a key component in the field of artificial intelligence for IT operations (AIOps). Considering log data of variant domains, retraining the whole network for unknown domains is inefficient in real industrial scenarios especially for low-resource domains. However, previous deep models merely focused on extracting the semantics of log sequence in the same domain, leading to poor generalization on multi-domain logs. Therefore, we propose a unified Transformer-based framework for log anomaly detection (\ourmethod{}), which is comprised of the pretraining and adapter-based tuning stage. Our model is first pretrained on the source domain to obtain shared semantic knowledge of log data. Then, we transfer the pretrained model to the target domain via the adapter-based tuning. The proposed method is evaluated on three public datasets including one source domain and two target domains. The experimental results demonstrate that our simple yet efficient approach, with fewer trainable parameters and lower training costs in the target domain, achieves state-of-the-art performance on three benchmarks.

Motivation & Objective

  • To address the challenge of poor generalization in log anomaly detection across multiple IT system domains.
  • To reduce training costs and parameter overhead when deploying models on new, low-resource domains.
  • To enable efficient transfer of shared semantic knowledge from a source domain to target domains without full retraining.
  • To improve model robustness and performance under low-resource training conditions.

Proposed method

  • A two-stage framework: first pretraining a Transformer encoder on a source domain log dataset to learn shared semantic representations.
  • Introducing lightweight adapter modules inserted between Transformer layers to enable parameter-efficient fine-tuning on target domains.
  • Freezing the pretrained model weights and only updating adapter parameters during fine-tuning, minimizing computational cost and overfitting risk.
  • Using log parsing (via Drain) to convert raw logs into structured templates before feeding them into the Transformer encoder.
  • Evaluating the model on multiple benchmarks (HDFS, BGL, Thunderbird) with ablation studies on adapter size, number of encoder layers, and training data size.
  • Applying the same learning rate and model architecture across datasets to ensure fair comparison and consistent evaluation.

Experimental results

Research questions

  • RQ1Can a unified Transformer-based model effectively detect anomalies across diverse log domains with shared semantic patterns?
  • RQ2How does adapter-based fine-tuning compare to full fine-tuning in terms of performance, parameter efficiency, and convergence speed?
  • RQ3To what extent does pretraining on a source domain improve performance on low-resource target domains?
  • RQ4How does model performance vary with different amounts of training data, especially in low-resource scenarios?

Key findings

  • TransLog achieves state-of-the-art performance on three public benchmarks: HDFS, BGL, and Thunderbird, with F1 scores of 0.998, 0.997, and 0.996 respectively.
  • Adapter-based tuning reduces trainable parameters to 3.5–5.5% of the full model while maintaining competitive performance.
  • The model converges faster and generalizes better than training from scratch, especially when fine-tuning on low-resource datasets (e.g., <50k samples).
  • Performance improvement from pretraining is domain-dependent, with BGL-pretrained models yielding greater gains on HDFS than Thunderbird-pretrained ones.
  • Adapter tuning shows greater robustness than full fine-tuning when increasing the number of encoder layers, with consistent performance across 1, 2, and 4 layers.
  • With fewer than 5% of parameters updated, performance drops by only 1%, demonstrating high parameter efficiency.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.