Table of Contents
Fetching ...

DConAD: A Differencing-based Contrastive Representation Learning Framework for Time Series Anomaly Detection

Wenxin Zhang, Xiaojian Lin, Wenjun Yu, Guangzhen Yao, jingxiang Zhong, Yu Li, Renda Han, Songcheng Xu, Hao Shi, Cuicui Luo

TL;DR

DConAD tackles unsupervised time-series anomaly detection under challenges of diverse anomaly patterns and limited labels by combining differencing-based differential data with a Transformer-based spatiotemporal dependency encoder. A KL-divergence-based, positive-only contrastive objective operating on two views derived from original and differential representations guides robust learning of normal patterns while stop-gradient prevents collapse. The framework integrates time-oriented and relation-oriented Transformer blocks and demonstrates clear performance gains over nine baselines across five real-world datasets, with thorough ablations validating each component. The work provides a practical, scalable approach that reduces reconstruction reliance and improves generalization for anomaly detection in complex time series.

Abstract

Time series anomaly detection holds notable importance for risk identification and fault detection across diverse application domains. Unsupervised learning methods have become popular because they have no requirement for labels. However, due to the challenges posed by the multiplicity of abnormal patterns, the sparsity of anomalies, and the growth of data scale and complexity, these methods often fail to capture robust and representative dependencies within the time series for identifying anomalies. To enhance the ability of models to capture normal patterns of time series and avoid the retrogression of modeling ability triggered by the dependencies on high-quality prior knowledge, we propose a differencing-based contrastive representation learning framework for time series anomaly detection (DConAD). Specifically, DConAD generates differential data to provide additional information about time series and utilizes transformer-based architecture to capture spatiotemporal dependencies, which enhances the robustness of unbiased representation learning ability. Furthermore, DConAD implements a novel KL divergence-based contrastive learning paradigm that only uses positive samples to avoid deviation from reconstruction and deploys the stop-gradient strategy to compel convergence. Extensive experiments on five public datasets show the superiority and effectiveness of DConAD compared with nine baselines. The code is available at https://github.com/shaieesss/DConAD.

DConAD: A Differencing-based Contrastive Representation Learning Framework for Time Series Anomaly Detection

TL;DR

DConAD tackles unsupervised time-series anomaly detection under challenges of diverse anomaly patterns and limited labels by combining differencing-based differential data with a Transformer-based spatiotemporal dependency encoder. A KL-divergence-based, positive-only contrastive objective operating on two views derived from original and differential representations guides robust learning of normal patterns while stop-gradient prevents collapse. The framework integrates time-oriented and relation-oriented Transformer blocks and demonstrates clear performance gains over nine baselines across five real-world datasets, with thorough ablations validating each component. The work provides a practical, scalable approach that reduces reconstruction reliance and improves generalization for anomaly detection in complex time series.

Abstract

Time series anomaly detection holds notable importance for risk identification and fault detection across diverse application domains. Unsupervised learning methods have become popular because they have no requirement for labels. However, due to the challenges posed by the multiplicity of abnormal patterns, the sparsity of anomalies, and the growth of data scale and complexity, these methods often fail to capture robust and representative dependencies within the time series for identifying anomalies. To enhance the ability of models to capture normal patterns of time series and avoid the retrogression of modeling ability triggered by the dependencies on high-quality prior knowledge, we propose a differencing-based contrastive representation learning framework for time series anomaly detection (DConAD). Specifically, DConAD generates differential data to provide additional information about time series and utilizes transformer-based architecture to capture spatiotemporal dependencies, which enhances the robustness of unbiased representation learning ability. Furthermore, DConAD implements a novel KL divergence-based contrastive learning paradigm that only uses positive samples to avoid deviation from reconstruction and deploys the stop-gradient strategy to compel convergence. Extensive experiments on five public datasets show the superiority and effectiveness of DConAD compared with nine baselines. The code is available at https://github.com/shaieesss/DConAD.

Paper Structure

This paper contains 16 sections, 17 equations, 4 figures, 4 tables.

Figures (4)

  • Figure 1: The illustration of DConAD framework. First, DConAD leverages the preprocessing module to generate differential representations of the original time series. After preprocessing, DConAD employs a spatiotemporal dependency learning module to capture the latent dependencies between variables and the long-range dependencies within each sequence. Based on the derived embeddings from the original time series and its differential representation, DConAD generates two contrastive views to learn the consistencies of normal patterns within the time series between the two views based on KL divergence. DConAD is trained with stop-gradient strategies to enhance robustness and convergence.
  • Figure 2: The sensitivity experimental results of DConAD on four hyperparameters, including the number of heads, hidden size, layers, and window size.
  • Figure 3: The validation experiments on contrastive learning paradigms on three datasets.
  • Figure 4: The validation experiments on the utility of KL divergence on five datasets. As-KL denotes DConAD with asymmetrical KL divergence, S-KL denotes DConAD with symmetrical KL divergence, and JS denotes DConAD with JS divergence.