Predictive Uncertainty through Quantization

Bastiaan S. Veeling, Rianne van den Berg, Max WellingarXiv 2018

Abstract

Deep learning models often exhibit extreme overconfidence, which can lead to catastrophic failures in high-stakes applications. While Deep Latent Variable Models (DLVMs) attempt to capture uncertainty, they typically rely on rigid Gaussian assumptions that fail to represent complex, multi-modal distributions. We present Stochastic Quantized Activation Distributions (SQUAD), a novel approach that replaces continuous latent variables with flexible, histogram-like quantized distributions. By discretizing the activation domain, SQUAD allows models to express nuanced uncertainty without the computational burden of ensembles. Our results across multiple benchmarks demonstrate that SQUAD provides superior risk-coverage trade-offs and competitive uncertainty estimates compared to state-of-the-art methods.

Introduction: The Problem of Overconfidence

In fields like medical diagnostics or autonomous driving, a wrong prediction is problematic, but a wrong prediction made with 99% confidence is catastrophic. Standard deep learning models are notoriously overconfident, often failing to signal when they encounter data that lies outside their training distribution. To manage this, researchers utilize Deep Latent Variable Models (DLVMs) to model the "hidden" factors (latent variables) explaining the data.

Traditionally, these models use Variational Inference to approximate the true distribution of latent variables. However, to maintain mathematical tractability, a Gaussian (normal) distribution is almost always assumed. This "bell curve" constraint is often too rigid; it forces the model to collapse uncertainty into a single mean value, effectively smoothing over the complexities of the underlying data and leading to the very overconfidence it seeks to avoid.

The SQUAD Method

Researchers from the University of Amsterdam have introduced SQUAD (Stochastic Quantized Activation Distributions) to address these limitations. Instead of assuming a continuous Gaussian distribution, SQUAD quantizes the domain of the latent variables into a set of discrete "bins."

Key Technical Components

  • Multinomial Distributions: By using discrete bins, the model can assign specific probabilities to each bin. This allows the distribution to be multi-modal—meaning the model can simultaneously represent multiple hypotheses (e.g., a hidden factor being either "very low" or "very high") without being forced to average them into a middle-ground value.
  • Gumbel-Softmax Trick: Since selecting a discrete bin is a non-differentiable operation, the authors employ the Gumbel-Softmax reparameterization. This enables the model to be trained using standard gradient descent.
  • Information Bottleneck (IB) Framework: SQUAD is implemented within the IB framework, which encourages the model to compress input data into the most essential features required for prediction, naturally filtering out noise.
Integration of stochastic quantized activation distributions within a neural network architecture.

To ensure scalability, the authors also introduced SQUAD-factorized, a matrix-factorization variant that prevents the number of parameters from exploding as the number of bins increases.

Experimental Evaluation

The model was evaluated on three primary image classification benchmarks: Fashion MNIST (clothing items), notMNIST (letters in unusual fonts), and SVHN (Street View House Numbers). The latter two were used specifically to test generalization and performance on complex, natural images.

Key Results

  • Superior Risk/Coverage: Using "Selective Classification"—where a model can "reject" a prediction if confidence is too low—SQUAD consistently achieved higher coverage for a given risk level compared to standard MLPs and Gaussian-based models.
  • Competitive with Ensembles: SQUAD's uncertainty estimates were competitive with "Deep Ensembles" (which require training multiple models), but without the massive computational overhead.
  • Sample Efficiency: At test time, SQUAD required fewer samples to reach a stable uncertainty estimate than popular methods like MC Dropout.

Key Insights

The core innovation of SQUAD lies in the idea that flexibility comes through discretization. While it seems counter-intuitive to restrict latent variables to discrete values, this quantization allows the probability distribution to take almost any shape, much like a histogram.

Furthermore, SQUAD activations are naturally self-normalizing, reducing the reliance on computationally expensive techniques like Batch Normalization. Interestingly, the authors found that the model often "learns" its own non-linear activation functions, frequently settling on "peaky" sigmoid-like shapes that optimize information flow.

Limitations and Future Work

While promising, SQUAD currently requires automated hyperparameter tuning (such as TPE) to find optimal bin configurations. Future work will focus on developing more "plug-and-play" defaults and extending the SQUAD framework to other architectures, such as Variational Auto-Encoders (VAEs), and exploring more complex learned priors for the quantized bins.

Summary updated

BibTeX
@misc{veeling2018predictive,
  author = {Bastiaan S. Veeling and Rianne van den Berg and Max Welling},
  title = {{Predictive Uncertainty through Quantization}},
  year = {2018},
  eprint = {1810.05500},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1810.05500},
}
Figure