Can LLMs Understand Time Series Anomalies?

Zihao Zhou, Rose Yu
10/7/2024
cs.LG

Official code: Rose-STL-Lab/AnomLLM (47 stars, MIT, last commit 2024-10-16).

Abstract

Large Language Models (LLMs) have gained popularity in time series forecasting, but their potential for anomaly detection remains largely unexplored. Our study investigates whether LLMs can understand and detect anomalies in time series data, focusing on zero-shot and few-shot scenarios. Inspired by conjectures about LLMs' behavior from time series forecasting research, we formulate key hypotheses about LLMs' capabilities in time series anomaly detection. We design and conduct principled experiments to test each of these hypotheses. Our investigation reveals several surprising findings about LLMs for time series: (1) LLMs understand time series better as images rather than as text, (2) LLMs do not demonstrate enhanced performance when prompted to engage in explicit reasoning about time series analysis. (3) Contrary to common beliefs, LLMs' understanding of time series does not stem from their repetition biases or arithmetic abilities. (4) LLMs' behaviors and performance in time series analysis vary significantly across different models. This study provides the first comprehensive analysis of contemporary LLM capabilities in time series anomaly detection. Our results suggest that while LLMs can understand trivial time series anomalies, we have no evidence that they can understand more subtle real-world anomalies. Many common conjectures based on their reasoning capabilities do not hold. All synthetic dataset generators, final prompts, and evaluation scripts have been made available in https://github.com/rose-stl-lab/anomllm.

View on arXivView PDF

Code Implementations(1)

MIT
4712Shell, PythonAug 12, 20242 years agoMIT

Similar Papers

Cite this paper

@article{zhou2024llms,
  title  = {Can LLMs Understand Time Series Anomalies?},
  author = {Zihao Zhou and Rose Yu},
  year   = {2024},
  eprint = {2410.05440},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.05440v3},
  journal = {ICLR 2024 2024}
}

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

Discussion