Table of Contents
Fetching ...

Conformal prediction with localization

Leying Guan

TL;DR

The paper introduces localized conformal prediction, which uses a localizer $H$ to weight training samples by proximity to a new test covariate $X_{n+1}$ and a tuned quantile $\tilde{\alpha}$ to construct a confidence interval ${\widehat{C}}(X_{n+1})$ with finite-sample, distribution-free coverage. It shows that standard conformal prediction is a special case, provides practical localizers (distance-based and nearest-neighbor), and proposes an automatic bandwidth selection procedure; empirical results demonstrate improved local adaptivity while maintaining coverage, with extensions to data-dependent score functions and covariate shift. The framework connects to local and asymptotic conditional coverage and offers theoretical guarantees under localization, potentially improving uncertainty quantification in heterogeneous or shifting data regimes. Overall, localized conformal prediction broadens conformal inference to heterogeneous settings, enabling test-specific, locally valid confidence statements without strong distributional assumptions.

Abstract

We propose a new method called localized conformal prediction, where we can perform conformal inference using only a local region around a new test sample to construct its confidence interval. Localized conformal inference is a natural extension to conformal inference. It generalizes the method of conformal prediction to the case where we can break the data exchangeability, so as to give the test sample a special role. To our knowledge, this is the first work that introduces such a localization to the framework of conformal prediction. We prove that our proposal can also have assumption-free and finite sample coverage guarantees, and we compare the behaviors of localized conformal prediction and conformal prediction in simulations.

Conformal prediction with localization

TL;DR

The paper introduces localized conformal prediction, which uses a localizer to weight training samples by proximity to a new test covariate and a tuned quantile to construct a confidence interval with finite-sample, distribution-free coverage. It shows that standard conformal prediction is a special case, provides practical localizers (distance-based and nearest-neighbor), and proposes an automatic bandwidth selection procedure; empirical results demonstrate improved local adaptivity while maintaining coverage, with extensions to data-dependent score functions and covariate shift. The framework connects to local and asymptotic conditional coverage and offers theoretical guarantees under localization, potentially improving uncertainty quantification in heterogeneous or shifting data regimes. Overall, localized conformal prediction broadens conformal inference to heterogeneous settings, enabling test-specific, locally valid confidence statements without strong distributional assumptions.

Abstract

We propose a new method called localized conformal prediction, where we can perform conformal inference using only a local region around a new test sample to construct its confidence interval. Localized conformal inference is a natural extension to conformal inference. It generalizes the method of conformal prediction to the case where we can break the data exchangeability, so as to give the test sample a special role. To our knowledge, this is the first work that introduces such a localization to the framework of conformal prediction. We prove that our proposal can also have assumption-free and finite sample coverage guarantees, and we compare the behaviors of localized conformal prediction and conformal prediction in simulations.

Paper Structure

This paper contains 20 sections, 18 theorems, 53 equations, 4 figures, 2 tables, 1 algorithm.

Key Result

Corollary 3.1

Let $Z_1,\ldots,Z_{n+1}\overset{i.i.d}{\sim}\mathcal{P}$, and $V(.)$ be a fixed function. For any $\tilde{\alpha}$, let $v^*_{i} = Q(\tilde{\alpha}; \hat{{\mathcal{F}}}_i), i = 1,2,\ldots, n+1$. If $\tilde{\alpha}$ satisfies then ${\mathbbm{P}}\left\{V_{n+1} \leq Q(\tilde{\alpha};\hat{{\mathcal{F}}}_{n+1} ) \right\}\geq \alpha$, and thus, ${\mathbbm{P}}\left\{V_{n+1} \leq Q(\tilde{\alpha};\hat{{

Figures (4)

  • Figure 1: Conformal bands (blue), localized conformal bands (red) and underlying true confidence bands (black) at level $\alpha = .95$. The conformal bands cannot capture the heterogeneity in the distribution of $V(X_{n+1}, Y_{n+1})$ for different $X_{n+1}$. The grey dots represent the actual test observations.
  • Figure 2: Example \ref{['exm1']}. Confidence bands constructed using 1000 repetitions with targeted level at $\alpha = .95$. The black, blue, red and green dots respectively represent (1) the true responses for the test samples (response), (2) the conformal confidence bands (CB), (3) the localized conformal confidence bands with distance localizer $H_h^1$ (LCB1), and (4) the localized conformal confidence bands with nearest-neighbor based localizer $H_h^2$ (LCB2). The red dots close to the top and bottom within each plot represent samples whose CIs based on LCB1 have infinite length (both the CB and the LCB2 do not have infinite length CI by construction).
  • Figure 3: Conformal inference (blue) and localized conformal inference with automatically chosen $h$ (red) at level $\alpha = .95$. The localized inference leads to less volatile CIs for samples that are close to the training.
  • Figure 4: Example \ref{['exm2']}. Confidence bands constructed using 1000 repetitions with targeted level at $\alpha = .95$. The black, blue, red and green dots respectively represent (1) actual $V_i$ for the test samples (error), (2) the conformal inference (CB) for $V_i$, (3)the localized conformal inference for $V_i$ with distance based localizer $H_h^1$ (LCB1), and (4) the localized conformal inference with nearest-neighbor based localizer $H_h^2$ (LCB2). The x-axis shows values for $X_p$, and y-axis shows values for the upper and lower boundaries of constructed CIs for each of the test samples.

Theorems & Definitions (30)

  • Corollary 3.1
  • Theorem 3.2
  • Corollary 3.3
  • Proposition 3.4
  • Corollary 3.5
  • Example 3.6
  • Example 3.7
  • Example 4.1
  • Theorem 5.1
  • Theorem 5.2
  • ...and 20 more