Skip to main content
QUICK REVIEW

[Paper Review] Anomaly scores for generative models

Václav Šmídl, Jan Bím|arXiv (Cornell University)|May 28, 2019
Anomaly Detection Techniques and ApplicationsComputer Science38 references5 citations
TL;DR

This paper proposes a theoretically grounded anomaly score for generative models, particularly variational autoencoders (VAEs) and GANs, by decomposing data into manifold and residual components using a reparameterized likelihood. The method combines reconstruction error and latent space probability into a computationally efficient score that outperforms standard reconstruction error in both supervised and unsupervised hyperparameter selection across multiple datasets.

ABSTRACT

Reconstruction error is a prevalent score used to identify anomalous samples when data are modeled by generative models, such as (variational) auto-encoders or generative adversarial networks. This score relies on the assumption that normal samples are located on a manifold and all anomalous samples are located outside. Since the manifold can be learned only where the training data lie, there are no guarantees how the reconstruction error behaves elsewhere and the score, therefore, seems to be ill-defined. This work defines an anomaly score that is theoretically compatible with generative models, and very natural for (variational) auto-encoders as they seem to be prevalent. The new score can be also used to select hyper-parameters and models. Finally, we explain why reconstruction error delivers good experimental results despite weak theoretical justification.

Motivation & Objective

  • To address the lack of theoretical justification for reconstruction error as an anomaly score in generative models.
  • To develop a score that unifies reconstruction error and latent space probability in a way compatible with VAEs and GANs.
  • To enable reliable hyperparameter and model selection in anomaly detection, especially in unsupervised settings with no labeled anomalies.
  • To provide a computationally feasible alternative to high-dimensional integrals required for exact likelihood evaluation.

Proposed method

  • Reformulates the generative model using a manifold-residual decomposition, where data are modeled as a projection of the latent space plus noise.
  • Derives an exact likelihood using change-of-variables formula, enabling precise computation of anomaly scores without normalization constants.
  • Uses a parametric encoder $ g_{\phi} $ and generator $ f_{\theta} $, with $ g_{\phi} $ approximating the pseudoinverse of $ f_{\theta} $.
  • Applies the score to both VAEs and GANs by leveraging the same likelihood framework, avoiding reliance on reconstruction error alone.
  • Employs the score for model selection via likelihood maximization, even when no anomalies are labeled during training.
  • Introduces a method to improve normalization constant approximation by optimizing over latent codes $ z' $, enhancing score accuracy.

Experimental results

Research questions

  • RQ1Can a theoretically justified anomaly score be derived for generative models that combines reconstruction error and latent probability?
  • RQ2Why does reconstruction error perform well in practice despite weak theoretical grounding?
  • RQ3Can the proposed score improve hyperparameter selection in unsupervised anomaly detection where no labeled anomalies are available?
  • RQ4Does the score outperform reconstruction error in both supervised and unsupervised model selection scenarios?
  • RQ5Is the assumption of a low-dimensional manifold beneficial for anomaly detection, and how does it affect performance?

Key findings

  • The proposed anomaly score significantly outperforms reconstruction error in AUC on all tested problems when hyperparameters are selected using labeled anomalies.
  • In the unsupervised setting with no labeled anomalies, the proposed score achieves higher AUC than reconstruction error in nine out of ten problems.
  • Anomaly detection performance based on the proposed score peaks at 4–6 latent dimensions, suggesting that low-dimensional manifolds are beneficial for modeling.
  • The reconstruction error score shows little sensitivity to latent dimension, while the proposed score reveals a clear optimal range, supporting the manifold assumption.
  • The paper demonstrates that reconstruction error's empirical success may stem from favorable data distribution alignment rather than theoretical robustness.
  • The method enables accurate model selection via likelihood maximization, even without labeled anomalies, by providing a reliable score for hyperparameter tuning.

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.