Drift-Aware Variational Autoencoder-based Anomaly Detection with Two-level Ensembling

Jin Li, Kleanthis Malialis, Christos G. Panayiotou, Marios M. Polycarpou

Abstract

In today's digital world, the generation of vast amounts of streaming data in various domains has become ubiquitous. However, many of these data are unlabeled, making it challenging to identify events, particularly anomalies. This task becomes even more formidable in nonstationary environments where model performance can deteriorate over time due to concept drift. To address these challenges, this paper presents a novel method, VAE++ESDD, which employs incremental learning and two-level ensembling: an ensemble of Variational AutoEncoder(VAEs) for anomaly prediction, along with an ensemble of concept drift detectors. Each drift detector utilizes a statistical-based concept drift mechanism. To evaluate the effectiveness of VAE++ESDD, we conduct a comprehensive experimental study using real-world and synthetic datasets characterized by severely or extremely low anomalous rates and various drift characteristics. Our study reveals that the proposed method significantly outperforms both strong baselines and state-of-the-art methods.

Introduction

Real-world streaming scenarios, such as monitoring water distribution networks or detecting credit card fraud, present a "triple threat" to anomaly detection systems: extreme class imbalance, the unavailability of labels, and concept drift. Anomalies are inherently rare, leading models to bias toward normal behavior. Furthermore, the lack of real-time ground truth labels necessitates unsupervised learning. Finally, non-stationary environments mean that the definition of "normal" evolves over time due to sensor aging or changing user behaviors.

Existing methods often struggle to distinguish between genuine anomalies and natural shifts in data distribution. VAE++ESDD addresses these hurdles by combining an ensemble of Variational Autoencoders (VAEs) for prediction with an ensemble of statistical drift detectors for robust adaptation.

Methods: The VAE++ESDD Framework

The VAE++ESDD architecture relies on a two-level ensembling strategy to maintain high accuracy in non-stationary environments.

System architecture of VAE++ESDD showing the ensemble of incremental learners and drift detectors.

Level 1: The Predictor Ensemble

The system utilizes multiple VAEs to learn the compression and reconstruction of normal data. A high reconstruction error serves as a proxy for an anomaly. To ensure robustness, each VAE in the ensemble uses a different training window size. This "temporal diversity" allows the ensemble to balance quick adaptation to recent changes with long-term stability.

Level 2: The Drift Detector Ensemble

To handle non-stationarity, an ensemble of detectors monitors the reconstruction losses of the VAEs. Using the Mann-Whitney U test—a non-parametric statistical test—the system compares recent losses against a historical reference.

When potential drift is sensed, the system enters a "warning" state and buffers incoming data. If the drift is confirmed (an "alarm"), the old VAEs are discarded, and new ones are immediately trained using the buffered data. This "Warn-Alarm" mechanism allows for rapid recovery after a distribution shift. Additionally, the system employs adaptive thresholding, using a "mean + 1 standard deviation" rule based on recent reconstruction errors to allow the decision boundary to evolve alongside the data.

Experimental Setup

The framework was evaluated against a diverse set of synthetic and real-world datasets, focusing on severe (1%) and extreme (0.1%) anomaly rates. These datasets cover various drift types, including abrupt, recurrent, and incremental shifts.

Summary of synthetic and real-world datasets used for evaluation, including drift types and characteristics.

Key Results and Insights

VAE++ESDD significantly outperformed strong baselines (such as iForest++ and LOF++) and state-of-the-art methods (ARCUS, MemStream) across nearly all metrics:

  • Performance Stability: On the high-dimensional MNIST-multi dataset, VAE++ESDD achieved a G-mean of 0.825, outperforming the next best competitor, StrAEm++DD (0.736).
  • Drift Resilience: In scenarios with abrupt drift, the model demonstrated a characteristic "V-shaped" recovery, returning to high performance almost immediately after a drift event thanks to the warning buffer.
  • False Alarm Reduction: The ensemble of drift detectors proved more reliable than single-detector systems, successfully filtering out noise that might otherwise trigger unnecessary model resets.

Conclusion and Future Work

VAE++ESDD provides a robust, unsupervised solution for anomaly detection in streaming data. By using reconstruction loss as a proxy for drift and employing diverse windowing, the system adapts to non-stationary environments without human intervention.

Future research will address current limitations, such as "catastrophic forgetting," by implementing a model bank to store and reuse experts for recurrent drift. Additionally, distinguishing between feature drift and concept drift could further refine adaptation strategies. While the ensemble approach is computationally intensive, parallel execution offers a viable path for real-time deployment in resource-constrained IoT environments.

Summary updated

BibTeX
@article{li2026drift,
  author = {Jin Li and Kleanthis Malialis and Christos G. Panayiotou and Marios M. Polycarpou},
  title = {{Drift-Aware Variational Autoencoder-based Anomaly Detection with Two-level Ensembling}},
  journal = {Neurocomputing},
  year = {2026},
  doi = {10.1016/j.neucom.2026.133061},
}
Figure