arXiv:2610.37866stat.MLOct 2026

Manuscript Offprint

arXiv:2610.37866

Finite-Sample Optimal Conformal Prediction Sets under Covariate Shift

Zhongyang Li

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

Abstract

We study conformal prediction under covariate shift with a known covariate density ratio, seeking prediction sets with minimum expected length under the target distribution. For every calibration sample size, we prove that the rule combining the inverse conditional-density score with randomized weighted conformal calibration minimizes this expected length among all rules valid over the full weighted-exchangeability class.

We approximate the oracle using quantile and kernel histograms, including forest-weighted estimators, and select estimators and tuning parameters by resampling to estimate calibrated target length. On a bounded response domain, we bound excess length linearly in L1L^1 density error at fixed calibration size, without requiring a uniform positive lower bound on the true density. We also bound selection-pool and resampling errors. Under explicit growth conditions, the selected procedure approaches the same oracle while the calibration size remains fixed.

Experiments on 36 known-density configurations and four public regression datasets compare coverage, prediction-set length, and runtime with existing methods. In targeted low-coverage and strong-shift comparisons, inverse-density selection yields shorter mean sets in most cases and lower mean runtime than the evaluated weighted baselines, with some differences in achieved coverage.

Keywords: conformal prediction, covariate shift, prediction sets, finite-sample optimality, model selection

1 Introduction

Conformal prediction provides finite-sample marginal coverage under exchangeability without a correctly specified prediction model (Shafer and Vovk, 2008; Angelopoulos and Bates, 2023). Under covariate shift, calibration and test laws P,QP, Q share the conditional response density f(y∣x)f(y \mid x) but have different input distributions. Weighted calibration retains target coverage when w=dQX/dPXw = dQ_X/dP_X is known (Tibshirani et al., 2019). We study which calibrated rule minimizes target expected prediction-set length at a fixed calibration size.

Existing methods use quantile regression (Romano et al., 2019), conditional distributions or densities (Chernozhukov et al., 2021; Izbicki et al., 2020, 2022; Wang and Qiao, 2025), quantile histograms (Sesia and Romano, 2021; Luo and Zhou, 2025), length-oriented optimization (Kiyani et al., 2024; Le Bars and Humbert, 2025), or unions of a prescribed number of intervals (Gao et al., 2025). Their coverage constraints and optimality benchmarks differ. For finite-sample optimality, we build on Tibshirani, Barber, and Ramdas (2026, Theorem 7) and its precedents (Hoff, 2023; Koning and van Meer, 2025).

Our main contributions are:

  1. Weighted finite-sample optimality. For every calibration size mm, randomized weighted calibration with score 1/f(y∣x)1/f(y \mid x) minimizes target expected volume among all rules valid over the full class of weighted permutation mixtures (Theorem 1). Risk is evaluated under Pm×QP^m \times Q; validity is required over the full weighted class. The density ratio enters calibration but cancels from the optimal score ordering. Prediction sets may be disconnected.

  2. Estimation and excess length. We bound excess length by score error and, on a finite-volume response domain, by density error without a uniform positive density lower bound or clipping (Section 4). For normalized estimates, Proposition 8 gives a linear L1L^1 bound at fixed mm and an example showing that its error order cannot be improved uniformly. Quantile and kernel histogram bounds, including forest weights (Section 5), yield fixed-mm consistency under the conditions in Section 6.2.

  3. Selection by calibrated target length. Building on conformal predictor selection (Yang and Kuchibhotla, 2025; Liang et al., 2026), we analyze bootstrap calibration from a labeled pool and length evaluation on an independent input pool (Section 6.1). Separating approximation, pool, and resampling errors gives consistency after selection toward the same fixed-mm oracle under explicit growth conditions (Corollary 14). Independent final calibration retains exact target marginal coverage.

Figure 1 summarizes inverse-density prediction with length selection or negative log-likelihood (NLL) selection.

Figure

Figure 1: Alternative selection criteria for inverse-density prediction. Length selection is the primary method; NLL selection is the comparator. Each branch selects one candidate and proceeds separately to final calibration. Training, selection, and final calibration use independent data. See Sections 5 and 6.

Simulations compare fitted rules with the finite-mm oracle in 36 known-density configurations. A further study removes the density floor, fixes m=200m=200, and increases training, selection pools, and bootstrap repetitions. Four public datasets compare coverage, transformed-scale length, and runtime; controlled comparisons separate score and density-selection effects. Highest predictive density (HPD) scores (Izbicki et al., 2022) measure the estimated conditional probability mass of responses with higher density than the candidate response. In targeted comparisons, inverse-density selection yields shorter mean sets than our weighted HPD implementation in most tested low-coverage settings and than our weighted implementation of distributional conformal prediction optimized for short intervals (DCP-opt) (Chernozhukov et al., 2021) in most tested strong-shift settings. Measured mean runtime is lower throughout these comparisons (Section 7.5; Appendix D.1). These comparisons use common nominal coverage levels, with some differences in achieved coverage.

Sections 2–6 develop the framework and theory; experiments and related work follow in Sections 7 and 8.

References (25)