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 [14 ] . This mismatch can appear as overconfidence or underconfidence, both of which are critical especially in high-stakes applications and downstream tasks relying prediction uncertainty [48 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 [48 ] , a reliable confidence score can improve selection power. Therefore, a network should provide reliable calibrated probabilities rather than directly applying the point predictions [2 , 25 , 17 ] .
Post-hoc calibration provides a cost-effective solution to rectify miscalibration without retraining. However, existing global parametric maps such as Temperature Scaling (TS) [14 ] , ensemble TS (ETS) [52 ] , and Dirichlet calibration [23 ] 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) [10 ] introduces spatial adaptivity, but its increased parametric capacity risks overfitting on limited calibration data [14 , 23 , 38 ] . Conversely, purely non-parametric local methods capture spatial patterns by adapting to neighborhood distributions but suffer from data inefficiency and discard informative global logits [50 , 51 , 29 , 24 ] . These limitations raise a foundational 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 V 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 [45 , 4 ] .
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 [14 ] , Feature Clipping (FC) [37 ] , and Semantic-Aware Grouping (SAG) [46 ] . Extensive experiments in Appendix § 12 further demonstrate the efficiency, robustness, and effectiveness of LAPE.
We summarize our contributions as follows:
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.
We extend LAPE to multi-view settings through CFAF, which combines calibrated view-level predictions with local refinement on a rectified joint feature space.
We establish asymptotic consistency of LAPE, providing a consistency analysis for feature-space residual calibration of the full multiclass probability vector.
We conduct comprehensive evaluations across various datasets and architectures, demonstrating that LAPE can improve the performance of existing post-hoc calibration methods.
Preliminary
Problem Setup
Let X ∈ X X \in\mathcal{X} X ∈ X denote the feature variable and Y ∈ Y = { 1 , … , K } Y \in\mathcal{Y} = \{1,\ldots,K\} Y ∈ Y = { 1 , … , K } denote the label variable. Assume access to a calibration dataset { ( x i , y i ) } i = 1 n \{(x_i,y_i)\}_{i=1}^{n} {( x i , y i ) } i = 1 n . Let π ^ 0 : X → Δ K − 1 \hat{\pi}_0 : \mathcal{X} \to\Delta^{K-1} π ^ 0 : X → Δ K − 1 be a pre-trained soft-classifier for the K K K -class classification, where Δ K − 1 \Delta^{K-1} Δ K − 1 represents the ( K − 1 ) (K-1) ( K − 1 ) -dimensional probability simplex. Let p ( k ; x ) = P ( Y = k ∣ X = x ) p(k;x) = \mathbb{P}(Y = k \mid X = x) p ( k ; x ) = P ( Y = k ∣ X = x ) . For any x ∈ X x \in\mathcal{X} x ∈ X , we write π ^ 0 ( x ) = ( π ^ 0 ( 1 ; x ) , … , π ^ 0 ( K ; x ) ) \hat{\pi}_0(x) = (\hat{\pi}_0(1;x), \ldots, \hat{\pi}_0(K;x)) π ^ 0 ( x ) = ( π ^ 0 ( 1 ; x ) , … , π ^ 0 ( K ; x )) , where π ^ 0 ( k ; x ) \hat{\pi}_0(k;x) π ^ 0 ( k ; x ) represents the base estimate of p ( k ; x ) p(k;x) p ( k ; x ) . Denote the feature embedding of x x x by z : = ϕ ( x ) z := \phi(x) z := ϕ ( x ) and write z i = ϕ ( x i ) z_i = \phi(x_i) z i = ϕ ( x i ) , i ∈ [ n ] : = { 1 , … , n } i \in[n] := \{1,\ldots,n\} i ∈ [ n ] := { 1 , … , n } . The initial goal of LAPE is to construct a calibrated estimator of p ( k ; x ) p(k;x) p ( k ; x ) , denoted by p ^ ( k ; x ) \hat{p}(k;x) p ^ ( k ; x ) , by leveraging π ^ 0 ( k ; x ) \hat{\pi}_0(k;x) π ^ 0 ( k ; x ) , D c a l \mathcal{D}_{\mathrm{cal}} D cal , and { z i } i = 1 n \{z_i\}_{i=1}^{n} { z i } i = 1 n .
Furthermore, let f c a l ( ⋅ ; π ^ 0 , D ) : X → Δ K − 1 f_{\mathrm{cal}}(\cdot;\hat{\pi}_0,\mathcal{D}) : \mathcal{X} \to\Delta^{K-1} f cal ( ⋅ ; π ^ 0 , D ) : X → Δ K − 1 be any existing post-hoc calibration algorithm, which calibrates the initial soft-classifier π ^ 0 \hat{\pi}_0 π ^ 0 based on a calibration dataset D ⊆ D c a l \mathcal{D} \subseteq\mathcal{D}_{\mathrm{cal}} D ⊆ D cal . For example, the mapping f c a l f_{\mathrm{cal}} f cal can be defined by calibration algorithms such as VS and TS. We aim to utilize LAPE to further improve these calibration methods.
Motivation
A learned representation can be discriminative for classification while still leaving calibration errors that vary across different feature-space neighborhoods. For example, global post-hoc calibrators typically learn a fixed transformation from logits or confidence scores to calibrated probabilities. As a result, two samples with similar scores receive similar corrections, even if their nearby calibration samples exhibit different empirical label frequencies [38 , 27 , 10 ] . Such “same-score, different-reliability ” implies a possible route beyond purely score-based calibration: retain the global calibrator as a stable anchor and use nearby held-out samples as local evidence for residual mismatch, when the feature geometry makes such neighborhoods informative.
The key insight of LAPE is to use local frequencies in calibration samples as residual evidence for probability calibration. Figure 1 illustrates this mechanism in a controlled two-dimensional simulation, where training and calibration samples are generated from the same distribution, and only the training samples are used to fit the classifier. The figure highlights two observations as follows.
Figure 1. Representation separation can not guarantee uniform calibration support. (a) Raw features of training and calibration samples. (b) Learned features separate the training samples clearly, but calibration samples can remain mixed near induced boundary regions. Different colors represent different classes. The highlighted neighborhood illustrates the local evidence used by LAPE.
Observation 1. After representation learning, the training samples become more clearly separated, whereas held-out calibration samples can still remain locally mixed near induced boundary regions.
Observation 2. For held-out points with class-1 softmax scores in [ 0.35 , 0.65 ] [0.35, 0.65] [ 0.35 , 0.65 ] , local frequencies from 32 nearest neighbors in the full learned feature space better approximate oracle probabilities than softmax predictions (MAE: 0.126 vs. 0.156).
Observation 1 reflects that the classifier is optimized to separate the observed training dataset but can fail to separate held-out samples near classification boundaries. Observation 2 demonstrates that nearby held-out calibration samples can provide empirical evidence about the local class composition that is not directly used by a purely score-based global calibrator. LAPE therefore uses this local frequency as a residual correction to a global calibrated anchor.
Evidence beyond two dimensions. We further examine the above observations in a controlled simulation with 100-dimensional inputs. We generate i.i.d. training, calibration, and test sets, each containing 2,000 samples. The classifier is obtained on the training dataset. For a split A ∈ { t r a i n , c a l } A \in\{\mathrm{train}, \mathrm{cal}\} A ∈ { train , cal } and a representation h ∈ { r a w , l e a r n e d } h \in\{\mathrm{raw}, \mathrm{learned}\} h ∈ { raw , learned } , let μ A , c h \mu^{h}_{A,c} μ A , c h denote the centroid of class c c c :
μ A , c h = 1 ∣ I A , c ∣ ∑ i ∈ I A , c h ( x i ) , I A , c = { i : x i ∈ A , y i = c } . \mu^{h}_{A,c} = \frac{1}{\lvert\mathcal{I}_{A,c}\rvert}\sum_{i\in\mathcal{I}_{A,c}} h(x_i), \qquad\mathcal{I}_{A,c} = \{i : x_i \in A,\, y_i = c\}. μ A , c h = ∣ I A , c ∣ 1 i ∈ I A , c ∑ h ( x i ) , I A , c = { i : x i ∈ A , y i = c } .
We use S A h = ∥ μ A , 1 h − μ A , 0 h ∥ 2 S^{h}_{A} = \lVert\mu^{h}_{A,1} - \mu^{h}_{A,0} \rVert_{2} S A h = ∥ μ A , 1 h − μ A , 0 h ∥ 2 as a class-separation diagnostic, after standardizing each representation using statistics from the training split.
Results are averaged over ten random seeds. In the raw input space, the training and calibration sets have nearly identical class separation (2.510 ± 0.176 versus 2.519 ± 0.162). After representation learning, the separation is moderately larger for the training samples than for the held-out calibration samples (3.663 ± 0.343 versus 2.981 ± 0.234), showing that a train–calibration discrepancy can remain even under i.i.d. sampling.
We then evaluate probability estimation on an independent test set. The boundary region is specified before model fitting as 0.35 ≤ P ( Y = 1 ∣ X ) ≤ 0.65 0.35 \le P(Y = 1 \mid X) \le0.65 0.35 ≤ P ( Y = 1 ∣ X ) ≤ 0.65 . For each test point, the local estimate is computed from the Laplace-smoothed label frequency of its 50 nearest calibration samples in the learned representation. Within this predefined region, the mean absolute error to the oracle conditional probability is 0.1067 ± 0.0098 0.1067 \pm0.0098 0.1067 ± 0.0098 for the softmax estimate and 0.0969 ± 0.0055 0.0969 \pm0.0055 0.0969 ± 0.0055 for the local-frequency estimate. Over the entire test samples which includes points that fall outside the boundary region, however, softmax remains more accurate than the local estimate (0.0941 ± \pm ± 0.0054 versus 0.1058 ± \pm ± 0.0042). These results support using local calibration frequencies as a residual correction in selected regions, rather than as a replacement for the global prediction.
Local Adaptive Probability Estimation
This section presents LAPE in two parts. We first introduce the general LAPE method, which constructs a non-parametric residual correction for a pre-trained soft-classifier π ^ 0 \hat{\pi}_0 π ^ 0 . We then describe how to apply LAPE to existing post-hoc calibrators by treating their calibrated outputs as π ^ 0 \hat{\pi}_0 π ^ 0 under the shared calibration dataset D c a l \mathcal{D}_{\mathrm{cal}} D cal .
General Methodology
We introduce the general method of LAPE in three steps. We first describe how to identify the neighbors of a given test point. Then, we introduce the hybrid refinement, which fuses the global anchor with this local evidence to produce the final calibrated probability. Finally, we describe how to employ the adaptive optimization to solve for the correction parameters that minimize residual errors.
Step 1: Local evidence retrieval. Given a new test sample x x x and its feature embedding vector z z z , the first step of LAPE is to select samples from D c a l \mathcal{D}_{\mathrm{cal}} D cal that are geometrically close to x x x in the feature space. Specifically, let d i = ∥ z i − z ∥ 2 d_i = \lVert z_i-z\rVert_2 d i = ∥ z i − z ∥ 2 , i ∈ [ n ] i \in[n] i ∈ [ n ] . For any fixed m ∈ [ n ] m \in[n] m ∈ [ n ] , the set of m m m nearest neighbors N m ( x ) \mathcal{N}_m(x) N m ( x ) is defined by
N m ( x ) : = { i ∈ [ n ] : ∥ z − z i ∥ 2 ≤ d ( m ) } , \mathcal{N}_m(x) := \{i \in[n] : \lVert z-z_i\rVert_2 \le d_{(m)}\}, N m ( x ) := { i ∈ [ n ] : ∥ z − z i ∥ 2 ≤ d ( m ) } ,
where d ( m ) d_{(m)} d ( m ) denotes the m m m -th smallest value of { d i } i = 1 n \{d_i\}_{i=1}^n { d i } i = 1 n . By leveraging the local calibration dataset N m ( x ) \mathcal{N}_m(x) N m ( x ) , LAPE then computes the local empirical distribution as
p ~ 0 ( k ; x , m ) : = ∑ i ∈ N m ( x ) I ( y i = k ) + 1 / K m + 1 , k ∈ [ K ] , (1) \tilde{p}_0(k;x,m) := \frac{\sum_{i\in\mathcal{N}_m(x)} \mathbb{I}(y_i=k)+1/K}{m+1}, \qquad k\in[K], \tag*{(1)} p ~ 0 ( k ; x , m ) := m + 1 ∑ i ∈ N m ( x ) I ( y i = k ) + 1/ K , k ∈ [ K ] , (1)
where 1 / K 1/K 1/ K is a smoothing term to avoid zero probabilities.
Step 2: Hybrid refinement. Let π a n c h o r ( k ; x ) \pi^{\mathrm{anchor}}(k;x) π anchor ( k ; x ) be the anchor estimate of p ( k ; x ) p(k;x) p ( k ; x ) , k ∈ [ K ] k \in[K] k ∈ [ K ] . We focus on the case that
π a n c h o r ( k ; x ) = π ^ 0 ( k ; x ) . \pi^{\mathrm{anchor}}(k;x)=\hat{\pi}_0(k;x). π anchor ( k ; x ) = π ^ 0 ( k ; x ) .
The idea of hybrid refinement is that, if the base prediction π ^ 0 ( ⋅ ) \hat{\pi}_0(\cdot) π ^ 0 ( ⋅ ) is already reliable in many regions, then it is unnecessary to adopt a large local correction. For sparse regions where π ^ 0 ( ⋅ ) \hat{\pi}_0(\cdot) π ^ 0 ( ⋅ ) performs not satisfactorily, local frequencies may also be weakly supported, which means that over-reliance on the local evidence can further increase variance. Therefore, LAPE treats p ~ 0 ( k ; x , m ) \tilde{p}_0(k;x,m) p ~ 0 ( k ; x , m ) as a delicate residual correction signal rather than a replacement for the global anchor. Specifically, given a neighborhood size m ∈ [ n ] m \in[n] m ∈ [ n ] and a weight α ∈ [ 0 , 1 ] \alpha\in[0,1] α ∈ [ 0 , 1 ] , the calibrated probability of π ^ 0 ( k ; x ) \hat{\pi}_0(k;x) π ^ 0 ( k ; x ) is given by
p ^ ( k ; x , m , α ) : = ( 1 − α ) ⋅ π a n c h o r ( k ; x ) + α ⋅ p ~ 0 ( k ; x , m ) , k ∈ [ K ] . (2) \hat{p}(k;x,m,\alpha) := (1-\alpha)\cdot\pi^{\mathrm{anchor}}(k;x)+\alpha\cdot\tilde{p}_0(k;x,m), \qquad k\in[K]. \tag*{(2)} p ^ ( k ; x , m , α ) := ( 1 − α ) ⋅ π anchor ( k ; x ) + α ⋅ p ~ 0 ( k ; x , m ) , k ∈ [ K ] . (2)
In what follows, we describe how to choose m m m and α \alpha α adaptively.
Step 3: Adaptive hyperparameter selection. LAPE selects the hyperparameter vector ( m , α ) (m,\alpha) ( m , α ) by leveraging weighted leave-one-out (LOO) analysis. Specifically, for any fixed i ∈ [ n ] i \in[n] i ∈ [ n ] , we denote the LOO probability estimate of x i x_i x i by
p ( i ) ( y i ; x i , m , α ) : = ( 1 − α ) π a n c h o r ( y i ; x i ) + α p ~ − i ( y i ; x i , m ) . (3) p^{(i)}(y_i;x_i,m,\alpha):=(1-\alpha)\pi^{\mathrm{anchor}}(y_i;x_i)+\alpha\tilde{p}_{-i}(y_i;x_i,m). \tag*{(3)} p ( i ) ( y i ; x i , m , α ) := ( 1 − α ) π anchor ( y i ; x i ) + α p ~ − i ( y i ; x i , m ) . (3)
where p ~ − i ( k ; x i , m ) \tilde{p}_{-i}(k;x_i,m) p ~ − i ( k ; x i , m ) is the LOO local empirical distribution that
p ~ − i ( k ; x i , m ) : = ∑ j ∈ N m ( x ) ∖ { i } I ( y j = k ) + 1 / K m , k ∈ [ K ] . (4) \tilde{p}_{-i}(k;x_i,m):=\frac{\sum_{j\in\mathcal{N}_m(x)\setminus\{i\}}\mathbb{I}(y_j=k)+1/K}{m}, \qquad k\in[K]. \tag*{(4)} p ~ − i ( k ; x i , m ) := m ∑ j ∈ N m ( x ) ∖ { i } I ( y j = k ) + 1/ K , k ∈ [ K ] . (4)
Each calibration sample is weighted by its distance to the feature embedding of the test point x x x , i.e.,
w i ( m ) = exp ( − ∥ z − z i ∥ 2 2 / σ 2 ) ∑ j ∈ N m ( x ) exp ( − ∥ z − z j ∥ 2 2 / σ 2 ) . (5) w_i^{(m)}=\frac{\exp\left(-\lVert z-z_i\rVert_2^2/\sigma^2\right)}{\sum_{j\in\mathcal{N}_m(x)}\exp\left(-\lVert z-z_j\rVert_2^2/\sigma^2\right)}. \tag*{(5)} w i ( m ) = ∑ j ∈ N m ( x ) exp ( − ∥ z − z j ∥ 2 2 / σ 2 ) exp ( − ∥ z − z i ∥ 2 2 / σ 2 ) . (5)
Algorithm 1 Local Adaptive Probability Estimation
Input: Test sample x x x , calibration set D c a l = { ( x i , y i ) } i = 1 n \mathcal{D}_{\mathrm{cal}} = \{(x_i,y_i)\}_{i=1}^{n} D cal = {( x i , y i ) } i = 1 n , feature map ϕ \phi ϕ , anchor scores π a n c h o r ( x ) \pi^{\mathrm{anchor}}(x) π anchor ( x ) and { π a n c h o r ( x i ) } i = 1 n \{\pi^{\mathrm{anchor}}(x_i)\}_{i=1}^{n} { π anchor ( x i ) } i = 1 n , candidate grids M \mathcal{M} M and A \mathcal{A} A .
Output: Calibrated probability vector p ^ ( x ) \hat{p}(x) p ^ ( x ) .
Compute z = ϕ ( x ) z = \phi(x) z = ϕ ( x ) and z i = ϕ ( x i ) z_i = \phi(x_i) z i = ϕ ( x i ) , i ∈ [ n ] i \in[n] i ∈ [ n ] .
Compute the neighbor sets N m ( x ) \mathcal{N}_m(x) N m ( x ) for all m ∈ M m \in\mathcal{M} m ∈ M .
Set σ = d ( ⌊ n / 2 ⌋ ) \sigma= d(\lfloor\sqrt{n}/2\rfloor) σ = d (⌊ n /2 ⌋) , the distance from z z z to its ⌊ n / 2 ⌋ \lfloor\sqrt{n}/2\rfloor ⌊ n /2 ⌋ -th nearest calibration embedding.
for m ∈ M m \in\mathcal{M} m ∈ M and α ∈ A \alpha\in\mathcal{A} α ∈ A do
Initialize L ( m , α ) ← 0 L(m,\alpha) \leftarrow0 L ( m , α ) ← 0 .
for i ∈ N m ( x ) i \in\mathcal{N}_m(x) i ∈ N m ( x ) do
Compute the local weight w i ( m ) ( x ) w_i^{(m)}(x) w i ( m ) ( x ) as in (5).
Compute the leave-one-out local frequency p ~ − i ( k ; x i , m ) \tilde{p}_{-i}(k;x_i,m) p ~ − i ( k ; x i , m ) as in (4).
Compute p ^ ( i ) ( y i ; x i , m , α ) \hat{p}^{(i)}(y_i;x_i,m,\alpha) p ^ ( i ) ( y i ; x i , m , α ) as in (3).
Update
L ( m , α ) ← L ( m , α ) − w i ( m ) ( x ) log p ^ ( i ) ( y i ; x i , m , α ) L(m,\alpha) \leftarrow L(m,\alpha) - w_i^{(m)}(x)\log\hat{p}^{(i)}(y_i;x_i,m,\alpha) L ( m , α ) ← L ( m , α ) − w i ( m ) ( x ) log p ^ ( i ) ( y i ; x i , m , α ) .
end for
end for
Select ( m ∗ , α ∗ ) = arg min m ∈ M , α ∈ A L ( m , α ) (m^*,\alpha^*) = \arg\min_{m\in\mathcal{M},\alpha\in\mathcal{A}} L(m,\alpha) ( m ∗ , α ∗ ) = arg min m ∈ M , α ∈ A L ( m , α ) .
Compute p ^ ( k ; x ) \hat{p}(k;x) p ^ ( k ; x ) as in (7), k ∈ [ K ] k \in[K] k ∈ [ K ] .
Return p ^ ( x ) = ( p ^ ( 1 ; x ) , … , p ^ ( K ; x ) ) \hat{p}(x) = (\hat{p}(1;x),\ldots,\hat{p}(K;x)) p ^ ( x ) = ( p ^ ( 1 ; x ) , … , p ^ ( K ; x )) .
where σ = d ( ⌊ n / 2 ⌋ ) \sigma= d(\lfloor\sqrt{n}/2\rfloor) σ = d (⌊ n /2 ⌋) is the bandwidth. We optimize m m m over the grid M = { M min , … , M max } ⊆ [ n ] \mathcal{M} = \{M_{\min},\ldots,M_{\max}\} \subseteq[n] M = { M m i n , … , M m a x } ⊆ [ n ] , where M min M_{\min} M m i n and M max M_{\max} M m a x have the same order O ( n ) O(\sqrt{n}) O ( n ) . In practice, we simply set M min = ⌊ n / 10 ⌋ M_{\min} = \lfloor\sqrt{n}/10\rfloor M m i n = ⌊ n /10 ⌋ and M max = ⌊ n / 2 ⌋ M_{\max} = \lfloor\sqrt{n}/2\rfloor M m a x = ⌊ n /2 ⌋ . Finally, the hyperparameter vector ( m ∗ , α ∗ ) (m^*,\alpha^*) ( m ∗ , α ∗ ) is adaptively determined by minimizing the density-weighted negative log-likelihood:
( m ∗ , α ∗ ) = arg min m ∈ M , α ∈ [ 0 , 1 ] ∑ i ∈ N m ( x ) − w i ( m ) log ( p ^ ( i ) ( y i ; x i , m , α ) ) . (6) (m^*,\alpha^*) = \arg\min_{m\in\mathcal{M},\alpha\in[0,1]} \sum_{i\in\mathcal{N}_m(x)} -w_i^{(m)}\log\left(\hat{p}^{(i)}(y_i;x_i,m,\alpha)\right). \tag*{(6)} ( m ∗ , α ∗ ) = arg m ∈ M , α ∈ [ 0 , 1 ] min i ∈ N m ( x ) ∑ − w i ( m ) log ( p ^ ( i ) ( y i ; x i , m , α ) ) . (6)
Correspondingly, the final calibrated estimate p ^ ( x ) : = ( p ^ ( 1 ; x ) , … , p ^ ( K ; x ) ) \hat{p}(x) := (\hat{p}(1;x),\ldots,\hat{p}(K;x)) p ^ ( x ) := ( p ^ ( 1 ; x ) , … , p ^ ( K ; x )) satisfies
p ^ ( k ; x ) = ( 1 − α ∗ ) ⋅ π a n c h o r ( k ; x ) + α ∗ ⋅ p ~ 0 ( k ; x , m ∗ ) , k ∈ [ K ] . (7) \hat{p}(k;x) = (1-\alpha^*)\cdot\pi^{\mathrm{anchor}}(k;x) + \alpha^*\cdot\tilde{p}_0(k;x,m^*),\quad k\in[K]. \tag*{(7)} p ^ ( k ; x ) = ( 1 − α ∗ ) ⋅ π anchor ( k ; x ) + α ∗ ⋅ p ~ 0 ( k ; x , m ∗ ) , k ∈ [ K ] . (7)
The proposed method is summarized in Algorithm 1.
Applying LAPE to Calibrators with Shared Calibration Dataset
By (7), the quality of the global anchor π ^ 0 ( x ) \hat{\pi}_0(x) π ^ 0 ( x ) is important to the calibrated p ^ ( x ) \hat{p}(x) p ^ ( x ) . Directly taking the softmax probability vector of a neural network as π ^ 0 ( x ) \hat{\pi}_0(x) π ^ 0 ( x ) is concerning, as it usually fails to provide a reasonable estimate of ( p ( 1 ; x ) , … , p ( K ; x ) ) (p(1;x),\ldots,p(K;x)) ( p ( 1 ; x ) , … , p ( K ; x )) . An appealing solution is to apply LAPE to already calibrated estimates. For example, we can take the result of VS as π ^ 0 ( x ) \hat{\pi}_0(x) π ^ 0 ( x ) . The remaining concern is that existing confidence calibration methods also need a calibration dataset, and reuse the same set D c a l \mathcal{D}_{\mathrm{cal}} D cal for fitting π ^ 0 ( k ; x ) \hat{\pi}_0(k;x) π ^ 0 ( k ; x ) and constructing p ^ ( k ; x ) \hat{p}(k;x) p ^ ( k ; x ) will result in calibration-set overfitting. A direct idea is to split D c a l \mathcal{D}_{\mathrm{cal}} D cal into two disjoint parts, but this strategy often comes at the cost of sacrificing the utilization of the calibration set. To tackle this, we introduce a V V V -fold cross-fitting strategy as follows.
Specifically, we first partition D c a l \mathcal{D}_{\mathrm{cal}} D cal into V V V disjoint subsets { D c a l ( v ) , v = 1 , … , V } \{\mathcal{D}_{\mathrm{cal}}^{(v)}, v=1,\ldots,V\} { D cal ( v ) , v = 1 , … , V } . For each fold D c a l ( v ) \mathcal{D}_{\mathrm{cal}}^{(v)} D cal ( v ) , we first calibrate π ^ 0 \hat{\pi}_0 π ^ 0 on the set D c a l ∖ D c a l ( v ) \mathcal{D}_{\mathrm{cal}}\setminus\mathcal{D}_{\mathrm{cal}}^{(v)} D cal ∖ D cal ( v ) to obtain a calibrated soft-classifier f c a l : X → Δ K − 1 f_{\mathrm{cal}}:\mathcal{X}\to\Delta^{K-1} f cal : X → Δ K − 1 . We then apply f c a l f_{\mathrm{cal}} f cal to the hold-out calibration dataset D c a l ( v ) \mathcal{D}_{\mathrm{cal}}^{(v)} D cal ( v ) . That is, we take π a n c h o r ( x i ) = ( π a n c h o r ( 1 ; x i ) , … , π a n c h o r ( K ; x i ) ) \pi^{\mathrm{anchor}}(x_i)=(\pi^{\mathrm{anchor}}(1;x_i),\ldots,\pi^{\mathrm{anchor}}(K;x_i)) π anchor ( x i ) = ( π anchor ( 1 ; x i ) , … , π anchor ( K ; x i )) as
π a n c h o r ( x i ) = f c a l ( x i ; π ^ 0 , D c a l ∖ D c a l ( v ) ) , ∀ ( x i , y i ) ∈ D c a l ( v ) , v = 1 , … , V . \pi^{\mathrm{anchor}}(x_i)=f_{\mathrm{cal}}\left(x_i;\hat{\pi}_0,\mathcal{D}_{\mathrm{cal}}\setminus\mathcal{D}_{\mathrm{cal}}^{(v)}\right),\quad\forall(x_i,y_i)\in\mathcal{D}_{\mathrm{cal}}^{(v)},\quad v=1,\ldots,V. π anchor ( x i ) = f cal ( x i ; π ^ 0 , D cal ∖ D cal ( v ) ) , ∀ ( x i , y i ) ∈ D cal ( v ) , v = 1 , … , V .
This ensures that the prediction function for the point x i x_i x i is independent of ( x i , y i ) (x_i,y_i) ( x i , y i ) , i ∈ [ n ] i\in[n] i ∈ [ n ] . For the test point x x x , due to its independence from D c a l \mathcal{D}_{\mathrm{cal}} D cal , the calibrated function is fitted on the whole set D c a l \mathcal{D}_{\mathrm{cal}} D cal :
π a n c h o r ( x ) = f c a l ( x ; π ^ 0 , D c a l ) . \pi^{\mathrm{anchor}}(x)=f_{\mathrm{cal}}(x;\hat{\pi}_0,\mathcal{D}_{\mathrm{cal}}). π anchor ( x ) = f cal ( x ; π ^ 0 , D cal ) .
The remaining steps are identical to subsection 3.1.
Algorithm 2 LAPE with Cascade Feature Augmentation Fusion
Input: Test sample x x x , soft-classifiers { π ^ 0 ( r ) , ϕ ( r ) } r = 1 R \{\hat{\pi}_0^{(r)}, \phi^{(r)}\}_{r=1}^{R} { π ^ 0 ( r ) , ϕ ( r ) } r = 1 R , calibration set D c a l \mathcal{D}_{\mathrm{cal}} D cal , search grid A \mathcal{A} A .
Output: Calibrated probability vector p ^ ( x ) \hat{p}(x) p ^ ( x ) .
Compute out-of-fold calibrated view predictions { q ^ i ( r ) , o o f } \{\hat{q}_i^{(r),\mathrm{oof}}\} { q ^ i ( r ) , oof } on D c a l \mathcal{D}_{\mathrm{cal}} D cal .
Compute fusion weights w ∗ w^* w ∗ by (8).
Fit view-level calibrators on the full D c a l \mathcal{D}_{\mathrm{cal}} D cal and compute π C F A F a n c h o r ( x ) \pi_{\mathrm{CFAF}}^{\mathrm{anchor}}(x) π CFAF anchor ( x ) by (9).
Construct joint features z i j o i n t = [ z i ( 1 ) ⊕ ⋯ ⊕ z i ( R ) ] z_i^{\mathrm{joint}} = [z_i^{(1)} \mathbin{\oplus} \cdots\mathbin{\oplus} z_i^{(R)}] z i joint = [ z i ( 1 ) ⊕ ⋯ ⊕ z i ( R ) ] for i ∈ [ n ] i \in[n] i ∈ [ n ] and z j o i n t = [ z ( 1 ) ⊕ ⋯ ⊕ z ( R ) ] z^{\mathrm{joint}} = [z^{(1)} \mathbin{\oplus} \cdots\mathbin{\oplus} z^{(R)}] z joint = [ z ( 1 ) ⊕ ⋯ ⊕ z ( R ) ] .
Compute z ~ i = Ψ ( z i j o i n t ; D c a l ) \tilde{z}_i = \Psi(z_i^{\mathrm{joint}};\mathcal{D}_{\mathrm{cal}}) z ~ i = Ψ ( z i joint ; D cal ) , i ∈ [ n ] i \in[n] i ∈ [ n ] , and z ~ = Ψ ( z j o i n t ; D c a l ) \tilde{z} = \Psi(z^{\mathrm{joint}};\mathcal{D}_{\mathrm{cal}}) z ~ = Ψ ( z joint ; D cal ) .
Apply LAPE to π C F A F a n c h o r ( x ) \pi_{\mathrm{CFAF}}^{\mathrm{anchor}}(x) π CFAF anchor ( x ) and { ( z ~ i , y i ) } i = 1 n \{(\tilde{z}_i,y_i)\}_{i=1}^{n} {( z ~ i , y i ) } i = 1 n as in (10) to compute p ^ ( k ; x ) \hat{p}(k;x) p ^ ( k ; x ) , k ∈ [ K ] k \in[K] k ∈ [ K ] .
Return p ^ ( x ) \hat{p}(x) p ^ ( x ) .
Extension to Multi-View Scenarios
For many applications, object may be described by several feature groups or multiple modalities; we refer to these as multi-view scenarios. It is common in post-hoc deployment that the view-specific soft-classifiers have already been trained, and retraining an end-to-end interaction model may be costly or infeasible. Given a shared held-out calibration dataset D c a l \mathcal{D}_{\mathrm{cal}} D cal , a naive calibration strategy is late fusion, which calibrates each view separately and then averages them to obtain a final calibrated probability [36 , 44 , 4 ] . However, this strategy operates on predictors that are trained separately for each view, which can miss cross-view interactions. The Cascade Feature Augmentation Fusion (CFAF) is designed to tackle this problem.
Let each input be observed through R R R views: x = ( x ( 1 ) , … , x ( R ) ) x = (x^{(1)}, \ldots, x^{(R)}) x = ( x ( 1 ) , … , x ( R ) ) . For each view r ∈ [ R ] r \in[R] r ∈ [ R ] , let π ^ 0 ( r ) : X ( r ) → Δ K − 1 \hat{\pi}_0^{(r)} : \mathcal{X}^{(r)} \to\Delta^{K-1} π ^ 0 ( r ) : X ( r ) → Δ K − 1 be the frozen view-specific soft-classifier and let z ( r ) = ϕ ( r ) ( x ( r ) ) z^{(r)} = \phi^{(r)}(x^{(r)}) z ( r ) = ϕ ( r ) ( x ( r ) ) be its feature representation. For the test data x x x , we fit a post-hoc calibrator for each view and obtain calibrated view-level predictions
q ^ ( r ) ( x ) = f c a l ( r ) ( x ( r ) ; π ^ 0 ( r ) , D c a l ) , r ∈ [ R ] . \hat{q}^{(r)}(x) = f_{\mathrm{cal}}^{(r)}(x^{(r)};\hat{\pi}_0^{(r)},\mathcal{D}_{\mathrm{cal}}), \quad r \in[R]. q ^ ( r ) ( x ) = f cal ( r ) ( x ( r ) ; π ^ 0 ( r ) , D cal ) , r ∈ [ R ] .
Then we apply the V V V -fold cross-fitting strategy in Section 3.2 to compute q ^ i ( r ) , o o f \hat{q}_i^{(r),\mathrm{oof}} q ^ i ( r ) , oof , which represents the out-of-fold calibrated prediction of view r r r for x i x_i x i . We compute the fusion weights by
w ∗ = arg min w ∈ Δ R − ∑ i = 1 n log ( ∑ r = 1 R w r q ^ i ( r ) , o o f ( y i ) ) , Δ R = { w : w r ≥ 0 , ∑ r = 1 R w r = 1 } . (8) w^* = \underset{w \in\Delta_R}{\arg\min}\ -\sum_{i=1}^{n}\log\left(\sum_{r=1}^{R}w_r\hat{q}_i^{(r),\mathrm{oof}}(y_i)\right), \quad\Delta_R = \left\{w:w_r \ge0,\ \sum_{r=1}^{R}w_r = 1\right\}. \tag*{(8)} w ∗ = w ∈ Δ R arg min − i = 1 ∑ n log ( r = 1 ∑ R w r q ^ i ( r ) , oof ( y i ) ) , Δ R = { w : w r ≥ 0 , r = 1 ∑ R w r = 1 } . (8)
Therefore, the resulting CFAF anchor for a test sample is
π C F A F a n c h o r ( x ) = ∑ r = 1 R w r ∗ q ^ ( r ) ( x ) . (9) \pi_{\mathrm{CFAF}}^{\mathrm{anchor}}(x) = \sum_{r=1}^{R}w_r^*\hat{q}^{(r)}(x). \tag*{(9)} π CFAF anchor ( x ) = r = 1 ∑ R w r ∗ q ^ ( r ) ( x ) . (9)
CFAF then applies LAPE in a joint feature space rather than in any single view. Specifically, for i ∈ [ n ] i \in[n] i ∈ [ n ] , define the concatenated feature representation by z i j o i n t = [ z i ( 1 ) ⊕ ⋯ ⊕ z i ( R ) ] z_i^{\mathrm{joint}} = [z_i^{(1)} \mathbin{\oplus} \cdots\mathbin{\oplus} z_i^{(R)}] z i joint = [ z i ( 1 ) ⊕ ⋯ ⊕ z i ( R ) ] . For the test point x x x , write z j o i n t = [ z ( 1 ) ⊕ ⋯ ⊕ z ( R ) ] z^{\mathrm{joint}} = [z^{(1)} \mathbin{\oplus} \cdots\mathbin{\oplus} z^{(R)}] z joint = [ z ( 1 ) ⊕ ⋯ ⊕ z ( R ) ] . We apply a rectification map fitted on the calibration features to obtain z ~ i = Ψ ( z i j o i n t ; D c a l ) \tilde{z}_i = \Psi(z_i^{\mathrm{joint}};\mathcal{D}_{\mathrm{cal}}) z ~ i = Ψ ( z i joint ; D cal ) , i ∈ [ n ] i \in[n] i ∈ [ n ] , where Ψ \Psi Ψ denotes standardization, optionally followed by whitening. Write z ~ = Ψ ( z j o i n t ; D c a l ) \tilde{z} = \Psi(z^{\mathrm{joint}};\mathcal{D}_{\mathrm{cal}}) z ~ = Ψ ( z joint ; D cal ) . Using { ( z ~ i , y i ) } i = 1 n \{(\tilde{z}_i,y_i)\}_{i=1}^{n} {( z ~ i , y i ) } i = 1 n for neighbor retrieval, CFAF computes the same local empirical distribution as LAPE:
p ~ 0 ( k ; x , m ) = ∑ i ∈ N m ( z ~ ) I ( y i = k ) + 1 / K m + 1 , k ∈ [ K ] . \tilde{p}_0(k;x,m) = \frac{\sum_{i \in\mathcal{N}_m(\tilde{z})}\mathbb{I}(y_i = k) + 1/K}{m+1}, \quad k \in[K]. p ~ 0 ( k ; x , m ) = m + 1 ∑ i ∈ N m ( z ~ ) I ( y i = k ) + 1/ K , k ∈ [ K ] .
With ( m ∗ , α ∗ ) (m^*,\alpha^*) ( m ∗ , α ∗ ) selected as in (6), the final CFAF prediction is
p ^ ( k ; x ) = ( 1 − α ∗ ) π C F A F a n c h o r ( k ; x ) + α ∗ p ~ 0 ( k ; x , m ∗ ) , k ∈ [ K ] . (10) \hat{p}(k;x) = (1-\alpha^*)\pi_{\mathrm{CFAF}}^{\mathrm{anchor}}(k;x) + \alpha^*\tilde{p}_0(k;x,m^*), \quad k \in[K]. \tag*{(10)} p ^ ( k ; x ) = ( 1 − α ∗ ) π CFAF anchor ( k ; x ) + α ∗ p ~ 0 ( k ; x , m ∗ ) , k ∈ [ K ] . (10)
The CFAF method is summarized in Algorithm 2.
Theoretical Results
In this section, we first establish the asymptotic consistency of LAPE; detailed proofs are deferred to Appendix § 10 . Then we provide a geometric interpretation of its finite-sample behavior.
We regard consistency as an important statistical property needed by a post-hoc calibration framework. That is, as the size of calibration dataset n n n tends to infinity, the estimated probability vector should converge in probability to its true conditional distribution. Specifically, let
p ( x ) : = ( p ( 1 ; x ) , … , p ( K ; x ) ) = ( P ( Y = 1 ∣ X = x ) , … , P ( Y = K ∣ X = x ) ) . p(x) := (p(1; x), \ldots, p(K; x)) = (\mathbb{P}(Y = 1 \mid X = x), \ldots, \mathbb{P}(Y = K \mid X = x)). p ( x ) := ( p ( 1 ; x ) , … , p ( K ; x )) = ( P ( Y = 1 ∣ X = x ) , … , P ( Y = K ∣ X = x )) .
Rewrite the calibrated estimate vector p ^ ( x ) \hat{p}(x) p ^ ( x ) under D c a l \mathcal{D}_{\mathrm{cal}} D cal by p ^ n ( x ) \hat{p}_n(x) p ^ n ( x ) . Theorem 5.1 demonstrates that, under regular assumptions (Assumptions B.2–B.7; see Appendix § 10 .§ 2 ), the proposed estimator p ^ n ( x ) \hat{p}_n(x) p ^ n ( x ) satisfies p ^ n ( x ) → p ( x ) \hat{p}_n(x) \to p(x) p ^ n ( x ) → p ( x ) in probability as n → ∞ n \to\infty n → ∞ .
Theorem 5.1 (Consistency of LAPE). Let x ∈ X x \in\mathcal{X} x ∈ X be a test sample with unobserved label y y y . Suppose that D c a l ∪ { ( x , y ) } \mathcal{D}_{\mathrm{cal}} \cup\{(x, y)\} D cal ∪ {( x , y )} are i.i.d. Let p ^ n ( x ) \hat{p}_n(x) p ^ n ( x ) denote the LAPE estimator defined by (7) when constructed from a calibration set of size n n n . Under Assumptions B.2–B.7, the estimator p ^ n ( x ) \hat{p}_n(x) p ^ n ( x ) is asymptotically consistent. That is, for any fixed ε > 0 \varepsilon> 0 ε > 0 ,
lim n → ∞ P ( ∥ p ^ n ( x ) − p ( x ) ∥ 2 > ε ) = 0 , \lim_{n \to\infty} \mathbb{P}\left(\lVert\hat{p}_n(x) - p(x)\rVert_2 > \varepsilon\right) = 0, n → ∞ lim P ( ∥ p ^ n ( x ) − p ( x ) ∥ 2 > ε ) = 0 , where ∥ ⋅ ∥ 2 \lVert\cdot\rVert_2 ∥ ⋅ ∥ 2 denotes the Euclidean norm.
Geometric Interpretation. The term p ~ 0 ( k ; x , m ) \tilde{p}_0(k; x, m) p ~ 0 ( k ; x , m ) given by (1) can be regarded as a smoothed local frequency that estimates the local conditional class probability around the test point x x x . The bias is therefore controlled by how much the conditional probability changes inside the retrieved neighborhood. Specifically, let B σ ( z ) B_{\sigma}(z) B σ ( z ) be the neighborhood of radius σ ( x ) \sigma(x) σ ( x ) around z = ϕ ( x ) z = \phi(x) z = ϕ ( x ) . Ignoring the O ( 1 / m ) O(1/m) O ( 1/ m ) contribution from Laplace smoothing, the geometric component of the local estimation bias satisfies
Bias ( x ) ≤ sup ϕ ( x ′ ) ∈ B σ ( z ) ∥ p ( x ′ ) − p ( x ) ∥ 2 ≤ L p ⋅ σ ( x ) . \operatorname{Bias}(x) \le\sup_{\phi(x') \in B_{\sigma}(z)} \lVert p(x') - p(x) \rVert_2 \le L_p \cdot\sigma(x). Bias ( x ) ≤ ϕ ( x ′ ) ∈ B σ ( z ) sup ∥ p ( x ′ ) − p ( x ) ∥ 2 ≤ L p ⋅ σ ( x ) .
where Bias ( x ) \operatorname{Bias}(x) Bias ( x ) denotes the unsmoothed geometric bias and L p L_p L p is a local Lipschitz constant of the conditional probability map in B σ ( z ) B_{\sigma}(z) B σ ( z ) . Thus, local refinement is reliable when nearby points have similar conditional probabilities. When the neighborhood mixes regions with different class probabilities, the local frequency can be biased; LAPE can then shrink the neighborhood or reduce the interpolation weight, relying more on the anchor prediction. Table 5 in Appendix § 12 .§ 2 supports this interpretation: LAPE is closer to the true probability in locally smooth neighborhoods, whereas the oracle gap increases when neighborhood variation is large.
Table 5. Oracle neighborhood-variation diagnostic in a fixed feature space. Test points are ranked by oracle neighborhood variation V k ( x ) V_k(x) V k ( x ) with fixed diagnostic size k = 80 k = 80 k = 80 . The table reports the bottom 30% and top 30% groups, averaged over five seeds. Lower local bias, MAE, and KL are better; V k ( x ) V_k(x) V k ( x ) is a diagnostic variation score. The oracle neighborhood-variation score is defined below; local bias, MAE, and KL are assessed relative to the known oracle conditional probabilities.
Experimental Results
In this section, we present the experimental results of LAPE and other baselines on diverse datasets and neural network architectures. We aim to demonstrate that the performance of confidence calibration of existing baselines can be enhanced by leveraging LAPE. Codes can be found at https://github.com/AltonWongsource/residual-calibration.
Experimental Setup
We introduce the main information about the experiments; detailed settings and additional results such as ablation studies are presented in Appendix § 11 and D, respectively.
Datasets. For the main result in Figure 2 , we evaluate our framework on four datasets that encompass both tabular and image categories. For tabular data, we consider Obesity Risk [32 ] . For image data, we consider CIFAR-100 [21 ] and two medical-image datasets: BreastMNIST [47 ] and MHIST [43 ] . We also evaluate the proposed method on many other datasets; see Appendix § 11 .§ 1 for full descriptions.
Figure 2. Paired comparison of LAPE-side refinement across calibration anchors. Each anchor and its LAPE refinement are evaluated under the same dataset and backbone. Rows report NLL, ECE, and accuracy. Bar annotations show relative changes, computed as ( v a n c h o r − v L A P E ) / v a n c h o r × 100 % (v_{\mathrm{anchor}}-v_{\mathrm{LAPE}})/v_{\mathrm{anchor}}\times100\% ( v anchor − v LAPE ) / v anchor × 100% for NLL/ECE and ( v L A P E − v a n c h o r ) / v a n c h o r × 100 % (v_{\mathrm{LAPE}}-v_{\mathrm{anchor}})/v_{\mathrm{anchor}}\times100\% ( v LAPE − v anchor ) / v anchor × 100% for accuracy.
Model Architectures For the tabular dataset, we use an MLP backbone. For medical transfer learning datasets, we use ImageNet-pretrained ResNet18 or DenseNet121 backbones. For CIFAR-100, we use ResNet50. Detailed settings are presented in Appendix § 11 .4.
Methods We consider four calibration baselines, including TS [14 ] , Vector Scaling (VS), FC [37 ] , and SAG [46 ] . We compare these methods with their adjusted version by LAPE. We named these adjusted baselines by TS+LAPE, VS+LAPE, FC+LAPE, and SAG+LAPE, respectively. Other baselines are also compared; see Appendix § 11 .§ 2 for details.
Evaluation. Let I 1 , … , I M I_1, \ldots, I_M I 1 , … , I M partition the confidence interval [ 0 , 1 ] [0,1] [ 0 , 1 ] . For i i i -th test point, let y ^ i = arg max y p ^ y ( x i ) \hat{y}_i = \operatorname{arg\,max}_{y} \hat{p}_y(x_i) y ^ i = arg max y p ^ y ( x i ) and c ^ i = max y p ^ y ( x i ) \hat{c}_i = \max_y \hat{p}_y(x_i) c ^ i = max y p ^ y ( x i ) be the predicted label and confidence, respectively. We evaluate calibration performance using two complementary metrics: Negative Log-Likelihood (NLL) [13 ] and Expected Calibration Error (ECE) [29 ] :
NLL = − 1 N ∑ i = 1 N log p ^ y i ( x i ) , ECE = ∑ m = 1 M ∣ B m ∣ N ∣ acc ( B m ) − conf ( B m ) ∣ . \operatorname{NLL} = -\frac{1}{N}\sum_{i=1}^{N}\log\hat{p}_{y_i}(x_i), \qquad\operatorname{ECE} = \sum_{m=1}^{M}\frac{|B_m|}{N}\left|\operatorname{acc}(B_m)-\operatorname{conf}(B_m)\right|. NLL = − N 1 i = 1 ∑ N log p ^ y i ( x i ) , ECE = m = 1 ∑ M N ∣ B m ∣ ∣ acc ( B m ) − conf ( B m ) ∣ .
where B m = { i : c ^ i ∈ I m } B_m = \{i : \hat{c}_i \in I_m\} B m = { i : c ^ i ∈ I m } , and
acc ( B m ) = 1 ∣ B m ∣ ∑ i ∈ B m 1 { y ^ i = y i } , conf ( B m ) = 1 ∣ B m ∣ ∑ i ∈ B m c ^ i . \operatorname{acc}(B_m) = \frac{1}{|B_m|}\sum_{i\in B_m}\mathbf{1}\{\hat{y}_i = y_i\}, \qquad\operatorname{conf}(B_m) = \frac{1}{|B_m|}\sum_{i\in B_m}\hat{c}_i. acc ( B m ) = ∣ B m ∣ 1 i ∈ B m ∑ 1 { y ^ i = y i } , conf ( B m ) = ∣ B m ∣ 1 i ∈ B m ∑ c ^ i .
Note that we report NLL since minimizing NLL is equivalent to minimizing the KL divergence to the true conditional distribution: E [ − log q ( Y ∣ X ) ] = E [ H ( P ( ⋅ ∣ X ) ) + KL ( P ( ⋅ ∣ X ) ∥ q ( ⋅ ∣ X ) ) ] \mathbb{E}[-\log q(Y\mid X)] = \mathbb{E}[H(P(\cdot\mid X))+\operatorname{KL}(P(\cdot\mid X)\mathbin{\|}q(\cdot\mid X))] E [ − log q ( Y ∣ X )] = E [ H ( P ( ⋅ ∣ X )) + KL ( P ( ⋅ ∣ X ) ∥ q ( ⋅ ∣ X ))] . The definition and results for ACE [30 ] are presented in Appendix § 11 .§ 3 and Appendix § 12 , respectively.
Results
LAPE improves existing post-hoc calibration methods. Figure 2 demonstrates that LAPE can further improve a range of existing post-hoc calibration methods. Across tabular MLPs, medical-image transfer models, and natural-image backbones, adding LAPE often reduces NLL and ECE while largely preserving accuracy. This supports the role of LAPE as a residual refinement module: it keeps the global calibrator as a stable anchor and uses nearby calibration samples to correct remaining local miscalibration. The gains are not uniform across all anchors and metrics, which is expected because the benefit of local refinement depends on both the quality of the anchor and the informativeness of the learned feature geometry.
CFAF-LAPE improves multi-view calibration. Table 1 examines whether local residual refinement remains useful in multi-view settings. Across all tasks, CFAF consistently improves NLL, ECE, and accuracy, and is much better than the late fusion strategy. This suggests that late fusion is insufficient if residual calibration errors depend on cross-view interactions. CFAF addresses this by forming a calibrated fusion anchor and applying local residual refinement in the rectified joint representation, without retraining an end-to-end fusion model.
Table 1. Results of CFAF-LAPE and late fusion on multi-view tasks.
Table 17. Full CFAF synthetic stress-test results.
Table 18. Real multi-view and multimodal CFAF results. Each block reports two single-view baselines, a late-fusion baseline, and CFAF-LAPE.
Robustness to calibration-set size. Figure 3 shows that VS+LAPE lowers NLL at every ratio, even while VS still improves with more data (Table 7 ). As more calibration data become available, its NLL decreases further; ECE and accuracy also show favorable overall trends despite small fluctuations. These results suggest that LAPE benefits from additional calibration data but does not require a large calibration set to improve the primary NLL metric.
Figure 3. Sensitivity to calibration data size (calibration ratio). NLL, ECE, and accuracy are reported, with shaded areas indicating standard deviations across five calibration split seeds.
Table 7. Sample-ratio sensitivity in the local-residual diagnostic. Each method cell reports NLL / ECE / accuracy (%) averaged over five calibration split seeds.
Summary of results in appendix. Appendix D provides additional evidence for the advantage of LAPE. The runtime study shows that the accelerated implementation keeps LAPE practical at inference time (Table 4 ). The heterogeneity and covariate-shift diagnostics show that LAPE is most useful when residual errors are structured in feature-space neighborhoods and when target-domain calibration samples reveal those errors; the CIFAR-10-C experiment further confirms this behavior under real-image corruption (Table 6 , Table 8 , and Table 9 ). The high-dimensional and structural-noise studies shows that, less reliable retrieval geometry can reduce the gains, but the refinement remains stable for most anchors (Table 10 and Table 11 ). The architecture-depth diagnostic shows that LAPE benefits from usable local structure across different MLP depths, and the ablation study verifies that both adaptive neighborhood selection and anchor–local interpolation contribute to the final gains (Table 12 and Table 13 ). The CLIP and training-time calibration experiments show that LAPE remains effective beyond standard post-hoc anchors, providing further refinement after prompt tuning, DAC calibration, and calibration-aware training objectives (Table 14 and Table 15 ). The cross-fitting experiment shows that out-of-fold anchor construction is more effective than direct reuse or simple data splitting when flexible anchors are used with limited calibration data (Table 16 ). The dynamic-fusion experiment further shows that CFAF-LAPE remains complementary to stronger learned multi-view fusion methods such as QMF and PDF (Table 19 ). Results on more datasets and backbones further demonstrate the advantage and generality of LAPE (Table 20 and Table 21 ).
Table 4. Multi-seed inference-time comparison between the naive and accelerated implementations. Latency is reported in milliseconds per sample as mean ± \pm ± standard deviation over five seeds. Lower latency is better, and higher speedup is better.
Table 6. Full local-heterogeneity stress-test results on the GMM manifold. All methods are evaluated under the controlled probability-distortion setting.
Table 8. Target-calibrated covariate-shift LAPE-side results. Entries are relative percentage changes versus the corresponding anchor, with positive values indicating improvement.
Table 9. CIFAR-10-C Gaussian-noise LAPE-side results. Entries are relative percentage changes versus the corresponding anchor, with positive values indicating improvement. Severity levels 1, 3, and 5 represent increasingly strong Gaussian-noise corruption.
Table 10. Full high-dimensional stress-test results. Only LAPE-side refinements are reported for each feature dimension. Entries are relative percentage changes versus the corresponding anchor, with positive values indicating improvement.
Table 11. Full structural-noise results on the two-moons setting. Only LAPE-side refinements are reported at each noise level. Entries are relative percentage changes versus the corresponding anchor, with positive values indicating improvement.
Table 12.
Table 13.
Table 14. CoOp/DAC LAPE-side results on DTD. Entries are relative percentage changes versus the corresponding anchor, with positive values indicating improvement.
Table 15. Training-time calibration LAPE-side results on Obesity. Entries are relative percentage changes versus the corresponding anchor, with positive values indicating improvement.
Table 16. Cross-fitting versus data-splitting results. Results are reported as mean± \pm ± standard deviation over 20 independent seeds.
Table 19. Dynamic-fusion LAPE-side results on the multi-view digits benchmark. Entries are relative percentage changes versus the corresponding anchor, with positive values indicating improvement.
Table 20. Full tabular LAPE-side refinement results. Each dataset block reports relative percentage changes versus the corresponding anchor, with positive values indicating improvement; thus, + is better and − is worse for all Δ \Delta Δ columns.
Table 21. Combined visual transfer-learning LAPE-side results. Medical rows use ImageNet-pretrained ResNet18 or DenseNet121 feature spaces, and CIFAR rows use frozen ImageNet-pretrained ResNet50 features with a multinomial linear probe. Entries are relative percentage changes versus the corresponding anchor, with positive values indicating improvement; thus, + is better and − is worse for all Δ \Delta Δ columns.
Conclusion
We propose LAPE, a post-hoc residual calibration framework that refines global calibrated predictions with local feature-space evidence. Instead of replacing existing calibrators, LAPE treats their outputs as stable anchors and applies a non-parametric local correction using nearby calibration samples. To reduce calibration-set overfitting while retaining data efficiency, we introduce a V V V -fold cross-fitting strategy for constructing out-of-sample anchor scores on the calibration set. We further propose CFAF to extend the framework to multi-view scenarios. Theoretically, we establish the asymptotic consistency of LAPE under regular assumptions. Extensive experiments demonstrate that LAPE can improve the calibration quality of diverse post-hoc baselines while remaining practical under varying calibration set sizes and distribution shifts. We expect that the proposed LAPE can serve as a basic tool towards reliable, data-efficient, and geometry-aware probability calibration.
Limitation. Although LAPE provides a flexible residual refinement framework for post-hoc calibration, its effectiveness depends on the quality of the learned feature geometry. When nearby samples in feature space do not share similar conditional label distributions, local frequency estimates may become biased and the method should rely more heavily on the global anchor. Future work may study more robust retrieval metrics. Furthermore, extending local residual refinement to other confidence representations, such as verbalized confidence in large reasoning models [42 ] , remains an interesting direction for future work.
Acknowledgments and Disclosure of Funding
This research is supported by the Zhejiang Provincial Peak Discipline Program (Statistics, Zhejiang Gongshang University), the Collaborative Innovation Center of Zhejiang Gongshang University, and the Southern University of Science and Technology.
Related Work
Global score-based post-hoc calibration. Post-hoc calibration aims to improve the reliability of a trained classifier without retraining the base model. Classical methods in this family include Temperature Scaling (TS), Vector Scaling (VS), Matrix Scaling (MS), Beta Calibration, Dirichlet Calibration, and ensemble or compositional variants such as Ensemble Temperature Scaling (ETS) [14 , 22 , 23 , 52 ] . These methods are widely used because they are simple, stable, and require only a held-out calibration set. They preserve the learned classifier and usually fit only a small number of calibration parameters, which makes them practical for modern neural networks and transfer-learning pipelines. However, their corrections are mainly determined by logits, confidence scores, or low-dimensional transformations of the predicted probability vector. As a result, examples with similar score patterns tend to receive similar corrections, even when they lie in different regions of the learned feature space and have different empirical reliability. Thus, global score-based calibrators can improve average calibration but may still leave spatially structured residual errors, especially near decision boundaries, rare subpopulations, or locally mixed regions.
Adaptive parametric and group-wise calibration maps. A natural way to address the rigidity of global score transformations is to increase the expressiveness of the calibration map. Parameterized Temperature Scaling (PTS) predicts a sample-specific temperature from the logit vector [38 ] , while Sample-Dependent Adaptive Temperature Scaling (AdaTS) assigns different temperatures to different inputs [18 ] . Local Temperature Scaling (LTS) further makes temperature spatially local by predicting pixel- or voxel-level temperature values for semantic segmentation [10 ] . Semantic-Aware Grouping (SAG) follows a group-wise route: it learns a semantic grouping function from frozen deep features and logits, partitions the data into semantic subsets, and fits a separate calibrator within each group [46 ] . These methods are important steps toward instance-dependent, spatially adaptive, or group-wise calibration. Nevertheless, their adaptivity is obtained by fitting additional calibration components, such as neural temperature predictors, local temperature fields, or semantic grouping heads. Such extra degrees of freedom require regularization, hyperparameter selection, and sufficient held-out calibration data. Indeed, recent studies on adaptive temperature scaling observe that highly expressive calibrators can perform well when calibration data are abundant, but may become fragile under limited calibration samples [3 ] . This motivates a different route: instead of learning a richer parametric calibration map, LAPE keeps a global calibrated anchor fixed and uses held-out reference labels only as non-parametric local residual evidence.
Non-parametric score-level calibration. Non-parametric calibration has a long history in classifier probability estimation. Histogram binning estimates empirical label frequencies within score bins, while isotonic regression learns a monotone score-to-probability map [50 , 51 ] . Bayesian Binning into Quantiles (BBQ) improves histogram binning by averaging over multiple quantile-binning models [29 ] . For multiclass calibration, IROvA extends binary isotonic regression by fitting one class-wise monotone map for each one-vs-all problem, while multiclass isotonic regression, also referred to as MIR or IRM, improves data efficiency by pooling probability-label entries from all classes and learning a shared monotone map [52 ] . Scaling-binning calibrators further combine parametric scaling with binning to balance calibration guarantees and sample efficiency [24 ] . These methods provide flexible alternatives to global parametric maps, but their flexibility is still mainly defined over scalar scores, confidence bins, class-wise probabilities, or probability-vector entries. They do not directly exploit the geometry of the learned feature space. Moreover, when used as stand-alone local or partition-based probability estimators, they can be data-inefficient in finite calibration samples and may discard useful information already encoded in the neural network logits.
Position of LAPE. LAPE combines the stability of global post-hoc calibration with the flexibility of local non-parametric evidence. Unlike global score transformations, it can distinguish examples with similar logits but different feature-space neighborhoods. Unlike adaptive parametric or group-wise calibrators, it does not learn a new temperature predictor, spatial temperature map, or semantic partition. Unlike score-level non-parametric methods, its local evidence is defined by neighboring reference samples in the learned feature space rather than by score bins or probability entries. The local empirical distribution is therefore used only as a residual correction to a stable global anchor, not as a replacement for the classifier output. Under regularity conditions, this anchor-preserving local refinement yields a consistent estimator of the conditional class probability.
Table 2 summarizes the main families of confidence calibration methods considered in this work and highlights the methodological position of LAPE.
Table 2. Main families of confidence calibration methods and the position of LAPE. The comparison focuses on how each method family obtains calibration adaptivity and whether it directly uses feature-space reference-label evidence.
Technical Proofs
In this section, we provide the necessary assumptions and the proof of Theorem 5.1 .
Notations
We use the notation introduced in § 2 and § 3 . In particular, D c a l = { ( x i , y i ) } i = 1 n D_{\mathrm{cal}} = \{(x_i, y_i)\}_{i=1}^{n} D cal = {( x i , y i ) } i = 1 n is the calibration set, z i = ϕ ( x i ) z_i = \phi(x_i) z i = ϕ ( x i ) and z = ϕ ( x ) z = \phi(x) z = ϕ ( x ) are the feature embeddings, N m ( x ) \mathcal{N}_m(x) N m ( x ) is the m m m -nearest-neighbor set in the feature space, p ~ 0 ( x , m ) \widetilde{p}_0(x,m) p 0 ( x , m ) is the smoothed local empirical probability vector, π a n c h o r ( x ) \pi^{\mathrm{anchor}}(x) π anchor ( x ) is the anchor probability vector, and p ^ n ( x ) \widehat{p}_n(x) p n ( x ) denotes the final LAPE estimator constructed from a calibration set of size n n n .
For the proof, we make the following n n n -dependent notation explicit. Let P X P_X P X denote the marginal distribution of X X X . For the retrieval embedding Z = ϕ ( X ) Z = \phi(X) Z = ϕ ( X ) , let p Z p_Z p Z and p Z p_Z p Z denote its marginal distribution and density, respectively, and let Z ⊂ R d z \mathcal{Z} \subset\mathbb{R}^{d_z} Z ⊂ R d z denote the support of Z Z Z . Let
d i ( x ) : = ∥ z i − z ∥ 2 , d_i(x) := \lVert z_i - z \rVert_2, d i ( x ) := ∥ z i − z ∥ 2 ,
and let d ( r ) ( x ) d_{(r)}(x) d ( r ) ( x ) denote the r r r -th smallest value among { d i ( x ) } i = 1 n \{d_i(x)\}_{i=1}^{n} { d i ( x ) } i = 1 n . We write
m σ , n : = ⌊ n 2 ⌋ , σ n : = d ( m σ , n ) ( x ) . m_{\sigma,n} := \left\lfloor\frac{\sqrt{n}}{2} \right\rfloor, \qquad\sigma_n := d_{(m_{\sigma,n})}(x). m σ , n := ⌊ 2 n ⌋ , σ n := d ( m σ , n ) ( x ) .
Let M n \mathcal{M}_n M n and A n \mathcal{A}_n A n denote the candidate grids for the neighborhood size and interpolation weight, respectively, and write
m min , n : = min M n . m_{\min,n} := \min\mathcal{M}_n. m m i n , n := min M n .
The selected candidate is denoted by
( m n ∗ , α n ∗ ) ∈ arg min m ∈ M n , α ∈ A n J n ( x ; m , α ) , (m_n^*,\alpha_n^*) \in\mathop{\arg\min}_{m\in\mathcal{M}_n,\ \alpha\in\mathcal{A}_n} \mathcal{J}_n(x;m,\alpha), ( m n ∗ , α n ∗ ) ∈ arg min m ∈ M n , α ∈ A n J n ( x ; m , α ) ,
where J n ( x ; m , α ) \mathcal{J}_n(x;m,\alpha) J n ( x ; m , α ) is the local weighted leave-one-out negative log-likelihood. Thus,
p ^ n ( x ) = p ^ n ( x ; m n ∗ , α n ∗ ) , \widehat{p}_n(x) = \widehat{p}_n(x;m_n^*,\alpha_n^*), p n ( x ) = p n ( x ; m n ∗ , α n ∗ ) ,
where p ^ n ( x ; m , α ) \widehat{p}_n(x;m,\alpha) p n ( x ; m , α ) denotes the corresponding LAPE candidate before inserting the selected parameters.
Definition B.1 (Optimal Fused Bias). For a fixed test point x x x and candidate neighborhood size m m m , define the conditional mean of the local empirical probability vector by
p ‾ 0 ( x , m ) : = E { p ~ 0 ( x , m ) ∣ z 1 , … , z n } . \overline{p}_0(x,m) := \mathbb{E}\{\widetilde{p}_0(x,m)\mid z_1,\ldots,z_n\}. p 0 ( x , m ) := E { p 0 ( x , m ) ∣ z 1 , … , z n } . The optimal fused bias of LAPE is
Bias L A P E ( x ; m ) : = min α ∈ [ 0 , 1 ] ∥ ( 1 − α ) π a n c h o r ( x ) + α p ‾ 0 ( x , m ) − p ( x ) ∥ 2 . \operatorname{Bias}_{\mathrm{LAPE}}(x;m) := \min_{\alpha\in[0,1]} \left\|(1-\alpha)\pi^{\mathrm{anchor}}(x)+\alpha\overline{p}_0(x,m)-p(x)\right\|_2. Bias LAPE ( x ; m ) := α ∈ [ 0 , 1 ] min ( 1 − α ) π anchor ( x ) + α p 0 ( x , m ) − p ( x ) 2 . The smoothing term in p ~ 0 ( x , m ) \widetilde{p}_0(x,m) p 0 ( x , m ) is kept in the definition, but it is asymptotically negligible when m → ∞ m\to\infty m → ∞ .
Assumptions
Assumption B.2 (Regularity of Probability Space). For every x ∈ X x\in\mathcal{X} x ∈ X , the conditional distribution P ( Y ∣ X = x ) \mathbb{P}(Y\mid X=x) P ( Y ∣ X = x ) is well-defined, and p ( x ) ∈ Δ K − 1 p(x)\in\Delta^{K-1} p ( x ) ∈ Δ K − 1 . Moreover, the feature representation used for retrieval is compatible with the target conditional probability: there exists a measurable map p ϕ : Z → Δ K − 1 p_\phi:\mathcal{Z}\to\Delta^{K-1} p ϕ : Z → Δ K − 1 such that
p ( x ) = p ϕ ( ϕ ( x ) ) p(x)=p_\phi(\phi(x)) p ( x ) = p ϕ ( ϕ ( x )) for P X P_X P X -almost every x x x .
Assumption B.3 (Compact Support and Regularity). The retrieval support Z \mathcal{Z} Z is compact, and the density p Z p_{\mathcal{Z}} p Z is bounded away from zero and infinity on Z \mathcal{Z} Z :
0 < C min ≤ p Z ( z ) ≤ C max < ∞ , z ∈ Z . 0<C_{\min}\le p_{\mathcal{Z}}(z)\le C_{\max}<\infty,\qquad z\in\mathcal{Z}. 0 < C m i n ≤ p Z ( z ) ≤ C m a x < ∞ , z ∈ Z . Moreover, Z \mathcal{Z} Z satisfies a standard local volume regularity condition: there exist constants 0 < c v o l ≤ C v o l < ∞ 0<c_{\mathrm{vol}}\le C_{\mathrm{vol}}<\infty 0 < c vol ≤ C vol < ∞ and r 0 > 0 r_0>0 r 0 > 0 such that, for every z ∈ Z z\in\mathcal{Z} z ∈ Z and every 0 < r ≤ r 0 0<r\le r_0 0 < r ≤ r 0 ,
c v o l r d z ≤ Vol ( B ( z , r ) ∩ Z ) ≤ C v o l r d z . c_{\mathrm{vol}}r^{d_z}\le\operatorname{Vol}(B(z,r)\cap\mathcal{Z})\le C_{\mathrm{vol}}r^{d_z}. c vol r d z ≤ Vol ( B ( z , r ) ∩ Z ) ≤ C vol r d z .
Assumption B.4 (Lipschitz Continuity in the Retrieval Space). The marginal density p Z ( z ) p_{\mathcal{Z}}(z) p Z ( z ) and the conditional probability map p ϕ ( z ) p_\phi(z) p ϕ ( z ) are Lipschitz continuous on Z \mathcal{Z} Z . That is, there exist constants L Z < ∞ L_{\mathcal{Z}}<\infty L Z < ∞ and L p < ∞ L_p<\infty L p < ∞ such that, for all z , z ′ ∈ Z z,z'\in\mathcal{Z} z , z ′ ∈ Z ,
∣ p Z ( z ) − p Z ( z ′ ) ∣ ≤ L Z ∥ z − z ′ ∥ 2 , |p_{\mathcal{Z}}(z)-p_{\mathcal{Z}}(z')|\le L_{\mathcal{Z}}\|z-z'\|_2, ∣ p Z ( z ) − p Z ( z ′ ) ∣ ≤ L Z ∥ z − z ′ ∥ 2 , ∥ p ϕ ( z ) − p ϕ ( z ′ ) ∥ 2 ≤ L p ∥ z − z ′ ∥ 2 . \|p_\phi(z)-p_\phi(z')\|_2\le L_p\|z-z'\|_2. ∥ p ϕ ( z ) − p ϕ ( z ′ ) ∥ 2 ≤ L p ∥ z − z ′ ∥ 2 .
Assumption B.5 (Lipschitz Continuity of the Anchor Predictor). The anchor probability map π a n c h o r \pi^{\mathrm{anchor}} π anchor is Lipschitz continuous in the retrieval space. Specifically, there exists a constant L a n c h o r < ∞ L_{\mathrm{anchor}}<\infty L anchor < ∞ such that, for all x , x ′ ∈ X x,x'\in\mathcal{X} x , x ′ ∈ X ,
∥ π a n c h o r ( x ) − π a n c h o r ( x ′ ) ∥ 2 ≤ L a n c h o r ∥ ϕ ( x ) − ϕ ( x ′ ) ∥ 2 . \|\pi^{\mathrm{anchor}}(x)-\pi^{\mathrm{anchor}}(x')\|_2\le L_{\mathrm{anchor}}\|\phi(x)-\phi(x')\|_2. ∥ π anchor ( x ) − π anchor ( x ′ ) ∥ 2 ≤ L anchor ∥ ϕ ( x ) − ϕ ( x ′ ) ∥ 2 . Throughout the consistency proof, the anchor predictor is treated as a fixed function independent of the calibration labels.
Assumption B.6 (Bounded Negative Log-Likelihood). The local objective uses the negative log-likelihood L ( y , q ) = − log q y \mathcal{L}(y,q)=-\log q_y L ( y , q ) = − log q y . Assume that there exists a constant δ ∈ ( 0 , 1 / ( 2 K ) ) \delta\in(0,1/(2K)) δ ∈ ( 0 , 1/ ( 2 K )) such that
p ϕ , k ( z ) ≥ 2 δ for every z ∈ Z and k ∈ [ K ] , p_{\phi,k}(z)\ge2\delta\quad\text{for every }z\in\mathcal{Z}\text{ and }k\in[K], p ϕ , k ( z ) ≥ 2 δ for every z ∈ Z and k ∈ [ K ] , and the fixed anchor predictor satisfies
π k a n c h o r ( x ) ≥ 2 δ , x ∈ X , k ∈ [ K ] . \pi_k^{\mathrm{anchor}}(x)\ge2\delta,\qquad x\in\mathcal{X},\quad k\in[K]. π k anchor ( x ) ≥ 2 δ , x ∈ X , k ∈ [ K ] . Define the truncated log-loss L δ ( y , q ) = − log ( max { q y , δ } ) \mathcal{L}_\delta(y,q)=-\log(\max\{q_y,\delta\}) L δ ( y , q ) = − log ( max { q y , δ }) . Then
0 ≤ L δ ( y , q ) ≤ C δ : = − log δ < ∞ . 0\le\mathcal{L}_\delta(y,q)\le C_\delta:=-\log\delta<\infty. 0 ≤ L δ ( y , q ) ≤ C δ := − log δ < ∞. The truncated and ordinary log-losses coincide whenever q y ≥ δ q_y\ge\delta q y ≥ δ .
Assumption B.7 (Candidate Neighborhood Grid). Let
m min , n : = min M n , m max , n : = max M n . m_{\min,n} := \min\mathcal{M}_n,\qquad m_{\max,n} := \max\mathcal{M}_n. m m i n , n := min M n , m m a x , n := max M n . The candidate neighborhood grid satisfies
m min , n → ∞ , log n = o ( m min , n ) , m max , n ≤ m σ , n . m_{\min,n} \to\infty,\qquad\log n = o(m_{\min,n}),\qquad m_{\max,n} \le m_{\sigma,n}. m m i n , n → ∞ , log n = o ( m m i n , n ) , m m a x , n ≤ m σ , n . The interpolation grid satisfies 1 ∈ A n 1 \in\mathcal{A}_n 1 ∈ A n , and the total grid size grows subexponentially in the smallest candidate neighborhood size:
log ( ∣ M n ∣ ∣ A n ∣ ) = o ( m min , n ) . \log\left(\lvert\mathcal{M}_n\rvert\lvert\mathcal{A}_n\rvert\right) = o(m_{\min,n}). log ( ∣ M n ∣ ∣ A n ∣ ) = o ( m m i n , n ) . Moreover, there exists m n ∘ ∈ M n m_n^\circ\in\mathcal{M}_n m n ∘ ∈ M n such that
m n ∘ → ∞ , m n ∘ n → 0. m_n^\circ\to\infty,\qquad\frac{m_n^\circ}{n} \to0. m n ∘ → ∞ , n m n ∘ → 0. Thus the optimization can compare against a consistent pure-local candidate. The practical grid used in the main algorithm satisfies these conditions.
Preliminary Lemmas
We introduce adaptive slices in the retrieval space. We establish Lemma B.8, which ensures that the number of calibration embeddings inside each slice concentrates around its expectation. This prevents large geometric fluctuations and provides a stability prerequisite for the local empirical frequency estimator.
For the proof, let a n a_n a n be an auxiliary slice-count scale satisfying
a n → ∞ , a n m min , n → 0 , log n = o ( a n ) . a_n \to\infty,\qquad\frac{a_n}{m_{\min,n}} \to0,\qquad\log n = o(a_n). a n → ∞ , m m i n , n a n → 0 , log n = o ( a n ) .
Such a sequence exists for the practical grid used in the main algorithm, where m min , n ≍ n m_{\min,n} \asymp\sqrt{n} m m i n , n ≍ n ; for example, one may take a n = n 1 / 4 a_n = n^{1/4} a n = n 1/4 . This sequence is used only to define the proof slices and is not an algorithmic tuning parameter.
Lemma B.8 (Geometric Consistency on Adaptive Slices). Fix a test point x x x and write z = ϕ ( x ) z = \phi(x) z = ϕ ( x ) . Consider a partition of a neighborhood of z z z in the retrieval space into a finite set of disjoint slices { S j } j = 0 T n − 1 \{S_j\}_{j=0}^{T_n-1} { S j } j = 0 T n − 1 . Let the probability mass of each slice under the marginal distribution of Z = ϕ ( X ) Z = \phi(X) Z = ϕ ( X ) satisfy
c 1 a n n ≤ P Z ( S j ) ≤ c 2 a n n , j = 0 , … , T n − 1 , c_1\frac{a_n}{n} \le P_Z(S_j) \le c_2\frac{a_n}{n},\qquad j=0,\ldots,T_n-1, c 1 n a n ≤ P Z ( S j ) ≤ c 2 n a n , j = 0 , … , T n − 1 , for some constants c 1 , c 2 > 0 c_1,c_2 > 0 c 1 , c 2 > 0 . Define λ j : = n P Z ( S j ) \lambda_j := nP_Z(S_j) λ j := n P Z ( S j ) . Then
λ j ≍ a n , λ j → ∞ , λ j m min , n → 0 , \lambda_j \asymp a_n,\qquad\lambda_j \to\infty,\qquad\frac{\lambda_j}{m_{\min,n}} \to0, λ j ≍ a n , λ j → ∞ , m m i n , n λ j → 0 , where m min , n : = min M n m_{\min,n} := \min\mathcal{M}_n m m i n , n := min M n is the smallest candidate neighborhood size. Let n j = ∑ i = 1 n I ( z i ∈ S j ) n_j = \sum_{i=1}^{n}\mathbb{I}(z_i \in S_j) n j = ∑ i = 1 n I ( z i ∈ S j ) be the empirical count in slice S j S_j S j , and let λ min , n : = min 0 ≤ j < T n λ j \lambda_{\min,n} := \min_{0 \le j < T_n}\lambda_j λ m i n , n := min 0 ≤ j < T n λ j . Then, for any 0 < δ < 1 0 < \delta< 1 0 < δ < 1 ,
P ( max 0 ≤ j < T n ∣ n j − λ j ∣ > δ λ j ) ≤ 2 T n exp { − c λ min , n δ 2 } \mathbb{P}\left(\max_{0 \le j < T_n}\lvert n_j-\lambda_j\rvert> \delta\lambda_j\right) \le2T_n\exp\{-c\lambda_{\min,n}\delta^2\} P ( 0 ≤ j < T n max ∣ n j − λ j ∣ > δ λ j ) ≤ 2 T n exp { − c λ m i n , n δ 2 } for a universal constant c > 0 c > 0 c > 0 . In particular, for the adaptive slices constructed in Lemma B.9, we have T n = O ( n / a n ) T_n = O(n/a_n) T n = O ( n / a n ) , and therefore the failure probability converges to zero.
Proof. For each slice S j S_j S j , the count n j n_j n j follows a binomial distribution Bin ( n , P Z ( S j ) ) \operatorname{Bin}(n,P_Z(S_j)) Bin ( n , P Z ( S j )) with mean λ j = n P Z ( S j ) \lambda_j = nP_Z(S_j) λ j = n P Z ( S j ) . By the multiplicative Chernoff bound, for any 0 < δ < 1 0 < \delta< 1 0 < δ < 1 ,
P ( ∣ n j − λ j ∣ > δ λ j ) ≤ 2 exp ( − δ 2 λ j 3 ) . \mathbb{P}(\lvert n_j-\lambda_j\rvert> \delta\lambda_j) \le2\exp\left(-\frac{\delta^2\lambda_j}{3}\right). P (∣ n j − λ j ∣ > δ λ j ) ≤ 2 exp ( − 3 δ 2 λ j ) .
Taking a union bound over all T n T_n T n slices gives
P ( max 0 ≤ j < T n ∣ n j − λ j ∣ > δ λ j ) ≤ 2 ∑ j = 0 T n − 1 exp ( − δ 2 λ j 3 ) ≤ 2 T n exp ( − δ 2 λ min , n 3 ) . \mathbb{P}\left(\max_{0 \le j < T_n}\lvert n_j-\lambda_j\rvert> \delta\lambda_j\right)
\le2\sum_{j=0}^{T_n-1}\exp\left(-\frac{\delta^2\lambda_j}{3}\right)
\le2T_n\exp\left(-\frac{\delta^2\lambda_{\min,n}}{3}\right). P ( 0 ≤ j < T n max ∣ n j − λ j ∣ > δ λ j ) ≤ 2 j = 0 ∑ T n − 1 exp ( − 3 δ 2 λ j ) ≤ 2 T n exp ( − 3 δ 2 λ m i n , n ) .
Since λ min , n ≍ a n \lambda_{\min,n} \asymp a_n λ m i n , n ≍ a n and a n → ∞ a_n \to\infty a n → ∞ , the exponential term vanishes. Moreover, the adaptive construction in Lemma B.9 uses slices with probability mass of order a n / n a_n/n a n / n , so T n = O ( n / a n ) T_n = O(n/a_n) T n = O ( n / a n ) and log T n = O ( log n ) \log T_n = O(\log n) log T n = O ( log n ) . Because log n = o ( a n ) \log n = o(a_n) log n = o ( a n ) , the union-bound failure probability converges to zero. Finally,
λ j m min , n ≲ a n m min , n → 0 , \frac{\lambda_j}{m_{\min,n}} \lesssim\frac{a_n}{m_{\min,n}} \to0, m m i n , n λ j ≲ m m i n , n a n → 0 ,
so a single adaptive slice is asymptotically negligible relative to any admissible candidate neighborhood size. This property will be used when controlling partial boundary slices. □
We establish the next lemma. This lemma ensures that the true conditional probability remains stable inside the region bounded by two cut points. Hence, the variation within each slice is controlled and the local expectation can be approximated by its cut-point value.
Lemma B.9 (Adaptive Slicing via Probability Mass). Fix a test point x x x and write z = ϕ ( x ) z = \phi(x) z = ϕ ( x ) . For all sufficiently large n n n , there exists a sequence of radii
0 = r 0 < r 1 < ⋯ < r T n = R max , R max : = sup u ∈ Z ∥ u − z ∥ 2 , 0 = r_0 < r_1 < \cdots< r_{T_n} = R_{\max}, \qquad R_{\max} := \sup_{u \in\mathcal{Z}} \lVert u-z\rVert_2, 0 = r 0 < r 1 < ⋯ < r T n = R m a x , R m a x := u ∈ Z sup ∥ u − z ∥ 2 , in the retrieval space that generates the slices required by Lemma B.8. Specifically, with
B z ( r ) : = { u ∈ Z : ∥ u − z ∥ 2 < r } , S j : = B z ( r j + 1 ) ∖ B z ( r j ) , B_z(r) := \{u \in\mathcal{Z} : \lVert u-z\rVert_2 < r\}, \qquad S_j := B_z(r_{j+1}) \setminus B_z(r_j), B z ( r ) := { u ∈ Z : ∥ u − z ∥ 2 < r } , S j := B z ( r j + 1 ) ∖ B z ( r j ) , the slices satisfy
c 1 a n n ≤ P Z ( S j ) ≤ c 2 a n n , j = 0 , … , T n − 1 , c_1 \frac{a_n}{n} \le P_Z(S_j) \le c_2 \frac{a_n}{n}, \qquad j=0,\ldots,T_n-1, c 1 n a n ≤ P Z ( S j ) ≤ c 2 n a n , j = 0 , … , T n − 1 , for some constants c 1 , c 2 > 0 c_1,c_2 > 0 c 1 , c 2 > 0 . Moreover, the number of slices satisfies T n = O ( n / a n ) T_n = O(n/a_n) T n = O ( n / a n ) .
Define the theoretical local label-frequency vector up to radius r > 0 r > 0 r > 0 by
μ ( r ) : = E { e Y ∣ Z ∈ B z ( r ) } = A ( r ) V ( r ) , \mu(r) := \mathbb{E}\{e_Y \mid Z \in B_z(r)\} = \frac{A(r)}{V(r)}, μ ( r ) := E { e Y ∣ Z ∈ B z ( r )} = V ( r ) A ( r ) , where
e Y = ( I ( Y = 1 ) , … , I ( Y = K ) ) , e_Y = (\mathbb{I}(Y=1),\ldots,\mathbb{I}(Y=K)), e Y = ( I ( Y = 1 ) , … , I ( Y = K )) , and
V ( r ) : = ∫ B z ( r ) p Z ( u ) d u , A ( r ) : = ∫ B z ( r ) p ϕ ( u ) p Z ( u ) d u . V(r) := \int_{B_z(r)} p_Z(u)\,\mathrm{d}u,\qquad A(r) := \int_{B_z(r)} p_\phi(u)p_Z(u)\,\mathrm{d}u. V ( r ) := ∫ B z ( r ) p Z ( u ) d u , A ( r ) := ∫ B z ( r ) p ϕ ( u ) p Z ( u ) d u . For notational convenience, set μ ( 0 ) : = p ϕ ( z ) \mu(0) := p_\phi(z) μ ( 0 ) := p ϕ ( z ) . Under Assumptions B.3 and B.4, for sufficiently large n n n , the variation of μ ( r ) \mu(r) μ ( r ) inside each slice satisfies
sup r , r ′ ∈ [ r j , r j + 1 ] ∥ μ ( r ) − μ ( r ′ ) ∥ 2 ≤ C s l i c e ( a n n ) 1 / d z , \sup_{r,r'\in[r_j,r_{j+1}]} \lVert\mu(r)-\mu(r')\rVert_2 \le C_{\mathrm{slice}}\left(\frac{a_n}{n}\right)^{1/d_z}, r , r ′ ∈ [ r j , r j + 1 ] sup ∥ μ ( r ) − μ ( r ′ ) ∥ 2 ≤ C slice ( n a n ) 1/ d z , where C s l i c e < ∞ C_{\mathrm{slice}} < \infty C slice < ∞ depends only on the density bounds, the Lipschitz constants, and the local volume constants of the retrieval space. In particular, this variation vanishes as n → ∞ n \to\infty n → ∞ .
Proof. Let
V ( r ) = P Z ( B z ( r ) ) = ∫ B z ( r ) p Z ( u ) d u . V(r) = P_Z(B_z(r)) = \int_{B_z(r)} p_Z(u)\,\mathrm{d}u. V ( r ) = P Z ( B z ( r )) = ∫ B z ( r ) p Z ( u ) d u . Since p Z p_Z p Z is a density bounded on the compact retrieval space, V ( r ) V(r) V ( r ) is a continuous nondecreasing function of r r r . We choose the cut points r j r_j r j as probability-mass quantiles, so that the probability increment
V ( r j + 1 ) − V ( r j ) = P Z ( S j ) V(r_{j+1}) - V(r_j) = P_Z(S_j) V ( r j + 1 ) − V ( r j ) = P Z ( S j ) is of order a n / n a_n/n a n / n . If the final residual slice has probability mass smaller than the target order, we merge it with the preceding slice. After this adjustment, all slices satisfy
c 1 a n n ≤ P Z ( S j ) ≤ c 2 a n n c_1 \frac{a_n}{n} \le P_Z(S_j) \le c_2 \frac{a_n}{n} c 1 n a n ≤ P Z ( S j ) ≤ c 2 n a n for fixed constants c 1 , c 2 > 0 c_1,c_2 > 0 c 1 , c 2 > 0 , and the number of slices is T n = O ( n / a n ) T_n = O(n/a_n) T n = O ( n / a n ) .
It remains to control the variation of the conditional label-frequency vector. Write
t n : = a n n , h n : = t n 1 / d z . t_n := \frac{a_n}{n}, \qquad h_n := t_n^{1/d_z}. t n := n a n , h n := t n 1/ d z .
By Assumption B.3, there exist constants v − , v + > 0 v_-,v_+>0 v − , v + > 0 and r ∗ > 0 r_* > 0 r ∗ > 0 such that
v − r d z ≤ V ( r ) ≤ v + r d z , 0 < r ≤ r ∗ . v_-r^{d_z} \le V(r) \le v_+r^{d_z}, \qquad0<r\le r_*. v − r d z ≤ V ( r ) ≤ v + r d z , 0 < r ≤ r ∗ .
Fix any 0 ≤ r ≤ r ′ 0\le r\le r' 0 ≤ r ≤ r ′ within the same slice. By construction,
0 ≤ Δ V : = V ( r ′ ) − V ( r ) ≤ c 2 t n . 0\le\Delta V := V(r')-V(r)\le c_2t_n. 0 ≤ Δ V := V ( r ′ ) − V ( r ) ≤ c 2 t n .
If Δ V = 0 \Delta V=0 Δ V = 0 , then μ ( r ′ ) = μ ( r ) \mu(r')=\mu(r) μ ( r ′ ) = μ ( r ) . Otherwise, define
ν ( r , r ′ ) : = A ( r ′ ) − A ( r ) Δ V . \nu(r,r') := \frac{A(r')-A(r)}{\Delta V}. ν ( r , r ′ ) := Δ V A ( r ′ ) − A ( r ) .
Writing Δ A : = A ( r ′ ) − A ( r ) \Delta A:=A(r')-A(r) Δ A := A ( r ′ ) − A ( r ) , we obtain
μ ( r ′ ) − μ ( r ) = Δ V V ( r ′ ) ( ν ( r , r ′ ) − μ ( r ) ) . \mu(r')-\mu(r)=\frac{\Delta V}{V(r')}(\nu(r,r')-\mu(r)). μ ( r ′ ) − μ ( r ) = V ( r ′ ) Δ V ( ν ( r , r ′ ) − μ ( r )) .
This identity also holds for r = 0 r=0 r = 0 under the convention μ ( 0 ) = p ϕ ( z ) \mu(0)=p_{\phi}(z) μ ( 0 ) = p ϕ ( z ) . First suppose r ′ ≥ r ∗ r'\ge r_* r ′ ≥ r ∗ . Since V ( r ′ ) ≥ V ( r ∗ ) > 0 V(r')\ge V(r_*)>0 V ( r ′ ) ≥ V ( r ∗ ) > 0 and both ν ( r , r ′ ) \nu(r,r') ν ( r , r ′ ) and μ ( r ) \mu(r) μ ( r ) are probability vectors,
∥ μ ( r ′ ) − μ ( r ) ∥ 2 ≤ 2 Δ V V ( r ′ ) ≤ 2 c 2 t n V ( r ∗ ) = O ( h n ) . \|\mu(r')-\mu(r)\|_2\le\frac{2\Delta V}{V(r')}\le\frac{2c_2t_n}{V(r_*)}=O(h_n). ∥ μ ( r ′ ) − μ ( r ) ∥ 2 ≤ V ( r ′ ) 2Δ V ≤ V ( r ∗ ) 2 c 2 t n = O ( h n ) .
Now suppose r ′ < r ∗ r'<r_* r ′ < r ∗ . By Assumption B.4, both ν ( r , r ′ ) \nu(r,r') ν ( r , r ′ ) and μ ( r ) \mu(r) μ ( r ) differ from p ϕ ( z ) p_{\phi}(z) p ϕ ( z ) by at most L p r ′ L_pr' L p r ′ . Therefore,
∥ ν ( r , r ′ ) − μ ( r ) ∥ 2 ≤ 2 L p r ′ . \|\nu(r,r')-\mu(r)\|_2\le2L_pr'. ∥ ν ( r , r ′ ) − μ ( r ) ∥ 2 ≤ 2 L p r ′ .
If r ′ ≤ h n r'\le h_n r ′ ≤ h n , then
∥ μ ( r ′ ) − μ ( r ) ∥ 2 ≤ 2 L p r ′ ≤ 2 L p h n . \|\mu(r')-\mu(r)\|_2\le2L_pr'\le2L_ph_n. ∥ μ ( r ′ ) − μ ( r ) ∥ 2 ≤ 2 L p r ′ ≤ 2 L p h n .
If h n < r ′ < r ∗ h_n<r'<r_* h n < r ′ < r ∗ , the lower volume bound gives
V ( r ′ ) ≥ v − ( r ′ ) d z . V(r')\ge v_-(r')^{d_z}. V ( r ′ ) ≥ v − ( r ′ ) d z .
Consequently,
∥ μ ( r ′ ) − μ ( r ) ∥ 2 ≤ Δ V V ( r ′ ) 2 L p r ′ ≤ 2 L p c 2 v − ( r ′ ) 1 − d z t n ≤ 2 L p c 2 v − t n h n d z − 1 = 2 L p c 2 v − h n . \|\mu(r')-\mu(r)\|_2\le\frac{\Delta V}{V(r')}2L_pr'\le\frac{2L_pc_2}{v_-}(r')^{1-d_z}t_n\le\frac{2L_pc_2}{v_-}\frac{t_n}{h_n^{d_z-1}}=\frac{2L_pc_2}{v_-}h_n. ∥ μ ( r ′ ) − μ ( r ) ∥ 2 ≤ V ( r ′ ) Δ V 2 L p r ′ ≤ v − 2 L p c 2 ( r ′ ) 1 − d z t n ≤ v − 2 L p c 2 h n d z − 1 t n = v − 2 L p c 2 h n .
Combining the cases yields
sup r , r ′ ∈ [ r j , r j + 1 ] ∥ μ ( r ) − μ ( r ′ ) ∥ 2 ≤ C s l i c e ( a n n ) 1 / d z \sup_{r,r'\in[r_j,r_{j+1}]}\|\mu(r)-\mu(r')\|_2\le C_{\mathrm{slice}}\left(\frac{a_n}{n}\right)^{1/d_z} r , r ′ ∈ [ r j , r j + 1 ] sup ∥ μ ( r ) − μ ( r ′ ) ∥ 2 ≤ C slice ( n a n ) 1/ d z
uniformly over all slices.
Lemma B.10 (Stability of Empirical Frequency at Cut Points). For a cut point r ℓ r_\ell r ℓ , let
I ℓ : = { i ∈ [ n ] : z i ∈ B z ( r ℓ ) } = { i ∈ [ n ] : z i ∈ S 0 ∪ ⋯ ∪ S ℓ − 1 } , I_\ell:=\{i\in[n]:z_i\in B_z(r_\ell)\}=\{i\in[n]:z_i\in S_0\cup\cdots\cup S_{\ell-1}\}, I ℓ := { i ∈ [ n ] : z i ∈ B z ( r ℓ )} = { i ∈ [ n ] : z i ∈ S 0 ∪ ⋯ ∪ S ℓ − 1 } , and let n ℓ c u t : = ∣ I ℓ ∣ n_\ell^{\mathrm{cut}}:=|I_\ell| n ℓ cut := ∣ I ℓ ∣ . Define the empirical label-frequency vector aggregated up to the cut point r ℓ r_\ell r ℓ by
p ^ s l i c e ( r ℓ ) : = 1 n ℓ c u t ∑ i ∈ I ℓ e y i , e y i : = ( I ( y i = 1 ) , … , I ( y i = K ) ) . \widehat{p}_{\mathrm{slice}}(r_\ell):=\frac{1}{n_\ell^{\mathrm{cut}}}\sum_{i\in I_\ell}e_{y_i},\qquad e_{y_i}:=(\mathbb{I}(y_i=1),\ldots,\mathbb{I}(y_i=K)). p slice ( r ℓ ) := n ℓ cut 1 i ∈ I ℓ ∑ e y i , e y i := ( I ( y i = 1 ) , … , I ( y i = K )) . Let μ ( r ℓ ) \mu(r_\ell) μ ( r ℓ ) be the theoretical local label-frequency vector defined in Lemma B.9. Under the geometric stability event from Lemma B.8, for any δ > 0 \delta>0 δ > 0 ,
P ( max ℓ : n ℓ c u t ≥ m min , n ∥ p ^ s l i c e ( r ℓ ) − μ ( r ℓ ) ∥ 2 > δ ) → 0. \mathbb{P}\left(\max_{\ell:n_\ell^{\mathrm{cut}}\ge m_{\min,n}}\|\widehat{p}_{\mathrm{slice}}(r_\ell)-\mu(r_\ell)\|_2>\delta\right)\to0. P ( ℓ : n ℓ cut ≥ m m i n , n max ∥ p slice ( r ℓ ) − μ ( r ℓ ) ∥ 2 > δ ) → 0. Equivalently, the aggregated empirical frequency at every admissible cut point converges uniformly to its corresponding theoretical local expectation.
Proof. Fix a cut point r ℓ r_\ell r ℓ such that n ℓ c u t ≥ m min , n n_\ell^{\mathrm{cut}} \ge m_{\min,n} n ℓ cut ≥ m m i n , n . Let F n = σ ( z 1 , … , z n ) \mathcal{F}_n = \sigma(z_1,\ldots,z_n) F n = σ ( z 1 , … , z n ) be the sigma-algebra generated by the feature embeddings. Conditional on F n \mathcal{F}_n F n , the labels are independent, and
E [ e ~ y i ∣ F n ] = p ϕ ( z i ) . \mathbb{E}[\tilde{e}_{y_i}\mid\mathcal{F}_n]=p_\phi(z_i). E [ e ~ y i ∣ F n ] = p ϕ ( z i ) .
Define the conditional average probability vector inside the cut region by
p ˉ ℓ : = 1 n ℓ c u t ∑ i ∈ I ℓ p ϕ ( z i ) . \bar{p}_\ell:= \frac{1}{n_\ell^{\mathrm{cut}}}\sum_{i\in I_\ell}p_\phi(z_i). p ˉ ℓ := n ℓ cut 1 i ∈ I ℓ ∑ p ϕ ( z i ) .
Then
p ^ s l i c e ( r ℓ ) − p ˉ ℓ = 1 n ℓ c u t ∑ i ∈ I ℓ ( e ~ y i − p ϕ ( z i ) ) . \hat{p}_{\mathrm{slice}}(r_\ell)-\bar{p}_\ell=\frac{1}{n_\ell^{\mathrm{cut}}}\sum_{i\in I_\ell}(\tilde{e}_{y_i}-p_\phi(z_i)). p ^ slice ( r ℓ ) − p ˉ ℓ = n ℓ cut 1 i ∈ I ℓ ∑ ( e ~ y i − p ϕ ( z i )) .
Each coordinate of e ~ y i − p ϕ ( z i ) \tilde{e}_{y_i}-p_\phi(z_i) e ~ y i − p ϕ ( z i ) is centered and bounded in [ − 1 , 1 ] [-1,1] [ − 1 , 1 ] . By applying Hoeffding’s inequality coordinatewise and taking a union bound over the K K K coordinates, we obtain, for any δ > 0 \delta>0 δ > 0 ,
P ( ∥ p ^ s l i c e ( r ℓ ) − p ˉ ℓ ∥ 2 > δ ∣ F n ) ≤ 2 K exp ( − 2 n ℓ c u t δ 2 K ) . \mathbb{P}\left(\left\|\hat{p}_{\mathrm{slice}}(r_\ell)-\bar{p}_\ell\right\|_2>\delta\mid\mathcal{F}_n\right)\leq2K\exp\left(-\frac{2n_\ell^{\mathrm{cut}}\delta^2}{K}\right). P ( ∥ p ^ slice ( r ℓ ) − p ˉ ℓ ∥ 2 > δ ∣ F n ) ≤ 2 K exp ( − K 2 n ℓ cut δ 2 ) .
Since n ℓ c u t ≥ m min , n n_\ell^{\mathrm{cut}}\geq m_{\min,n} n ℓ cut ≥ m m i n , n and m min , n → ∞ m_{\min,n}\to\infty m m i n , n → ∞ , the stochastic deviation vanishes. Taking a union bound over the at most T n T_n T n cut points, with T n T_n T n growing at most polynomially, gives
P ( max ℓ : n ℓ c u t ≥ m min , n ∥ p ^ s l i c e ( r ℓ ) − p ˉ ℓ ∥ 2 > δ ∣ F n ) ≤ 2 K T n exp ( − 2 m min , n δ 2 K ) → 0. \mathbb{P}\left(\max_{\ell:n_\ell^{\mathrm{cut}}\geq m_{\min,n}}\left\|\hat{p}_{\mathrm{slice}}(r_\ell)-\bar{p}_\ell\right\|_2>\delta\mid\mathcal{F}_n\right)\leq2KT_n\exp\left(-\frac{2m_{\min,n}\delta^2}{K}\right)\to0. P ( ℓ : n ℓ cut ≥ m m i n , n max ∥ p ^ slice ( r ℓ ) − p ˉ ℓ ∥ 2 > δ ∣ F n ) ≤ 2 K T n exp ( − K 2 m m i n , n δ 2 ) → 0.
It remains to compare p ˉ ℓ \bar{p}_\ell p ˉ ℓ with the theoretical local expectation μ ( r ℓ ) \mu(r_\ell) μ ( r ℓ ) . The cut points r ℓ r_\ell r ℓ are deterministic population quantiles for fixed x x x and n n n . Conditional on the membership indicators { I ( z i ∈ B z ( r ℓ ) ) } i = 1 n \{\mathbb{I}(z_i\in B_z(r_\ell))\}_{i=1}^n { I ( z i ∈ B z ( r ℓ )) } i = 1 n , the embeddings inside B z ( r ℓ ) B_z(r_\ell) B z ( r ℓ ) are independent draws from P Z ( ⋅ ∣ Z ∈ B z ( r ℓ ) ) P_Z(\cdot\mid Z\in B_z(r_\ell)) P Z ( ⋅ ∣ Z ∈ B z ( r ℓ )) . Therefore, we have
E [ p ϕ ( Z ) ∣ Z ∈ B z ( r ℓ ) ] = μ ( r ℓ ) . \mathbb{E}[p_\phi(Z)\mid Z\in B_z(r_\ell)]=\mu(r_\ell). E [ p ϕ ( Z ) ∣ Z ∈ B z ( r ℓ )] = μ ( r ℓ ) .
Since every coordinate of p ϕ ( Z ) p_\phi(Z) p ϕ ( Z ) lies in [ 0 , 1 ] [0,1] [ 0 , 1 ] , Hoeffding’s inequality gives, for any δ > 0 \delta>0 δ > 0 ,
P ( ∥ p ˉ ℓ − μ ( r ℓ ) ∥ 2 > δ , n ℓ c u t ≥ m min , n ) ≤ 2 K exp ( − 2 m min , n δ 2 K ) . \mathbb{P}\left(\left\|\bar{p}_\ell-\mu(r_\ell)\right\|_2>\delta,\ n_\ell^{\mathrm{cut}}\geq m_{\min,n}\right)\leq2K\exp\left(-\frac{2m_{\min,n}\delta^2}{K}\right). P ( ∥ p ˉ ℓ − μ ( r ℓ ) ∥ 2 > δ , n ℓ cut ≥ m m i n , n ) ≤ 2 K exp ( − K 2 m m i n , n δ 2 ) .
Taking a union bound over the T n T_n T n cut points yields
P ( max ℓ : n ℓ c u t ≥ m min , n ∥ p ˉ ℓ − μ ( r ℓ ) ∥ 2 > δ ) ≤ 2 K T n exp ( − 2 m min , n δ 2 K ) ⟶ 0. \mathbb{P}\left(\max_{\ell:n_\ell^{\mathrm{cut}}\geq m_{\min,n}}\left\|\bar{p}_\ell-\mu(r_\ell)\right\|_2>\delta\right)\leq2KT_n\exp\left(-\frac{2m_{\min,n}\delta^2}{K}\right)\longrightarrow0. P ( ℓ : n ℓ cut ≥ m m i n , n max ∥ p ˉ ℓ − μ ( r ℓ ) ∥ 2 > δ ) ≤ 2 K T n exp ( − K 2 m m i n , n δ 2 ) ⟶ 0.
Combining the two concentration bounds with the triangle inequality yields
P ( max ℓ : n ℓ c u t ≥ m min , n ∥ p ^ s l i c e ( r ℓ ) − μ ( r ℓ ) ∥ 2 > δ ) → 0. \mathbb{P}\left(\max_{\ell:n_\ell^{\mathrm{cut}}\geq m_{\min,n}}\left\|\hat{p}_{\mathrm{slice}}(r_\ell)-\mu(r_\ell)\right\|_2>\delta\right)\to0. P ( ℓ : n ℓ cut ≥ m m i n , n max ∥ p ^ slice ( r ℓ ) − μ ( r ℓ ) ∥ 2 > δ ) → 0.
This proves the lemma.
We establish Lemma B.11. This lemma describes the asymptotic behavior of the weighting bandwidth used in the local empirical loss. It shows that the bandwidth σ n \sigma_n σ n shrinks to zero, while the number of calibration embeddings inside this radius diverges.
Lemma B.11 (Bandwidth and Sample Size Asymptotics). Let
m σ , n : = ⌊ n 2 ⌋ , σ n = d ( m σ , n ) ( x ) , m_{\sigma,n}:=\left\lfloor\frac{\sqrt{n}}{2}\right\rfloor,\qquad\sigma_n=d(m_{\sigma,n})(x), m σ , n := ⌊ 2 n ⌋ , σ n = d ( m σ , n ) ( x ) , where d ( m σ , n ) ( x ) d(m_{\sigma,n})(x) d ( m σ , n ) ( x ) is the m σ , n m_{\sigma,n} m σ , n -th nearest-neighbor distance from z = ϕ ( x ) z=\phi(x) z = ϕ ( x ) among the calibration embeddings { z i } i = 1 n \{z_i\}_{i=1}^n { z i } i = 1 n . Under Assumption B.3 and the local volume regularity used in Lemma B.9,
σ n = Θ p ( n − 1 / ( 2 d z ) ) , \sigma_n=\Theta_p\left(n^{-1/(2d_z)}\right), σ n = Θ p ( n − 1/ ( 2 d z ) ) , and hence σ n → 0 \sigma_n\to0 σ n → 0 in probability. Moreover, the effective local sample size
N e f f ( σ n ) : = ∑ i = 1 n I { ∥ z i − z ∥ 2 ≤ σ n } N_{\mathrm{eff}}(\sigma_n):=\sum_{i=1}^n\mathbb{I}\{\|z_i-z\|_2\leq\sigma_n\} N eff ( σ n ) := i = 1 ∑ n I { ∥ z i − z ∥ 2 ≤ σ n } satisfies N e f f ( σ n ) ≥ m σ , n = Θ ( n ) N_{\mathrm{eff}}(\sigma_n)\geq m_{\sigma,n}=\Theta(\sqrt{n}) N eff ( σ n ) ≥ m σ , n = Θ ( n ) , and therefore N e f f ( σ n ) → ∞ N_{\mathrm{eff}}(\sigma_n)\to\infty N eff ( σ n ) → ∞ .
Proof. We first prove the convergence of σ n \sigma_n σ n . For a fixed test embedding z z z , define
V ( r ) : = P Z ( B z ( r ) ) V(r) := P_Z(B_z(r)) V ( r ) := P Z ( B z ( r )) .
By Assumption B.3, the density bounds and local volume regularity imply that there exist constants c − , c + > 0 c_-,c_+ > 0 c − , c + > 0 and r 0 > 0 r_0 > 0 r 0 > 0 such that
c − r d z ≤ V ( r ) ≤ c + r d z , 0 < r ≤ r 0 . c_-r^{d_z} \le V(r) \le c_+r^{d_z}, \qquad0 < r \le r_0. c − r d z ≤ V ( r ) ≤ c + r d z , 0 < r ≤ r 0 .
Let t n : = ( m σ , n / n ) 1 / d z t_n := (m_{\sigma,n}/n)^{1/d_z} t n := ( m σ , n / n ) 1/ d z . Choose fixed constants a , b > 0 a,b > 0 a , b > 0 satisfying
c + a d z ≤ 1 2 , c − b d z ≥ 2. c_+a^{d_z} \le\frac{1}{2}, \qquad c_-b^{d_z} \ge2. c + a d z ≤ 2 1 , c − b d z ≥ 2.
Since m σ , n / n → 0 m_{\sigma,n}/n \to0 m σ , n / n → 0 , both a t n at_n a t n and b t n bt_n b t n lie within the local regularity radius for sufficiently large n n n . Define the number of calibration embeddings within radius r r r by
N n ( r ) : = ∑ i = 1 n I { ∥ z i − z ∥ 2 ≤ r } . N_n(r) := \sum_{i=1}^{n} \mathbb{I}\{\lVert z_i-z\rVert_2 \le r\}. N n ( r ) := i = 1 ∑ n I {∥ z i − z ∥ 2 ≤ r } .
For each fixed r r r , we have N n ( r ) ∼ Bin ( n , V ( r ) ) N_n(r) \sim\operatorname{Bin}(n,V(r)) N n ( r ) ∼ Bin ( n , V ( r )) . The volume bounds yield
E N n ( a t n ) ≤ m σ , n 2 , E N n ( b t n ) ≥ 2 m σ , n . \mathbb{E}N_n(at_n) \le\frac{m_{\sigma,n}}{2}, \qquad\mathbb{E}N_n(bt_n) \ge2m_{\sigma,n}. E N n ( a t n ) ≤ 2 m σ , n , E N n ( b t n ) ≥ 2 m σ , n .
By the multiplicative Chernoff bounds, there exists a constant c > 0 c > 0 c > 0 such that
P ( N n ( a t n ) ≥ m σ , n ) ≤ exp ( − c m σ , n ) , P ( N n ( b t n ) < m σ , n ) ≤ exp ( − c m σ , n ) . \mathbb{P}\bigl(N_n(at_n) \ge m_{\sigma,n}\bigr) \le\exp(-cm_{\sigma,n}), \qquad\mathbb{P}\bigl(N_n(bt_n) < m_{\sigma,n}\bigr) \le\exp(-cm_{\sigma,n}). P ( N n ( a t n ) ≥ m σ , n ) ≤ exp ( − c m σ , n ) , P ( N n ( b t n ) < m σ , n ) ≤ exp ( − c m σ , n ) .
Consequently,
P ( a t n ≤ σ n ≤ b t n ) ≥ 1 − 2 exp ( − c m σ , n ) ⟶ 1. \mathbb{P}(at_n \le\sigma_n \le bt_n) \ge1-2\exp(-cm_{\sigma,n}) \longrightarrow1. P ( a t n ≤ σ n ≤ b t n ) ≥ 1 − 2 exp ( − c m σ , n ) ⟶ 1.
Since m σ , n = Θ ( n 1 / 2 ) m_{\sigma,n}=\Theta(n^{1/2}) m σ , n = Θ ( n 1/2 ) , it follows that t n = Θ ( n − 1 / ( 2 d z ) ) t_n=\Theta(n^{-1/(2d_z)}) t n = Θ ( n − 1/ ( 2 d z ) ) . Therefore, we have σ n = Θ p ( n − 1 / ( 2 d z ) ) \sigma_n=\Theta_p(n^{-1/(2d_z)}) σ n = Θ p ( n − 1/ ( 2 d z ) ) , which implies σ n → 0 \sigma_n\to0 σ n → 0 in probability. We then prove the divergence of the effective local sample size. By definition of the order statistic d ( m σ , n ) ( x ) d_{(m_{\sigma,n})}(x) d ( m σ , n ) ( x ) , at least m σ , n m_{\sigma,n} m σ , n calibration embeddings lie inside the closed ball of radius σ n \sigma_n σ n around z z z . Hence
N e f f ( σ n ) = ∑ i = 1 n I { ∥ z i − z ∥ 2 ≤ σ n } ≥ m σ , n = Θ ( n ) . N_{\mathrm{eff}}(\sigma_n)=\sum_{i=1}^{n}\mathbb{I}\{\lVert z_i-z\rVert_2 \le\sigma_n\}\ge m_{\sigma,n}=\Theta(\sqrt{n}). N eff ( σ n ) = i = 1 ∑ n I {∥ z i − z ∥ 2 ≤ σ n } ≥ m σ , n = Θ ( n ) .
Thus N e f f ( σ n ) → ∞ N_{\mathrm{eff}}(\sigma_n)\to\infty N eff ( σ n ) → ∞ as n → ∞ n\to\infty n → ∞ .
We now establish Lemma B.12. This lemma shows that, on the candidate grids used by LAPE, the local weighted leave-one-out negative log-likelihood concentrates around its conditional mean. The key point is that all candidate neighborhoods contain at least m min , n m_{\min,n} m m i n , n points, while the Gaussian weights are uniformly of order 1 / m 1/m 1/ m on each candidate neighborhood.
Lemma B.12 (Conditional Uniform Convergence of Empirical Risk). For m ∈ M n m \in\mathcal{M}_n m ∈ M n and α ∈ A n \alpha\in\mathcal{A}_n α ∈ A n , write the local weighted leave-one-out objective as
J n ( x ; m , α ) = ∑ i ∈ N m ( x ) w i ( m ) ( x ) L ( y i , q i , n ( − i ) ( m , α ) ) . J_n(x;m,\alpha)=\sum_{i\in\mathcal{N}_m(x)}w_i^{(m)}(x)\mathcal{L}\bigl(y_i,q_{i,n}^{(-i)}(m,\alpha)\bigr). J n ( x ; m , α ) = i ∈ N m ( x ) ∑ w i ( m ) ( x ) L ( y i , q i , n ( − i ) ( m , α ) ) . where q i , n ( − i ) ( m , α ) q_{i,n}^{(-i)}(m,\alpha) q i , n ( − i ) ( m , α ) denotes the leave-one-out probability vector used to evaluate the calibration point i i i . Here q i , n ( − i ) ( m , α ) q_{i,n}^{(-i)}(m,\alpha) q i , n ( − i ) ( m , α ) is constructed from the same query-local pool N m ( x ) ∖ { i } \mathcal{N}_m(x)\setminus\{i\} N m ( x ) ∖ { i } , so for fixed ( m , α ) (m,\alpha) ( m , α ) the objective depends only on the labels inside N m ( x ) \mathcal{N}_m(x) N m ( x ) , with the anchor values treated as fixed. Assume that the candidate grid satisfies m ≤ m σ , n m\le m_{\sigma,n} m ≤ m σ , n for all m ∈ M n m\in\mathcal{M}_n m ∈ M n , as in the main algorithm. Let
G n : = σ ( z 1 , … , z n , π a n c h o r ( x ) , π a n c h o r ( x 1 ) , … , π a n c h o r ( x n ) ) \mathcal{G}_n:=\sigma\bigl(z_1,\ldots,z_n,\pi^{\mathrm{anchor}}(x),\pi^{\mathrm{anchor}}(x_1),\ldots,\pi^{\mathrm{anchor}}(x_n)\bigr) G n := σ ( z 1 , … , z n , π anchor ( x ) , π anchor ( x 1 ) , … , π anchor ( x n ) ) be the sigma-algebra generated by the embeddings and the fixed anchor values. Define the corresponding conditional risk by
R n ( x ; m , α ) : = E [ J n ( x ; m , α ) ∣ G n ] . R_n(x;m,\alpha):=\mathbb{E}[J_n(x;m,\alpha)\mid\mathcal{G}_n]. R n ( x ; m , α ) := E [ J n ( x ; m , α ) ∣ G n ] . Under Assumptions B.3–B.6 and the leave-one-out construction, for every fixed ε > 0 \varepsilon>0 ε > 0 ,
P ( sup m ∈ M n , α ∈ A n ∣ J n ( x ; m , α ) − R n ( x ; m , α ) ∣ ≥ ε ) → 0 , \mathbb{P}\left(\sup_{\substack{m\in\mathcal{M}_n,\ \alpha\in\mathcal{A}_n}}\left|J_n(x;m,\alpha)-R_n(x;m,\alpha)\right|\ge\varepsilon\right)\to0, P ( m ∈ M n , α ∈ A n sup ∣ J n ( x ; m , α ) − R n ( x ; m , α ) ∣ ≥ ε ) → 0 , provided that ∣ M n ∣ ∣ A n ∣ |\mathcal{M}_n||\mathcal{A}_n| ∣ M n ∣∣ A n ∣ grows subexponentially in m min , n m_{\min,n} m m i n , n . In particular, this holds for the finite or polynomial-size grids used in the algorithm.
Proof. Fix m ∈ M n m \in\mathcal{M}_n m ∈ M n and α ∈ A n \alpha\in\mathcal{A}_n α ∈ A n . Condition on G n \mathcal{G}_n G n . Under Assumptions B.2 and B.5, the calibration labels are conditionally independent, with
P ( Y i = k ∣ G n ) = p ϕ , k ( z i ) . \mathbb{P}(Y_i = k \mid\mathcal{G}_n) = p_{\phi,k}(z_i). P ( Y i = k ∣ G n ) = p ϕ , k ( z i ) .
For any i ∈ N m ( x ) i \in\mathcal{N}_m(x) i ∈ N m ( x ) and k ∈ [ K ] k \in[K] k ∈ [ K ] , the leave-one-out local frequency is
p ~ − i ( k ; x i , m ) = ∑ j ∈ N m ( x ) ∖ { i } 1 { Y j = k } + 1 / K m . \widetilde{p}_{-i}(k; x_i,m) = \frac{\sum_{j\in\mathcal{N}_m(x)\setminus\{i\}} 1\{Y_j = k\} + 1/K}{m}. p − i ( k ; x i , m ) = m ∑ j ∈ N m ( x ) ∖ { i } 1 { Y j = k } + 1/ K .
By Assumption B.6,
E [ p ~ − i ( k ; x i , m ) ∣ G n ] ≥ 2 δ ( m − 1 ) m . \mathbb{E}\left[\widetilde{p}_{-i}(k; x_i,m) \mid\mathcal{G}_n\right] \ge\frac{2\delta(m-1)}{m}. E [ p − i ( k ; x i , m ) ∣ G n ] ≥ m 2 δ ( m − 1 ) .
Since m ≥ m min , n → ∞ m \ge m_{\min,n} \to\infty m ≥ m m i n , n → ∞ , Hoeffding’s inequality yields
P ( p ~ − i ( k ; x i , m ) < δ ∣ G n ) ≤ exp ( − c δ m ) \mathbb{P}\left(\widetilde{p}_{-i}(k; x_i,m) < \delta\mid\mathcal{G}_n\right) \le\exp(-c_\delta m) P ( p − i ( k ; x i , m ) < δ ∣ G n ) ≤ exp ( − c δ m )
for some constant c δ > 0 c_\delta> 0 c δ > 0 and all sufficiently large n n n . Let
E n = { min m ∈ M n , i ∈ N m ( x ) , k ∈ [ K ] p ~ − i ( k ; x i , m ) ≥ δ } . \mathcal{E}_n = \left\{\min_{m\in\mathcal{M}_n,i\in\mathcal{N}_m(x),k\in[K]} \widetilde{p}_{-i}(k; x_i,m) \ge\delta\right\}. E n = { m ∈ M n , i ∈ N m ( x ) , k ∈ [ K ] min p − i ( k ; x i , m ) ≥ δ } .
A union bound gives
P ( E n c ∣ G n ) ≤ K n ∣ M n ∣ exp ( − c δ m min , n ) = o ( 1 ) , \mathbb{P}(\mathcal{E}_n^c \mid\mathcal{G}_n) \le Kn|\mathcal{M}_n|\exp(-c_\delta m_{\min,n}) = o(1), P ( E n c ∣ G n ) ≤ K n ∣ M n ∣ exp ( − c δ m m i n , n ) = o ( 1 ) ,
where the convergence follows from Assumption B.7. Since every anchor coordinate is at least 2 δ 2\delta 2 δ , all fused leave-one-out candidates have coordinates at least δ \delta δ on E n \mathcal{E}_n E n . Define
J n δ ( x ; m , α ) = ∑ i ∈ N m ( x ) w i ( m ) ( x ) L δ ( Y i , q i , n ( − i ) ( m , α ) ) , J_n^\delta(x;m,\alpha) = \sum_{i\in\mathcal{N}_m(x)} w_i^{(m)}(x)\mathcal{L}_\delta\left(Y_i,q_{i,n}^{(-i)}(m,\alpha)\right), J n δ ( x ; m , α ) = i ∈ N m ( x ) ∑ w i ( m ) ( x ) L δ ( Y i , q i , n ( − i ) ( m , α ) ) ,
R n δ ( x ; m , α ) = E [ J n δ ( x ; m , α ) ∣ G n ] . R_n^\delta(x;m,\alpha) = \mathbb{E}\left[J_n^\delta(x;m,\alpha)\mid\mathcal{G}_n\right]. R n δ ( x ; m , α ) = E [ J n δ ( x ; m , α ) ∣ G n ] .
Since m ≤ m σ , n m \le m_{\sigma,n} m ≤ m σ , n , we have w i ( m ) ( x ) ≤ e / m w_i^{(m)}(x) \le e/m w i ( m ) ( x ) ≤ e / m . Moreover, L δ \mathcal{L}_\delta L δ is bounded by C δ C_\delta C δ and is 1 / δ 1/\delta 1/ δ -Lipschitz in the corresponding probability coordinate.
Changing a single label changes the direct loss contribution by at most e C δ / m eC_\delta/m e C δ / m . The total effect on the remaining leave-one-out losses is bounded by 2 / ( δ m ) 2/(\delta m) 2/ ( δ m ) . Therefore, the bounded-difference constant satisfies b m ≤ ( e C δ + 2 / δ ) / m b_m \le(eC_\delta+ 2/\delta)/m b m ≤ ( e C δ + 2/ δ ) / m . By McDiarmid’s inequality,
P ( ∣ J n δ ( x ; m , α ) − R n δ ( x ; m , α ) ∣ > ε ∣ G n ) ≤ 2 exp ( − 2 ε 2 m ( e C δ + 2 / δ ) 2 ) . \mathbb{P}\left(\left|J_n^\delta(x;m,\alpha)-R_n^\delta(x;m,\alpha)\right|>\varepsilon\mid\mathcal{G}_n\right)
\le2\exp\left(-\frac{2\varepsilon^2m}{(eC_\delta+2/\delta)^2}\right). P ( J n δ ( x ; m , α ) − R n δ ( x ; m , α ) > ε ∣ G n ) ≤ 2 exp ( − ( e C δ + 2/ δ ) 2 2 ε 2 m ) .
Taking a union bound over M n × A n \mathcal{M}_n \times\mathcal{A}_n M n × A n yields
P ( sup m ∈ M n , α ∈ A n ∣ J n δ − R n δ ∣ > ε ∣ G n ) ≤ 2 ∣ M n ∣ ∣ A n ∣ exp ( − 2 ε 2 m min , n ( e C δ + 2 / δ ) 2 ) ⟶ 0. \mathbb{P}\left(\sup_{m\in\mathcal{M}_n,\alpha\in\mathcal{A}_n}\left|J_n^\delta-R_n^\delta\right|>\varepsilon\mid\mathcal{G}_n\right)
\le2|\mathcal{M}_n||\mathcal{A}_n|\exp\left(-\frac{2\varepsilon^2m_{\min,n}}{(eC_\delta+2/\delta)^2}\right)\longrightarrow0. P ( m ∈ M n , α ∈ A n sup J n δ − R n δ > ε ∣ G n ) ≤ 2∣ M n ∣∣ A n ∣ exp ( − ( e C δ + 2/ δ ) 2 2 ε 2 m m i n , n ) ⟶ 0.
By Laplace smoothing, every leave-one-out local probability is at least 1 / ( K m ) 1/(Km) 1/ ( K m ) . Consequently, the ordinary log-loss is bounded by
B n = log ( K n ) = O ( log n ) B_n=\log(Kn)=O(\log n) B n = log ( K n ) = O ( log n )
uniformly over the candidate grid. On E n \mathcal{E}_n E n , we have J n ( x ; m , α ) = J n δ ( x ; m , α ) J_n(x;m,\alpha)=J_n^\delta(x;m,\alpha) J n ( x ; m , α ) = J n δ ( x ; m , α ) for every candidate. Furthermore, we have
sup m ∈ M n , α ∈ A n ∣ R n − R n δ ∣ ≤ ( B n + C δ ) P ( E n c ∣ G n ) = o ( 1 ) . \sup_{m\in\mathcal{M}_n,\alpha\in\mathcal{A}_n}|R_n-R_n^\delta|
\le(B_n+C_\delta)\mathbb{P}(\mathcal{E}_n^c\mid\mathcal{G}_n)=o(1). m ∈ M n , α ∈ A n sup ∣ R n − R n δ ∣ ≤ ( B n + C δ ) P ( E n c ∣ G n ) = o ( 1 ) .
Combining these bounds gives
sup m ∈ M n , α ∈ A n ∣ J n ( x ; m , α ) − R n ( x ; m , α ) ∣ → P 0. \sup_{m\in\mathcal{M}_n,\alpha\in\mathcal{A}_n}|J_n(x;m,\alpha)-R_n(x;m,\alpha)|\xrightarrow{\mathbb{P}}0. m ∈ M n , α ∈ A n sup ∣ J n ( x ; m , α ) − R n ( x ; m , α ) ∣ P 0.
We establish Lemma B.13. This lemma gives the risk gap used in later contradiction arguments: if the conditional mean of a candidate probability vector stays away from the true conditional probability, then its expected negative log-likelihood is strictly above the entropy floor.
Lemma B.13 (Risk Inflation). Fix a test point x x x and let Q ( x ) Q(x) Q ( x ) be any possibly random probability-vector estimator with strictly positive coordinates and integrable negative log-loss. Let F \mathcal{F} F be a sigma-algebra such that, conditional on F \mathcal{F} F , the label Y Y Y has distribution p ( x ) p(x) p ( x ) and is independent of Q ( x ) Q(x) Q ( x ) . Define q ˉ ( x ) : = E [ Q ( x ) ∣ F ] \bar{q}(x) := \mathbb{E}[Q(x) \mid\mathcal{F}] q ˉ ( x ) := E [ Q ( x ) ∣ F ] . If ∥ q ˉ ( x ) − p ( x ) ∥ 2 ≥ c \lVert\bar{q}(x)-p(x)\rVert_2 \ge c ∥ q ˉ ( x ) − p ( x ) ∥ 2 ≥ c for some constant c > 0 c > 0 c > 0 , then the conditional expected negative log-likelihood satisfies
E [ − log Q Y ( x ) ∣ F ] ≥ H ( p ( x ) ) + c 2 2 , \mathbb{E}[-\log Q_Y(x) \mid\mathcal{F}] \ge H(p(x)) + \frac{c^2}{2}, E [ − log Q Y ( x ) ∣ F ] ≥ H ( p ( x )) + 2 c 2 , where Y ∣ X = x ∼ p ( x ) Y \mid X=x \sim p(x) Y ∣ X = x ∼ p ( x ) and H ( p ( x ) ) : = − ∑ k = 1 K p ( k ; x ) log p ( k ; x ) H(p(x)) := -\sum_{k=1}^{K}p(k;x)\log p(k;x) H ( p ( x )) := − ∑ k = 1 K p ( k ; x ) log p ( k ; x ) .
Proof. Let p k : = p ( k ; x ) p_k := p(k;x) p k := p ( k ; x ) and write Q k ( x ) Q_k(x) Q k ( x ) for the k k k -th coordinate of Q ( x ) Q(x) Q ( x ) . Conditioning on F \mathcal{F} F , the expected negative log-likelihood is
E [ − log Q Y ( x ) ∣ F ] = ∑ k = 1 K p k E [ − log Q k ( x ) ∣ F ] . \mathbb{E}[-\log Q_Y(x) \mid\mathcal{F}] = \sum_{k=1}^{K}p_k\mathbb{E}[-\log Q_k(x) \mid\mathcal{F}]. E [ − log Q Y ( x ) ∣ F ] = k = 1 ∑ K p k E [ − log Q k ( x ) ∣ F ] . Since − log t -\log t − log t is convex on ( 0 , ∞ ) (0,\infty) ( 0 , ∞ ) , Jensen’s inequality gives
E [ − log Q k ( x ) ∣ F ] ≥ − log E [ Q k ( x ) ∣ F ] = − log q ˉ k ( x ) . \mathbb{E}[-\log Q_k(x) \mid\mathcal{F}] \ge-\log\mathbb{E}[Q_k(x) \mid\mathcal{F}] = -\log\bar{q}_k(x). E [ − log Q k ( x ) ∣ F ] ≥ − log E [ Q k ( x ) ∣ F ] = − log q ˉ k ( x ) . Therefore,
E [ − log Q Y ( x ) ∣ F ] ≥ − ∑ k = 1 K p k log q ˉ k ( x ) = H ( p ( x ) ) + D K L { p ( x ) ∥ q ˉ ( x ) } . \mathbb{E}[-\log Q_Y(x) \mid\mathcal{F}] \ge-\sum_{k=1}^{K}p_k\log\bar{q}_k(x) = H(p(x)) + D_{\mathrm{KL}}\{p(x)\Vert\bar{q}(x)\}. E [ − log Q Y ( x ) ∣ F ] ≥ − k = 1 ∑ K p k log q ˉ k ( x ) = H ( p ( x )) + D KL { p ( x ) ∥ q ˉ ( x )} . By Pinsker’s inequality,
D K L { p ( x ) ∥ q ˉ ( x ) } ≥ 2 ∥ p ( x ) − q ˉ ( x ) ∥ T V 2 = 1 2 ∥ p ( x ) − q ˉ ( x ) ∥ 1 2 . D_{\mathrm{KL}}\{p(x)\Vert\bar{q}(x)\} \ge2\lVert p(x)-\bar{q}(x)\rVert_{\mathrm{TV}}^2 = \frac{1}{2}\lVert p(x)-\bar{q}(x)\rVert_1^2. D KL { p ( x ) ∥ q ˉ ( x )} ≥ 2 ∥ p ( x ) − q ˉ ( x ) ∥ TV 2 = 2 1 ∥ p ( x ) − q ˉ ( x ) ∥ 1 2 . Since ∥ v ∥ 1 ≥ ∥ v ∥ 2 \lVert v\rVert_1 \ge\lVert v\rVert_2 ∥ v ∥ 1 ≥ ∥ v ∥ 2 for any finite-dimensional vector v v v , the bias condition implies
D K L { p ( x ) ∥ q ˉ ( x ) } ≥ 1 2 ∥ p ( x ) − q ˉ ( x ) ∥ 2 2 ≥ c 2 2 . D_{\mathrm{KL}}\{p(x)\Vert\bar{q}(x)\} \ge\frac{1}{2}\lVert p(x)-\bar{q}(x)\rVert_2^2 \ge\frac{c^2}{2}. D KL { p ( x ) ∥ q ˉ ( x )} ≥ 2 1 ∥ p ( x ) − q ˉ ( x ) ∥ 2 2 ≥ 2 c 2 . Combining the preceding displays yields
E [ − log Q Y ( x ) ∣ F ] ≥ H ( p ( x ) ) + c 2 2 . \mathbb{E}[-\log Q_Y(x) \mid\mathcal{F}] \ge H(p(x)) + \frac{c^2}{2}. E [ − log Q Y ( x ) ∣ F ] ≥ H ( p ( x )) + 2 c 2 . This completes the proof.
We establish Lemma B.14. This lemma shows that the local weights used by LAPE concentrate inside any fixed feature-space neighborhood of the query point. Since the largest candidate neighborhood radius is bounded by the bandwidth radius σ n \sigma_n σ n , Lemma B.11 implies that all weighted calibration samples become local asymptotically.
Lemma B.14 (Localization of Local Gaussian Weights). Fix a test point x x x and write z = ϕ ( x ) z=\phi(x) z = ϕ ( x ) . For any candidate neighborhood size m ∈ M n m\in\mathcal{M}_n m ∈ M n and any fixed radius r > 0 r>0 r > 0 , define the external weight contribution by
W o u t ( m ) ( r ) : = ∑ i ∈ N m ( x ) : ∥ z i − z ∥ 2 > r w i ( m ) ( x ) . W_{\mathrm{out}}^{(m)}(r) := \sum_{i\in\mathcal{N}_m(x):\lVert z_i-z\rVert_2>r}w_i^{(m)}(x). W out ( m ) ( r ) := i ∈ N m ( x ) : ∥ z i − z ∥ 2 > r ∑ w i ( m ) ( x ) . Assume that m ≤ m σ , n m\le m_{\sigma,n} m ≤ m σ , n for all m ∈ M n m\in\mathcal{M}_n m ∈ M n , as in the main algorithm. Then, under the conditions of Lemma B.11,
sup m ∈ M n W o u t ( m ) ( r ) → P 0. \sup_{m\in\mathcal{M}_n} W_{\mathrm{out}}^{(m)}(r) \xrightarrow{P} 0. m ∈ M n sup W out ( m ) ( r ) P 0.
Proof. By definition,
m σ , n = ⌈ n 2 ⌉ , σ n = d ( m σ , n ) ( x ) , m_{\sigma,n}=\left\lceil\frac{\sqrt{n}}{2}\right\rceil,\qquad\sigma_n=d_{(m_{\sigma,n})}(x), m σ , n = ⌈ 2 n ⌉ , σ n = d ( m σ , n ) ( x ) ,
where d ( m σ , n ) ( x ) d_{(m_{\sigma,n})}(x) d ( m σ , n ) ( x ) is the m σ , n m_{\sigma,n} m σ , n -th nearest-neighbor distance from z z z among the calibration embeddings. If m ≤ m σ , n m\le m_{\sigma,n} m ≤ m σ , n , then every point in N m ( x ) \mathcal{N}_m(x) N m ( x ) has distance at most σ n \sigma_n σ n from z z z . Hence, for any fixed r > 0 r>0 r > 0 , on the event { σ n ≤ r } \{\sigma_n\le r\} { σ n ≤ r } ,
N m ( x ) ⊆ B z ( r ) for all m ∈ M n . \mathcal{N}_m(x)\subseteq B_z(r)\qquad\text{for all }m\in\mathcal{M}_n. N m ( x ) ⊆ B z ( r ) for all m ∈ M n .
Consequently,
W o u t ( m ) ( r ) = 0 for all m ∈ M n W_{\mathrm{out}}^{(m)}(r)=0\qquad\text{for all }m\in\mathcal{M}_n W out ( m ) ( r ) = 0 for all m ∈ M n
on this event. Therefore,
sup m ∈ M n W o u t ( m ) ( r ) ≤ I { σ n > r } . \sup_{m\in\mathcal{M}_n}W_{\mathrm{out}}^{(m)}(r)\le\mathbb{I}\{\sigma_n>r\}. m ∈ M n sup W out ( m ) ( r ) ≤ I { σ n > r } .
Lemma B.11 gives σ n → P 0 \sigma_n\xrightarrow{P}0 σ n P 0 , and thus P ( σ n > r ) → 0 \mathbb{P}(\sigma_n>r)\to0 P ( σ n > r ) → 0 for every fixed r > 0 r>0 r > 0 . This proves
sup m ∈ M n W o u t ( m ) ( r ) → P 0. \sup_{m\in\mathcal{M}_n}W_{\mathrm{out}}^{(m)}(r)\xrightarrow{P}0. m ∈ M n sup W out ( m ) ( r ) P 0.
Proof of Theorem 5.1
We prove the consistency statement for a fixed test point x x x . The proof has three parts. First, we show that the local empirical frequency is uniformly stable over the candidate neighborhood grid. Second, we prove that the empirical risk minimization step cannot select a candidate whose conditional mean remains separated from the true conditional probability. Finally, we combine these two facts to obtain convergence of the final LAPE estimator.
Step 1: Variance control.
Proposition B.15 (The good set Ω g o o d ( x , n ) \Omega_{\mathrm{good}}(x,n) Ω good ( x , n ) ). For m ∈ M n m\in\mathcal{M}_n m ∈ M n , let p ˉ 0 ( x , m ) \bar{p}_0(x,m) p ˉ 0 ( x , m ) be the conditional mean defined in Definition B.1. For any fixed ε > 0 \varepsilon>0 ε > 0 , define
Ω g o o d ( x , n ; ε ) : = { sup m ∈ M n ∥ p ~ 0 ( x , m ) − p ˉ 0 ( x , m ) ∥ 2 ≤ ε } . \Omega_{\mathrm{good}}(x,n;\varepsilon):=\left\{\sup_{m\in\mathcal{M}_n}\|\widetilde{p}_0(x,m)-\bar{p}_0(x,m)\|_2\le\varepsilon\right\}. Ω good ( x , n ; ε ) := { m ∈ M n sup ∥ p 0 ( x , m ) − p ˉ 0 ( x , m ) ∥ 2 ≤ ε } . Under the assumptions above,
P ( Ω g o o d ( x , n ; ε ) ) → 1. \mathbb{P}\left(\Omega_{\mathrm{good}}(x,n;\varepsilon)\right)\to1. P ( Ω good ( x , n ; ε ) ) → 1. Equivalently,
sup m ∈ M n ∥ p ~ 0 ( x , m ) − p ˉ 0 ( x , m ) ∥ 2 = o P ( 1 ) . \sup_{m\in\mathcal{M}_n}\|\widetilde{p}_0(x,m)-\bar{p}_0(x,m)\|_2=o_P(1). m ∈ M n sup ∥ p 0 ( x , m ) − p ˉ 0 ( x , m ) ∥ 2 = o P ( 1 ) .
Proof of Proposition B.15. Fix a test point x x x and condition on F n : = σ ( z 1 , … , z n ) \mathcal{F}_n:=\sigma(z_1,\ldots,z_n) F n := σ ( z 1 , … , z n ) . Under i.i.d. assumption and Assumption B.2, the labels Y 1 , … , Y n Y_1,\ldots,Y_n Y 1 , … , Y n are conditionally independent given F n \mathcal{F}_n F n , with
E [ e Y i ∣ F n ] = p ϕ ( z i ) , i ∈ [ n ] . \mathbb{E}[e_{Y_i}\mid\mathcal{F}_n]=p_\phi(z_i),\qquad i\in[n]. E [ e Y i ∣ F n ] = p ϕ ( z i ) , i ∈ [ n ] .
Since P Z P_Z P Z has a density, the distances from the fixed query embedding z = ϕ ( x ) z=\phi(x) z = ϕ ( x ) are almost surely distinct. Thus ∣ N m ( x ) ∣ = m |\mathcal{N}_m(x)|=m ∣ N m ( x ) ∣ = m for every m ∈ M n m\in\mathcal{M}_n m ∈ M n , and the neighbor sets are determined by F n \mathcal{F}_n F n .
By the definition of the Laplace-smoothed local frequency and its conditional mean,
p ~ 0 ( x , m ) = ∑ i ∈ N m ( x ) e Y i + u K m + 1 , p ˉ 0 ( x , m ) = ∑ i ∈ N m ( x ) p ϕ ( z i ) + u K m + 1 , \widetilde{p}_0(x,m)=\frac{\sum_{i\in\mathcal{N}_m(x)}e_{Y_i}+u_K}{m+1},\qquad\bar{p}_0(x,m)=\frac{\sum_{i\in\mathcal{N}_m(x)}p_\phi(z_i)+u_K}{m+1}, p 0 ( x , m ) = m + 1 ∑ i ∈ N m ( x ) e Y i + u K , p ˉ 0 ( x , m ) = m + 1 ∑ i ∈ N m ( x ) p ϕ ( z i ) + u K ,
where u K = ( 1 / K , … , 1 / K ) u_K=(1/K,\ldots,1/K) u K = ( 1/ K , … , 1/ K ) . Consequently,
p ~ 0 ( x , m ) − p ˉ 0 ( x , m ) = 1 m + 1 ∑ i ∈ N m ( x ) ( e Y i − p ϕ ( z i ) ) . \widetilde{p}_0(x,m)-\bar{p}_0(x,m)=\frac{1}{m+1}\sum_{i\in\mathcal{N}_m(x)}\left(e_{Y_i}-p_\phi(z_i)\right). p 0 ( x , m ) − p ˉ 0 ( x , m ) = m + 1 1 i ∈ N m ( x ) ∑ ( e Y i − p ϕ ( z i ) ) .
For each class k ∈ [ K ] k\in[K] k ∈ [ K ] , the summands I ( Y i = k ) − p ϕ , k ( z i ) \mathbb{I}(Y_i=k)-p_{\phi,k}(z_i) I ( Y i = k ) − p ϕ , k ( z i ) are conditionally independent, centered, and have range length one. Hoeffding’s inequality therefore gives, for every ε > 0 \varepsilon>0 ε > 0 ,
P ( ∣ p ~ 0 ( k ; x , m ) − p ˉ 0 ( k ; x , m ) ∣ > ε K ∣ F n ) ≤ 2 exp ( − 2 ( m + 1 ) 2 ε 2 m K ) ≤ 2 exp ( − 2 m ε 2 K ) . \mathbb{P}\left(\left|\widetilde{p}_0(k;x,m)-\bar{p}_0(k;x,m)\right|>\frac{\varepsilon}{\sqrt{K}}\mathrel{\Big|}\mathcal{F}_n\right)\le2\exp\left(-\frac{2(m+1)^2\varepsilon^2}{mK}\right)\le2\exp\left(-\frac{2m\varepsilon^2}{K}\right). P ( ∣ p 0 ( k ; x , m ) − p ˉ 0 ( k ; x , m ) ∣ > K ε F n ) ≤ 2 exp ( − m K 2 ( m + 1 ) 2 ε 2 ) ≤ 2 exp ( − K 2 m ε 2 ) .
Applying a union bound over the K K K coordinates and all m ∈ M n m \in\mathcal{M}_n m ∈ M n yields
P ( sup m ∈ M n ∥ p ~ 0 ( x , m ) − p ‾ 0 ( x , m ) ∥ 2 > ε | F n ) ≤ 2 K ∣ M n ∣ exp ( − 2 m min , n ε 2 K ) . \mathbb{P}\left(\sup_{m\in\mathcal{M}_n}\|\widetilde{p}_0(x,m)-\overline{p}_0(x,m)\|_2>\varepsilon\ \middle|\ \mathcal{F}_n\right)\leq2K|\mathcal{M}_n|\exp\left(-\frac{2m_{\min,n}\varepsilon^2}{K}\right). P ( m ∈ M n sup ∥ p 0 ( x , m ) − p 0 ( x , m ) ∥ 2 > ε F n ) ≤ 2 K ∣ M n ∣ exp ( − K 2 m m i n , n ε 2 ) .
By Assumption B.7, log ∣ M n ∣ = o ( m min , n ) \log|\mathcal{M}_n|=o(m_{\min,n}) log ∣ M n ∣ = o ( m m i n , n ) and m min , n → ∞ m_{\min,n}\to\infty m m i n , n → ∞ . Hence the right-hand side converges to zero. Taking expectations over F n \mathcal{F}_n F n gives
P ( sup m ∈ M n ∥ p ~ 0 ( x , m ) − p ‾ 0 ( x , m ) ∥ 2 > ε ) ⟶ 0. \mathbb{P}\left(\sup_{m\in\mathcal{M}_n}\|\widetilde{p}_0(x,m)-\overline{p}_0(x,m)\|_2>\varepsilon\right)\longrightarrow0. P ( m ∈ M n sup ∥ p 0 ( x , m ) − p 0 ( x , m ) ∥ 2 > ε ) ⟶ 0.
This proves the proposition.
Step 2: Bias convergence.
Proposition B.16 (Bias convergence of the selected candidate). Let ( m n ∗ , α n ∗ ) (m_n^*,\alpha_n^*) ( m n ∗ , α n ∗ ) be any minimizer of J n ( x ; m , α ) \mathcal{J}_n(x;m,\alpha) J n ( x ; m , α ) over M n × A n \mathcal{M}_n\times\mathcal{A}_n M n × A n . Define the conditional mean of the fused candidate by
q ‾ n ( x ; m , α ) : = ( 1 − α ) π a n c h o r ( x ) + α p ‾ 0 ( x , m ) . \overline{q}_n(x;m,\alpha):=(1-\alpha)\pi^{\mathrm{anchor}}(x)+\alpha\overline{p}_0(x,m). q n ( x ; m , α ) := ( 1 − α ) π anchor ( x ) + α p 0 ( x , m ) . Then ∥ q ‾ n ( x ; m n ∗ , α n ∗ ) − p ( x ) ∥ 2 = o P ( 1 ) \|\overline{q}_n(x;m_n^*,\alpha_n^*)-p(x)\|_2=o_P(1) ∥ q n ( x ; m n ∗ , α n ∗ ) − p ( x ) ∥ 2 = o P ( 1 ) . Consequently, Bias L A P E ( x ; m n ∗ ) = o P ( 1 ) \operatorname{Bias}_{\mathrm{LAPE}}(x;m_n^*)=o_P(1) Bias LAPE ( x ; m n ∗ ) = o P ( 1 ) .
Proof. We argue by contradiction. Suppose that there exist constants c > 0 c>0 c > 0 and ρ > 0 \rho>0 ρ > 0 and a subsequence, still indexed by n n n , such that
P ( ∥ q ‾ n ( x ; m n ∗ , α n ∗ ) − p ( x ) ∥ 2 ≥ c ) ≥ ρ . \mathbb{P}\left(\|\overline{q}_n(x;m_n^*,\alpha_n^*)-p(x)\|_2\geq c\right)\geq\rho. P ( ∥ q n ( x ; m n ∗ , α n ∗ ) − p ( x ) ∥ 2 ≥ c ) ≥ ρ . Consider this event together with the good event from Proposition B.15 and the uniform risk-concentration event from Lemma B.12, both of which have probability tending to one.
We first lower-bound the risk of such a persistently biased selected candidate. Because p ϕ p_\phi p ϕ and π a n c h o r \pi^{\mathrm{anchor}} π anchor are Lipschitz in the retrieval space, and because Lemma B.14 localizes the weights inside arbitrarily small balls around z z z , define the conditional mean of the leave-one-out candidate from Lemma B.12 by
q ‾ i , n ( − i ) ( m , α ) : = E [ q i , n ( − i ) ( m , α ) ∣ G n ] . \overline{q}^{(-i)}_{i,n}(m,\alpha):=\mathbb{E}\left[q^{(-i)}_{i,n}(m,\alpha)\mid\mathcal{G}_n\right]. q i , n ( − i ) ( m , α ) := E [ q i , n ( − i ) ( m , α ) ∣ G n ] . For any i ∈ N m n ∗ ( x ) i\in\mathcal{N}_{m_n^*}(x) i ∈ N m n ∗ ( x ) , Lipschitz continuity and the leave-one-out construction give
∥ q ‾ i , n ( − i ) ( m n ∗ , α n ∗ ) − p ϕ ( z i ) ∥ 2 ≥ ∥ q ‾ n ( x ; m n ∗ , α n ∗ ) − p ϕ ( z ) ∥ 2 − ( L a n c h o r + L p ) ∥ z i − z ∥ 2 − C m n ∗ , \left\|\overline{q}^{(-i)}_{i,n}(m_n^*,\alpha_n^*)-p_\phi(z_i)\right\|_2
\geq\left\|\overline{q}_n(x;m_n^*,\alpha_n^*)-p_\phi(z)\right\|_2-(L_{\mathrm{anchor}}+L_{p})\|z_i-z\|_2-\frac{C}{m_n^*}, q i , n ( − i ) ( m n ∗ , α n ∗ ) − p ϕ ( z i ) 2 ≥ ∥ q n ( x ; m n ∗ , α n ∗ ) − p ϕ ( z ) ∥ 2 − ( L anchor + L p ) ∥ z i − z ∥ 2 − m n ∗ C , for some constant C > 0 C>0 C > 0 . By Lemma B.11, ∥ z i − z ∥ 2 ≤ σ n = o P ( 1 ) \|z_i-z\|_2\leq\sigma_n=o_P(1) ∥ z i − z ∥ 2 ≤ σ n = o P ( 1 ) uniformly over the neighborhood, while m n ∗ ≥ m min , n → ∞ m_n^*\geq m_{\min,n}\to\infty m n ∗ ≥ m m i n , n → ∞ . Thus, on the event of a bias of at least c c c at x x x , the left-hand side is at least c / 2 c/2 c /2 with probability tending to one. Lemma B.13 then yields a positive excess conditional risk. Since H ( p ϕ ( z i ) ) = H ( p ( x ) ) + o P ( 1 ) H(p_\phi(z_i))=H(p(x))+o_P(1) H ( p ϕ ( z i )) = H ( p ( x )) + o P ( 1 ) uniformly over the neighborhood, we obtain
R n ( x ; m n ∗ , α n ∗ ) ≥ H ( p ( x ) ) + κ c − o P ( 1 ) R_n(x;m_n^*,\alpha_n^*)\geq H(p(x))+\kappa_c-o_P(1) R n ( x ; m n ∗ , α n ∗ ) ≥ H ( p ( x )) + κ c − o P ( 1 ) for some κ c > 0 \kappa_c>0 κ c > 0 .
For example, after choosing the local radius so that the Lipschitz error is small enough, one may take κ c = c 2 / 16 \kappa_c=c^2/16 κ c = c 2 /16 . By Lemma B.12, the empirical objective is uniformly close to R n R_n R n , and hence
J n ( x ; m n ∗ , α n ∗ ) ≥ H ( p ( x ) ) + κ c − o P ( 1 ) . \mathcal{J}_n(x;m_n^*,\alpha_n^*)\geq H(p(x))+\kappa_c-o_P(1). J n ( x ; m n ∗ , α n ∗ ) ≥ H ( p ( x )) + κ c − o P ( 1 ) . We now construct a consistent competitor. By Assumption B.7, there exists m n ∘ ∈ M n m_n^\circ\in\mathcal{M}_n m n ∘ ∈ M n such that m n ∘ → ∞ m_n^\circ\to\infty m n ∘ → ∞ and m n ∘ / n → 0 m_n^\circ/n\to0 m n ∘ / n → 0 , and the grid contains α = 1 \alpha=1 α = 1 . Consider the pure-local candidate ( m n ∘ , 1 ) (m_n^\circ,1) ( m n ∘ , 1 ) . Since m n ∘ ∈ M n m_n^\circ\in\mathcal{M}_n m n ∘ ∈ M n and max M n ≤ m σ , n \max\mathcal{M}_n\leq m_{\sigma,n} max M n ≤ m σ , n , its neighborhood radius satisfies
d ( m n ∘ ) ( x ) ≤ σ n . d_{(m_n^\circ)}(x)\leq\sigma_n. d ( m n ∘ ) ( x ) ≤ σ n . Lemma B.11 gives σ n → 0 \sigma_n\to0 σ n → 0 in probability, while m n ∘ → ∞ m_n^\circ\to\infty m n ∘ → ∞ by Assumption B.7. Hence the pure-local neighborhood radius shrinks to zero and its sample size diverges.
By the definition of the conditional local mean,
p ˉ 0 ( x , m n ∘ ) = ∑ i ∈ N m n ∘ ( x ) p ϕ ( z i ) + u K m n ∘ + 1 , \bar{p}_0(x,m_n^\circ)=\frac{\sum_{i\in\mathcal{N}_{m_n^\circ}(x)}p_\phi(z_i)+u_K}{m_n^\circ+1}, p ˉ 0 ( x , m n ∘ ) = m n ∘ + 1 ∑ i ∈ N m n ∘ ( x ) p ϕ ( z i ) + u K ,
where u K = ( 1 / K , … , 1 / K ) u_K=(1/K,\ldots,1/K) u K = ( 1/ K , … , 1/ K ) . For a fixed test point satisfying p ( x ) = p ϕ ( z ) p(x)=p_\phi(z) p ( x ) = p ϕ ( z ) , Assumption B.4 and d ( m n ∘ ) ( x ) ≤ σ n d_{(m_n^\circ)}(x)\leq\sigma_n d ( m n ∘ ) ( x ) ≤ σ n yield
∥ p ˉ 0 ( x , m n ∘ ) − p ( x ) ∥ 2 ≤ m n ∘ m n ∘ + 1 L p σ n + ∥ u K − p ( x ) ∥ 2 m n ∘ + 1 → P 0. \left\|\bar{p}_0(x,m_n^\circ)-p(x)\right\|_2\leq\frac{m_n^\circ}{m_n^\circ+1}L_p\sigma_n+\frac{\left\|u_K-p(x)\right\|_2}{m_n^\circ+1}\xrightarrow{P}0. ∥ p ˉ 0 ( x , m n ∘ ) − p ( x ) ∥ 2 ≤ m n ∘ + 1 m n ∘ L p σ n + m n ∘ + 1 ∥ u K − p ( x ) ∥ 2 P 0.
Furthermore, Proposition B.15 gives
∥ p ~ 0 ( x , m n ∘ ) − p ˉ 0 ( x , m n ∘ ) ∥ 2 → P 0. \left\|\widetilde{p}_0(x,m_n^\circ)-\bar{p}_0(x,m_n^\circ)\right\|_2\xrightarrow{P}0. ∥ p 0 ( x , m n ∘ ) − p ˉ 0 ( x , m n ∘ ) ∥ 2 P 0.
Therefore, by the triangle inequality,
∥ p ~ 0 ( x , m n ∘ ) − p ( x ) ∥ 2 → P 0. \left\|\widetilde{p}_0(x,m_n^\circ)-p(x)\right\|_2\xrightarrow{P}0. ∥ p 0 ( x , m n ∘ ) − p ( x ) ∥ 2 P 0.
Thus both the conditional mean and the empirical local frequency of the pure-local competitor converge to p ( x ) p(x) p ( x ) in probability.
For each i ∈ N m n ∘ ( x ) i\in\mathcal{N}_{m_n^\circ}(x) i ∈ N m n ∘ ( x ) , the leave-one-out predictor is conditionally independent of Y i Y_i Y i given G n \mathcal{G}_n G n , under the fixed-anchor assumption. By the Lipschitz continuity of p ϕ p_\phi p ϕ and the localization of the neighborhood, its conditional mean satisfies
∥ E [ q i , n ( − i ) ( m n ∘ , 1 ) ∣ G n ] − p ϕ ( z i ) ∥ 2 ≤ 2 L p σ n + O ( 1 / m n ∘ ) = o p ( 1 ) . \left\|\mathbb{E}\left[q_{i,n}^{(-i)}(m_n^\circ,1)\mid\mathcal{G}_n\right]-p_\phi(z_i)\right\|_2\leq2L_p\sigma_n+O(1/m_n^\circ)=o_p(1). E [ q i , n ( − i ) ( m n ∘ , 1 ) ∣ G n ] − p ϕ ( z i ) 2 ≤ 2 L p σ n + O ( 1/ m n ∘ ) = o p ( 1 ) .
By conditional Hoeffding concentration and log n = o ( m min , n ) \log n=o(m_{\min,n}) log n = o ( m m i n , n ) , the leave-one-out predictions concentrate uniformly around their conditional means. Under Assumption B.6 , all their coordinates exceed δ \delta δ with probability tending to one. The log-loss is then bounded and continuous. The complementary event contributes o p ( 1 ) o_p(1) o p ( 1 ) to the conditional risk, since its probability is exponentially small in m min , n m_{\min,n} m m i n , n and Laplace smoothing bounds the loss by O ( log n ) O(\log n) O ( log n ) . Therefore,
R n ( x ; m n ∘ , 1 ) = ∑ i ∈ N m n ∘ ( x ) w i ( m n ∘ ) ( x ) H ( p ϕ ( z i ) ) + o p ( 1 ) . R_n(x;m_n^\circ,1)=\sum_{i\in\mathcal{N}_{m_n^\circ}(x)}w_i^{(m_n^\circ)}(x)H(p_\phi(z_i))+o_p(1). R n ( x ; m n ∘ , 1 ) = i ∈ N m n ∘ ( x ) ∑ w i ( m n ∘ ) ( x ) H ( p ϕ ( z i )) + o p ( 1 ) .
Since the neighborhood radius converges to zero and p ϕ p_\phi p ϕ is Lipschitz continuous, the entropy terms converge uniformly to H ( p ( x ) ) H(p(x)) H ( p ( x )) . Therefore,
R n ( x ; m n ∘ , 1 ) = H ( p ( x ) ) + o p ( 1 ) . R_n(x;m_n^\circ,1)=H(p(x))+o_p(1). R n ( x ; m n ∘ , 1 ) = H ( p ( x )) + o p ( 1 ) .
Using Lemma B.12 again gives
J n ( x ; m n ∘ , 1 ) ≤ H ( p ( x ) ) + o p ( 1 ) . J_n(x;m_n^\circ,1)\leq H(p(x))+o_p(1). J n ( x ; m n ∘ , 1 ) ≤ H ( p ( x )) + o p ( 1 ) .
For sufficiently large n n n , the competitor has strictly smaller empirical objective than any candidate with the non-vanishing bias described above:
J n ( x ; m n ∘ , 1 ) < J n ( x ; m n ∗ , α n ∗ ) J_n(x;m_n^\circ,1)<J_n(x;m_n^*,\alpha_n^*) J n ( x ; m n ∘ , 1 ) < J n ( x ; m n ∗ , α n ∗ )
with probability tending to one on that event. This contradicts the definition of ( m n ∗ , α n ∗ ) (m_n^*,\alpha_n^*) ( m n ∗ , α n ∗ ) as a minimizer of J n J_n J n . Hence the selected conditional mean bias must vanish in probability:
∥ q ˉ n ( x ; m n ∗ , α n ∗ ) − p ( x ) ∥ 2 → P 0. \left\|\bar{q}_n(x;m_n^*,\alpha_n^*)-p(x)\right\|_2\xrightarrow{P}0. ∥ q ˉ n ( x ; m n ∗ , α n ∗ ) − p ( x ) ∥ 2 P 0.
Finally, since
Bias L A P E ( x ; m n ∗ ) = min α ∈ [ 0 , 1 ] ∥ ( 1 − α ) π a n c h o r ( x ) + α p ˉ 0 ( x , m n ∗ ) − p ( x ) ∥ 2 \operatorname{Bias}_{\mathrm{LAPE}}(x;m_n^*)=\min_{\alpha\in[0,1]}\left\|(1-\alpha)\pi^{\mathrm{anchor}}(x)+\alpha\bar{p}_0(x,m_n^*)-p(x)\right\|_2 Bias LAPE ( x ; m n ∗ ) = α ∈ [ 0 , 1 ] min ( 1 − α ) π anchor ( x ) + α p ˉ 0 ( x , m n ∗ ) − p ( x ) 2
is no larger than the same expression evaluated at α = α n ∗ \alpha=\alpha_n^* α = α n ∗ , the last display also implies
Bias L A P E ( x ; m n ∗ ) → P 0. \operatorname{Bias}_{\mathrm{LAPE}}(x;m_n^*)\xrightarrow{P}0. Bias LAPE ( x ; m n ∗ ) P 0.
Step 3: Completing the proof.
Let E n ( ε ) : = { ∥ p ^ n ( x ) − p ( x ) ∥ 2 > ε } E_n(\varepsilon) := \{\|\hat{p}_n(x) - p(x)\|_2 > \varepsilon\} E n ( ε ) := { ∥ p ^ n ( x ) − p ( x ) ∥ 2 > ε } . Using the definition of the final estimator and the conditional mean q ˉ n \bar{q}_n q ˉ n , we decompose
∥ p ^ n ( x ) − p ( x ) ∥ 2 ≤ ∥ p ^ n ( x ) − q ˉ n ( x ; m n ∗ , α n ∗ ) ∥ 2 + ∥ q ˉ n ( x ; m n ∗ , α n ∗ ) − p ( x ) ∥ 2 ≤ sup m ∈ M n ∥ p ~ 0 ( x , m ) − p ˉ 0 ( x , m ) ∥ 2 + ∥ q ˉ n ( x ; m n ∗ , α n ∗ ) − p ( x ) ∥ 2 . \begin{aligned}
\|\hat{p}_n(x) - p(x)\|_2 \le\|\hat{p}_n(x) - \bar{q}_n(x; m_n^*, \alpha_n^*)\|_2 + \|\bar{q}_n(x; m_n^*, \alpha_n^*) - p(x)\|_2 \\
&\le\sup_{m \in\mathcal{M}_n} \|\tilde{p}_0(x,m) - \bar{p}_0(x,m)\|_2 + \|\bar{q}_n(x; m_n^*, \alpha_n^*) - p(x)\|_2.
\end{aligned} ∥ p ^ n ( x ) − p ( x ) ∥ 2 ≤ ∥ p ^ n ( x ) − q ˉ n ( x ; m n ∗ , α n ∗ ) ∥ 2 + ∥ q ˉ n ( x ; m n ∗ , α n ∗ ) − p ( x ) ∥ 2 ≤ m ∈ M n sup ∥ p ~ 0 ( x , m ) − p ˉ 0 ( x , m ) ∥ 2 + ∥ q ˉ n ( x ; m n ∗ , α n ∗ ) − p ( x ) ∥ 2 .
The first term converges to zero in probability by Proposition B.15 ; the second term converges to zero in probability by Proposition B.16 . Therefore, for every fixed ε > 0 \varepsilon> 0 ε > 0 ,
P ( ∥ p ^ n ( x ) − p ( x ) ∥ 2 > ε ) → 0. \mathbb{P}(\|\hat{p}_n(x) - p(x)\|_2 > \varepsilon) \to0. P ( ∥ p ^ n ( x ) − p ( x ) ∥ 2 > ε ) → 0.
This proves Theorem 5.1 .
Experimental Details
Datasets
The experiments cover controlled synthetic diagnostics, tabular classification, medical-image transfer learning, natural-image classification, and multi-view or multimodal settings. The tabular suite includes Obesity Risk [32 ] , Financial Fraud [33 ] , Shuttle and other Statlog-style datasets [19 ] , ACS Income and Adult [9 , 20 ] , Letter Recognition and its noisy variant [12 ] , Forest Cover [6 ] , MiniBooNE [34 ] , EEG Eye State [35 ] , Image Segmentation [40 ] , and Vehicle Silhouettes [28 ] . The visual suite includes MedMNIST tasks such as PneumoniaMNIST, DermaMNIST, and BreastMNIST [47 ] , MHIST [43 ] , CIFAR-10/100 [21 ] , CIFAR-10-C [16 ] , and DTD [8 ] . The multi-view and multimodal evaluations include UCI Multiple Features [11 ] , the Optical Recognition of Handwritten Digits dataset [1 ] , and HAM10000 image–metadata tasks [39 ] . Synthetic diagnostics are generated specifically to isolate local heterogeneity, calibration/reference-ratio effects, covariate shift, high-dimensional retrieval, structural noise, architecture depth, adaptive weighting, anchor-capacity and cross-fitting effects, and multi-view interaction.
Additional Baselines
In addition to classical post-hoc calibrators such as TS/VS [14 ] , Dirichlet calibration [23 ] , LTS [10 ] , ETS [52 ] , and isotonic-regression variants such as IROvA/MIR [50 , 51 ] , we include recent feature-aware and grouping-based baselines, including FC [37 ] and SAG [46 ] . 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. Detailed full-result tables are collected in Appendix D.
Additional Metrics
The main text focuses on NLL, ECE, and accuracy for readability. Complete appendix tables also report ACE when applicable. For a test set of size N N N , let y ^ i = arg max y p ^ y ( x i ) \hat{y}_i = \arg\max_y \hat{p}_y(x_i) y ^ i = arg max y p ^ y ( x i ) and c ^ i = max y p ^ y ( x i ) \hat{c}_i = \max_y \hat{p}_y(x_i) c ^ i = max y p ^ y ( x i ) . Accuracy is
Acc = 1 N ∑ i = 1 N 1 { y ^ i = y i } . \operatorname{Acc} = \frac{1}{N}\sum_{i=1}^{N} \mathbf{1}\{\hat{y}_i = y_i\}. Acc = N 1 i = 1 ∑ N 1 { y ^ i = y i } .
NLL and ECE are defined in Section 6. ACE follows the adaptive calibration-error protocol of Nixon et al. [2019]: for each class k k k , examples are sorted by the predicted probability p ^ k ( x i ) \hat{p}_k(x_i) p ^ k ( x i ) , divided into equal-frequency adaptive bins B k , m \mathcal{B}_{k,m} B k , m , and compared by
ACE = 1 K ∑ k = 1 K ∑ m = 1 M ∣ B k , m ∣ N ∣ 1 ∣ B k , m ∣ ∑ i ∈ B k , m 1 { y i = k } − 1 ∣ B k , m ∣ ∑ i ∈ B k , m p ^ k ( x i ) ∣ . \operatorname{ACE} = \frac{1}{K}\sum_{k=1}^{K}\sum_{m=1}^{M}\frac{|\mathcal{B}_{k,m}|}{N}\left|\frac{1}{|\mathcal{B}_{k,m}|}\sum_{i\in\mathcal{B}_{k,m}}\mathbf{1}\{y_i=k\}-\frac{1}{|\mathcal{B}_{k,m}|}\sum_{i\in\mathcal{B}_{k,m}}\hat{p}_k(x_i)\right|. ACE = K 1 k = 1 ∑ K m = 1 ∑ M N ∣ B k , m ∣ ∣ B k , m ∣ 1 i ∈ B k , m ∑ 1 { y i = k } − ∣ B k , m ∣ 1 i ∈ B k , m ∑ p ^ k ( x i ) .
These metrics are diagnostic complements rather than separate headline objectives: lower NLL, ECE, and ACE are better, while higher accuracy is better. Appendix D reports the corresponding values for the full method suite.
For appendix tables that compare a calibrated anchor with its LAPE-refined version, we report the relative percentage improvement rather than the raw metric value. For an error-type metric M M M , such as NLL, ECE, or ACE, the reported value is
Δ M ( % ) = 100 × M ( anchor ) − M ( anchor + LAPE ) M ( anchor ) . \Delta M(\%) = 100 \times\frac{M(\text{anchor}) - M(\text{anchor + LAPE})}{M(\text{anchor})}. Δ M ( % ) = 100 × M ( anchor ) M ( anchor ) − M ( anchor + LAPE ) .
For accuracy, the reported value is
Δ Acc ( % ) = 100 × Acc ( anchor + LAPE ) − Acc ( anchor ) Acc ( anchor ) . \Delta\operatorname{Acc}(\%) = 100 \times\frac{\operatorname{Acc}(\text{anchor + LAPE}) - \operatorname{Acc}(\text{anchor})}{\operatorname{Acc}(\text{anchor})}. Δ Acc ( % ) = 100 × Acc ( anchor ) Acc ( anchor + LAPE ) − Acc ( anchor ) .
Thus, a positive value always indicates an improvement after applying LAPE, whereas a negative value indicates that the LAPE refinement slightly worsens the corresponding metric. 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. Reporting relative changes therefore directly measures the additional benefit contributed by LAPE and makes improvements comparable across datasets, anchors, and metrics with different numerical scales.
Backbones and Experimental Frameworks
Table references below summarize the backbone or experimental framework used by each supplementary result table. The choice of backbone follows the role of each experiment. For image data, we use standard transfer-learning backbones such as ResNet and DenseNet. For tabular data, we use MLP predictors because the datasets are moderate in size and overly complex deep architectures can easily overfit. The same principle is used for synthetic simulations, where compact MLPs are sufficient to isolate the intended diagnostic factor. Unless otherwise stated, synthetic single-view experiments use an MLP with hidden layers (64, 32) and ReLU activations. The architecture-depth diagnostic separately uses shallow, medium, and deep MLPs with hidden layers (32), (64, 32), and (128, 64, 32). When an experiment is specially constructed to study a stress scenario rather than to benchmark a standard dataset, the detailed construction is described in the corresponding subsection. The post-hoc calibration and LAPE refinement experiments were run on a single local workstation with an Intel Core 5 120U CPU with 10 cores and 12 logical processors and 32 GB RAM; all paired comparisons within each table were conducted under the same hardware and software environment.
Table 3 summarizes the experimental frameworks used in the supplementary experiments, including the dataset or diagnostic setting and the corresponding backbone or calibration framework for each result table.
Table 3. Summary of experimental frameworks for supplementary experiments. Each row reports the dataset or diagnostic setting, together with the backbone or calibration framework used for the corresponding result table.
Supplementary Experimental Results
Computational Cost
We distinguish the one-time index construction cost from per-query inference cost. Before inference, LAPE builds a spatial index such as a KD-tree [5 ] or Ball-tree [31 ] on D r e f \mathcal{D}_{\mathrm{ref}} D ref . This costs O ( N log N ) O(N \log N) O ( N log N ) or O ( N d log N ) O(Nd \log N) O ( N d log N ) depending on the index and dimension, and is amortized across future queries.
The online inference process begins with the neighbor retrieval phase, denoted as T r e t r i e v e T_{\mathrm{retrieve}} T retrieve . This component represents the computational time required to query the spatial index and identify the K max K_{\max} K m a x nearest neighbors for a test sample. By leveraging the pre-built index, we avoid the prohibitive linear scan O ( N ⋅ d ) O(N \cdot d) O ( N ⋅ d ) associated with naïve methods. Instead, the search complexity is reduced to O ( d log N ) O(d \log N) O ( d log N ) in the average case. In high-dimensional regimes where distance metrics may degrade, applying PCA as a preconditioner ensures the effective dimension d ′ d' d ′ remains small, strictly maintaining the efficient logarithmic bound T r e t r i e v e ≈ O ( d ′ log N ) T_{\mathrm{retrieve}} \approx O(d' \log N) T retrieve ≈ O ( d ′ log N ) .
Following retrieval, the algorithm enters the parameter optimization phase, denoted as T o p t i m T_{\mathrm{optim}} T optim . This component measures the time needed to determine the optimal neighborhood size $k^* \in [k_{\min}, K_{\max}] and interpolation weight α ∗ ∈ A \alpha^{*} \in\mathcal{A} α ∗ ∈ A . We employ a LOO protocol that iterates through candidate sizes k k k . For a specific neighborhood size k k k , computing the LOO likelihood involves aggregating evidence from k k k neighbors. Summing over the search space results in an arithmetic progression of operations ∑ k = 1 K max k ≈ O ( K max 2 ) \sum_{k=1}^{K_{\max}} k \approx O(K_{\max}^{2}) ∑ k = 1 K m a x k ≈ O ( K m a x 2 ) . Consequently, considering the grid search over α \alpha α , the optimization complexity is derived as T o p t i m = O ( ∣ A ∣ ⋅ K max 2 ) T_{\mathrm{optim}} = O(|\mathcal{A}| \cdot K_{\max}^{2}) T optim = O ( ∣ A ∣ ⋅ K m a x 2 ) .
Combining these two components, the total inference complexity per query is given by
T t o t a l = T r e t r i e v e + T o p t i m ≈ O ( d ′ log N + ∣ A ∣ ⋅ K max 2 ) , (11) T_{\mathrm{total}} = T_{\mathrm{retrieve}} + T_{\mathrm{optim}} \approx O(d' \log N + |\mathcal{A}| \cdot K_{\max}^{2}), \tag*{(11)} T total = T retrieve + T optim ≈ O ( d ′ log N + ∣ A ∣ ⋅ K m a x 2 ) , (11)
where ∣ A ∣ |\mathcal{A}| ∣ A ∣ is the number of interpolation candidates. The quadratic term is controlled by using a moderate K max K_{\max} K m a x , motivated by the consistency analysis, and by evaluating k k k on a grid in practice. The timing study below verifies that this implementation is practical for the dataset sizes used in the paper.
Empirical runtime with acceleration. We compare the naive implementation with the accelerated version used in our reruns. The accelerated version implements the same LAPE search in vectorized query batches, so predicted probabilities are identical to the naive loop while inference overhead is lower. We repeat the timing experiment over five random seeds with query batch size 256.
Oracle Neighborhood-Variation Diagnostic
In synthetic experiments, the true conditional probability function η \eta η is known. We therefore use it only for analysis to measure how much the true probability changes inside a fixed diagnostic neighborhood of each test point: V k ( x ) = k − 1 ∑ j ∈ N k ( x ) ∣ η ( x j ) − η ( x ) ∣ V_k(x) = k^{-1} \sum_{j \in\mathcal{N}_k(x)} \lvert\eta(x_j) - \eta(x) \rvert V k ( x ) = k − 1 ∑ j ∈ N k ( x ) ∣ η ( x j ) − η ( x )∣ . Here k k k is fixed for the diagnostic split (k = 80 k = 80 k = 80 in our implementation) and is separate from the adaptive k ∗ k^* k ∗ selected by LAPE. This statistic can be viewed as a finite-neighborhood proxy for the local variation rate of the oracle probability around x x x : small V k ( x ) V_k(x) V k ( x ) means that the retrieved neighbors have similar oracle probabilities to the query, while large V k ( x ) V_k(x) V k ( x ) means that the retrieved neighbors already differ from the query in their oracle probabilities. We compute this score for every test point in the same retrieval feature space, sort test points by V k ( x ) V_k(x) V k ( x ) , and report the bottom 30% as the low-variation group and the top 30% as the high-variation group. Table 5 shows that LAPE is closer to the oracle probability than the base predictor in both groups, with a larger reduction in the high-variation group, although that group remains intrinsically harder.
Local-Heterogeneity Stress Test
To isolate local heterogeneity from feature-space mismatch, we keep a single GMM feature space and a fixed oracle probability function η ( x ) \eta(x) η ( x ) . We then simulate region-specific calibration errors by transforming the oracle probabilities into base probabilities with different temperatures and class-bias shifts across mixture components. Thus, some local neighborhoods are over-confident, others are under-confident, and some have class-specific bias, while the retrieval geometry itself remains unchanged.
Table 6 reports raw metric values rather than relative LAPE-side changes. This experiment is designed to isolate local heterogeneity from feature-space mismatch and to illustrate the role of local evidence, so we compare all available methods directly instead of reporting pairwise improvement ratios. Specifically, we generate a fixed GMM feature space and a fixed oracle conditional probability function, and then construct the base probabilities by applying region-dependent distortions to the oracle probabilities. These distortions use different temperature factors and class-bias shifts across mixture regions, so different neighborhoods require different calibration corrections while the retrieval geometry itself remains unchanged. The results show that global calibrators are limited in this heterogeneous setting because one global remapping cannot correct neighborhoods with different residual errors. LTS is relatively competitive because its local temperature map can partially respond to region-dependent temperature variation. However, the distortion also includes class-bias shifts and more general local residual patterns that are not fully captured by a temperature-only correction. LAPE-side refinements, including LTS+LAPE, further improve the calibration metrics by combining a global or local anchor with empirical label evidence from nearby calibration samples. This supports the intended mechanism: neighborhood evidence helps LAPE handle local heterogeneity that is difficult for global post-hoc calibration and not fully resolved by parametric local-temperature scaling.
Sample-Ratio Sensitivity
This table is the numeric counterpart of Figure 3 . It fixes the base MLP and test set within each seed, and varies only the calibration ratio used by post-hoc methods. Since the goal is to isolate how the amount of calibration data affects the LAPE refinement, rather than to run another exhaustive baseline comparison, we report a compact set of representative methods: the uncalibrated base model, VS, Pure LAPE, and VS+LAPE.
The gain over VS is not strictly monotone. With very small calibration sets, VS still leaves substantial local residual error, so even sparse neighborhood evidence can yield a visible gain. At intermediate ratios, VS itself benefits from more calibration samples and narrows the relative gap. As the calibration set becomes larger, however, the fixed global form of VS reaches a ceiling, whereas the local empirical component in LAPE continues to improve, so the gain rises again at larger ratios.
Covariate-Shift Robustness
Table 8 reports the target-calibrated covariate-shift diagnostic under a controlled GMM simulation. The base MLP is trained on easy/core samples from the unshifted source distribution, while calibration samples and test samples are drawn from the full target distribution at each shift level. This design creates a controlled mismatch between the source-trained anchor and the target population, so the experiment evaluates whether target-domain calibration samples can repair local residual errors left by the anchor. To focus on robustness to distributional shift rather than on a difficult base classification problem, we deliberately use a relatively friendly GMM setting. As a result, under the mild shift level, global score-based calibrators such as TS and VS can already remove much of the dominant logit-scale miscalibration, leaving only modest room for additional local refinement. As the shift becomes stronger, however, the remaining errors become more structured in the target feature space, and the value of target-domain neighborhood evidence becomes clearer. The LAPE-side variants therefore show larger NLL and accuracy improvements at higher shift levels, supporting the role of LAPE as a post-hoc local refinement layer under covariate shift.
We further evaluate LAPE under real-image distribution shift on CIFAR-10-C. We consider Gaussian noise and extend the evaluation from severity 1 to severity levels 1, 3, and 5, corresponding to increasingly strong target shifts. A ResNet-18 linear probe is trained on clean CIFAR-10, while target-domain samples from each corrupted condition are used for calibration and evaluation.
Table 9 reports the effect of adding LAPE across a broad range of calibration anchors. LAPE improves the NLL across nearly all anchor–severity combinations, while accuracy also shows broad improvements. Moreover, the NLL gains generally increase as the corruption severity becomes stronger. These results demonstrate that LAPE remains effective under real-image distribution shift and provides robust post-hoc refinement across different calibration baselines.
High-Dimensional Stress Test
Table 10 provides a deliberately challenging high-dimensional stress test for LAPE. When the feature dimension increases to 200, the relative gains become smaller than those in lower-dimensional settings, with most improvements around the one-percent level. This behavior is consistent with the difficulty of local neighborhood estimation in high-dimensional spaces. Nevertheless, LAPE still provides positive calibration gains for most anchors. This indicates that the proposed local refinement remains stable rather than degrading under high-dimensional feature representations.
Table 11 stresses LAPE by progressively corrupting the local neighborhood information in the calibration feature space. Larger noise makes nearby calibration samples less informative for correcting the calibration residual of a test point, which naturally reduces the relative gains. Even under this stress, LAPE still yields positive calibration improvements for most anchors, indicating that the proposed local refinement can tolerate moderate degradation of local information.
Architecture-Depth Diagnostic
Table 12 : Architecture-depth results on Obesity. Each block reports only LAPE-side refinements for the corresponding backbone. Entries are relative percentage changes versus the corresponding anchor, with positive values indicating improvement.
The architecture-depth diagnostic shows different regimes of the Obesity backbone. The Base accuracies are 87.50% for MLP-shallow, 93.94% for MLP-medium, and 91.29% for MLP-deep. The shallow model is relatively underfitted, leaving useful but less structured local information for refinement. The medium model is the best-matched backbone, with the highest accuracy and lowest Base NLL, so the remaining room for improvement is naturally limited. The deep model shows signs of mild overfitting: its Base accuracy and NLL are worse than those of the medium model. Nevertheless, LAPE still extracts useful local information from the deep representation and improves calibration for most anchors. Overall, the results suggest that LAPE can refine probabilities across underfitted, well-fitted, and mildly overfitted backbones, although the magnitude of improvement depends on how much reliable local information remains in the learned feature space.
Adaptive-Strategy Ablation
Table 13 : Ice-and-Fire ablation study. Zone columns report region-wise NLL.
Table 13 reports an ablation stress test for the adaptive weighting strategy in LAPE. The fixed-weight variants apply the same correction coefficient to all test points, so they cannot account for spatially heterogeneous fitting quality in the feature space. We therefore divide the test samples into Zone A and Zone B, corresponding to regions where the anchor predictor is fitted to different degrees: one region has more reliable anchor probabilities, while the other contains stronger local calibration residuals and requires a different correction strength. Under this deliberately heterogeneous setting, the adaptive strategy improves over fixed coefficients not only overall but also within each zone. This indicates that the benefit of LAPE is not simply an averaging effect across regions; even inside a given region, test-point-specific adaptation provides a more effective local correction than a globally fixed weight.
Evaluations on Modern Vision-Language Models
LAPE relies on the feature space to provide locally informative label structure. For CLIP, whose representations are learned through broad image–text alignment, it is therefore important to verify whether the frozen image neighborhoods remain useful after downstream prompt tuning changes the class prototypes, logits, and decision boundaries.
To examine this issue, we conduct a targeted experiment on DTD using OpenAI CLIP ViT-B/32 and the standard CoOp prompt-tuning objective [54 ] . The image and text encoders are frozen, and only shared continuous context tokens are trained. We use the official base-to-new split with 16-shot base-class training, a prompt length of 16, and 100 training epochs. LAPE is evaluated on labeled novel-class reference/test splits from one fixed CoOp checkpoint, with results averaged over five stratified splits. Under CoOp, prompt tuning changes the text prototypes and prediction boundaries while leaving the frozen CLIP image embeddings, and hence LAPE’s retrieval neighborhoods, unchanged. We additionally include Distance-Aware Calibration (DAC) [41 ] to examine whether LAPE remains complementary to a CLIP-specific calibration method.
As shown in Table 14 , adding LAPE consistently improves NLL and accuracy over both CoOp and CoOp+DAC. LAPE reduces NLL by 25.87% over CoOp and by 13.45% over CoOp+DAC, while improving accuracy by more than 20% in both settings. Overall, these results show that the frozen CLIP image neighborhoods remain useful for refining prompt-adapted predictions and that LAPE provides complementary gains beyond DAC.
Compatibility with Training-Time Calibration Objectives
We further examine whether LAPE remains effective when calibration is incorporated directly into the model-training objective. In addition to standard cross-entropy (CE) training, we consider MDCA [15 ] and MbLS [26 ] as representative training-time calibration objectives. On Obesity, the full MLP is trained under each objective over five independent training seeds, after which LAPE is applied post hoc using the same calibration protocol.
As shown in Table 15 , adding LAPE further improves the primary NLL metric over CE-, MDCA-, and MbLS-trained predictors, while accuracy also improves. The NLL improvement is particularly pronounced for MbLS, reaching 22.54%. These results show that LAPE can provide additional post-hoc improvement even when calibration has already been incorporated into the training objective.
Cross-Fitting versus Data Splitting
We further examine the role of cross-fitting through a ablation study with a flexible tree-based anchor. We compare direct data reuse, an independent 50/50 data split, and 5-fold cross-fitting using 200 labeled calibration samples, with results averaged over 20 independent seeds.
As shown in Table 16 , 5-fold cross-fitting achieves the best performance across all four metrics. It avoids direct in-sample anchor evaluation while retaining all labeled calibration samples, whereas the 50/50 split sacrifices half of the available data at each stage. These results support cross-fitting as a data-efficient choice when flexible anchors are used under limited calibration data.
CFAF Experiments
This subsection reports CFAF-related experiments separately from the tabular leaderboard. The tables include synthetic multi-view and noisy-view stress tests, UCI multi-view digits, and HAM10000 image-plus-metadata experiments.
Cross-view interaction. The interaction setting reflects the main motivation of CFAF: the predictive signal may not be fully visible from either view alone, but emerges from their combination. In this case, view-specific calibration is insufficient because each single-view predictor only observes a partial and potentially ambiguous signal. CFAF addresses this limitation by constructing the local correction in an augmented multi-view representation, allowing the calibration neighborhood to capture reliability patterns that depend jointly on the two views.
Nonlinear fusion beyond late fusion. The nonlinear stress test examines a different limitation of simple late fusion. A fixed linear combination of calibrated view-wise probabilities can improve over single-view predictors, but it cannot represent nonlinear cross-view structures when the reliability pattern varies across the feature space. CFAF provides a post-hoc alternative: instead of learning a new end-to-end fusion network, it uses the augmented feature representation to perform local residual correction, thereby recovering part of the nonlinear fusion effect through calibration-based neighborhood information.
Noisy multi-view signals. The noisy-view stress test evaluates whether CFAF remains useful when the joint representation contains both informative and irrelevant views. In this setting, we construct five views: the first two views contain weak but useful XOR-related information, while the remaining three views are purely random. This setting should not be interpreted as assuming that arbitrary noise views are helpful. Rather, it tests whether CFAF can still extract the informative component of the joint representation when the multi-view space is contaminated by irrelevant views and single-view predictors become unreliable. The results suggest that CFAF can tolerate such noisy multi-view representations and still recover useful cross-view calibration information.
Real-data results. This table summarizes the real-data CFAF cases. On the multi-view UCI Multiple Features benchmark, CFAF-LAPE improves over both single-view predictors and late fusion. On the multimodal HAM10000 image-plus-metadata tasks, CFAF-LAPE also achieves favorable NLL and calibration results compared with single-modality and late-fusion baselines. These results suggest that the augmented local-refinement strategy is useful not only for controlled multi-view stress tests, but also for real multi-view and multimodal data.
Compatibility with Stronger Dynamic-Fusion Anchors
We further evaluate whether CFAF-LAPE remains useful for stronger sample-adaptive multi-view fusion strategies. We include QMF [53 ] and PDF [7 ] as representative learned dynamic-fusion methods. QMF performs sample-adaptive quality-aware fusion, while PDF further incorporates confidence and cross-view collaborative information into the fusion process.
Experiments are conducted on a two-view handwritten-digit benchmark, with results averaged over ten independent seeds. For each comparison, CFAF-LAPE is applied only as a post-hoc local residual refinement on top of the trained fusion anchor, without modifying the underlying fusion model.
As shown in Table 19 , adding CFAF-LAPE improves the primary NLL metric and accuracy over both QMF and PDF. The relative NLL reductions are 44.67% over QMF and 25.49% over PDF, while accuracy improves by 2.81% and 2.13%, respectively. The mean ECE and ACE are also improved for both anchors. These results show that CFAF-LAPE remains complementary to learned sample-adaptive multi-view fusion by providing additional post-hoc refinement through local evidence in the joint representation.
Additional Tabular and Visual Benchmarks
Supplementary results on diverse tabular datasets. Table 20 reports the full tabular results across multiple application domains. Since these entries are relative percentage changes against the corresponding anchors, they should be interpreted as the additional refinement contributed by LAPE rather than as a standalone leaderboard among different anchors. Except for the Cardio dataset, where the gains are limited, LAPE improves NLL for most anchor–dataset pairs. These results support the practical utility of LAPE as a post-hoc refinement layer across heterogeneous tabular problems.
Visual transfer-learning results across medical and natural-image benchmarks. Table 21 reports the combined visual transfer-learning results. The medical experiments evaluate LAPE on feature spaces induced by different ImageNet-pretrained backbones, including ResNet18 and DenseNet121, while the CIFAR experiments use frozen ImageNet-pretrained ResNet50 features with a multinomial linear probe. These results suggest that LAPE is not specific to a single visual backbone: it can serve as a plug-in refinement layer for different visual classifiers and calibrators without retraining the underlying visual model.
Taken together, the tabular and visual results show a common pattern: LAPE most consistently improves NLL, the primary probabilistic objective in our evaluation, while largely preserving accuracy across datasets and backbones. Diagnostic calibration metrics such as ECE also improve in many cases, and remain comparable when the anchor is already strong or when the local retrieval geometry is less informative. This behavior is consistent with the role of LAPE as a residual probability-refinement module: it improves probabilistic quality without substantially changing the decision rule of the underlying classifier.
NeurIPS Paper Checklist
Claims
Question: Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
Answer: [Yes]
Justification: The claims made in the abstract and introduction accurately match theoretical and experimental results.
Guidelines:
The answer [N/A] means that the abstract and introduction do not include the claims made in the paper.
The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A [No] or [N/A] answer to this question will not be perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.
It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.
Limitations
Question: Does the paper discuss the limitations of the work performed by the authors?
Answer: [Yes]
Justification: Discussion on limitations are clearly stated in the main paper.
Guidelines:
The answer [N/A] means that the paper has no limitation while the answer [No] means that the paper has limitations, but those are not discussed in the paper.
The authors are encouraged to create a separate “Limitations” section in their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.
The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect on the factors that influence the performance of the approach. For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.
While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren’t acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.
Theory assumptions and proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?
Answer: [Yes]
Justification: The assumptions and proofs of Theorem 5.1 are clearly presented in Appendix § 10 .
Guidelines:
The answer [N/A] means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross-referenced.
All assumptions should be clearly stated or referenced in the statement of any theorems.
The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.
Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
Experimental result reproducibility
Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?
Answer: [Yes]
Justification: Please see Section 6, Appendix § 11 and Appendix § 12 for details of reproducibility. Reproducible codes are also submitted as Supplementary Material and will be made public on GitHub after the paper is received.
Guidelines:
The answer [N/A] means that the paper does not include experiments.
If the paper includes experiments, a [No] answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general, releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.
While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example (a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm. (b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully. (c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset). (d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.
Open access to data and code
Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?
Answer: [Yes]
Justification: Data access is stated in Appendix C. Reproducible codes are also submitted as Supplementary Material and will be made public on GitHub after the paper is received.
Guidelines:
The answer [N/A] means that paper does not include experiments requiring code.
Please see the NeurIPS code and data submission guidelines (https://neurips.cc/public/guides/CodeSubmissionPolicy) for more details.
While we encourage the release of code and data, we understand that this might not be possible, so [No] is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).
The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines (https://neurips.cc/public/guides/CodeSubmissionPolicy) for more details.
The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.
The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.
At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.
Experimental setting/details
Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer) necessary to understand the results?
Answer: [Yes]
Justification: See Section 6 and Appendix C for experimental settings.
Guidelines:
The answer [N/A] means that the paper does not include experiments.
The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.
The full details can be provided either with the code, in appendix, or as supplemental material.
Experiment statistical significance
Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Answer: [Yes]
Justification: All non deterministic statistics are reported as the average performance under different random seeds.
Guidelines:
The answer [N/A] means that the paper does not include experiments.
The authors should answer [Yes] if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.
The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).
The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)
The assumptions made should be given (e.g., Normally distributed errors).
It should be clear whether the error bar is the standard deviation or the standard error of the mean.
It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified.
For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g., negative error rates).
If error bars are reported in tables or plots, the authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.
Experiments compute resources
Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?
Answer: [Yes]
Justification: Please see details in Appendix C.
Guidelines:
The answer [N/A] means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn’t make it into the paper).
Code of ethics
Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines?
Answer: [Yes]
Justification: The research conducted in the paper conforms with the NeurIPS Code of Ethics.
Guidelines:
The answer [N/A] means that the authors have not reviewed the NeurIPS Code of Ethics.
If the authors answer [No], they should explain the special circumstances that require a deviation from the Code of Ethics.
The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).
Broader impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [Yes]
Justification: We discuss about the societal impacts of post-hoc confidence calibration in the introduction. We also emphasized the high value of the plug-and-play framework proposed in this article in enhancing the performance of existing post-hoc calibration methods.
Guidelines:
If the authors answer [N/A] or [No], they should explain why their work has no societal impact or why the paper does not address societal impact.
Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate Deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.
If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).
Safeguards
Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pre-trained language models, image generators, or scraped datasets)?
Answer: [N/A]
Justification: The paper poses no such risks.
Guidelines:
The answer [N/A] means that the paper poses no such risks.
Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.
Licenses for existing assets
Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
Answer: [N/A]
Justification: We have cited all the original papers that produced the code or dataset.
Guidelines:
The answer [N/A] means that the paper does not use existing assets.
The authors should cite the original paper that produced the code package or dataset.
The authors should state which version of the asset is used and, if possible, include a URL.
The name of the license (e.g., CC-BY 4.0) should be included for each asset.
For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.
If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset.
For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.
If this information is not available online, the authors are encouraged to reach out to the asset’s creators.
New assets
Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
Answer: [Yes]
Justification: We upload our code (as the new asset) in the supplement material.
Guidelines:
The answer [N/A] means that the paper does not release new assets.
Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent was obtained from people whose asset is used.
At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.
Crowdsourcing and research with human subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?
Answer: [N/A]
Justification: The paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer [N/A] means that the paper does not involve crowdsourcing nor research with human subjects.
Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper.
According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.
Institutional review board (IRB) approvals or equivalent for research with human subjects
Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?
Answer: [N/A]
Justification: The paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer [N/A] means that the paper does not involve crowdsourcing nor research with human subjects.
Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.
For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.
Declaration of LLM usage
Question: Does the paper describe the usage of LLMs if it is an important, original, or non-standard component of the core methods in this research? Note that if the LLM is used only for writing, editing, or formatting purposes and does not impact the core methodology, scientific rigor, or originality of the research, declaration is not required.
Answer: [N/A]
Justification: The core method development in this research does not involve LLMs as any important, original, or non-standard components.
Guidelines:
The answer [N/A] means that the core method development in this research does not involve LLMs as any important, original, or non-standard components.
Please refer to our LLM policy in the NeurIPS handbook for what should or should not be described.