arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.08561cs.SEcs.AI
收藏

LogLLM: 基于日志的异常检测使用大型语言模型

LogLLM: Log-based Anomaly Detection Using Large Language Models

SJTU(上海交通大学);QUT(昆士兰科技大学)

Wei Guan, Jian Cao, Shiyou Qian, Jianqi Gao, Chun Ouyang

AI总结:

针对传统深度学习方法难以捕捉日志语义的问题,提出LogLLM框架,结合BERT提取语义向量、Llama分类日志序列及投影器对齐向量空间,无需日志解析器,实验显示其在四个数据集上优于现有方法且能处理不稳定日志。

摘要:

软件系统通常会在日志中记录重要的运行时信息以辅助故障排查。基于日志的异常检测已成为关键研究领域,旨在通过日志数据识别系统问题,最终提升软件系统的可靠性。传统深度学习方法往往难以捕捉日志数据中嵌入的语义信息,这些数据通常以自然语言组织。本文提出LogLLM,一个利用大型语言模型(LLMs)的基于日志的异常检测框架。LogLLM采用BERT从日志消息中提取语义向量,同时利用基于Transformer解码器的模型Llama对日志序列进行分类。此外,我们引入一个投影器来对齐BERT和Llama的向量表示空间,确保对日志语义的一致理解。与需要日志解析器提取模板的传统方法不同,LogLLM使用正则表达式预处理日志消息,简化了整个过程。我们在四个公共数据集上的实验结果表明,LogLLM优于最先进的方法。即使在处理不稳定的日志时,它也能有效捕捉日志消息的语义并准确检测异常。

英文摘要:

Software systems often record important runtime information in logs to help with troubleshooting. Log-based anomaly detection has become a key research area that aims to identify system issues through log data, ultimately enhancing the reliability of software systems. Existing methods often fall short in capturing the semantic information, typically expressed in natural language, or the sequential dependencies inherent in log sequences. In this paper, we propose LogLLM, a framework that enables collaboration between heterogeneous LLMs for log-based anomaly detection. LogLLM exploits the complementary capabilities of different LLM architectures: a Transformer encoder-based LLM is employed to extract fine-grained semantic vectors from individual log messages, while a Transformer decoder-based LLM is utilized to model sequential dependencies and generate anomaly detection decisions. To enable effective collaboration between these heterogeneous LLMs, we introduce a learnable projector to align their vector representation spaces. Furthermore, we design a progressive three-stage training strategy to optimize the collaboration between heterogeneous LLMs by gradually aligning their representations and adapting them to log anomaly detection. Unlike conventional methods that require log parsers to extract templates, LogLLM preprocesses log messages with regular expressions, streamlining the entire process. Experimental results on four public real-world datasets demonstrate that LogLLM outperforms state-of-the-art methods, achieving an average F$_1$-score improvement of 6.6% over the strongest existing approach. Further analyses provide insights into the effectiveness of the key components of the model architecture and progressive three-stage training strategy.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑