A novel framework for uncertainty qantification via proper scores for classification and beyond

Sebastian Gruber · DOI

TL;DR

This thesis introduces a comprehensive mathematical framework for uncertainty quantification (UQ) built on the foundation of "proper scores." By generalizing bias-variance and calibration-sharpness decompositions through functional Bregman divergences, it provides a unified way to measure aleatoric and epistemic uncertainty across tasks ranging from simple classification to complex generative modeling in images, audio, and text.

What Problem Does This Paper Address?

As machine learning models are increasingly deployed in safety-critical domains like healthcare and autonomous driving, the ability to quantify uncertainty—knowing when a model doesn't know—is paramount. However, the field currently suffers from a "fragmentation" problem. Uncertainty quantification methods are often ad-hoc and task-specific; a technique used to calibrate a classifier doesn't easily translate to a generative model like a Large Language Model (LLM) or a diffusion-based image generator.

The author, Sebastian G. Gruber, tackles this by seeking a "first principles" approach. The core challenge is creating a mathematically rigorous framework that can handle both simple finite probability vectors (classification) and implicit, high-dimensional distributions (generative modeling) while providing consistent definitions for different types of uncertainty.

Methods

The framework centers on Proper Scores (or Proper Scoring Rules). These are loss functions—like Mean Squared Error or Cross-Entropy—that are uniquely minimized when the model's predicted distribution matches the true target distribution.

Key methodological contributions include:

  • General Bias-Variance Decomposition: Using functional Bregman divergences, the author proves that any strictly proper score can be decomposed into a bias term (systematic error), a variance term (epistemic uncertainty), and a noise term (aleatoric uncertainty).
  • Kernel-Based Proper Scores: To handle generative models where we only have samples (not explicit densities), the author utilizes Kernel Scores. This allows for the evaluation of "hallucinations" or "mode collapse" in models like GPT-4 or Stable Diffusion.
  • KL Calibration Error: The author introduces a new estimator for calibration error based on the Kullback-Leibler divergence. Unlike the widely used but biased Expected Calibration Error (ECE), this new estimator is proven to be consistent and asymptotically unbiased.
  • Disentangled Mean Embeddings: By applying Central Kernel Alignment (CKA), the author develops a method to break down the error of an image generator into specific pixel clusters, allowing researchers to see which parts of an image (e.g., the face vs. the background) the model is struggling to learn.

Datasets

The thesis validates its theory across a massive range of benchmarks:

  • Classification: CIFAR-10, CIFAR-100, ImageNet, and the classic Iris dataset.
  • Generative Images: InfiMNIST (a synthetic, infinite version of MNIST used to simulate ground truth), CelebA (celebrity faces), and ChestMNIST (medical X-rays).
  • Audio: LJSpeech, used for evaluating text-to-speech generative flow models.
  • Natural Language: CoQA and TriviaQA, used to test the uncertainty of Large Language Models (OPT family) in question-answering tasks.
  • Regression: The UCI Residential Building dataset.

Key Insights and Ideas

  • The Logit Space Advantage: One surprising finding is that for models trained with log-loss (cross-entropy), the "Bregman Information" (the variance/epistemic uncertainty term) can be calculated directly in the logit space using the LogSumExp function. This avoids the need for complex probability transformations.
  • Mode Collapse is Bias: In generative modeling, the author discovered that "mode collapse"—where a model fails to represent minority classes—is expressed mathematically almost entirely in the bias term, whereas overfitting increases the variance term.
  • Hallucination Detection via Kernel Entropy: For LLMs, measuring the "kernel entropy" of generated responses proved to be a significantly more reliable way to detect incorrect answers than standard lexical similarity metrics (like RougeL).
  • Information Monotonicity: The author proves that "model sharpness" is equivalent to an f-divergence. This implies that information is processed monotonically through neural network layers, providing a new theoretical link between uncertainty calibration and Information Bottleneck theory.

Key Results

  • LLM Performance: The kernel-based entropy approach outperformed state-of-the-art baselines in predicting the correctness of LLM responses across almost all tested settings on CoQA and TriviaQA.
  • Out-of-Distribution (OOD) Detection: The proposed "Bregman Information" metric showed superior robustness in detecting OOD samples on corrupted ImageNet data compared to standard confidence-based scores.
  • Calibration Reliability: The new KL calibration error estimator demonstrated a bias convergence rate of $O(n^{-1})$, making it far more reliable for model selection than traditional binning-based methods.
  • Image Diagnostics: The disentanglement method successfully identified that DCGAN training collapses were often driven by failures in specific image regions (like backgrounds) rather than the entire image.

Limitations and Future Work

  • Strict vs. Non-Strict Scores: The current bias-variance theory relies on "strictly" proper scores. Extending this to non-strictly proper scores (where the minimizer isn't unique) remains an open theoretical challenge.
  • Computational Cost: Some of the kernel-based estimators have $O(n^2)$ complexity, which can be computationally expensive for very large-scale datasets. The author suggests "block estimators" as a potential future fix.
  • New Modalities: While the framework covers text, audio, and images, the author notes that future work should explore even more complex domains like graph generation or video synthesis.
  • Injective Transformations: The author advocates for injective transformations for recalibration but acknowledges that more research is needed to optimize these for generative outputs specifically.

Summary updated

BibTeX
@misc{gruber2025novel,
  author = {Sebastian Gruber and Sebastian G. Gruber},
  title = {{A novel framework for uncertainty qantification via proper scores for classification and beyond}},
  year = {2025},
  eprint = {2508.18001},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.18001},
}
Figure