[논문 리뷰] Large language models can be zero-shot anomaly detectors for time series?
이 논문은 시간 시리즈 데이터에서 이상치를 검출할 수 있도록 대규모 언어 모델(Large Language Models, LLMs)을 활용하는 프레임워크인 SigLLM을 제안한다. 이는 Zero-shot 프ompting과 예측 기반 접근 방식을 통해 이루어지며, 예측 기반 검출 파이프라인(Detector)을 통해 기존의 전통적 방법보다 뛰어난 성능을 보이며, 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.
연구 동기 및 목표
- 대규모 언어 모델(Large Language Models, LLMs)이 미세조정 없이도 시간 시리즈 데이터에 대해 Zero-shot 이상 탐지자로 기능할 수 있는지 조사하는 것.
- LLMs가 자연어 처리를 위해 설계되었지만 시간 시리즈 데이터에선 순서 이해와 이상치 위치 특정이 필요하므로, 이러한 도전 과제를 해결하는 것.
- 시간 시리즈 데이터를 LLM이 처리할 수 있는 텍스트 표현으로 변환하면서도 시간적 의미를 유지하는 프레임워크를 개발하는 것.
- 직접 프롬프팅(Prompter) 방식과 예측 기반 이상 탐지 파이프라인(Detector) 방식을 비교하는 것.
- 기존 기준 모델들과의 성능, 비용, 실용성 측면에서 LLM 기반 이상 탐지의 실용성 평가
제안 방법
- SigLLM는 수치적 시간 시리즈를 역으로 복원할 수 있고, LLM 입력에 적합한 기술적 서술 문자열 표현으로 변환하는 시간 시리즈-텍스트 변환 모듈을 포함한다.
- Prompter 파이프라인은 자연어 지시문을 사용해 LLM에 입력 시퀀스 내 이상 구간을 식별하도록 직접 프롬프팅한다.
- Detector 파이프라인은 LLM의 자동회귀 예측 능력을 활용해 향후 값을 예측하고, 예측값과 실제 값 간 잔차를 계산해 이상을 탐지한다.
- OpenAI 및 HuggingFace에서 호스팅된 LLM과의 통합을 지원하여, 모델 미세조정 없이도 Zero-shot 추론이 가능하다.
- LLM의 컨텍스트 길이 제한으로 인해 장기간 시퀀스 처리를 위해 윈도우링 기법을 사용하지만, 이는 계산 오버헤드를 유발한다.
- 후처리 전략은 특히 Prompter 방식에서 임의의 경고를 줄이기 위해 핵심적인 역할을 한다.

실험 결과
연구 질문
- RQ1대규모 언어 모델(Large Language Models)은 미세조정 없이도 시간 시리즈 데이터에서 Zero-shot 환경에서 이상을 탐지할 수 있는가?
- RQ2시간 시리즈 이상 탐지에서 프롬프팅 기반과 예측 기반 LLM 접근 방식의 성능은 어떻게 비교되는가?
- RQ3LLMs는 최신 딥 러닝 및 전통적 이상 탐지 모델에 비해 얼마나 뛰어나거나 뒤처지는가?
- RQ4LLMs를 시간 시리즈 이상 탐지에 사용할 때의 실용적 한계는 무엇인가? 특히 지연 시간과 비용 측면에서.
- RQ5학습 데이터의 기억 현상은 LLM 기반 이상 탐지에 어떤 영향을 미치며, 이를 완화할 수 있는 효과적인 방법은 무엇인가?
주요 결과
- 모든 11개 데이터셋에서 예측 기반 Detector 방법이 프롬프팅 기반 Prompter 방법보다 F1 스코어에서 135% 높은 성능을 기록했다.
- Detector 파이프라인을 사용한 LLMs는 Anomaly Transformer 모델보다 우수한 성능을 보였고, 이동 평균 기반 기준선보다도 뛰어난 성능을 기록했다.
- 강력한 Zero-shot 성능에도 불구하고, LLMs는 여전히 최신 딥 러닝 모델보다 약 30% 정도 F1 스코어에서 뒤처졌다.
- Prompter 방법의 평균 추론 비용은 신호당 1.69달러였고, Detector 방법은 신호당 4.30달러로 더 높은 계산 비용을 유발했다.
- Detector의 추론 시간은 Prompter의 거의 두 배였으며, 오프라인 환경에서 평균 30~120분이 소요되었다.
- 연구 결과, LLM의 컨텍스트 길이 제약로 인해 윈도우링이 필수적이었으며, 이는 다변량 시간 시리즈에선 특히 확장성과 효율성에 한계를 초래했다.

이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.