NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Unravel Anomalies: An End-to-end Seasonal-Trend Decomposition Approach for Time Series Anomaly Detection

Zhenwei Zhang, Ruiqi Wang, Ran Ding, Yuantao Gu · DOI

Abstract

Traditional Time-series Anomaly Detection (TAD) methods often struggle with the composite nature of complex time-series data and a diverse array of anomalies. We introduce TADNet, an end-to-end TAD model that leverages Seasonal-Trend Decomposition to link various types of anomalies to specific decomposition components, thereby simplifying the analysis of complex time-series and enhancing detection performance. Our training methodology, which includes pre-training on a synthetic dataset followed by fine-tuning, strikes a balance between effective decomposition and precise anomaly detection. Experimental validation on real-world datasets confirms TADNet's state-of-the-art performance across a diverse range of anomalies.

Introduction

Time-series anomaly detection (TAD) is a critical task in domains ranging from industrial IoT to server monitoring. However, real-world signals are typically a "composite" of overlapping patterns: long-term trends, repeating seasonal cycles, and random noise. Traditional deep learning models often treat these inputs as a black box, leading to ambiguity where different anomaly types (e.g., gradual trend shifts vs. sudden spikes) are conflated. Furthermore, these models lack interpretability, failing to explain which underlying pattern was disrupted when an anomaly is flagged.

TADNet addresses these challenges by "unraveling" complex time-series into their constituent components—trend, seasonal, and remainder—using an end-to-end Seasonal-Trend Decomposition (STD) framework.

Methodology

Architecture

TADNet draws architectural inspiration from audio source separation (specifically TasNet). It treats the trend, seasonal, and remainder components as individual "sources" to be separated from the raw time-series "mixture."

  • Encoder: Projects the input time series into a high-dimensional latent space.
  • Separator: Acting as the model's core, it generates three distinct masks (trend, seasonal, and remainder) applied to the latent representation.
  • Decoders: Three independent decoders transform the masked representations back into the time domain, yielding the individual components.
TADNet Architecture and Two-Phase Training Workflow

Two-Phase Training Strategy

Since real-world datasets lack ground-truth labels for decomposed components, TADNet employs a two-phase training approach:

  1. Phase 1 (Pre-training): The model is trained on a complex synthetic dataset generated via deterministic functions and stochastic processes (e.g., ARIMA). Because the exact components are known, the model learns the fundamental logic of accurate decomposition.
  2. Phase 2 (Fine-tuning): The model is fine-tuned on real-world "normal" data to learn typical patterns. During inference, any significant deviation between the original signal and the reconstructed version (the reconstruction error) is identified as an anomaly.

Experimental Setup and Results

Datasets

TADNet was evaluated on five major benchmarks: UCR (KDD 2021 Cup), SMD (Server Machine Dataset), WADI & SWaT (Industrial IoT), and PSM (eBay server metrics). These cover both univariate and multivariate scenarios with varying anomaly densities.

Performance and Interpretability

TADNet achieved state-of-the-art (SOTA) performance, outperforming six major baselines (including TranAD and AnomalyTran) on four out of five datasets. Notable results include an F1-score of 98.74% on UCR and 98.66% on PSM.

Ablation studies highlighted the importance of the decomposition mechanism; removing the "Separator" caused the F1-score on the UCR dataset to drop from 98.74% to 32.68%.

Visualizing Seasonal-Trend Decomposition across various benchmarks

As shown in the visualizations, the reconstruction error aligns precisely with anomalous regions (highlighted in red), while the decomposed trend and seasonal components remain stable. This provides a clear, interpretable explanation for why a specific segment was flagged.

Discussion and Conclusion

Key Insights

  • Anomalies have "Homes": By associating specific anomalies with specific components (e.g., trend shifts in the trend component), the signal-to-anomaly ratio becomes significantly clearer.
  • Cross-Domain Innovation: Applying latent-space masking from audio processing to time-series allows the model to learn decomposition logic without rigid statistical assumptions.
  • Synthetic Supervision: Pre-training on mathematically rigorous synthetic data is essential for teaching the network decomposition logic before exposing it to noisy real-world data.

Limitations and Future Work

While effective, TADNet currently treats multivariate variables with a degree of independence. Future work will explore modeling complex inter-variable interactions. Additionally, while an "Iterative" training approach showed even higher accuracy (e.g., 92.06% on WADI), it is computationally expensive; optimizing this process remains a priority for practical deployment.

Summary updated

BibTeX
@inproceedings{zhang2024unravel,
  author = {Zhenwei Zhang and Ruiqi Wang and Ran Ding and Yuantao Gu},
  title = {{Unravel Anomalies: An End-to-end Seasonal-Trend Decomposition Approach for Time Series Anomaly Detection}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  doi = {10.1109/icassp48485.2024.10446482},
}
Figure