Manuscript Offprint

arXiv:2610.30652

Residual Calibration via Local Feature-Space Refinement

Xihao Wang, Chengyao Yu, Ruixing Ming

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Deep neural networks often struggle to provide reliable confidence estimates, making post-hoc calibration essential for reliable decision-making. Existing post-hoc methods largely rely on score-based transformations, which improve marginal calibration but often fail to capture spatially varying miscalibration in local regions of the learned feature space. To address this gap, we propose Local Adaptive Probability Estimation (LAPE), a post-hoc residual calibration framework. Specifically, LAPE treats the global calibrator output as a stable anchor and refines the individual prediction by leveraging non-parametric local evidence from neighboring calibration samples. As a plug-and-play refinement module, LAPE effectively utilizes the information about feature-space geometry and can reuse the calibration data that are used to construct the global calibrator. Furthermore, we extend LAPE to the setting with multi-view inputs through Cascade Feature Augmentation Fusion (CFAF). Extensive experiments demonstrate that the proposed methods can improve the calibration quality of various existing baselines and remain efficient and robust across different settings.

1 Introduction

Deep neural networks have exhibited remarkable accuracy on classification problems, but often fail to provide reliable confidence scores that reflect the ground truth correctness likelihoods [Guo et al., 2017]. This mismatch can appear as overconfidence or underconfidence, both of which are critical especially in high-stakes applications and downstream tasks relying prediction uncertainty [Yu et al., 2026a,b]. For example, in automated clinical diagnostics, a reliable confidence score can indicate when a prediction should be deferred to experts for further examination, and in robust conformalized selection [Yu et al., 2026a], a reliable confidence score can improve selection power. Therefore, a network should provide reliable calibrated probabilities rather than directly applying the point predictions [Amodei et al., 2016, Lakshminarayanan et al., 2017, Jiang et al., 2018].

Post-hoc calibration provides a cost-effective solution to rectify miscalibration without retraining. However, existing global parametric maps such as Temperature Scaling (TS) [Guo et al., 2017], ensemble TS (ETS) [Zhang et al., 2020], and Dirichlet calibration [Kull et al., 2019] rely solely on scalar logits. Consequently, predictions with similar scores tend to obtain identical calibrations, ignoring the varying empirical reliability across distinct feature neighborhoods. To this end, local TS (LTS) [Ding et al., 2021b] introduces spatial adaptivity, but its increased parametric capacity risks overfitting on limited calibration data [Guo et al., 2017, Kull et al., 2019, Tomani et al., 2022]. Conversely, purely non-parametric local methods capture spatial patterns by adapting to neighborhood distributions but suffer from data inefficiency and discard informative global logits [Zadrozny and Elkan, 2001, 2002, Naeini et al., 2015, Kumar et al., 2019]. These limitations raise a foundational

*Co-first authors and contributed equally to this work.

†^{\dagger}Correspondence to: Ruixing Ming rxming@mail.zjgsu.edu.cn

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

challenge: how to develop a calibration framework that leverages local feature-space evidence to correct residual errors while strictly preserving global predictive stability?

To address the above challenge, we propose Local Adaptive Probability Estimation (LAPE), a post-hoc residual calibration framework that effectively utilizes local feature-level evidence to further enhance existing calibration methods. Specifically, LAPE formulates calibration as a residual refinement problem. It takes the output of any existing post-hoc calibrator as a stable anchor (also called global anchor), and then applies a local correction to it only when the nearby calibration samples support it. To tackle the overfitting issue caused by reusing the calibration set to fit both a global anchor and residual refinement, we introduce a V-fold cross-fitting strategy. It generates out-of-sample anchor scores in the calibration set and can be more effective than the standard data-splitting strategy. Finally, we develop Cascade Feature Augmentation Fusion (CFAF), which extends LAPE to tackle multi-view scenarios [Xu et al., 2013, Baltrušaitis et al., 2019].

In theory, we establish the asymptotic consistency of the proposed LAPE. Empirically, we extensively evaluate LAPE across diverse benchmarks that encompass tabular and image-type data. Results show that LAPE helps to enhance the calibration performance of various baselines, such as TS [Guo et al., 2017], Feature Clipping (FC) [Tao et al., 2025], and Semantic-Aware Grouping (SAG) [Yang et al., 2023a]. Extensive experiments in Appendix D further demonstrate the efficiency, robustness, and effectiveness of LAPE.

We summarize our contributions as follows:

  1. We propose LAPE, a residual calibration framework that enhances existing post-hoc calibration methods by integrating feature-level evidence. Importantly, LAPE can reuse the calibration dataset for building the global calibrator and residual refinement.

  2. We extend LAPE to multi-view settings through CFAF, which combines calibrated view-level predictions with local refinement on a rectified joint feature space.

  3. We establish asymptotic consistency of LAPE, providing a consistency analysis for feature-space residual calibration of the full multiclass probability vector.

  4. We conduct comprehensive evaluations across various datasets and architectures, demonstrating that LAPE can improve the performance of existing post-hoc calibration methods.

References (86)

  • Optical recognition of handwritten digits
  • Concrete Problems in AI Safety
  • Adaptive temperature scaling for robust calibration of deep neural networks
  • Multimodal machine learning: A survey and taxonomy
  • Comparative accuracies of artificial neural networks and discriminant analysis in predicting forest cover types from cartographic variables
  • Predictive dynamic fusion
  • Describing textures in the wild (opens the publisher in a new tab)
  • Retiring adult: New datasets for fair machine learning
  • Local temperature scaling for probability calibration
  • Letter recognition using holland-style adaptive classifiers
  • Strictly proper scoring rules, prediction, and estimation
  • On calibration of modern neural networks
  • A stitch in time saves nine: A train-time regularizing loss for improved neural network calibration
  • Benchmarking neural network robustness to common corruptions and perturbations
  • To trust or not to trust a classifier
  • Sample-dependent adaptive temperature scaling for improved calibration
  • Statlog: comparison of classification algorithms on large real-world problems
  • A decision-tree hybrid
  • Learning multiple layers of features from tiny images
  • Beyond sigmoids: How to obtain well-calibrated probabilities from binary classifiers with beta calibration
  • Beyond temperature scaling: Obtaining well-calibrated multi-class probabilities with dirichlet calibration
  • Verified uncertainty calibration
  • Simple and scalable predictive uncertainty estimation using deep ensembles
  • The devil is in the margin: Margin-based label smoothing for network calibration
  • Local calibration: Metrics and recalibration
  • Statlog (Vehicle Silhouettes) [dataset]
  • Obtaining well calibrated probabilities using bayesian binning
  • Measuring calibration in deep learning
  • Dataset for estimation of obesity levels based on eating habits and physical condition in individuals from colombia, peru and mexico
  • Calibrating probability with undersampling for unbalanced classification
  • Boosted decision trees as an alternative to artificial neural networks for particle identification
  • Early versus late fusion in semantic video analysis
  • Feature clipping for uncertainty calibration
  • Parameterized temperature scaling for boosting the expressive power in post-hoc uncertainty calibration
  • The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions
  • Open-vocabulary calibration for fine-tuned CLIP. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 51734–51754
  • On the pitfalls of verbalized confidence priors for calibrating large reasoning models (opens arXiv in a new tab)
  • A survey on multi-view learning (opens arXiv in a new tab)
  • Beyond probability partitions: Calibrating neural networks with semantic aware grouping
  • Medmnist v2 - a large-scale lightweight benchmark for 2d and 3d biomedical image classification
  • Robust conformalized selection with noisy responses (opens arXiv in a new tab)
  • Anytime safe PAC efficient reasoning
  • Obtaining calibrated probability estimates from decision trees and naive bayesian classifiers
  • Transforming classifier scores into accurate multiclass probability estimates
  • Mix-n-match: Ensemble and compositional methods for uncertainty calibration in deep learning
  • Provable dynamic fusion for low-quality multimodal data
  • Learning to prompt for vision-language models
  • Let $P_X$ denote the marginal distribution of $X$
  • The retrieval support Z is compact, and the density $p_{Z}$ is bounded away from zero and infinity on Z:
  • there exist constants $0 < c_{\mathrm{vol}} \leq C_{\mathrm{vol}} < \infty$ and $r_0 > 0$ such that, for every $z \in \mathcal{Z}$ and every $0 < r \leq r_0$
  • This sequence is used only to define the proof slices and is not an algorithmic tuning parameter
  • Define $\lambda_j := nP_Z(S_j)$
  • Let $n_j = \sum_{i=1}^n \mathbb{I}(z_i \in S_j)$ be the empirical count in slice $S_j$, and let $\lambda_{\min,n} := \min_{0 \leq j < T_n} \lambda_j$
  • Moreover, the adaptive construction in Lemma B.9 uses slices with probability mass of order $a_n/n$, so $T_n = O(n/a_n)$ and $\log T_n = O(\log n)$
  • Moreover, the number of slices satisfies $T_n = O(n/a_n)$
  • Under Assumptions B.3 and B.4, for sufficiently large n, the variation of $\mu(r)$ inside each slice satisfies
  • We choose the cut points $r_{j}$ as probability-mass quantiles, so that the probability increment
  • Otherwise, define
  • By applying Hoeffding's inequality coordinatewise and taking a union bound over the $K$ coordinates, we obtain, for any $\delta > 0$
  • Taking a union bound over the at most $T_n$ cut points, with $T_n$ growing at most polynomially, gives
  • Under Assumption B.3 and the local volume regularity used in Lemma B.9
  • Choose fixed constants $a, b > 0$ satisfying
  • Define the number of calibration embeddings within radius $r$ by
  • The volume bounds yield
  • Therefore, we have $\sigma_n = \Theta_p(n^{-1/(2d_z)})$, which implies $\sigma_n \to 0$ in probability
  • Here $q_{i,n}^{(-i)}(m,\alpha)$ is constructed from the same query-local pool $\mathcal{N}_m(x) \setminus \{i\}$, so for fixed $(m,\alpha)$ the objective depends only on the labels inside $\mathcal{N}_m(x)$, with the anchor values treated as fixed
  • Define the corresponding conditional risk by
  • Moreover, $\mathcal{L}_\delta$ is bounded by $C_\delta$ and is $1/\delta$-Lipschitz in the corresponding probability coordinate
  • Consequently, the ordinary log-loss is bounded by
  • Then, under the conditions of Lemma B.11
  • If $m \leq m_{\sigma,n}$, then every point in $\mathcal{N}_m(x)$ has distance at most $\sigma_n$ from $z$
  • This proves $\sup_{m \in \mathcal{M}_n} W_{\text{out}}^{(m)}(r) \xrightarrow{P} 0$
  • For $m \in \mathcal{M}_n$, let $\bar{p}_0(x, m)$ be the conditional mean defined in Definition B.1
  • Consequently
  • Hoeffding's inequality therefore gives, for every $\varepsilon > 0$
  • By Lemma B.12, the empirical objective is uniformly close to $\mathcal{R}_n$, and hence
  • Hence the pure-local neighborhood radius shrinks to zero and its sample size diverges
  • For a fixed test point satisfying $p(x) = p_\phi(z)$, Assumption B.4 and $d_{(m_n^\circ)}(x) \leq \sigma_n$ yield
  • By the Lipschitz continuity of $p_\phi$ and the localization of the neighborhood, its conditional mean satisfies
  • Under Assumption B.6, all their coordinates exceed $\delta$ with probability tending to one
  • When a baseline can serve as a calibrated anchor, we also evaluate the corresponding LAPE-side refinement on top of that anchor using the same reference split
  • Complete appendix tables also report ACE when applicable
  • ACE follows the adaptive calibration-error protocol of Nixon et al. [2019]: for each class $k$, examples are sorted by the predicted probability $\hat{p}_k(x_i)$, divided into equal-frequency adaptive bins $\mathcal{B}_{k,m}$, and compared by
  • Appendix D reports the corresponding values for the full method suite
  • For an error-type metric M, such as NLL, ECE, or ACE, the reported value is
  • We use this relative form because LAPE is designed as a post-hoc refinement layer on top of an existing anchor rather than as a standalone replacement