ChatPaper.aiChatPaper

意料之外的注意力机制:可预测查询动态的时间序列异常检测

Surprised by Attention: Predictable Query Dynamics for Time Series Anomaly Detection

March 13, 2026
作者: Kadir-Kaan Özer, René Ebeling, Markus Enzweiler
cs.AI

摘要

多元時間序列異常通常表現為跨通道依賴關係的轉變,而非簡單的幅度偏移。以自動駕駛為例,轉向指令可能內部一致但與實際橫向加速度解耦。當靈活的序列模型在協調關係改變後仍能合理重建信號時,基於殘差的檢測器可能遺漏此類異常。本文提出無監督檢測器AxonAD,將多頭注意力查詢向量的演變視為短時程可預測過程:通過梯度更新的重建路徑與僅依賴歷史的預測器相結合,後者根據過往上下文預測未來查詢向量。該模型採用掩碼預測目標的訓練目標,對比指數移動平均目標編碼器。推理階段將重建誤差與尾部聚合查詢失配分數相結合,該分數通過計算近期時間步預測查詢與目標查詢的餘弦偏差來衡量。這種雙重策略既能感知結構性依賴關係轉變,又保留幅度層面的檢測能力。在帶有區間標註的專有車載遙測數據,以及TSB-AD多元數據集(17個數據集、180個序列)上採用無閾值與範圍感知指標的測試表明,AxonAD在排序質量和時間定位精度上均超越強基線模型。消融實驗證實查詢預測與組合評分是性能提升的主要驅動因素。代碼已開源於:https://github.com/iis-esslingen/AxonAD。
English
Multivariate time series anomalies often manifest as shifts in cross-channel dependencies rather than simple amplitude excursions. In autonomous driving, for instance, a steering command might be internally consistent but decouple from the resulting lateral acceleration. Residual-based detectors can miss such anomalies when flexible sequence models still reconstruct signals plausibly despite altered coordination. We introduce AxonAD, an unsupervised detector that treats multi-head attention query evolution as a short horizon predictable process. A gradient-updated reconstruction pathway is coupled with a history-only predictor that forecasts future query vectors from past context. This is trained via a masked predictor-target objective against an exponential moving average (EMA) target encoder. At inference, reconstruction error is combined with a tail-aggregated query mismatch score, which measures cosine deviation between predicted and target queries on recent timesteps. This dual approach provides sensitivity to structural dependency shifts while retaining amplitude-level detection. On proprietary in-vehicle telemetry with interval annotations and on the TSB-AD multi-variate suite (17 datasets, 180 series) with threshold-free and range-aware metrics, AxonAD improves ranking quality and temporal localization over strong baselines. Ablations confirm that query prediction and combined scoring are the primary drivers of the observed gains. Code is available at the URL https://github.com/iis-esslingen/AxonAD.
PDF32March 30, 2026