Residual Calibration via Local Feature-Space Refinement
Organizations: School of Statistics and Data Science, Zhejiang Gongshang University · Department of Statistics and Data Science, Southern University of Science and Technology
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.
Figures & tables
| Setting | Method | NLL | ECE | Acc. | Full results |
|---|---|---|---|---|---|
| Synthetic XOR views | Late fusion | 0.507 | 0.099 | 0.790 | Table 17 |
| CFAF-LAPE | 0.413 | 0.057 | 0.848 | ||
| Multi-view Digits | Late fusion | 0.112 | 0.029 | 0.960 | Table |
| CFAF-LAPE | 0.092 | 0.025 | 0.964 | ||
| HAM10000 melanoma vs nevus | Late fusion | 0.255 | 0.023 | 0.896 | Table 18 |
| CFAF-LAPE | 0.224 | 0.014 | 0.907 |
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
| Method family | Examples | Main idea | Main limitation / difference from LAPE |
|---|---|---|---|
| Global score/logit maps | TS, VS, MS, Beta, Dirichlet, ETS [ Guo et al., 2017 , Kull et al., 2017 , Kull et al., 2019 , Zhang et al., 2020 ] | Fit a global transformation on logits, confidence scores, or probability vectors. | Stable but mainly score-level; similar score patterns receive similar corrections even when feature-space neighborhoods have different empirical reliability. |
| Adaptive parametric or group-wise maps | PTS, AdaTS, LTS, SAG [ Tomani et al., 2022 , Joy et al., 2023 , Ding et al., 2021b , Yang et al., 2023a ] | Learn sample-specific temperatures, local temperature fields, or semantic group-wise calibrators. | More adaptive, but introduces extra fitted components such as temperature predictors or grouping heads; expressive calibrators may be fragile with limited calibration data [ Balanya et al., 2024 ] . |
| Score-level non-parametric calibration | Histogram binning, isotonic regression, BBQ, IROvA, MIR/IRM, scaling-binning [ Zadrozny and Elkan, 2001 , Zadrozny and Elkan, 2002 , Naeini et al., 2015 , Zhang et al., 2020 , Kumar et al., 2019 ] | Estimate flexible calibration maps from score bins, monotone score transformations, or probability-vector entries. | Non-parametric but still mainly score/probability-level; does not directly exploit learned feature geometry and can be data-inefficient in finite calibration samples. |
| LAPE | Pure LAPE; TS+LAPE; VS+LAPE; Dir+LAPE; FC+LAPE; SAG+LAPE | Preserve a global calibrated anchor and refine it with local reference-label evidence in feature space. | Uses non-parametric local evidence only as a residual correction, rather than learning a richer calibration map or replacing the classifier output. |
| Table | Dataset / setting | Backbone or framework |
|---|---|---|
| Table 6 | GMM local heterogeneity | Special oracle-based probability-distortion design; details are given in the corresponding subsection. |
| Table 7 | Sample-ratio sensitivity | Fixed MLP and fixed test set; only the calibration/reference ratio is varied. |
| Table 8 | Covariate shift | Source-trained MLP with target-domain calibration/reference splits. |
| Table 9 | CIFAR-10-C Gaussian-noise shift | Frozen ImageNet-pretrained ResNet18 with a multinomial linear probe trained on clean CIFAR-10; target-domain labeled reference samples are used for calibration. |
| Table 10 | High-dimensional stress test | MLP on synthetic high-dimensional features. |
| Table 11 | Structural-noise two moons | MLP on two-moons data with controlled structural noise. |
| Seeds | Naive ms/sample | Accelerated ms/sample | Speedup | |
|---|---|---|---|---|
| 250 | 5 | |||
| 500 | 5 | |||
| 1000 | 5 | |||
| 2000 | 5 |
| Group | Local bias | Base MAE | LAPE MAE | Base KL | LAPE KL | |
|---|---|---|---|---|---|---|
| Low oracle variation | 0.0073 | 0.0024 | 0.0151 | 0.0145 | 0.0124 | 0.0110 |
| High oracle variation | 0.2056 | 0.1542 | 0.1118 | 0.0943 | 0.0727 | 0.0472 |
| Setting | Method | NLL | Acc. (%) | ECE | ACE |
|---|---|---|---|---|---|
| GMM local heterogeneity | Base | 1.0010 | 60.13 | 0.1084 | 0.1103 |
| TS | 0.8480 | 60.13 | 0.0394 | 0.0822 | |
| ETS | 0.8429 | 60.13 | 0.0301 | 0.0789 | |
| VS | 0.8493 | 60.40 | 0.0444 | 0.0852 | |
| Dir | 0.8488 | 59.87 | 0.0390 | 0.0863 | |
| LTS | 0.8171 | 60.13 | 0.0422 | 0.0605 |
| Ratio | Base | VS | Pure LAPE | VS+LAPE | Gain over VS |
|---|---|---|---|---|---|
| 10% | 0.1205 / 0.0128 / 97.75 | 0.1116 / 0.0227 / 97.37 | 0.1284 / 0.0642 / 96.89 | 0.0869 / 0.0220 / 97.39 | 22.18% |
| 20% | 0.1205 / 0.0128 / 97.75 | 0.0974 / 0.0165 / 97.55 | 0.1003 / 0.0429 / 97.33 | 0.0817 / 0.0193 / 97.65 | 16.14% |
| 40% | 0.1205 / 0.0128 / 97.75 | 0.0959 / 0.0172 / 97.47 | 0.0886 / 0.0326 / 97.48 | 0.0801 / 0.0212 / 97.61 | 16.42% |
| 60% | 0.1205 / 0.0128 / 97.75 | 0.0951 / 0.0179 / 97.59 | 0.0796 / 0.0267 / 97.61 | 0.0756 / 0.0216 / 97.74 | 20.45% |
| 80% | 0.1205 / 0.0128 / 97.75 | 0.0954 / 0.0189 / 97.68 | 0.0759 / 0.0240 / 97.69 | 0.0739 / 0.0215 / 97.78 | 22.53% |
| 100% | 0.1205 / 0.0128 / 97.75 | 0.0951 / 0.0185 / 97.68 | 0.0744 / 0.0229 / 97.77 | 0.0727 / 0.0202 / 97.77 | 23.52% |
| Shift | Method | NLL (%) | Acc. (%) | ECE (%) | ACE (%) |
|---|---|---|---|---|---|
| Shift 0.4 | Pure LAPE | +3.83 | +0.12 | +15.60 | +18.67 |
| TS+LAPE | +1.83 | +0.18 | +9.40 | -10.42 | |
| VS+LAPE | +1.32 | +0.18 | -3.05 | -11.29 | |
| Dir+LAPE | +1.40 | +0.18 | -8.96 | +1.10 | |
| LTS+LAPE | +2.00 | +0.18 | +14.51 | +1.65 | |
| ETS+LAPE | +1.85 | +0.18 | +8.10 | -8.81 |
| Severity | Method | NLL (%) | Acc. (%) | ECE (%) | ACE (%) |
|---|---|---|---|---|---|
| 1 | Pure LAPE | +39.18 | +16.80 | +87.12 | +49.68 |
| TS+LAPE | +17.44 | +20.10 | -109.93 | +27.95 | |
| VS+LAPE | +2.61 | +2.39 | -82.98 | -40.95 | |
| Dir+LAPE | +1.50 | +1.16 | -45.51 | -12.64 | |
| LTS+LAPE | +16.50 | +20.70 | -97.52 | +27.26 | |
| ETS+LAPE | +17.47 | +20.01 | -104.91 | +28.14 |
| Dimension | Method | NLL (%) | Acc. (%) | ECE (%) | ACE (%) |
|---|---|---|---|---|---|
| D=10 | ETS+LAPE | +0.74 | +0.37 | -60.00 | -9.39 |
| LTS+LAPE | +2.78 | +0.37 | -3.54 | -17.19 | |
| Dir+LAPE | +4.67 | +0.76 | -25.49 | -1.92 | |
| TS+LAPE | +3.59 | +0.49 | -21.49 | -12.20 | |
| VS+LAPE | +3.79 | +0.62 | -22.80 | -10.65 | |
| IROvA+LAPE | +7.74 | +0.26 | +8.33 | -5.41 |
| Noise | Method | NLL (%) | Acc. (%) | ECE (%) | ACE (%) |
|---|---|---|---|---|---|
| Noise 0.1 | TS+LAPE | +6.06 | +0.00 | +17.02 | -93.82 |
| ETS+LAPE | +6.06 | +0.00 | +17.02 | -93.82 | |
| Dir+LAPE | +1.71 | +0.00 | -5.96 | +0.50 | |
| VS+LAPE | +1.66 | +0.00 | -5.63 | +0.41 | |
| Pure LAPE | +57.43 | +0.00 | +59.86 | +48.74 | |
| LTS+LAPE | +3.66 | +0.00 | -11.47 | -8.32 |
| Dataset / backbone | Method | NLL (%) | Acc. (%) | ECE (%) | ACE (%) |
|---|---|---|---|---|---|
| Obesity / MLP-deep | ETS+LAPE | +10.91 | +1.24 | -14.09 | -6.42 |
| TS+LAPE | +10.88 | +1.24 | -14.29 | -5.82 | |
| Pure LAPE | +8.55 | +1.24 | -29.34 | -12.48 | |
| Dir+LAPE | +10.81 | -0.41 | +7.78 | -13.06 | |
| LTS+LAPE | +5.57 | +1.24 | +3.82 | +3.21 | |
| MIR+LAPE | +8.81 | +1.24 | +12.10 | +10.52 |
| Method | NLL | Acc. (%) | ECE | ACE | Zone A | Zone B |
|---|---|---|---|---|---|---|
| Adaptive LAPE | 0.0384 | 99.00 | 0.0122 | 0.0070 | 0.0303 | 0.0467 |
| Fixed (A=0.2, K=30) | 0.1660 | 94.15 | 0.0589 | 0.0593 | 0.2262 | 0.1044 |
| Base Model (Alpha=0) | 0.1756 | 90.90 | 0.0339 | 0.0306 | 0.3016 | 0.0467 |
| Fixed (A=0.8, K=30) | 0.1949 | 99.25 | 0.1540 | 0.1321 | 0.0766 | 0.3161 |
| Fixed (A=0.5, K=100) | 0.2343 | 94.20 | 0.1101 | 0.1053 | 0.2494 | 0.2188 |
| Method | NLL (%) | Acc. (%) | ECE (%) | ACE (%) |
|---|---|---|---|---|
| CoOp+LAPE | +25.87 | +20.45 | +67.73 | +35.74 |
| CoOp+DAC+LAPE | +13.45 | +21.15 | +31.34 | +24.91 |
| Method | NLL (%) | Acc. (%) | ECE (%) | ACE (%) |
|---|---|---|---|---|
| CE+LAPE | +3.27 | +0.70 | -8.95 | -3.66 |
| MDCA+LAPE | +3.74 | +0.80 | -2.78 | -6.83 |
| MbLS+LAPE | +22.54 | +2.40 | +7.50 | +10.40 |
| Strategy | NLL | Acc. | ECE | ACE |
|---|---|---|---|---|
| Direct reuse | 1.3884 0.1132 | 0.6485 0.0291 | 0.3316 0.0291 | 0.3227 0.0300 |
| 50/50 split | 0.6198 0.0304 | 0.6816 0.0193 | 0.0957 0.0302 | 0.0935 0.0303 |
| 5-fold cross-fitting | 0.5951 0.0284 | 0.7021 0.0228 | 0.0757 0.0206 | 0.0728 0.0193 |
| Scenario | Method | NLL | Acc. (%) | ECE | ACE |
|---|---|---|---|---|---|
| Interaction (XOR) | CFAF-LAPE | 0.4134 | 84.80 | 0.0567 | 0.0639 |
| Fused (VS+Weight) | 0.5067 | 78.96 | 0.0985 | 0.1037 | |
| VS View A | 0.5439 | 68.72 | 0.0708 | 0.0753 | |
| Local Heterogeneity (Blobs) | CFAF-LAPE | 0.3940 | 79.36 | 0.0696 | 0.0696 |
| Fused (VS+Weight) | 0.4643 | 78.88 | 0.0473 | 0.0610 | |
| VS View B | 0.4651 | 78.96 | 0.0424 | 0.0600 |
| Dataset | Method | NLL | Acc. (%) | ECE | ACE |
|---|---|---|---|---|---|
| UCI Multiple Features | View A only | 0.1654 | 94.00 | 0.0259 | 0.0373 |
| View B only | 0.1497 | 95.20 | 0.0235 | 0.0194 | |
| Late fusion | 0.1117 | 96.00 | 0.0294 | 0.0147 | |
| CFAF-LAPE | 0.0919 | 96.40 | 0.0252 | 0.0156 | |
| HAM10000 malignant vs benign | Image only | 0.3461 | 84.98 | 0.0146 | 0.0250 |
| Metadata only | 0.4167 | 81.95 | 0.0210 | 0.0259 |
| Method | NLL (%) | Acc. (%) | ECE (%) | ACE (%) |
|---|---|---|---|---|
| QMF+CFAF-LAPE | +44.67 | +2.81 | +55.93 | +56.95 |
| PDF+CFAF-LAPE | +25.49 | +2.13 | +22.54 | +32.22 |
Model Calibration
Model calibration aligns predicted confidence or model outputs with observed outcomes and measurements to support more reliable decisions.
See all 218 papers