Mitigating the reconstruction-detection trade-off in VAE-based unsupervised anomaly detection

arXiv cs.LG / 5/6/2026

📰 NewsIdeas & Deep AnalysisModels & Research

Key Points

  • The paper studies how model selection in VAE-based unsupervised anomaly detection can create a trade-off between reconstruction quality and anomaly detection performance, especially across β-VAE variants.
  • It finds that constraining the latent space can improve anomaly detection metrics while reducing reconstruction quality.
  • The authors analyze run-to-run performance variability and show it is associated with the distance between the latent distributions of normal and abnormal data.
  • They propose and evaluate two approaches to mitigate the reconstruction–detection trade-off: β-scheduling and the Sparse VAE, with Sparse VAE delivering improved detection while preserving high reconstruction quality.

Abstract

Variational autoencoders are widely used for unsupervised anomaly detection. Model selection however remains an open-question: to remain fully unsupervised, hyperparameters are often chosen to minimize the reconstruction error on normal samples. In this paper, we reveal a trade-off between reconstruction quality and anomaly detection among \beta-VAE models. Models with constrained latent space reach higher detection metrics but lower reconstruction quality. We also assess the performance variability across random seeds and show it is linked to the distance between normal and abnormal latent distributions. From this analysis, we justify and investigate two methods to mitigate the reconstructiondetection tradeoff: beta-scheduling and the Sparse VAE. The latter especially shows an improvement in detection while maintaining high reconstruction quality.