DCdetector: Dual Attention Contrastive Representation Learning for Time Series Anomaly Detection
About
Time series anomaly detection is critical for a wide range of applications. It aims to identify deviant samples from the normal sample distribution in time series. The most fundamental challenge for this task is to learn a representation map that enables effective discrimination of anomalies. Reconstruction-based methods still dominate, but the representation learning with anomalies might hurt the performance with its large abnormal loss. On the other hand, contrastive learning aims to find a representation that can clearly distinguish any instance from the others, which can bring a more natural and promising representation for time series anomaly detection. In this paper, we propose DCdetector, a multi-scale dual attention contrastive representation learning model. DCdetector utilizes a novel dual attention asymmetric design to create the permutated environment and pure contrastive loss to guide the learning process, thus learning a permutation invariant representation with superior discrimination abilities. Extensive experiments show that DCdetector achieves state-of-the-art results on multiple time series anomaly detection benchmark datasets. Code is publicly available at https://github.com/DAMO-DI-ML/KDD2023-DCdetector.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Anomaly Detection | SMD | F1 Score84.95 | 217 | |
| Anomaly Detection | SWaT | F1 Score96.42 | 174 | |
| Anomaly Detection | PSM | F1 Score97.83 | 76 | |
| Anomaly Detection | MSL | Precision51 | 39 | |
| Anomaly Detection | PSM | Visual ROC88.41 | 35 | |
| Time Series Anomaly Detection | MSL | VUS-ROC0.39 | 32 | |
| Time Series Anomaly Detection | SMAP | -- | 32 | |
| Time Series Anomaly Detection | SMAP | Affiliation F168.99 | 29 | |
| Time Series Anomaly Detection | SMAP (test) | Affiliation Precision53.12 | 25 | |
| Time Series Anomaly Detection | PSM (test) | Affiliation Precision54.72 | 25 |