Skip to content

hanxiao0607/LogGPT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LogGPT: Log Anomaly Detection via GPT

This repository contains a Pytorch implementation of LogGPT, a novel model that employs GPT for log anomaly detection. LogGPT is first trained to predict the next log entry based on the preceding sequence ((a) Pre-training). To further enhance the performance of LogGPT, a novel reinforcement learning (RL) strategy is proposed to finetune the model specifically for the log anomaly detection task ((b) Fine-tuning).

alt text

Configuration

  • Ubuntu 20.04
  • NVIDIA driver 495.29.05
  • CUDA 11.3
  • Python 3.9.7
  • PyTorch 1.11.0

Installation

This code requires the packages listed in requirements.txt. A virtual environment is recommended to run this code

On macOS and Linux:

python3 -m pip install --user virtualenv
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
deactivate

Reference: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/

Instructions

Run and test:

python3 main.py HDFS
or
python3 main.py BGL
or
python3 main.py Thunderbird

Reference

If you plan to use LogGPT in your project, please consider citing our paper:

@misc{han2023loggpt,
      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}
}

Contact

If you have any questions, please contact Mohamed Trabelsi (mohamed.trabelsi@nokia-bell-labs.com) and Xiao Han (hanxiao2099@gmail.com).

Acknowledgements

The code is mainly written by Xiao Han during his internship at Nokia Bell Labs.

License

LogGPT is CC-BY-NC-4.0 licensed as of now.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%