Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy
Jiehui Xu, Haixu Wu, Jianmin Wang, Mingsheng Long
TL;DR
This work addresses unsupervised time series anomaly detection by introducing the Anomaly Transformer, which learns time-point associations through a novel Anomaly-Attention mechanism. It defines Association Discrepancy as the symmetrized KL divergence between prior-association and series-association, and employs a minimax learning strategy to amplify normal-abnormal distinction while reconstructing the signal. The approach yields state-of-the-art results across six benchmarks spanning service monitoring, space/earth exploration, and water-treatment domains, with extensive ablations validating the contribution of the association-based criterion and the minimax optimization. The method improves robustness to diverse anomaly types by leveraging both adjacent-concentration priors and learnable series associations, offering a practical and scalable solution for real-world surveillance systems.
Abstract
Unsupervised detection of anomaly points in time series is a challenging problem, which requires the model to derive a distinguishable criterion. Previous methods tackle the problem mainly through learning pointwise representation or pairwise association, however, neither is sufficient to reason about the intricate dynamics. Recently, Transformers have shown great power in unified modeling of pointwise representation and pairwise association, and we find that the self-attention weight distribution of each time point can embody rich association with the whole series. Our key observation is that due to the rarity of anomalies, it is extremely difficult to build nontrivial associations from abnormal points to the whole series, thereby, the anomalies' associations shall mainly concentrate on their adjacent time points. This adjacent-concentration bias implies an association-based criterion inherently distinguishable between normal and abnormal points, which we highlight through the \emph{Association Discrepancy}. Technically, we propose the \emph{Anomaly Transformer} with a new \emph{Anomaly-Attention} mechanism to compute the association discrepancy. A minimax strategy is devised to amplify the normal-abnormal distinguishability of the association discrepancy. The Anomaly Transformer achieves state-of-the-art results on six unsupervised time series anomaly detection benchmarks of three applications: service monitoring, space & earth exploration, and water treatment.
