Abstract
Deep ensembles are widely used for their predictive performance but often fail to provide reliable Bayesian uncertainty estimates due to functional collapse. This paper introduces Repulsive Deep Ensembles, a method that incorporates a repulsive force between ensemble members during training. We prove that this approach transforms ensemble training into a proper Bayesian inference process via Wasserstein gradient flow. Our results show that repulsive ensembles, especially when operating in function space, significantly improve uncertainty quantification and out-of-distribution detection.
Introduction
In deep learning, "Deep Ensembles"—training multiple models with different initializations—are remarkably effective. However, they lack a theoretical guarantee of convergence to the true Bayesian posterior. As models become overparameterized, ensemble members often suffer from functional collapse, where different models converge to nearly identical functions despite having different weights. This leads to overconfident predictions and poor performance on out-of-distribution (OOD) data.
Methodology: Adding Repulsion
The core innovation is the introduction of a kernelized repulsive term into the gradient descent update rule. Instead of training in isolation, models "push" away from each other to maintain diversity.
Weight vs. Function Space Repulsion
The authors explore two primary modes of repulsion:
- Weight Space Repulsion: Models are pushed apart based on their parameter values.
- Function Space Repulsion: Models are pushed apart based on their actual predictions. This is more robust as it ignores redundant weight configurations that yield identical behaviors.
Gradient Estimators
To implement this repulsive force, three gradient estimators are utilized:
- KDE (Kernel Density Estimation): Uses a kernel to estimate the distribution of ensemble members (particles).
- SGE (Stein Gradient Estimator): Considers simultaneous interactions between all particles.
- SSGE (Spectral Stein Gradient Estimator): A spectral method for easier estimation on out-of-sample points.
The authors mathematically demonstrate that these updates follow a Wasserstein gradient flow of the KL divergence, proving that the training process is equivalent to a physical system evolving toward the true Bayesian posterior distribution.
Experimental Evaluation
The methods were evaluated on synthetic benchmarks (1D regression, 2D classification), Neal’s Funnel, and real-world image classification (FashionMNIST vs. MNIST, CIFAR-10 vs. SVHN).
Key Results in Uncertainty Estimation
In 1D regression tasks, function-space repulsive ensembles (fWGD) were uniquely capable of capturing high uncertainty in the gaps between training data clusters, closely matching the gold-standard Hamiltonian Monte Carlo (HMC) results.
Out-of-Distribution Detection
On FashionMNIST and CIFAR-10, repulsive methods (particularly SGE and SSGE) consistently outperformed standard ensembles. For instance, the entropy ratio for OOD detection on FashionMNIST improved from ~6.25 (standard) to ~7.13 (repulsive). Notably, the repulsive force often improved or maintained top-1 accuracy, suggesting that diversity acts as a beneficial regularizer.
Key Insights
- Ensembles as Particles: Viewing ensemble members as particles allows the application of variational inference tools like Stein Variational Gradient Descent (SVGD).
- The Bayesian Proof: The proof that repulsion is the missing link to valid Bayesian inference is the paper's most significant theoretical contribution.
- Distance-Awareness: Function-space repulsive ensembles naturally become more uncertain as they move away from training data, a property standard ensembles lack.
Conclusion and Future Work
While Repulsive Deep Ensembles offer a rigorous path to Bayesian uncertainty, challenges remain. Computational complexity for estimators like SSGE can be a bottleneck for very large ensembles. Additionally, the impact of different Jacobian approximations in function-space updates requires further study. Future work will also focus on deriving explicit convergence bounds for finite ensembles.
Summary updated