LogLLM: Log-based Anomaly Detection Using Large Language Models

Wei Guan, Jian Cao, Shiyou Qian, Jianqi Gao, Chun Ouyang
11/13/2024
92 citations
cs.SEcs.AI

Official code: guanwei49/LogLLM (203 stars, Python, MIT, last commit 2025-12-09). 1 more implementation below.

Abstract

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.

Show full abstract

Traditional deep learning methods often struggle to capture the semantic information embedded in log data, which is typically organized in natural language. In this paper, we propose LogLLM, a log-based anomaly detection framework that leverages large language models (LLMs). LogLLM employs BERT for extracting semantic vectors from log messages, while utilizing Llama, a transformer decoder-based model, for classifying log sequences. Additionally, we introduce a projector to align the vector representation spaces of BERT and Llama, ensuring a cohesive understanding of log semantics. Unlike conventional methods that require log parsers to extract templates, LogLLM preprocesses log messages with regular expressions, streamlining the entire process. Our framework is trained through a novel three-stage procedure designed to enhance performance and adaptability. Experimental results across four public datasets demonstrate that LogLLM outperforms state-of-the-art methods. Even when handling unstable logs, it effectively captures the semantic meaning of log messages and detects anomalies accurately.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
guanwei49/LogLLMOfficial203PythonMIT2025-12-09
Mohammed-Abdul-Rafe-Sajid/Analysing-LogLLM-and-their-possible-improvementsCommunity4Jupyter Notebook–2025-10-20
guanwei49/LogLLMOfficial100%
MIT

LogLLM: Log-based Anomaly Detection Using Large Language Models (system log anomaly detection)

20335PythonOct 31, 202411 months agoMIT
anomaly-detectionlarge-language-modelsllmsupervised-finetuningsystem-logs+1 more

This assignment is done to analyse the research paper titled "LogLLM: Log-based Anomaly Detection Using Large Language Models" -- and identify research gaps, and proposed solutions.

40Jupyter NotebookOct 1, 20251 years ago

Similar Papers

Cite this paper

@article{guan2024logllm,
  title  = {LogLLM: Log-based Anomaly Detection Using Large Language Models},
  author = {Wei Guan and Jian Cao and Shiyou Qian and Jianqi Gao and Chun Ouyang},
  year   = {2024},
  eprint = {2411.08561},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.08561v5}
}

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/2411.08561.svg)](https://codeofpaper.com/paper/2411.08561)

Discussion