用变长输入差异检测时间序列大模型的对抗样本,提升能源预测安全性。
Keep the Lights On, Keep the Lengths in Check: Plug-In Adversarial Detection for Time-Series LLMs in Energy Forecasting
- 通过生成不同长度的输入子序列,利用预测一致性差异检测对抗攻击。
- 在三个能源数据集上对三种时序大模型均实现强鲁棒性检测效果。
- 无需修改模型即可插件式部署,适合真实电力系统安全防护场景。
准确的时间序列预测对低碳电力系统的规划与运行至关重要。新兴的时间序列大语言模型(TS-LLMs)可无任务微调地规模化提供该能力,正快速成为互联网能源(IoE)生态的核心组件。然而,其实际部署面临关键挑战:对抗样本(AEs)。检测困难源于两点:(i) 对抗扰动针对完整输入序列优化,利用全局时序依赖,导致局部检测方法失效;(ii) 与固定输入维度的传统模型不同,TS-LLMs支持可变长度输入,加剧了检测复杂性。为此,我们提出一种利用模型自身变长输入能力的插件式检测框架。方法基于采样引发的预测发散:给定输入序列,生成多个截断版本,通过比较其预测一致性来检测对抗样本——正常序列在采样下预测稳定,而对抗序列因扰动无法可靠传递至短序列,预测差异显著。我们在三个代表性TS-LLMs(TimeGPT、TimesFM、TimeLLM)上,基于三个能源数据集(ETTh2、NI、Consumption)进行评估。实验结果表明,该方法在黑盒与白盒攻击场景下均表现优异,具备高鲁棒性,证明其作为真实能源系统中TS-LLM预测可靠保障的实用性。
原文摘要 · Abstract (English)
Accurate time-series forecasting is increasingly critical for planning and operations in low-carbon power systems. Emerging time-series large language models (TS-LLMs) now deliver this capability at scale, requiring no task-specific retraining, and are quickly becoming essential components within the Internet-of-Energy (IoE) ecosystem. However, their real-world deployment is complicated by a critical vulnerability: adversarial examples (AEs). Detecting these AEs is challenging because (i) adversarial perturbations are optimized across the entire input sequence and exploit global temporal dependencies, which renders local detection methods ineffective, and (ii) unlike traditional forecasting models with fixed input dimensions, TS-LLMs accept sequences of variable length, increasing variability that complicates detection. To address these challenges, we propose a plug-in detection framework that capitalizes on the TS-LLM's own variable-length input capability. Our method uses sampling-induced divergence as a detection signal. Given an input sequence, we generate multiple shortened variants and detect AEs by measuring the consistency of their forecasts: Benign sequences tend to produce stable predictions under sampling, whereas adversarial sequences show low forecast similarity, because perturbations optimized for a full-length sequence do not transfer reliably to shorter, differently-structured subsamples. We evaluate our approach on three representative TS-LLMs (TimeGPT, TimesFM, and TimeLLM) across three energy datasets: ETTh2 (Electricity Transformer Temperature), NI (Hourly Energy Consumption), and Consumption (Hourly Electricity Consumption and Production). Empirical results confirm strong and robust detection performance across both black-box and white-box attack scenarios, highlighting its practicality as a reliable safeguard for TS-LLM forecasting in real-world energy systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。