TL;DR
Standard methods for estimating epistemic uncertainty rely on the variance of a model's predictions, but they completely miss errors caused by model misspecification (bias). This paper introduces DEUP (Direct Epistemic Uncertainty Prediction), a framework that directly estimates epistemic uncertainty by training a secondary "error predictor" to map out-of-sample generalization errors. DEUP significantly improves exploration and decision-making in sequential optimization, reinforcement learning, and out-of-distribution detection.
What Problem Does This Paper Address?
When deploying machine learning models in high-stakes or interactive environments (like active learning or reinforcement learning), knowing what the model doesn't know—its epistemic uncertainty (EU)—is crucial.
The machine learning community typically estimates EU using discrepancy-based methods, such as the variance of a Gaussian Process (GP) or Deep Ensembles. However, the authors point out a major pitfall: epistemic uncertainty actually consists of two parts:
- Approximation uncertainty: Lack of knowledge due to a finite training dataset.
- Model uncertainty (or bias): Lack of knowledge because the chosen model class cannot perfectly represent the true data-generating process (model misspecification).
Traditional variance-based methods only capture approximation uncertainty. If an entire ensemble of neural networks or a GP is misspecified, they can all agree on a wrong prediction, yielding a variance of nearly zero. This leads to dangerous overconfidence, causing active learners or RL agents to get stuck in suboptimal regions because they don't realize they are wrong.
Methods
Instead of relying on the internal disagreement of a model, DEUP proposes to estimate epistemic uncertainty by directly predicting the excess risk—the gap between a predictor's generalization error and the irreducible intrinsic noise (aleatoric uncertainty).
The core DEUP framework operates as follows:
- Train the Main Predictor: Train your primary model on the available dataset.
- Train an Error Predictor: Train a secondary model (the error predictor) to estimate the point-wise out-of-sample loss (risk) of the main predictor.
- Subtract Aleatoric Uncertainty: If an estimate of aleatoric uncertainty is available, subtract it from the predicted risk to isolate the epistemic uncertainty. Otherwise, the predicted risk serves as a conservative upper bound.
Handling Interactive Settings
In interactive settings like Reinforcement Learning (RL) or Sequential Model Optimization (SMO), the data distribution shifts as the agent collects new samples. To help the error predictor generalize across changing datasets, the authors introduce stationarizing features as inputs to the secondary model. These features include:
- The raw input $x$.
- A density estimate of the training data $\hat{q}(x|z^N)$.
- The main model's internal variance estimate $\hat{V}(x)$.
- A binary indicator showing whether the point was already seen in the training set.
To kickstart the error predictor before interactive data collection begins, DEUP utilizes a $K$-fold cross-validation strategy on the initial dataset to generate out-of-sample error targets.
Datasets
The authors evaluated DEUP across a diverse set of synthetic and real-world benchmarks:
- Synthetic Optimization Functions: 1D multi-modal functions, 2D Levi N.13 function, and high-dimensional (10D to 100D) Ackley functions.
- Reinforcement Learning: The classic CartPole environment from the
bsuitebenchmark. - Real-World Regression: DrugComb and LINCS L1000, used to predict the synergistic effects of anti-cancer drug combinations.
- Image Classification & OOD Detection: CIFAR-10 (training/in-distribution), SVHN (out-of-distribution), and CIFAR-10-C (corrupted images for distribution shift evaluation).
Key Insights and Ideas
- Misspecification is Everywhere: Even highly flexible models like neural networks or non-parametric GPs suffer from misspecification in practice due to finite compute budgets, early stopping, or the implicit biases of optimization algorithms like SGD.
- Treating Error as a Regression Target: By framing uncertainty estimation as a standard regression problem on out-of-sample errors, DEUP bypasses complex Bayesian approximations.
- Leveraging "Flawed" Baselines: DEUP doesn't replace variance-based methods; it can actually use them. By taking a misspecified GP's underestimated variance as an input feature, DEUP learns to map those flawed variances to actual $L_2$ errors, successfully correcting the underestimation.
Key Results
1. Sequential Model Optimization (SMO)
When optimizing complex functions with multiple local maxima, standard GP methods with Expected Improvement (GP-EI) frequently got trapped in local optima. DEUP-EI consistently found the global maximum across 1D, 2D, and high-dimensional (10D/100D) Ackley functions, showing superior robustness to dimensionality.
2. Reinforcement Learning
On the CartPole task, integrating DEUP's uncertainty estimates as an exploration bonus (DEUP-DQN) achieved lower average regret faster than standard DQN ($\epsilon$-greedy), MC-Dropout, and Bootstrapped DQN.
3. Real-World Drug Synergy Prediction
DEUP captured the true order of magnitude of model residuals significantly better than baselines. It achieved a Spearman rank correlation with actual residuals of 0.47, compared to 0.30 for Deep Ensembles and 0.12 for Deterministic Uncertainty Estimation (DUE).
4. Out-of-Distribution Detection
When evaluating ResNet models trained on CIFAR-10 and tested on OOD SVHN data, DEUP achieved the highest rank correlation with the true generalization error:
- ResNet-18: DEUP achieved an SRCC of 0.426, outperforming Deep Ensembles (0.381) and DUE (0.378).
- ResNet-50: DEUP achieved an SRCC of 0.465, outperforming Deep Ensembles (0.401).
Limitations and Future Work
- Computational Overhead: Training a secondary model adds computational cost. While the authors note that training DEUP with density and variance features is computationally on-par with a 5-network Deep Ensemble, scaling this to massive architectures remains a challenge.
- Aleatoric Uncertainty Dependency: To perfectly isolate epistemic uncertainty, DEUP ideally requires a reliable estimate of aleatoric uncertainty. When replicates are unavailable to calculate data noise, DEUP must rely on a pessimistic upper bound.
- Feature Selection: Performance is sensitive to the choice of stationarizing features, and the optimal subset of features can vary depending on the specific downstream task.
Summary updated