TL;DR
Deep neural networks are notoriously bad at knowing what they don’t know, and standard calibration fixes treat all identical confidence scores the same—ignoring where a data point actually lives in feature space. This paper introduces LAPE (Local Adaptive Probability Estimation), a plug-and-play module that takes an existing global calibration estimate as a stable "anchor" and nudges it toward reality by checking the empirical label frequencies of its nearest neighbors. Best of all, it requires no model retraining and squeezes extra value out of your existing calibration dataset without overfitting.
What Problem Does This Paper Address?
When a neural network outputs a "90% confidence" score, you want it to be right 90% of the time. Usually, it isn't. To fix this without retraining the network from scratch, practitioners use post-hoc calibration—methods like Temperature Scaling (TS) that adjust raw output scores (logits) using a small, held-out calibration dataset.
Here is the catch: global methods rely purely on those final scalar scores. Two completely different inputs that happen to produce a 0.80 score get the exact same mathematical adjustment, even if one sits comfortably in a well-behaved cluster of data and the other teeters on a chaotic decision boundary. This is the "same-score, different-reliability" problem.
Conversely, purely local, non-parametric methods look at feature-space neighborhoods, which captures spatial nuance, but they throw away useful global logits and starve for data in high dimensions. The authors ask: Can we get the spatial awareness of local methods while keeping the rock-solid stability of global ones?
Methods
Instead of replacing existing calibrators, the authors treat calibration as a residual refinement problem. LAPE acts as an add-on to any off-the-shelf calibrator (like Temperature or Vector Scaling):
- Global Anchor & Local Evidence: Take the output probability from a standard calibrator as a baseline ($\pi^{\text{anchor}}$). When a test point arrives, find its $m$ nearest neighbors from the calibration set in the network's learned feature space and calculate their smoothed empirical class frequencies.
- Adaptive Blending: Blend the global anchor and the local frequency using a simple linear weight $\alpha$. Rather than guessing $m$ and $\alpha$, LAPE optimizes them on the fly for each test point by running a fast, distance-weighted leave-one-out log-likelihood check on those local neighbors. If the local neighborhood is sparse or noisy, $\alpha$ shrinks, falling back safely to the global anchor.
- $V$-Fold Cross-Fitting: Reusing the same held-out dataset to fit both the global anchor and the local neighbor refinement is a recipe for overfitting. Splitting the data in half wastes precious samples. Instead, LAPE uses out-of-fold predictions (cross-fitting) to generate clean anchor scores across the entire calibration set.
- Multi-View Extension (CFAF): For multi-modal or multi-view setups where separate frozen models look at different data views, naive "late fusion" averages their predictions and misses cross-view interactions. Cascade Feature Augmentation Fusion (CFAF) builds a weighted global anchor across views, then runs LAPE's neighbor search inside a standardized, concatenated joint feature space.
The authors also prove mathematically that LAPE is asymptotically consistent—meaning as your calibration set grows, LAPE converges to the true conditional probability distribution.
Datasets
No new datasets are introduced, but the framework is tested across tabular, natural-image, medical-image, and multi-view benchmarks:
- Single-View: Obesity Risk (tabular), CIFAR-100 (natural images, plus corrupted CIFAR-10-C in the appendix), BreastMNIST, and MHIST (medical imaging).
- Multi-View: A synthetic XOR-views task, Multi-view Digits, and HAM10000 (melanoma vs. nevus classification).
Key Insights and Ideas
- Train-Calibration Geometry Gap: Even when training and calibration data are drawn i.i.d. from the exact same distribution, neural networks optimize to separate the training points—leaving held-out calibration points noticeably mixed near decision boundaries. Those mixed neighborhoods hold vital clues about local uncertainty that scalar logits miss.
- Correction, Not Replacement: In a 100-dimensional simulation, raw local neighbor frequencies beat softmax estimates near tricky decision boundaries (0.0969 vs. 0.1067 MAE), but lost across the whole space (0.1058 vs. 0.0941 MAE). Local evidence is terrible as a standalone predictor, yet brilliant as a targeted residual nudge.
- Cross-View Geometry Matters: In multi-view tasks, calibrating and averaging separate models misses errors that only appear when features are combined (like an XOR relationship). Searching neighbors in the joint representation fixes cross-view blind spots without end-to-end retraining.
Key Results
Adding LAPE consistently lowers Negative Log-Likelihood (NLL) and Expected Calibration Error (ECE) across diverse backbones (MLPs, ResNets) while leaving classification accuracy intact.
- Boosting Existing Calibrators: On BreastMNIST (ResNet18), pairing LAPE with Temperature Scaling cuts NLL by 12.6% and ECE by 15.5%; pairing it with Vector Scaling cuts ECE by 39.6%. On CIFAR-100 (ResNet50), LAPE improves Feature Clipping (FC) by 9.8% in NLL and 23.6% in ECE.
- Multi-View Gains: CFAF-LAPE outperforms late fusion across all metrics. On HAM10000, it drops NLL from 0.255 to 0.224, cuts ECE from 0.023 to 0.014, and nudges accuracy up from 89.6% to 90.7%. On synthetic XOR views, accuracy jumps from 79.0% to 84.8%.
- Data Efficiency: Even when restricted to just 10% of the calibration set, Vector Scaling + LAPE achieves lower NLL than Vector Scaling alone.
Limitations and Future Work
LAPE’s superpower is also its Achilles' heel: it relies on Euclidean distance in the learned feature space. If the network's feature geometry is warped or noisy—meaning nearby points don't actually share similar true label distributions—local frequencies become biased. While LAPE's adaptive weighting naturally dampens bad local signals by leaning back on the global anchor, the gains shrink. For future work, the authors suggest exploring more robust distance/retrieval metrics and extending this residual local refinement idea to modern LLM setups, such as calibrating verbalized confidence in large reasoning models.
Summary updated