Table of Contents
Fetching ...

Deep Out-of-Distribution Uncertainty Quantification via Weight Entropy Maximization

Antoine de Mathelin, François Deheeger, Mathilde Mougeot, Nicolas Vayatis

TL;DR

This work tackles over-confident predictions in deep learning by reframing epistemic uncertainty as sampling across the full space of weight-consistent hypotheses. It introduces MaxWEnt, an entropy-regularized objective that minimizes empirical risk while maximizing weight-space entropy, optimized via reparameterization tricks. The authors develop two practical weight-parameterizations (Scaling and SVD) and prove closed-form entropy expressions, with theoretical results in linear models and extensions to deep networks. Extensive experiments on synthetic data, UCI benchmarks, CityCam, and OSR/OpenOOD demonstrate that MaxWEnt, particularly with SVD parameterization, achieves state-of-the-art OOD detection and more faithful epistemic uncertainty estimates. The work also discusses Bayesian links, hyperparameter considerations, and practical guidelines for deploying entropy-based uncertainty quantification in real-world settings.

Abstract

This paper deals with uncertainty quantification and out-of-distribution detection in deep learning using Bayesian and ensemble methods. It proposes a practical solution to the lack of prediction diversity observed recently for standard approaches when used out-of-distribution (Ovadia et al., 2019; Liu et al., 2021). Considering that this issue is mainly related to a lack of weight diversity, we claim that standard methods sample in "over-restricted" regions of the weight space due to the use of "over-regularization" processes, such as weight decay and zero-mean centered Gaussian priors. We propose to solve the problem by adopting the maximum entropy principle for the weight distribution, with the underlying idea to maximize the weight diversity. Under this paradigm, the epistemic uncertainty is described by the weight distribution of maximal entropy that produces neural networks "consistent" with the training observations. Considering stochastic neural networks, a practical optimization is derived to build such a distribution, defined as a trade-off between the average empirical risk and the weight distribution entropy. We develop a novel weight parameterization for the stochastic model, based on the singular value decomposition of the neural network's hidden representations, which enables a large increase of the weight entropy for a small empirical risk penalization. We provide both theoretical and numerical results to assess the efficiency of the approach. In particular, the proposed algorithm appears in the top three best methods in all configurations of an extensive out-of-distribution detection benchmark including more than thirty competitors.

Deep Out-of-Distribution Uncertainty Quantification via Weight Entropy Maximization

TL;DR

This work tackles over-confident predictions in deep learning by reframing epistemic uncertainty as sampling across the full space of weight-consistent hypotheses. It introduces MaxWEnt, an entropy-regularized objective that minimizes empirical risk while maximizing weight-space entropy, optimized via reparameterization tricks. The authors develop two practical weight-parameterizations (Scaling and SVD) and prove closed-form entropy expressions, with theoretical results in linear models and extensions to deep networks. Extensive experiments on synthetic data, UCI benchmarks, CityCam, and OSR/OpenOOD demonstrate that MaxWEnt, particularly with SVD parameterization, achieves state-of-the-art OOD detection and more faithful epistemic uncertainty estimates. The work also discusses Bayesian links, hyperparameter considerations, and practical guidelines for deploying entropy-based uncertainty quantification in real-world settings.

Abstract

This paper deals with uncertainty quantification and out-of-distribution detection in deep learning using Bayesian and ensemble methods. It proposes a practical solution to the lack of prediction diversity observed recently for standard approaches when used out-of-distribution (Ovadia et al., 2019; Liu et al., 2021). Considering that this issue is mainly related to a lack of weight diversity, we claim that standard methods sample in "over-restricted" regions of the weight space due to the use of "over-regularization" processes, such as weight decay and zero-mean centered Gaussian priors. We propose to solve the problem by adopting the maximum entropy principle for the weight distribution, with the underlying idea to maximize the weight diversity. Under this paradigm, the epistemic uncertainty is described by the weight distribution of maximal entropy that produces neural networks "consistent" with the training observations. Considering stochastic neural networks, a practical optimization is derived to build such a distribution, defined as a trade-off between the average empirical risk and the weight distribution entropy. We develop a novel weight parameterization for the stochastic model, based on the singular value decomposition of the neural network's hidden representations, which enables a large increase of the weight entropy for a small empirical risk penalization. We provide both theoretical and numerical results to assess the efficiency of the approach. In particular, the proposed algorithm appears in the top three best methods in all configurations of an extensive out-of-distribution detection benchmark including more than thirty competitors.
Paper Structure (64 sections, 7 theorems, 88 equations, 11 figures, 9 tables, 2 algorithms)

This paper contains 64 sections, 7 theorems, 88 equations, 11 figures, 9 tables, 2 algorithms.

Key Result

Proposition 1

Let $q_{\phi}$ be a weight distribution described by Equation (weight-reparam) or (SVD-param) with $z \sim \mathcal{Z}$ and $\phi > 0$. If $\mathcal{Z}$ is defined as the normal $\mathcal{N}(0, \textnormal{Id}_d)$ or the uniform distribution $\mathcal{U}([-\sqrt{3}, \sqrt{3}]^d)$, there exists two c with $\phi = (\phi_1, ..., \phi_d) \in \mathbb{R}^d$, the scaling parameters of the weight distribu

Figures (11)

  • Figure 1: Uncertainty Estimation Comparison. Above: "two-moons" 2D classification dataset. Below: 1D-regression Jain2020MOD. Deep Ensemble (a) and MC-Dropout (b) produce overconfident estimations outside the training support due to a lack of hypothesis diversity. In the classification experiment, the hypotheses produced by both methods are restricted to half-space separators. There is no prediction uncertainty in the upper left and lower right areas of the input space, despite the lack of training data in these regions. In contrast, MaxWEnt (c, d) provides a clear discrimination between the in-distribution and out-of-distribution domains in terms of prediction uncertainty. Figure (c) presents the result obtained with MaxWEnt when no regularity assumption is made on the labeling function. In this case, the uncertainty quickly increases when leaving the training support, which truly represents the epistemic uncertainty in the absence of prior knowledge about the labeling function. Figure (d) reports the MaxWEnt uncertainty estimation when considering Lipschitz constraints. This result can be obtained with a small modification of the previous MaxWEnt model in the form of weight clipping. The full description of these synthetic experiments is reported in Section \ref{['synth-expe']}.
  • Figure 2: 1D-Regression Uncertainty Estimation. The horizontal and vertical axes correspond respectively to the 1D input space $\mathcal{X}$ and the 1D output space $\mathcal{Y}$. The black line represents the ground truth $f^*(x)$ and the blue line the average predictions $\overline{\mu}_w(x)$. Training instances are reported as white dots. Uncertainty estimations are reported in the form of confidence intervals centered around the average prediction (in light blue). The length of the intervals is equal to $4 \sqrt{u(x)}$ with $u(x)$ defined according to Equation (\ref{['uncertainty-regression']}).
  • Figure 3: Two-Moons Classification Uncertainty Estimation. The horizontal and vertical axes correspond to both dimensions of the input space $\mathcal{X}$. Training instances are represented by white dots. The two "moons" formed by the training instances correspond to two different classes. Predicted uncertainties $u(x)$, computed through Equation (\ref{['uncertainty-classification']}), are reported in shades of blue (darker areas correspond to larger uncertainties).
  • Figure 4: MaxWEnt-SVD Uncertainties for different clipping parameters. Clipping is performed "a posteriori" on the scaling variable $\hat{\phi} \odot z$ (cf. Equation \ref{['SVD-param']}) with $\hat{\phi}$ the parameters of the fitted MaxWEnt-SVD network, such that $q_{\hat{\phi}} \sim \overline{w} + V \min(\hat{\phi} \odot z, C)$, with $C$ the clipping parameter.
  • Figure 5: MaxWEnt Uncertainties Evolution through Epochs. One epoch corresponds to $100$ iterations. The entropy term $H(\phi)$ is defined here as $H(\phi) = \frac{1}{d} \sum_{k=1}^d \log(\phi_k^2)$ with $\phi$ the scale parameters of the weight distribution. Notice that MaxWEnt and MaxWEnt-SVD have different parameter initialization, respectively: $\phi_{\text{init}} = \text{softplus}(-5)$ and $\phi_{\text{init}} = \text{softplus}(-10)$.
  • ...and 6 more figures

Theorems & Definitions (7)

  • Proposition 1: Closed-form expression of the weight entropy
  • Proposition 2: Closed-form solution for the scaling parameterization
  • Proposition 3: Closed-form solution for the SVD parameterization
  • Proposition 4: Comparison between scaling and SVD parameterization
  • Proposition 6: Optimal scaling parameters
  • Lemma 7
  • Lemma 8