Skip to main content
QUICK REVIEW

[Paper Review] Revisiting VAE for Unsupervised Time Series Anomaly Detection: A Frequency Perspective

Zexin Wang, Changhua Pei|arXiv (Cornell University)|Feb 5, 2024
Anomaly Detection Techniques and ApplicationsComputer Science4 citations
TL;DR

This paper proposes Frequency-enhanced Conditional Variational Autoencoder (FCVAE), a novel unsupervised anomaly detection method for univariate time series that integrates global and local frequency features into the conditional VAE framework using a target attention mechanism. FCVAE significantly improves reconstruction accuracy for normal patterns—especially long-periodic and short-periodic trends—achieving state-of-the-art performance on public datasets and a large-scale cloud system with 11.1% improvement in F1 score over the legacy detector.

ABSTRACT

Time series Anomaly Detection (AD) plays a crucial role for web systems. Various web systems rely on time series data to monitor and identify anomalies in real time, as well as to initiate diagnosis and remediation procedures. Variational Autoencoders (VAEs) have gained popularity in recent decades due to their superior de-noising capabilities, which are useful for anomaly detection. However, our study reveals that VAE-based methods face challenges in capturing long-periodic heterogeneous patterns and detailed short-periodic trends simultaneously. To address these challenges, we propose Frequency-enhanced Conditional Variational Autoencoder (FCVAE), a novel unsupervised AD method for univariate time series. To ensure an accurate AD, FCVAE exploits an innovative approach to concurrently integrate both the global and local frequency features into the condition of Conditional Variational Autoencoder (CVAE) to significantly increase the accuracy of reconstructing the normal data. Together with a carefully designed "target attention" mechanism, our approach allows the model to pick the most useful information from the frequency domain for better short-periodic trend construction. Our FCVAE has been evaluated on public datasets and a large-scale cloud system, and the results demonstrate that it outperforms state-of-the-art methods. This confirms the practical applicability of our approach in addressing the limitations of current VAE-based anomaly detection models.

Motivation & Objective

  • To address the limitation of VAE-based models in capturing both long-periodic heterogeneous patterns and detailed short-periodic trends simultaneously in time series anomaly detection.
  • To improve reconstruction fidelity of normal time series segments, especially those with complex periodic structures, by incorporating frequency-domain information into the conditional VAE framework.
  • To develop a lightweight, efficient, and accurate unsupervised anomaly detection model suitable for real-time deployment in large-scale production environments.
  • To validate the effectiveness of frequency-aware conditioning and attention mechanisms in enhancing representation learning for anomaly detection.

Proposed method

  • FCVAE introduces a dual-frequency feature extraction mechanism using Global Frequency Mapping (GFM) and Local Frequency Mapping (LFM) to capture both broad periodic trends and fine-grained oscillations.
  • The model conditions the VAE on frequency features via a novel conditional input, enabling the decoder to reconstruct normal patterns more accurately by attending to relevant frequency components.
  • A target attention mechanism is designed to selectively emphasize useful local frequency information, improving reconstruction of short-periodic trends and complex patterns.
  • The framework employs a modified ELBO loss (CM-ELBO) that balances reconstruction and latent space regularization, enhancing generalization on normal data.
  • Data augmentation and masking of the last time point are applied during training to improve robustness and prevent information leakage.
  • The architecture is optimized for inference efficiency, processing over 1,195 data points per second on a single GPU, exceeding real-time generation speed.

Experimental results

Research questions

  • RQ1Can integrating both global and local frequency features into a conditional VAE improve reconstruction accuracy for normal time series patterns?
  • RQ2How does the target attention mechanism enhance the model's ability to reconstruct short-periodic trends and heterogeneous periodic patterns?
  • RQ3To what extent does FCVAE outperform existing SOTA unsupervised VAE-based methods in real-world anomaly detection scenarios?
  • RQ4Can FCVAE maintain high performance and efficiency in large-scale production systems with minimal latency?

Key findings

  • FCVAE achieves a 10.9% improvement in F1 score and 11.1% improvement in Delay F1 score over the legacy detector in a one-year online deployment on a large-scale cloud system.
  • On public datasets, FCVAE outperforms state-of-the-art unsupervised methods in terms of F1, AUC, and F1@Delay metrics, demonstrating superior reconstruction fidelity.
  • The ablation study confirms that both GFM and LFM components contribute significantly to performance, with the target attention mechanism further improving reconstruction of complex local patterns.
  • The model processes over 1,195 data points per second on a 3090 GPU, confirming its high inference efficiency and suitability for real-time anomaly detection.
  • The integration of frequency features into the CVAE condition leads to more accurate reconstruction of normal data, especially in regions with heterogeneous periodic behavior, as validated by visual analysis in Figure 1 and 2.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.