[論文レビュー] Large language models can be zero-shot anomaly detectors for time series?
本稿では、ゼロショットプロンプティングと予測を用いて時系列データの異常を検出できるようにする、SigLLMというフレームワークを提案する。予測に基づく検出パイプライン(Detector)を用いることで、LLMが従来の手法を上回ることを示した。F1スコアはプロンプティング手法を大きく上回ったが、最先端の深層学習モデルと比べて約30%の差がある。
Recent studies have shown the ability of large language models to perform a variety of tasks, including time series forecasting. The flexible nature of these models allows them to be used for many applications. In this paper, we present a novel study of large language models used for the challenging task of time series anomaly detection. This problem entails two aspects novel for LLMs: the need for the model to identify part of the input sequence (or multiple parts) as anomalous; and the need for it to work with time series data rather than the traditional text input. We introduce sigllm, a framework for time series anomaly detection using large language models. Our framework includes a time-series-to-text conversion module, as well as end-to-end pipelines that prompt language models to perform time series anomaly detection. We investigate two paradigms for testing the abilities of large language models to perform the detection task. First, we present a prompt-based detection method that directly asks a language model to indicate which elements of the input are anomalies. Second, we leverage the forecasting capability of a large language model to guide the anomaly detection process. We evaluated our framework on 11 datasets spanning various sources and 10 pipelines. We show that the forecasting method significantly outperformed the prompting method in all 11 datasets with respect to the F1 score. Moreover, while large language models are capable of finding anomalies, state-of-the-art deep learning models are still superior in performance, achieving results 30% better than large language models.
研究の動機と目的
- 大規模言語モデル(LLM)が微調整なしにゼロショットで時系列データの異常検出に利用可能かどうかを調査すること。
- 自然言語処理を目的として設計されたLLMを、時系列データに適応させる課題に取り組むこと。これは、時系列の理解と異常場所の特定を含む。
- 時系列データをLLMが処理可能なテキスト表現に変換するフレームワークを開発すること。この際、時間的意味を保持することが重要である。
- 2つの異なるパラダイムを比較すること:直接プロンプティング(Prompter)と予測に基づく異常検出(Detector)。
- LLMを用いた異常検出の実用性、コスト、性能を、既存のベースラインと比較して評価すること。
提案手法
- SigLLMには、数値時系列データを逆引き可能な記述的テキスト表現に変換する時系列からテキストへの変換モジュールが含まれる。
- Prompterパイプラインは、自然言語の指示を用いてLLMに入力シーケンス内の異常セグメントを特定させる。
- Detectorパイプラインは、LLMの自己回帰的予測機能を活用し、将来の値を予測した後、予測値と実測値の残差を計算して異常を検出する。
- フレームワークは、OpenAIおよびHuggingFaceにホストされたLLMと統合可能であり、モデルの微調整なしにゼロショット推論が可能である。
- LLMのコンテキスト長制限のため、長時間系列データを処理するにはローリングウィンドウが使用されるが、これにより計算コストが増加する。
- 後処理戦略は、特にPrompterアプローチにおいて誤検出を低減するために重要である。

実験結果
リサーチクエスチョン
- RQ1大規模言語モデル(LLM)は、微調整なしにゼロショットで時系列データの異常検出が可能か?
- RQ2時系列異常検出において、プロンプティングベースと予測ベースのLLMアプローチの性能はどのように比較できるか?
- RQ3LLMは、最先端の深層学習モデルや古典的手法と比較して、どの程度優れているか、または劣っているか?
- RQ4LLMを用いた時系列異常検出における実用的制限、特に遅延とコストの観点での課題は何か?
- RQ5学習データの記憶(memorization)がLLMベースの異常検出に与える影響は何か。また、効果的な緩和策はあるか?
主な発見
- 11のすべてのデータセットにおいて、予測ベースのDetector手法は、プロンプティングベースのPrompter手法をF1スコアで135%上回った。
- Detectorパイプラインを用いたLLMは、Anomaly Transformerモデルを上回り、移動平均ベースラインよりも優れた性能を示した。
- 強力なゼロショット性能を示したが、最先端の深層学習モデルと比較するとF1スコアで約30%の差がある。
- Prompter手法の平均推論コストは1信号あたり1.69ドルであり、Detector手法は1信号あたり4.30ドルで、計算コストが高かった。
- Detectorの推論時間はPrompterのほぼ2倍で、オフライン環境では1信号あたり30~120分の平均時間を要した。
- ローリングウィンドウはLLMのコンテキスト長制限のため必須であったが、これによりスケーラビリティと効率性が制限され、特に多次元時系列データでは顕著であった。

この論文を読む
Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。
Nubintでこの論文を読むこのレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。