Source-linked AI summary

TAnoGAN: Time Series Anomaly Detection with Generative Adversarial Networks

Md Abul Bashar, Richi Nayak

arXiv:2008.09567v2cs.CVcs.LGstat.ML

TL;DR

Time-series anomaly detection helps monitor environments where unusual behavior can signal underlying problems, while neural models generally require many training points. TAnoGan learns normal sequences with a GAN and inverse mapping, then uses reconstruction loss to score anomalies; across 46 real-world datasets, it outperformed traditional and neural models.

  • Problem

    Time-series anomaly detection is needed to monitor environments for behavior that departs from normal, while neural models generally require many training points.

    Source: §I · p. 1
  • Method

    TAnoGan models normal time-series sequences with a GAN, maps real sequences into latent space, and uses reconstruction loss to estimate anomaly scores.

    Source: §I · p. 1, §V · p. 7
  • Results

    Across 46 real-world time-series datasets, TAnoGan outperformed traditional and neural-network anomaly-detection models.

    Source: §V · p. 7, E. Discussion · p. 7
  • Takeaways & Limitations

    Progressively increasing generator hidden units supports effective anomaly detection in small datasets.

    Source: §V · p. 7

    GAN-based time-series anomaly detection is sensitive to epoch count, and optimal window length and model instability remain issues.

    Source: §V · p. 7

Abstract

from arXiv · show

Anomaly detection in time series data is a significant problem faced in many application areas such as manufacturing, medical imaging and cyber-security. Recently, Generative Adversarial Networks (GAN) have gained attention for generation and anomaly detection in image domain. In this paper, we propose a novel GAN-based unsupervised method called TAnoGan for detecting anomalies in time series when a small number of data points are available. We evaluate TAnoGan with 46 real-world time series datasets that cover a variety of domains. Extensive experimental results show that TAnoGan performs better than traditional and neural network models.

I. INTRODUCTION

Time-series anomaly detection matters in mission-critical settings, but existing unsupervised approaches struggle with nonlinear interactions and highly dynamic behavior. TAnoGan applies GAN-based unsupervised detection to small datasets and is evaluated across 46 diverse time-series datasets.

I. INTRODUCTION

  • The paper motivates anomaly detection as a way to investigate and resolve abnormal system behavior before it causes disasters.It emphasizes monitoring mission-critical environments.Source: §I · p. 1
  • Many unsupervised methods use linear projections that cannot handle nonlinear interactions, while normal-range prediction struggles with highly dynamic systems [2], [3], [4],,.PCA and PLS also assume Gaussian data and work best for highly correlated data,, [15].Source: §I · p. 1
  • TAnoGan maps real sequences into latent space, reconstructs them, and uses reconstruction loss as an anomaly score for small-data settings.The method is proposed as an unsupervised approach.Source: §I · p. 1
  • TAnoGan was evaluated on 46 diverse NAB time-series datasets with 1,000–22,000 data points each and significantly improved results over LSTM.The paper also reports that it outperformed traditional and neural-network models.Source: §I · pp. 1–2

II. RELATED WORK

Prior anomaly-detection methods face limits in modeling temporal structure and nonlinear behavior, while GAN anomaly detection had been explored less in time series than in images. The paper proposes an LSTM-based GAN for small datasets and describes its detection pipeline.

II. RELATED WORK

  • PCA and PLS assume Gaussian data and are effective only for highly correlated data; distance-based methods need prior anomaly-duration and count knowledge, while ABOD and FB ignore temporal correlations [2].Source: §II · p. 2
  • Most GAN-based anomaly-detection work had focused on images: AnoGan [3] lacks a time-sequence mechanism, while an LSTM GAN for time series [10] was not designed for anomaly detection.Auto-Encoder, Encoder-Decoder, and LSTM methods were also cited as deep-learning approaches,,,.Source: §II · p. 2
  • TAnoGan uses LSTMs as generator and discriminator and evaluates adversarial training against Auto-Encoder, Encoder-Decoder, and LSTM models for small-data anomaly detection,,,.The paper contrasts its small-data focus and architecture with [2], which used datasets of about one million points.Source: §II · p. 2

III. GENERATIVE ADVERSARIAL REPRESENTATION LEARNING TO IDENTIFY TIME SERIES ANOMALIES

  • The method first learns normal time-series variability with a GAN, then maps real sequences to latent space and uses reconstruction loss to identify anomalies.The generator produces realistic sequences from latent representations.Source: §III · p. 2

A. Learning General Data Distribution

TAnoGan learns a general distribution of normal time-series sequences through adversarial training. Its design pairs LSTM generator and discriminator models with a progressively widening generator suited to small datasets.

A. Learning General Data Distribution

  • Adversarial training teaches generator G to produce fake time-series sequences and discriminator D to distinguish generated sequences from real data, using LSTMs for both models.The generator maps noise from latent space into small time-series sequences; the discriminator estimates whether input data are real.Source: A. Learning General Data Distribution · pp. 2–3
  • For small datasets, the authors use a shallow discriminator and medium-depth generator because large discriminators overfit and shallow generators struggle to produce realistic data.The generator's hidden-unit count increases progressively across layers.Source: A. Learning General Data Distribution · p. 2
  • Real sequences are divided into sliding-window subsequences before discriminator input, and generator–discriminator competition continues until generated sequences become realistic.The networks are trained using stochastic gradient descent.Source: A. Learning General Data Distribution · p. 3

B. Mapping Real-Data to the Latent Space

Because the trained generator has no inverse mapping, TAnoGan searches latent space for a reconstruction of each real sequence. It scores the reconstruction using residual and discriminator-feature losses while keeping the trained networks fixed.

B. Mapping Real-Data to the Latent Space

  • GANs provide no inverse mapping from a real sequence x to latent space, so TAnoGan seeks z whose generated sequence G(z) most closely resembles x.The similarity reflects how well x follows the distribution used to train G.Source: B. Mapping Real-Data to the Latent Space · p. 3
  • Starting from a random latent vector, the method iteratively updates z by backpropagation to find a generated sequence most similar to x.The search proceeds over successive optimization steps.Source: B. Mapping Real-Data to the Latent Space · pp. 3–4
  • The latent-search loss combines pointwise residual dissimilarity with discriminator-feature dissimilarity, and only z is updated while generator and discriminator parameters remain fixed.The discriminator term uses intermediate-layer features to represent sequence statistics.Source: B. Mapping Real-Data to the Latent Space · p. 4

C. Detection of Anomalies

TAnoGan scores each small sequence by its fit to the learned general data distribution, treating high scores as anomalous. In the illustrated example, it identifies two anomalies and produces two false positives.

C. Detection of Anomalies

  • A small sequence is treated as anomalous when it deviates from the general data distribution rather than fitting the learned normal behavior.The figure identifies anomaly-score peaks relative to a threshold.Source: C. Detection of Anomalies · p. 4
  • The anomaly score combines residual and discrimination scores measured at the final latent-space mapping iteration.The score expresses how well a sequence fits the learned general distribution; larger scores indicate anomalies.Source: C. Detection of Anomalies · p. 4
  • Two anomaly-score peaks match ground-truth anomalies, while two other peaks exceed the threshold as false positives.The figure’s original-series view shows two correctly identified anomalies; the two false-positive points also differ from the general data distribution.Source: C. Detection of Anomalies · p. 4

IV. EMPIRICAL EVALUATION

The empirical evaluation is intended to show the effectiveness of TAnoGan’s adversarially trained generator for identifying time-series anomalies.

IV. EMPIRICAL EVALUATION

  • The experiments aim to demonstrate the effectiveness of the proposed TAnoGan model for identifying anomalies in time-series data.Source: §IV · p. 4
  • The evaluation centers on the proposed TAnoGan model’s adversarially trained generator.Source: §IV · p. 4
  • The target task is identifying anomalies in time-series data.Source: §IV · p. 4

A. Data Collection

The study uses 46 real datasets from NAB and evaluates models without training labels. It converts long sequences into overlapping small windows, with anomalies assigned by overlap with labeled anomaly spans.

A. Data Collection

  • The experiments use all 46 datasets from NAB’s five real-data categories.NAB contains 58 datasets overall, including artificial data, with 1,000–22,000 instances per dataset and 365,551 data points in total.Source: A. Data Collection · pp. 4–5
  • Models are trained unsupervised, with NAB’s manually assigned anomaly labels reserved for evaluating predictions.Each label marks a time span, reflecting that anomalies can persist over time rather than occur at a single point.Source: A. Data Collection · p. 5
  • The study subdivides long sequences into windows of 30 × i points and reports reasonably optimal results at i = 2.Training uses a shift of one point; testing uses a shift equal to the window size.Source: A. Data Collection · p. 5
  • A window is labeled anomalous when it falls within or overlaps a labeled anomaly span, supporting early detection and penalizing considerable delay.Source: A. Data Collection · p. 5

B. Evaluation Measures

The evaluation uses six standard classification measures: Accuracy, Precision, Recall, F1 Score, Cohen Kappa, and Area Under Curve.

B. Evaluation Measures

C. Baseline Models

TAnoGan is evaluated against eight baseline models, and its aggregate rankings and dataset-wise comparisons generally favor it across measures, with recall the exception.

C. Baseline Models

  • The eight baselines include GAN, LSTM, autoencoder, isolation-forest, mixture-model, support-vector, and CNN approaches.The set includes both traditional anomaly detectors and neural-network models.Source: C. Baseline Models · p. 5

D. Results

  • TAnoGan ranks above every baseline in cumulative rankings for F1, Cohen Kappa, precision, accuracy, and AUC.The ranking sums each model’s per-dataset ranks for an evaluation criterion.Source: D. Results · p. 5, Figure 3 · p. 6
  • On F1, TAnoGan beats each baseline on most datasets.Each dot represents a dataset; the figure’s triangles distinguish wins, losses, and equal performance.Source: D. Results · pp. 5–6, Figure 4 · p. 6
  • Across the 46 NAB datasets, TAnoGan outperformed a majority of the eight baseline models in almost all datasets, and always did so when dataset size exceeded 5,000 instances.For datasets under 5,000 instances, it outperformed a majority in most, with a few exceptions; domain colors appeared on both sides of the figure, indicating no domain sensitivity.Source: D. Results · p. 6, Figure 5 · p. 7
  • TAnoGan has the lowest critical-difference score on all measures except recall; GMM’s marginal recall edge accompanies poorer F1 and precision.The authors link GMM’s lower precision to excessive false positives and the cost of investigating false alarms.Source: D. Results · p. 7

E. Discussion

The discussion attributes TAnoGan’s broad advantage to learning a dataset’s general distribution through adversarial training. It explains comparisons with specific baselines through nonlinear modeling and a progressively widening generator.

E. Discussion

  • The authors conclude that a generative model’s learned general distribution helps distinguish anomalous sequences from normal ones.Source: E. Discussion · p. 7
  • TAnoGan outperforms VanLstm, and AutoEn,; its adversarial training lets it learn the general data distribution better than AutoEn.TAnoGan’s generator is similar to AutoEn’s decoder.Source: E. Discussion · p. 7
  • TAnoGan performs better than IsoF because its LSTM can use nonlinear interactions among features that IsoF cannot utilize.Source: E. Discussion · p. 7
  • In anomaly detection, TAnoGan significantly outperforms OCSvm, whose linear kernel may fail to separate nonlinear points, and achieves better results than GMM,, which significantly outperforms other traditional models.Source: E. Discussion · p. 7
  • Progressively increasing generator hidden units supports hierarchical sequence decoding across abstraction levels, which the authors say can help generalize from small datasets.Source: E. Discussion · p. 7
  • TAnoGan consistently outperformed popular unsupervised anomaly-detection models, including traditional and neural-network-based models.The authors state that learning a dataset’s general distribution helps isolate anomalies from normal observations.Source: E. Discussion · p. 7

V. CONCLUSION

TAnoGan uses an inverse mapping and generator reconstruction to assign anomaly scores to time-series sequences. Across 46 real-world datasets, it outperforms traditional and neural-network models, while window selection and model instability remain issues.

V. CONCLUSION

  • TAnoGan maps sequences to latent space, reconstructs them with a generator, and uses reconstruction loss to estimate anomaly scores.Source: §V · p. 7
  • Progressively increasing hidden units in the LSTM generator is presented as a way to detect anomalies effectively in small datasets.Source: §V · p. 7
  • TAnoGan outperforms traditional and neural-network models in experiments on 46 real-world time-series datasets.Source: §V · p. 7
  • Optimal window length, model instability, and sensitivity to training epochs are known issues; future work will test larger architectures on big datasets and more baselines.Source: §V · pp. 7–8
Loading 2008.09567v2…