Table of Contents
Fetching ...

End-To-End Self-Tuning Self-Supervised Time Series Anomaly Detection

Boje Deforce, Meng-Chieh Lee, Bart Baesens, Estefanía Serral Asensio, Jaemin Yoo, Leman Akoglu

TL;DR

TSAP introduces end-to-end self-tuning of augmentation hyperparameters for self-supervised time series anomaly detection without labeled data. It combines a differentiable augmentation module with an unsupervised Wasserstein-based validation loss to align augmented and unlabeled test data, enabling automatic selection of both discrete anomaly-type augmentations and their continuous parameters. Across six TSAD tasks on PhysioNet and MoCap data, TSAP consistently outperforms a broad set of baselines, including state-of-the-art augmentation-based methods, by effectively matching augmentation semantics to diverse anomaly types. The work advances unsupervised model selection in TSAD and opens avenues for extending to multivariate data and broader anomaly families, with practical implications for real-world monitoring systems.

Abstract

Time series anomaly detection (TSAD) finds many applications such as monitoring environmental sensors, industry KPIs, patient biomarkers, etc. A two-fold challenge for TSAD is a versatile and unsupervised model that can detect various different types of time series anomalies (spikes, discontinuities, trend shifts, etc.) without any labeled data. Modern neural networks have outstanding ability in modeling complex time series. Self-supervised models in particular tackle unsupervised TSAD by transforming the input via various augmentations to create pseudo anomalies for training. However, their performance is sensitive to the choice of augmentation, which is hard to choose in practice, while there exists no effort in the literature on data augmentation tuning for TSAD without labels. Our work aims to fill this gap. We introduce TSAP for TSA "on autoPilot", which can (self-)tune augmentation hyperparameters end-to-end. It stands on two key components: a differentiable augmentation architecture and an unsupervised validation loss to effectively assess the alignment between augmentation type and anomaly type. Case studies show TSAP's ability to effectively select the (discrete) augmentation type and associated (continuous) hyperparameters. In turn, it outperforms established baselines, including SOTA self-supervised models, on diverse TSAD tasks exhibiting different anomaly types.

End-To-End Self-Tuning Self-Supervised Time Series Anomaly Detection

TL;DR

TSAP introduces end-to-end self-tuning of augmentation hyperparameters for self-supervised time series anomaly detection without labeled data. It combines a differentiable augmentation module with an unsupervised Wasserstein-based validation loss to align augmented and unlabeled test data, enabling automatic selection of both discrete anomaly-type augmentations and their continuous parameters. Across six TSAD tasks on PhysioNet and MoCap data, TSAP consistently outperforms a broad set of baselines, including state-of-the-art augmentation-based methods, by effectively matching augmentation semantics to diverse anomaly types. The work advances unsupervised model selection in TSAD and opens avenues for extending to multivariate data and broader anomaly families, with practical implications for real-world monitoring systems.

Abstract

Time series anomaly detection (TSAD) finds many applications such as monitoring environmental sensors, industry KPIs, patient biomarkers, etc. A two-fold challenge for TSAD is a versatile and unsupervised model that can detect various different types of time series anomalies (spikes, discontinuities, trend shifts, etc.) without any labeled data. Modern neural networks have outstanding ability in modeling complex time series. Self-supervised models in particular tackle unsupervised TSAD by transforming the input via various augmentations to create pseudo anomalies for training. However, their performance is sensitive to the choice of augmentation, which is hard to choose in practice, while there exists no effort in the literature on data augmentation tuning for TSAD without labels. Our work aims to fill this gap. We introduce TSAP for TSA "on autoPilot", which can (self-)tune augmentation hyperparameters end-to-end. It stands on two key components: a differentiable augmentation architecture and an unsupervised validation loss to effectively assess the alignment between augmentation type and anomaly type. Case studies show TSAP's ability to effectively select the (discrete) augmentation type and associated (continuous) hyperparameters. In turn, it outperforms established baselines, including SOTA self-supervised models, on diverse TSAD tasks exhibiting different anomaly types.
Paper Structure (50 sections, 2 equations, 10 figures, 7 tables, 1 algorithm)

This paper contains 50 sections, 2 equations, 10 figures, 7 tables, 1 algorithm.

Figures (10)

  • Figure 1: Our TSAP framework for end-to-end self-tuning TSAD. Left: Offline trained, differentiable augmentation model $f_\mathrm{aug}(\cdot;\boldsymbol{\phi})$ takes as input the normal data and augmentation hyperparameter(s) $\mathbf{a}$, and outputs pseudo-anomalies $\mathbf{\tilde{x}}_\mathrm{aug}$. Right: Self-tuning engine incorporates the pre-trained $f_\mathrm{aug}$ (with parameters $\boldsymbol{\phi}$ frozen), alternating between two phases: ($i$) detection phase -- given $\mathbf{a}^{(t)}$ at iteration $t$, estimate parameters $\boldsymbol{\theta}^{(t)}$ of detector $f_\mathrm{det}$ (consisting of Encoder$_\theta$ and discriminator MLP$_\theta$), by optimizing $\mathcal{L}_\mathrm{trn}$ (classification loss); ($ii$) alignment phase -- given $f_\mathrm{det}^\mathrm{enc}(\cdot;\boldsymbol{\theta}^{(t)})$, update augmentation (governed by $\mathbf{a}$) to better align the embedded time series $\mathbf{z}_\mathrm{trn} \cup \mathbf{z}_\mathrm{aug}$ with $\mathbf{z}_\mathrm{val}$ in the learned discriminative space. Note that $\mathbf{x}_\mathrm{val}$ contains both normal and anomalous time series, but labels are not known or used at any point during training time.
  • Figure 2: Examples of six different types of time series anomalies; (black) original real-world time series, (red) pseudo anomalies generated by $g$.
  • Figure 4: Tuning continuous augmentation hyperparameter(s) with TSAP. Top: Given Platform anomalies at true level (red dashed line), various initializations converge accurately near the true value (left), following the minimized values of val. loss (center), and leading to high detection performance (right). Bottom: Multiple continuous hyperparameters, here both level and length, are accurately tuned to near true values (left), as guided by minimizing the val. loss (center), achieving high AUROC (right). Notice that the diverged results in both cases associate with high (or hard-to-optimize) val. loss, which help us effectively reject low performance models.
  • Figure 5: Tuning the discrete hyperparameter (anomaly type) with TSAP. Left: Given true Trend anomaly (black), val. loss favors both Trend (green) and Mean shift (blue) type, both with high AUROC (center) and high resemblance (right), and effectively rejects type Platform (orange) with poor performance. Right: For Jump anomalies in MoCap A with unknown type (black), val. loss favors type Platform (purple) that leads to high AUROC (center) and mimics well the true anomaly (right), and effectively rejects type Frequency (red) with poor performance.
  • Figure 6: Overview of ablation studies.Top:TSAP's $\mathcal{L}_\mathrm{val}$ is replaced by a point-wise val. loss leading to an erroneous estimation of $a$ (left) and poor performance (right). Bottom:TSAP's self-tuning module is disabled, $a$ is now randomized. Val. loss indicates poor alignment, reflected in poor performance.
  • ...and 5 more figures