[Paper Review] Large Language Models can Deliver Accurate and Interpretable Time Series Anomaly Detection
This paper proposes LLMAD, a novel few-shot time series anomaly detection framework that leverages Large Language Models (LLMs) for accurate and interpretable anomaly detection. By retrieving similar historical segments and applying an Anomaly Detection Chain-of-Thought (AnoCoT) prompting strategy, LLMAD achieves state-of-the-art F1 performance while generating natural language explanations for detected anomalies, marking the first direct application of LLMs to TSAD without fine-tuning.
Time series anomaly detection (TSAD) plays a crucial role in various industries by identifying atypical patterns that deviate from standard trends, thereby maintaining system integrity and enabling prompt response measures. Traditional TSAD models, which often rely on deep learning, require extensive training data and operate as black boxes, lacking interpretability for detected anomalies. To address these challenges, we propose LLMAD, a novel TSAD method that employs Large Language Models (LLMs) to deliver accurate and interpretable TSAD results. LLMAD innovatively applies LLMs for in-context anomaly detection by retrieving both positive and negative similar time series segments, significantly enhancing LLMs' effectiveness. Furthermore, LLMAD employs the Anomaly Detection Chain-of-Thought (AnoCoT) approach to mimic expert logic for its decision-making process. This method further enhances its performance and enables LLMAD to provide explanations for their detections through versatile perspectives, which are particularly important for user decision-making. Experiments on three datasets indicate that our LLMAD achieves detection performance comparable to state-of-the-art deep learning methods while offering remarkable interpretability for detections. To the best of our knowledge, this is the first work that directly employs LLMs for TSAD.
Motivation & Objective
- Address the lack of interpretability in deep learning-based time series anomaly detection (TSAD) methods, which often act as black boxes.
- Overcome the data-hungry nature of traditional deep learning models by enabling few-shot anomaly detection using LLMs.
- Integrate domain-specific knowledge into LLMs to improve anomaly detection accuracy and explanation quality.
- Enable natural language explanations of anomalies—such as anomaly type, severity, and root cause—without requiring model fine-tuning.
- Demonstrate that LLMs can be directly applied to TSAD with high accuracy and interpretability, setting a new benchmark in the field.
Proposed method
- LLMAD retrieves both normal and anomalous time series segments from historical data to serve as in-context learning (ICL) demonstrations for the LLM.
- It employs a retrieval-augmented prompting strategy to contextualize the input with relevant past patterns, enhancing the LLM’s understanding of the current time series.
- The Anomaly Detection Chain-of-Thought (AnoCoT) framework is used to guide the LLM through a step-by-step reasoning process, mimicking expert diagnostic logic.
- AnoCoT incorporates domain-specific rules and background knowledge into the prompt, enabling the LLM to reason about anomaly types, severity levels, and contextual explanations.
- The method operates without fine-tuning, relying solely on prompt engineering and retrieval to adapt the LLM to the TSAD task.
- Explanations are generated in natural language, including anomaly identification, type classification, and contextual reasoning, directly from the LLM’s output.
Experimental results
Research questions
- RQ1Can LLMs be effectively applied to time series anomaly detection without fine-tuning, achieving competitive performance with state-of-the-art deep learning models?
- RQ2To what extent can retrieval-augmented in-context learning improve few-shot anomaly detection in LLMs for time series data?
- RQ3Can the AnoCoT prompting strategy generate human-readable, expert-like explanations that enhance interpretability in TSAD?
- RQ4How does the integration of domain-specific knowledge into prompts affect the accuracy and reliability of LLM-based anomaly detection?
- RQ5Can LLMAD outperform traditional black-box deep learning models in both detection performance and interpretability in real-world TSAD scenarios?
Key findings
- LLMAD achieves competitive F1 scores compared to state-of-the-art deep learning methods on three public time series anomaly detection datasets.
- The model demonstrates strong generalization in few-shot settings, relying on retrieved historical segments rather than extensive fine-tuning.
- Human evaluation confirms that LLMAD generates comprehensive, contextually relevant, and interpretable anomaly explanations, including anomaly type, severity, and root cause reasoning.
- The AnoCoT prompting strategy significantly improves the quality and consistency of explanations, aligning them with expert diagnostic patterns.
- Despite higher inference latency and cost, LLMAD’s interpretability and zero-shot adaptability make it highly suitable for practical deployment where explainability is critical.
- The framework is the first to directly apply LLMs to time series anomaly detection without fine-tuning, establishing a new paradigm in interpretable TSAD.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.