Skip to main content
QUICK 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 Reliability被引用 16
一句话总结

TransLog 提出了一种统一的、基于适配器的微调框架,用于使用预训练 Transformer 编码器进行跨领域日志异常检测。通过在源领域上进行预训练,并利用高效的适配器模块进行目标领域的微调,该方法在显著减少可训练参数数量和降低训练成本的同时,实现了最先进的性能表现,尤其在低资源设置下表现优异。

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.

研究动机与目标

  • 解决在多个 IT 系统领域中日志异常检测泛化能力差的挑战。
  • 在将模型部署到新的、低资源领域时,降低训练成本和参数开销。
  • 在无需完整微调的情况下,实现从源领域到目标领域的共享语义知识高效迁移。
  • 在低资源训练条件下提升模型的鲁棒性和性能。

提出的方法

  • 采用两阶段框架:首先在源领域日志数据集上预训练 Transformer 编码器,以学习共享的语义表示。
  • 在 Transformer 层之间引入轻量级适配器模块,以实现在目标领域上的参数高效微调。
  • 在微调过程中冻结预训练模型的权重,仅更新适配器参数,从而最小化计算成本并降低过拟合风险。
  • 使用日志解析(通过 Drain)将原始日志转换为结构化模板,再输入到 Transformer 编码器中。
  • 在多个基准数据集(HDFS、BGL、Thunderbird)上进行评估,并对适配器大小、编码器层数量和训练数据量进行消融研究。
  • 在所有数据集中采用相同的初始学习率和模型架构,以确保公平比较和一致评估。

实验结果

研究问题

  • RQ1统一的基于 Transformer 的模型是否能有效检测具有共享语义模式的多样化日志领域中的异常?
  • RQ2与完整微调相比,基于适配器的微调在性能、参数效率和收敛速度方面表现如何?
  • RQ3在源领域上进行预训练在多大程度上能提升在低资源目标领域上的性能?
  • RQ4当训练数据量不同时,模型性能如何变化,尤其是在低资源场景下?

主要发现

  • TransLog 在三个公开基准数据集(HDFS、BGL、Thunderbird)上均达到最先进性能,F1 分数分别为 0.998、0.997 和 0.996。
  • 基于适配器的微调将可训练参数减少至全模型的 3.5%–5.5%,同时保持了具有竞争力的性能表现。
  • 与从零开始训练相比,该模型收敛更快且泛化能力更强,尤其在低资源数据集(如样本数少于 50k)上微调时表现更优。
  • 预训练带来的性能提升具有领域依赖性,BGL 预训练模型在 HDFS 上的性能增益高于 Thunderbird 预训练模型。
  • 当增加编码器层数时,适配器微调表现出更强的鲁棒性,无论在 1、2 或 4 层时均保持一致的性能表现。
  • 当仅更新少于 5% 的参数时,性能仅下降 1%,证明了极高的参数效率。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。