TL;DR
Standard Bayesian neural networks rely on weight-space priors that are difficult to interpret, model-specific, and prone to overconfidence on out-of-distribution (OOD) data. This paper proposes a model-agnostic approach that places a Dirichlet prior directly in function space by treating the predictive samples of any stochastic classifier (like MC Dropout or Deep Ensembles) as draws from an implicit Dirichlet distribution. This simple regularization improves uncertainty quantification, out-of-distribution calibration, and adversarial robustness without changing model architectures.
What Problem Does This Paper Address?
Deep neural networks are notoriously overconfident when making predictions on data far from their training distribution. While Bayesian neural networks (BNNs) aim to mitigate this by placing priors over model weights, weight-space priors have fundamental flaws:
- They are unintuitive to specify (a Gaussian prior on weights does not correspond to an intuitive prior over functions).
- They depend heavily on the underlying architecture.
- They frequently fail to prevent overconfident extrapolations.
Prior work on function-space priors for classification often required architectural changes (e.g., forcing networks to output Dirichlet concentration parameters directly, as in Prior Networks or Evidential Deep Learning). The authors seek a unified, architecture-agnostic framework for function-space variational inference (fVI) tailored specifically to classification tasks.
Methods
Rather than redesigning network architectures, the authors treat standard stochastic classifiers (e.g., Ensembles, MC Dropout, Radial BNNs, Rank-1 BNNs) as implicit stochastic processes:
- Implicit Dirichlet Posterior: Instead of averaging softmax predictions across $M$ samples—which discards epistemic variance—the authors interpret the $M$ categorical probability vectors as samples from an implicit Dirichlet distribution over the probability simplex $\Delta^{K-1}$.
- Fast Dirichlet Estimation: They estimate the Dirichlet mean ($\bar{\boldsymbol{\alpha}}_{\boldsymbol{x}}$) via moment matching and the precision ($z_{\boldsymbol{x}}$) via Minka’s iterative quasi-Newton Maximum Likelihood Estimation (MLE).
- Function-Space ELBO (fELBO): The training objective optimizes a standard expected categorical log-likelihood alongside a function-space KL divergence (fKL) evaluated against a Dirichlet function prior (typically a uniform Dirichlet distribution, $\boldsymbol{\beta} = \mathbf{1}$).
- Efficient Gradient Approximation: When differentiating through the fKL objective, the gradient with respect to the estimated Dirichlet parameters is dropped. This pathwise gradient trick simplifies the computation graph by avoiding differentiation through the iterative MLE solver while also reducing gradient variance.
Stochastic Model (w ~ q(w))
│
▼
M Softmax Samples f^(1:M) ──► Fit Dirichlet (MLE) ──► Compute fKL to Prior
│ │
▼ ▼
Expected Log-Likelihood ──────────────────────────────► Maximize fELBO
Datasets
- Synthetic: Two Moons (2D toy classification) and an 8D Hypercube benchmark ($[-1, 1]^8$ with up to $2^8 = 256$ classes) to examine scaling behavior.
- Rotated MNIST: MNIST digits rotated from $0^\circ$ to $180^\circ$ in $10^\circ$ steps (190,000 test images) to benchmark covariate shift.
- Corrupted CIFAR-10 & CIFAR-100: Evaluated across 19 corruption types at 5 severity levels (Hendrycks & Dietterich, 2019; 960,000 test images each).
- Adversarial CIFAR-10 & CIFAR-100: Fast Gradient Sign Method (FGSM) attacks with perturbation budgets $\epsilon \in [0, 0.3]$. (No new benchmark datasets were introduced; existing standard benchmarks were utilized).
Key Insights and Ideas
- Preserving Epistemic Variance: Taking the arithmetic mean of predictive samples on a simplex collapses crucial information about model disagreement. Fitting a Dirichlet distribution retains the spread of these predictions, enabling true function-space comparison.
- Measurement Set Dictates Extrapolation: Estimating the fKL supremum over an expectation requires choosing a "measurement set." Using just training data improves calibration, but augmenting this set with rotated or unlabeled data drives OOD predictions significantly closer to the uniform prior.
- The High-Dimensionality Penalty: In $K$-class settings, categorical log-likelihood scales independently of $K$, whereas Dirichlet KL divergence scales linearly with $K$ due to summation over classes. For large $K$ (e.g., CIFAR-100), the prior can easily overwhelm the likelihood, requiring an annealing scale factor ($\lambda \approx 1/K$) to prevent underfitting.
Key Results
- OOD Log-Likelihood & Calibration:
- On Rotated MNIST at $180^\circ$, Deep Ensemble with fVI maintained a log-likelihood of $-3.16$ (vs. $-5.25$ for standard Ensemble) and dropped ECE from $0.42$ to $0.30$.
- On Corrupted CIFAR-10 (Severity 5), Ensemble fVI achieved an ECE of $0.11$ (vs. $0.19$ for standard Ensemble) and log-likelihood of $-1.33$ (vs. $-1.51$). Rank-1 BNNs saw an even dramatic improvement in log-likelihood under severity 5: $-1.53$ (fVI) vs. $-3.00$ (weight-space).
- Adversarial Robustness: Under FGSM attacks on CIFAR-10 ($\epsilon = 0.3$), MAP fVI sustained a log-likelihood of $-3.01$ compared to $-5.53$ for vanilla MAP. Similarly, MC Dropout fVI achieved $-2.90$ vs. $-4.96$ for standard MC Dropout.
Limitations and Future Work
- High Label Dimensions ($K \ge 100$): A naive uniform Dirichlet prior causes excessive regularization on CIFAR-100, requiring heuristic scaling of the KL term. Designing better priors for massive label spaces remains an open issue.
- Accuracy vs. Robustness Trade-off: fVI models occasionally exhibit a marginal drop in clean, in-distribution test accuracy in exchange for substantial gains in OOD log-likelihood and calibration.
- Measurement Set Selection: Training data was predominantly used as the finite measurement set. Systematic techniques to construct measurement sets (via unlabeled data, data augmentations, or generative models) represent an essential avenue for future exploration.
Summary updated