Unraveling the "Anomaly" in Time Series Anomaly Detection: A Self-supervised Tri-domain Solution

Yuting Sun, Guansong Pang, Guanhua Ye, Tong Chen, Xia Hu, Hongzhi Yin · DOI

Introduction

Time Series Anomaly Detection (TSAD) is a critical task across various domains, from healthcare monitoring to financial fraud detection. Despite its importance, the field is hampered by a severe lack of labeled data and the inherent difficulty of defining what constitutes an "anomaly" across different contexts. TriAD (Tri-domain Anomaly Detector) emerges as a novel self-supervised framework designed to overcome these challenges by leveraging multi-domain contrastive learning and specialized discovery algorithms.

The Challenges of Modern TSAD

Current research in TSAD faces three primary hurdles: label scarcity, flawed evaluation metrics, and the "Augmentation Paradox." While self-supervised learning often uses data augmentation to create training signals, standard techniques like jittering or shuffling can inadvertently produce synthetic data that mimics real-world anomalies.

The Augmentation Paradox: Synthetic augmentations like jittering and shuffling often resemble real anomalies, confusing self-supervised models.

As shown in the figure above, a real anomaly in the UCR 003 dataset (top-left) looks remarkably similar to a signal augmented with jittering (top-right). Similarly, the anomaly in UCR 020 (bottom-left) resembles a shuffled signal (bottom-right). This similarity makes it difficult for traditional self-supervised models to distinguish between "normal" augmented data and actual "anomalous" events.

Furthermore, the industry's reliance on the "Point Adjustment" (PA) metric has led to inflated performance scores. In some cases, a randomly initialized model can outperform a trained one under PA, necessitating more rigorous metrics like PA%K and Affiliation.

The TriAD Framework

TriAD addresses these issues through a hybrid approach that combines deep representation learning with classical search algorithms.

1. Tri-domain Encoding

TriAD processes data through three specialized encoders to capture diverse signal characteristics:

  • Temporal Domain: Captures the evolution of patterns over time.
  • Frequency Domain: Utilizes Fast Fourier Transforms (FFT) to analyze spectral content, identifying anomalies that might be invisible in the time domain.
  • Residual Domain: Analyzes the "leftover" signal after removing established trends and periodic behaviors, highlighting subtle deviations.

2. Dual Contrastive Learning

To ensure robust feature extraction, TriAD employs two types of contrastive loss:

  • Intra-domain Contrast: Teaches the model to differentiate normal data from synthetic distortions within each domain.
  • Inter-domain Contrast: Ensures that the three encoders learn unique, non-redundant features, maximizing the information captured from the input signal.

3. Hybrid Inference and Discord Discovery

During the detection phase, the deep learning component identifies "suspicious windows." These candidates are then passed to MERLIN, a classical discord discovery algorithm. By using deep learning as a high-speed filter, TriAD reduces the search space for MERLIN by approximately 20 times, combining the precision of classical methods with the speed of modern neural networks.

Key Results and Performance

TriAD was evaluated on the rigorous UCR Time Series Anomaly Archive, which contains 250 challenging datasets. The results demonstrate a significant leap in performance:

  • Accuracy: TriAD achieved a three-fold increase in F1 scores (using the PA%K metric) compared to state-of-the-art models like Anomaly Transformer.
  • Efficiency: The model improved detection accuracy by 50% over the standalone MERLIN++ algorithm while reducing inference time to just 10% of the original.
  • Versatility: TriAD successfully identified six distinct anomaly types, including seasonal shifts and level changes, where competing models often failed.

Conclusion and Future Directions

TriAD represents a significant advancement in self-supervised anomaly detection by acknowledging and solving the "Augmentation Paradox" and the limitations of current evaluation metrics. While the model is highly robust, future work will focus on refining anomaly scoring systems and exploring performance on datasets with high anomaly density or "bursty" events. By moving toward multi-domain analysis and more rigorous benchmarking, TriAD sets a new standard for reliability in time series analysis.

Summary updated

BibTeX
@inproceedings{sun2024unraveling,
  author = {Yuting Sun and Guansong Pang and Guanhua Ye and Tong Chen and Xia Hu and Hongzhi Yin},
  title = {{Unraveling the "Anomaly" in Time Series Anomaly Detection: A Self-supervised Tri-domain Solution}},
  booktitle = {ICDE},
  year = {2024},
  doi = {10.1109/icde60146.2024.00080},
}
Figure