用软提示让大模型更准识别时间序列异常
SPEAR: Soft Prompt Enhanced Anomaly Recognition for Time Series Data
- 用可学习的软提示融合时间序列嵌入,适配大模型
- 软提示迭代优化,使大模型在异常检测上性能提升
- 适合想用大模型做时序异常检测的研究者
时间序列异常检测在医疗和网络流量监控等领域至关重要。大语言模型(LLMs)为处理普遍的时间序列数据提供了新机遇。传统方法难以应对变长序列和上下文相关的异常。我们提出软提示增强的异常检测方法(SPEAR),利用软提示和量化技术,将时间序列数据转换为嵌入并结合可学习的软提示嵌入,输入冻结的LLM进行推理。软提示通过交叉熵损失迭代更新,使模型适应时间序列异常检测任务。软提示有效提升了LLM在下游任务中的表现,量化则确保模型能高效处理序列数据,因LLM原生设计用于离散序列。实验表明,该方法显著增强了大模型在时间序列异常检测上的能力。
原文摘要 · Abstract (English)
Time series anomaly detection plays a crucial role in a wide range of fields, such as healthcare and internet traffic monitoring. The emergence of large language models (LLMs) offers new opportunities for detecting anomalies in the ubiquitous time series data. Traditional approaches struggle with variable-length time series sequences and context-based anomalies. We propose Soft Prompt Enhanced Anomaly Recognition (SPEAR), a novel approach to leverage LLMs for anomaly detection with soft prompts and quantization. Our methodology involves quantizing and transforming the time series data into input embeddings and combining them with learnable soft prompt embeddings. These combined embeddings are then fed into a frozen LLM. The soft prompts are updated iteratively based on a cross-entropy loss, allowing the model to adapt to time series anomaly detection. The use of soft prompts helps adapt LLMs effectively to time series tasks, while quantization ensures optimal handling of sequences, as LLMs are designed to handle discrete sequences. Our experimental results demonstrate that soft prompts effectively increase LLMs' performance in downstream tasks regarding time series anomaly detection.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。