LogGPT
GPT-style decoder over log keys, fine-tuned with a Top-K reinforcement reward to detect log anomalies.
Language · 280 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Language
- Parameters
- 295.9K
- Operations
- 280
- Framework
- PyTorch
- Recurrent
- No
- Published
- IEEE International Conference on Big Data (BigData) (arXiv 2023)
- Cited by
- 70 (as of 29 October 2026)
- Authors
- Xiao Han, Shuhan Yuan, Mohamed Trabelsi
- Source
- GitHub: nokia/LogGPT
- License
- CC-BY-NC-4.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m17983
- Graph hash
- 626df99d28e20bb651df9fda1c7352f8f923e5622486232875136f4a54e66635
- Skeleton hash
- afa5caedcfd9be483d80b500f13619e5d504f0b0cea1f996e66273d643c6cf6b
- Architecture hash
- 82726d169a2343413ecb937f2164ea6ecb194f88966e134ad559dd012a9834b0
- Diagram SHA-256
- 04df261f967bb9b179d938e72fdd47f191e933337fc8028aa22bbb7d0d5a25e9
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
LogGPT applies a GPT model to the detection of anomalies in system logs. Log messages are first reduced by a log parser to their templates, called log keys, so that a log becomes a sequence over a small vocabulary. The model is trained to predict the next log key from the preceding ones, and an anomaly is detected by checking whether the observed log key appears in the Top-K prediction list.
The paper's argument is that training a sequence model with a language modeling loss is not directly related to anomaly detection. After pre-training, the model is therefore fine-tuned with reinforcement learning under a Top-K reward: positive when the actual log key is among the Top-K predictions and negative otherwise. Unlike the LSTM-based DeepLog, it does not split a log sequence into small windows.
The paper's network is a GPT with 6 layers and 6 heads, with embeddings and hidden states of dimension 60. K is set to 50% of the log keys seen in training. The evaluation covers three log datasets: HDFS, BGL and Thunderbird. For each of them, training uses 5000 randomly selected normal log sequences.
Key idea. LogGPT pre-trains a GPT to predict the next log entry and then fine-tunes it with a reinforcement learning strategy designed specifically for log anomaly detection.
- LogGPT
- log anomaly detection
- log language model
- system logs
- log keys
- Top-K reward
- reinforcement learning fine-tuning
- HDFS logs
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{han2023loggptloganomalydetection,
title={LogGPT: Log Anomaly Detection via GPT},
author={Xiao Han and Shuhan Yuan and Mohamed Trabelsi},
year={2023},
eprint={2309.14482},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2309.14482},
}