Skip to content

LJunius/LLMAD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLMAD: Large Language Models can Deliver Accurate and Interpretable Time Series Anomaly Detection.

Description

This repository contains the code for the paper: "Large Language Models can Deliver Accurate and Interpretable Time Series Anomaly Detection". It demonstrates the use of Large Language Models (LLMs) to tackle the task of Time Series Anomaly Detection.

LLMAD

Table of Contents

Installation

To get started, clone the repository and install the necessary dependencies:

cd LLM_AD
pip install -U openai fastdtw pandas numpy scipy

Usage

Configuration

Before running the scripts, set up your configuration file config.yaml with your OpenAI API details:

openai:
  api_key: "your-api-key"
  base_url: "https://api.openai.com/v1"

Running the Scripts

Below are the commands to run the scripts for different datasets.

Yahoo Dataset

bash script/yahoo.sh

WSD Dataset

bash script/wsd.sh

KPI Dataset

bash script/kpi.sh

File Descriptions

File Name Description
run.py Program entry point
Prompt_template.py Structure of the prompt
Eval/* Scripts to compute evaluation metrics

If you find this repo helpful, please cite the following papers:

@article{liu2024large,
  title={Large Language Models can Deliver Accurate and Interpretable Time Series Anomaly Detection},
  author={Liu, Jun and Zhang, Chaoyun and Qian, Jiaxu and Ma, Minghua and Qin, Si and Bansal, Chetan and Lin, Qingwei and Rajmohan, Saravan and Zhang, Dongmei},
  journal={arXiv preprint arXiv:2405.15370},
  year={2024}
}

About

LLMAD code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages