Skip to main content
QUICK REVIEW

[Paper Review] Safer Classification by Synthesis

William Yang Wang, Angelina Wang|arXiv (Cornell University)|Nov 22, 2017
Adversarial Robustness in Machine LearningComputer Science24 references32 citations
TL;DR

This paper proposes a generative classification framework that uses class-specific generative models (VAEs or GANs) to improve robustness against out-of-distribution examples. At test time, it finds the most similar generated image for a given input across all class generators, selecting the corresponding class; this approach ensures reliable uncertainty estimation and maintains competitive accuracy on in-distribution data while achieving vanishing risk under selective prediction.

ABSTRACT

The discriminative approach to classification using deep neural networks has become the de-facto standard in various fields. Complementing recent reservations about safety against adversarial examples, we show that conventional discriminative methods can easily be fooled to provide incorrect labels with very high confidence to out of distribution examples. We posit that a generative approach is the natural remedy for this problem, and propose a method for classification using generative models. At training time, we learn a generative model for each class, while at test time, given an example to classify, we query each generator for its most similar generation, and select the class corresponding to the most similar one. Our approach is general and can be used with expressive models such as GANs and VAEs. At test time, our method accurately "knows when it does not know," and provides resilience to out of distribution examples while maintaining competitive performance for standard examples.

Motivation & Objective

  • To address the safety limitations of discriminative deep learning models, which can misclassify out-of-distribution examples with high confidence.
  • To develop a classification method that inherently knows when it does not know, by leveraging generative modeling.
  • To provide a principled, interpretable, and robust alternative to standard discriminative classifiers for safety-critical applications.
  • To evaluate whether generative models can serve as both accurate classifiers and effective novelty detectors.

Proposed method

  • At training time, a separate generative model (VAE or GAN) is trained for each class using labeled data.
  • At test time, for a given input image, the method searches over the latent space of each generator to find the latent vector that produces the most similar generated image.
  • The class corresponding to the generator producing the closest image (measured by L² distance) is selected as the prediction.
  • Confidence is derived from the L² distance between the input and the nearest generated image, enabling selective classification.
  • The method uses a similarity-based confidence score to reject out-of-distribution examples, achieving the vanishing risk property.
  • The approach is compatible with both VAEs and GANs, and does not require modifying the training objective of the generative models.

Experimental results

Research questions

  • RQ1Can a generative modeling approach provide better robustness to out-of-distribution examples than standard discriminative models?
  • RQ2Does the similarity between a test image and the nearest generated image from a class-specific generator provide a reliable confidence score?
  • RQ3Can generative models be used to simultaneously achieve high in-distribution accuracy and effective novelty detection?
  • RQ4Is the confidence score derived from generative reconstruction error sufficient to enable selective classification with vanishing risk?

Key findings

  • The generative classifier achieves vanishing risk under selective prediction, meaning its error rate can be driven to zero by increasing selectivity, unlike standard CNNs.
  • On the Omniglot-augmented MNIST dataset, the generative classifier with L² distance shows lower baseline accuracy than a CNN but maintains robustness to out-of-distribution inputs.
  • For an Omniglot image misclassified with high confidence by a CNN, the GAN-based generative classifier produces a minimum L² distance of ~10⁻², an order of magnitude higher than for MNIST images (~10⁻³), indicating low confidence.
  • When combining generative novelty detection with CNN classification, the resulting system outperforms the CNN alone across all coverage levels, achieving lower risk at every threshold.
  • The VAE-based generative classifier correctly classifies MNIST images that KNN misclassifies, because it can generate realistic images of the correct class even when such examples are absent in the training set.
  • The method provides interpretability: the classification decision is based on a concrete generated image, making the reasoning process transparent.

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.