LogLLaMA: Transformer-based log anomaly detection with LLaMA

Zhuoyi Yang, Ian G. Harris
3/19/2025
cs.LGcs.CL

No confident code implementation found for this paper.

Abstract

Log anomaly detection refers to the task that distinguishes the anomalous log messages from normal log messages. Transformer-based large language models (LLMs) are becoming popular for log anomaly detection because of their superb ability to understand complex and long language patterns. In this paper, we propose LogLLaMA, a novel framework that leverages LLaMA2. LogLLaMA is first finetuned on normal log messages from three large-scale datasets to learn their patterns. After finetuning, the model is capable of generating successive log messages given previous log messages. Our generative model is further trained to identify anomalous log messages using reinforcement learning (RL). The experimental results show that LogLLaMA outperforms the state-of-the-art approaches for anomaly detection on BGL, Thunderbird, and HDFS datasets.

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{yang2025logllama,
  title  = {LogLLaMA: Transformer-based log anomaly detection with LLaMA},
  author = {Zhuoyi Yang and Ian G. Harris},
  year   = {2025},
  eprint = {2503.14849},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.14849v1}
}

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

Discussion