Second-Order Uncertainty Quantification: Variance-Based Measures

Yusuf Sale, Paul Hofman, Lisa Wimmer, Eyke Hüllermeier, Thomas NaglerarXiv 2024 · DOI

Abstract

Quantifying uncertainty is critical for deploying machine learning models in high-stakes environments like healthcare and autonomous driving. Traditional entropy-based metrics often conflate different types of uncertainty and lack class-specific granularity. This paper proposes a framework for second-order uncertainty quantification (UQ) using variance-based measures. By applying the Law of Total Variance to distributions over class probabilities, we decompose total uncertainty into label-wise aleatoric and epistemic components. We demonstrate that these measures satisfy key theoretical axioms, including spread-preserving location shifts, which entropy-based measures fail. Experimental results on computer vision benchmarks show that our approach provides competitive performance in accuracy-rejection and out-of-distribution detection while offering superior interpretability through label-wise analysis.

Introduction

In high-stakes machine learning applications, a model's prediction must be accompanied by a reliable measure of certainty. Researchers typically distinguish between two types of uncertainty: Aleatoric Uncertainty (AU), which represents inherent noise in the data, and Epistemic Uncertainty (EU), which represents a lack of model knowledge due to insufficient training data.

While Shannon entropy and mutual information are the current "gold standards" for UQ, they suffer from systematic biases and often fail to identify which specific class the model is confused about. This paper addresses these limitations by shifting the focus to variance-based measures derived from second-order distributions.

Methods: The Second-Order View

Instead of analyzing a single vector of class probabilities (first-order), this framework utilizes second-order distributions—distributions over the probabilities themselves. These are typically generated via Bayesian ensembles or Evidential Deep Learning.

Decomposition of uncertainty for a Gaussian second-order distribution $\mathcal{N}(0.5, 0.1)$.

The core contribution is the application of the Law of Total Variance to this second-order view. The total variance of a label is decomposed into:

  • Label-wise Aleatoric Uncertainty: The expected conditional variance, capturing inherent randomness.
  • Label-wise Epistemic Uncertainty: The variance of the expected probabilities, capturing model disagreement or "spread."

By summing these across classes using importance weights, the authors derive global measures for Total (TU), Aleatoric (AU), and Epistemic (EU) uncertainty.

Key Insights and Axiomatic Validation

A central part of this work is testing UQ measures against eight mathematical axioms (A0–A7). A critical finding is that variance-based measures satisfy Axiom A5 (spread-preserving location shifts), whereas entropy-based measures do not.

Behavior of uncertainty measures under spread-preserving shifts and conflicting evidence.

As illustrated in the figure above, shifting a distribution toward a boundary without changing its "spread" (comparing d and e) results in a constant variance-based EU (the second value in the EU pair, 0.05), while the entropy-based EU (the first value) changes from 0.04 to 0.07. This invariance is theoretically desirable as the model's "ignorance" hasn't changed, only the location of the distribution. Furthermore, the framework correctly identifies maximal epistemic uncertainty in cases of conflicting evidence (f).

Experimental Results

The researchers evaluated their approach using standard benchmarks including MNIST, CIFAR-10, and SVHN. Key findings include:

  • Competitive Utility: In Accuracy-Rejection Curves, variance-based measures performed identically to entropy-based standards, ensuring no loss in predictive utility for the gain in theoretical rigor.
  • Effective OoD Detection: For out-of-distribution tasks (e.g., CIFAR-10 vs. SVHN), the variance-based EU measure ($EU_{var}$) achieved a near-perfect AUROC of .999.
  • Label-Wise Granularity: Qualitative analysis of MNIST digits demonstrated that the label-wise approach identifies specific class confusion. For instance, a model might show high AU for a blurry "4" (inherent ambiguity) but high EU for a digit style it hasn't seen before (lack of data).

Conclusion

By moving from entropy to variance, this paper provides a more robust and interpretable framework for second-order uncertainty. While the authors acknowledge that variance-based measures do not satisfy the controversial axiom of maximality at uniform distributions (A2), the practical benefits of label-wise granularity and axiomatic consistency make this a significant step forward for reliable machine learning. Future work will explore scaling these label-wise insights to datasets with thousands of classes.

Summary updated

BibTeX
@misc{sale2024second,
  author = {Yusuf Sale and Paul Hofman and Lisa Wimmer and Eyke Hüllermeier and Thomas Nagler},
  title = {{Second-Order Uncertainty Quantification: Variance-Based Measures}},
  year = {2024},
  eprint = {2401.00276},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.00276},
}
Figure