GenIAS: Generator for Instantiating Anomalies in time Series
Zahra Zamanzadeh Darban, Qizhou Wang, Geoffrey I. Webb, Shirui Pan, Charu C. Aggarwal, Mahsa Salehi
TL;DR
GenIAS introduces a latent-space anomaly generator for time series that uses a TCN-VAE with learned latent perturbations and a deviation-based patching strategy to create diverse, realistic anomalies. A novel enhanced KL loss with a tunable prior tightens normal latent representations, improving separation from anomalies. The framework is validated on nine TSAD datasets, integrated with a strong detector, and shows consistent improvements over 17 baselines in both generation quality and anomaly detection metrics. These results highlight the practical value of generative anomaly injection for unsupervised time series anomaly detection and point to future work on adaptive perturbations and inter-variable correlations.
Abstract
A recent and promising approach for building time series anomaly detection (TSAD) models is to inject synthetic samples of anomalies within real data sets. The existing injection mechanisms have significant limitations - most of them rely on ad hoc, hand-crafted strategies which fail to capture the natural diversity of anomalous patterns, or are restricted to univariate time series settings. To address these challenges, we design a generative model for TSAD using a variational autoencoder, which is referred to as a Generator for Instantiating Anomalies in Time Series (GenIAS). GenIAS is designed to produce diverse and realistic synthetic anomalies for TSAD tasks. By employing a novel learned perturbation mechanism in the latent space and injecting the perturbed patterns in different segments of time series, GenIAS can generate anomalies with greater diversity and varying scales. Further, guided by a new triplet loss function, which uses a min-max margin and a new variance-scaling approach to further enforce the learning of compact normal patterns, GenIAS ensures that anomalies are distinct from normal samples while remaining realistic. The approach is effective for both univariate and multivariate time series. We demonstrate the diversity and realism of the generated anomalies. Our extensive experiments demonstrate that GenIAS - when integrated into a TSAD task - consistently outperforms seventeen traditional and deep anomaly detection models, thereby highlighting the potential of generative models for time series anomaly generation.
