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.
翻译:时间序列异常检测(TSAD)在各行业中发挥着关键作用,它通过识别偏离标准趋势的非典型模式来维护系统完整性,并支持及时采取应对措施。传统的TSAD模型通常依赖深度学习,需要大量训练数据且以黑盒方式运行,对检测到的异常缺乏可解释性。为应对这些挑战,我们提出LLMAD——一种新颖的TSAD方法,该方法利用大语言模型(LLMs)来提供准确且可解释的TSAD结果。LLMAD创新性地通过检索正负相似时间序列片段,将LLMs应用于上下文异常检测,显著提升了LLMs的检测效能。此外,LLMAD采用异常检测思维链(AnoCoT)方法模拟专家逻辑进行决策推理。该方法进一步提升了检测性能,并使LLMAD能够通过多维度视角为检测结果提供解释,这对用户决策尤为重要。在三个数据集上的实验表明,我们的LLMAD在达到与最先进深度学习方法相当的检测性能的同时,还为检测结果提供了显著的可解释性。据我们所知,这是首个直接运用LLMs进行TSAD的研究工作。