Table of Contents
Fetching ...

QuantProb: Generalizing Probabilities along with Predictions for a Pre-trained Classifier

Aditya Challa, Snehanshu Saha, Soma Dhavala

TL;DR

QuantProb introduces a duality-driven framework to derive quantile-based probabilities, ${\mathcal{Q}}(\mathbf{x},\tau)$ and ${\mathcal{P}}(\mathbf{x},p)$, from any pre-trained classifier $f_{\theta}$ without altering its predictions. By training quantile representations across a finite set of quantiles $\tau$, the method yields QuantProb, a probability estimate that generalizes better under distortions than standard softmax outputs. The authors argue that minimizing calibration error on the original distribution is less robust than achieving constant calibration error across plausible distortions, and they demonstrate constant calibration behavior on CIFAR10/ CIFAR10C datasets, while showing that Platt scaling cannot repair distortion-invariance. The work connects quantile regression theory with practical calibration and OOD detection, showing that QuantProb preserves the base model's properties while improving reliability under data perturbations. Overall, QuantProb offers a practical, distortion-robust alternative to post-hoc calibration for pretrained classifiers with potential broader impact on reliability in deployed AI systems.

Abstract

Quantification of Uncertainty in predictions is a challenging problem. In the classification settings, although deep learning based models generalize well, class probabilities often lack reliability. Calibration errors are used to quantify uncertainty, and several methods exist to minimize calibration error. We argue that between the choice of having a minimum calibration error on original distribution which increases across distortions or having a (possibly slightly higher) calibration error which is constant across distortions, we prefer the latter We hypothesize that the reason for unreliability of deep networks is - The way neural networks are currently trained, the probabilities do not generalize across small distortions. We observe that quantile based approaches can potentially solve this problem. We propose an innovative approach to decouple the construction of quantile representations from the loss function allowing us to compute quantile based probabilities without disturbing the original network. We achieve this by establishing a novel duality property between quantiles and probabilities, and an ability to obtain quantile probabilities from any pre-trained classifier. While post-hoc calibration techniques successfully minimize calibration errors, they do not preserve robustness to distortions. We show that, Quantile probabilities (QuantProb), obtained from Quantile representations, preserve the calibration errors across distortions, since quantile probabilities generalize better than the naive Softmax probabilities.

QuantProb: Generalizing Probabilities along with Predictions for a Pre-trained Classifier

TL;DR

QuantProb introduces a duality-driven framework to derive quantile-based probabilities, and , from any pre-trained classifier without altering its predictions. By training quantile representations across a finite set of quantiles , the method yields QuantProb, a probability estimate that generalizes better under distortions than standard softmax outputs. The authors argue that minimizing calibration error on the original distribution is less robust than achieving constant calibration error across plausible distortions, and they demonstrate constant calibration behavior on CIFAR10/ CIFAR10C datasets, while showing that Platt scaling cannot repair distortion-invariance. The work connects quantile regression theory with practical calibration and OOD detection, showing that QuantProb preserves the base model's properties while improving reliability under data perturbations. Overall, QuantProb offers a practical, distortion-robust alternative to post-hoc calibration for pretrained classifiers with potential broader impact on reliability in deployed AI systems.

Abstract

Quantification of Uncertainty in predictions is a challenging problem. In the classification settings, although deep learning based models generalize well, class probabilities often lack reliability. Calibration errors are used to quantify uncertainty, and several methods exist to minimize calibration error. We argue that between the choice of having a minimum calibration error on original distribution which increases across distortions or having a (possibly slightly higher) calibration error which is constant across distortions, we prefer the latter We hypothesize that the reason for unreliability of deep networks is - The way neural networks are currently trained, the probabilities do not generalize across small distortions. We observe that quantile based approaches can potentially solve this problem. We propose an innovative approach to decouple the construction of quantile representations from the loss function allowing us to compute quantile based probabilities without disturbing the original network. We achieve this by establishing a novel duality property between quantiles and probabilities, and an ability to obtain quantile probabilities from any pre-trained classifier. While post-hoc calibration techniques successfully minimize calibration errors, they do not preserve robustness to distortions. We show that, Quantile probabilities (QuantProb), obtained from Quantile representations, preserve the calibration errors across distortions, since quantile probabilities generalize better than the naive Softmax probabilities.
Paper Structure (49 sections, 2 theorems, 19 equations, 10 figures, 2 tables, 1 algorithm)

This paper contains 49 sections, 2 theorems, 19 equations, 10 figures, 2 tables, 1 algorithm.

Key Result

Theorem 3.1

Let $\psi^*$ denote a minimizer of the following cost, over the dataset $\mathcal{D}$. Then, the solution ${\mathcal{Q}}({\bm{x}}, \tau)$ obtained by algorithm alg:quantrep with the base classifier as $\psi^*({\bm{x}}, 0.5)$, minimizes the cost in equation eq:thm1 as well, assuming strong duality for ${\mathcal{Q}}({\bm{x}}, \tau)$.

Figures (10)

  • Figure 1: Illustrating the construction of Quantile Representations. (a) Simple toy example. (b) Illustrates different classifiers obtained for different $\tau$. (c) Quantile Probabilities Heatmap. (d) Baseline Probabilities Heatmap. Note that quantile probabilities capture the inherent structure of the dataset, while baseline probabilities only rely on distance from the boundary.
  • Figure 2: Calibration errors when training on features from Resnet34/Densenet embedding on CIFAR10C. Quantile representations can be effective for calibration because they estimate probabilities using Equation equation \ref{['eq:quantprob']}, which has been shown to be robust to corruptions. As demonstrated using the CIFAR10C dataset DBLP:conf/iclr/HendrycksD19, the Expected Calibration Error (ECE) of the probabilities obtained from quantile representations (QUANT) does not increase with the severity of the corruptions. In contrast, when using the standard Maximum Softmax Probability (MSP) method, the calibration error increases as the severity of the corruptions increases.
  • Figure 3: Calibration errors when training on features from Resnet34/Densenet embedding on CIFAR100C
  • Figure 4: Calibration errors when training the entire network of Resnet34/DenseNet embedding on CIFAR10.
  • Figure 5: Correcting calibration error on the validation set may not improve performance on corrupted datasets.
  • ...and 5 more figures

Theorems & Definitions (2)

  • Theorem 3.1
  • Theorem 4.1