Manuscript Offprint
arXiv:2610.37866Finite-Sample Optimal Conformal Prediction Sets under Covariate Shift
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 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 share the conditional response density but have different input distributions. Weighted calibration retains target coverage when 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:
-
Weighted finite-sample optimality. For every calibration size , randomized weighted calibration with score minimizes target expected volume among all rules valid over the full class of weighted permutation mixtures (Theorem 1). Risk is evaluated under ; 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.
-
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 bound at fixed and an example showing that its error order cannot be improved uniformly. Quantile and kernel histogram bounds, including forest weights (Section 5), yield fixed- consistency under the conditions in Section 6.2.
-
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- 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 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- oracle in 36 known-density configurations. A further study removes the density floor, fixes , 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.
This is covariate shift: can differ from , while . The known weight is the Radon–Nikodym derivative .
Write and , where . Let be a -finite measure on . For , we take to be Lebesgue measure. Write , and let denote the collection of Borel subsets of .
To allow randomization, we represent a prediction rule by a fixed set-valued map
whose membership indicator
is jointly measurable. Given a calibration sample and a test input , the rule returns , where is independent of all data. Nonrandomized rules are included as the special case in which does not depend on .
For fixed , we write
Thus the subscript indicates that only the auxiliary random variable is integrated out; the data remain fixed.
The target risk of is
We condition on all training and selection data until those steps are analyzed explicitly.
Fix a measurable finite score , with smaller values preferred. Set and . The target inputs have -almost surely. At a zero-weight input, define the output as ; such inputs do not affect target risk or coverage. For a candidate with , write and
The weighted randomized conformal rule is
To construct the prediction set at a test input , draw independently of the data and hold its value fixed as varies over .
Its inclusion probability has the closed form
where . Consequently,
The guarantee below is marginal over calibration data, the target observation, and U. It does not require p coverage at every input x, or conditional on one realized calibration sample.
3 A weighted version of the finite-sample oracle theorem
3.1 Validity class and oracle theorem
For an augmented sample , with , let and
For each positive integer , let denote the set of permutations of . For , write
For and any Borel set , define
For each with , is a probability measure on . Let be the class of all mixtures of these measures:
(9) where ranges over probability measures on .
For a joint distribution on , we say that has coverage at least under if
where , , , and is independent of the sample. The probability is taken over both the sample and .
The iid covariate-shift model in Section 2 satisfies , as shown in Lemma 2 below.
Assume that the reference conditional law has a jointly measurable density that is positive and finite -almost everywhere. On that set define
Extend as any finite positive measurable function on the exceptional set, for example by setting it equal to one. The score is then defined on every augmented sample. Write , with defined in (5). We call the oracle rule because its score uses the true conditional density . Its target risk , defined in (2), does not depend on the choice of extension.
Theorem 1 (Weighted finite-sample oracle). Among all measurable randomized prediction rules with coverage at least under every , the minimum target risk (2) is attained by :
The result holds for every finite and every -finite , and the risks may equal . The oracle rule has exact coverage over .
3.2 Proof of the oracle theorem
We first establish three facts used in the proof.
Lemma 2 (Inclusion of the iid covariate-shift model). Define a measure on by
Then is a probability measure satisfying , and
In particular, .
Proof. Since , we have and . For any Borel set , substitution gives
The integrands vanish when , justifying integration over all . Permutation invariance of makes all terms equal, and the last equality uses .
Proposition 3 (Coverage over ). Let be a prediction rule as defined in Section 2 whose inclusion probabilities do not depend on the order of the calibration sample:
for all , , , and , where for .
For , let denote the sample obtained by deleting , and define
Then has coverage at least under every if and only if
For any prediction rule , define
with independent of the data and U. Its inclusion probability is
so it satisfies (12). It has the same coverage as under every and the same target risk , with its randomization averaged over both and .
Proof. For , exactly permutations in (8) put observation last. Calibration-order invariance therefore gives
Each belongs to , and every member of is a mixture of these kernels. Thus coverage over the class is equivalent to (13). When , all weights vanish and the constraint holds automatically.
Reordering only reindexes the average defining . To check that symmetrization preserves coverage, let fix . The change of index in (8) leaves both and the kernel unchanged under this reordering. Hence each kernel, and every mixture , is invariant under permutations of the first coordinates. Therefore and have the same law under , which proves equality of coverage after averaging over . Under , and likewise have the same law. Averaging over proves , including infinite risks.
Proposition 4 (Exact randomized weighted calibration). Let be a fixed measurable score function. Let be defined by (5) when , and by when , as specified in Section 2. Then satisfies (13) with equality. Its coverage is exactly under every , and in particular under .
Proof. Fix with , and write . List the distinct scores of the positive-weight observations in decreasing order:
Define
Here is the fraction of total weight at score , and is the fraction at larger scores. Since and , the intervals cover without overlapping interiors.
For and , applying (5) with calibration sample and candidate gives
Grouping the weighted sum by score, we obtain
Indices with contribute nothing. If , then all . By the zero-weight convention in Section 2, for every , so both sides of (13) are zero.
Reordering the calibration sample does not change . Hence (14) gives coverage exactly under each and therefore under every mixture . The conclusion for follows from Lemma 2.
Proof of Theorem 1. By Proposition 3, it suffices to consider a rule satisfying (12) and (13). Write , , and . Tonelli's theorem and permutation symmetry under give
The first identity follows because cancels the conditional response density. The same identity holds for .
Fix an augmented sample , and write . If , both cost sums are zero. Otherwise, let
By (6) and Proposition 4,
Since , we obtain
The first term is nonnegative: below the cutoff, ; above it, ; at the cutoff, the factor is zero. The second term is nonnegative because and satisfies the coverage constraint.
Thus for every . Integrating this inequality using (15) proves optimality, including when the risks are infinite. Exact coverage of follows from Proposition 4.
This is the weighted version of the exchangeable finite-sample oracle; see (Hoff, 2023; Koning and van Meer, 2025; Tibshirani et al., 2026) for preceding formulations. At , the validity class reduces to ordinary exchangeability. The weight enters (5), but the optimal score remains .
For a positive, finite density estimate fitted independently of the calibration and test data, the rule with score still has coverage exactly under every by Proposition 4. However, its target risk need not equal .
4 Approximating the weighted oracle
Theorem 5 (Integrated and uniform score-error bounds). Suppose . For any fixed finite score s, define
Then
The uniform norm can be replaced by an essential uniform norm under .
Proof. Fix , and write , , , and . By Proposition 4,
The ordering argument in the proof of Theorem 1, applied to each score with the equal weighted sums in (17), gives
The cutoff term vanishes because those sums agree, so the first inequality also holds for scores of either sign. Consequently,
(18)
If W = 0, all terms are zero.
Since , taking expectations in (18) and using (15) and gives
Also, and (17) imply
Using this bound in (18), together with and , gives
Finally, has density with respect to . Thus a bound on holding -almost everywhere holds at all observations -almost surely. The same argument therefore applies to the essential uniform norm.
For a -integrable function , define
Corollary 6 (A density-estimation bound). Let be a fixed, positive, finite measurable density estimate, and use in (5). When ,
If , the right side is at most
Proof. Because the conditional density under Q is also f,
Apply Theorem 5; the lower bound on gives (21).
Corollary 7 (Density ordering and oracle-length consistency). Assume, as in Theorem 1, that is positive and finite -almost everywhere, and suppose . Let be a fixed finite measurable density estimate and use in (5). If , the score gives exactly the same prediction rule. Define
and, for , define
For every calibration size ,
The parameter is used only in the bound; the density estimate is not clipped. In particular, if the true density satisfies almost everywhere, then
without a positive lower bound on .
Now fix , and the response scale. For estimates trained independently of calibration and test data, put and
Each risk below is evaluated conditional on training, and each oracle uses the same calibration size as its fitted comparator. Then
If , the right side tends to zero. If instead in probability over training, then in probability and in training expectation. Conditional on training, each rule has coverage exactly under every .
Proof. Finite response volume gives
Fix and . The function
is finite and strictly decreasing on . Thus and preserve exactly the same comparisons and ties, and yield the same rule in (5) for every calibration sample and . Write at a fixed point. The inequality
and the identity
give, because ,
Apply Theorem 5 and let only in this upper bound. The prediction rule is unchanged for every , so this limit does not merge score ties. Taking the infimum over proves (23). If , choose ; then , proving (24).
For every fixed , average the same bound over training. It is independent of , which proves (26). Since ()-almost everywhere, as by dominated convergence on the finite-volume response domain. For fixed , let , and then let . This proves the mean convergence when . The deterministic bound, with the same two limits, proves convergence in probability when in probability. The supremum risk gap lies in , so its convergence in probability also implies convergence in expectation. Exact coverage follows from Proposition 4.
Proposition 8 (Linear density-error bound at fixed calibration size). Under the assumptions and notation of Corollary 7, suppose and the estimate is normalized:
For every , the rule with score satisfies
For independently trained estimates that are normalized almost surely, use and from (25). Then
(29)
Thus, for fixed and a deterministic sequence , a density-error rate gives an excess-length rate without a uniform positive density lower bound. No upper or positive lower bound on is required beyond (1).
Appendix L gives the proof, a sharper weighted bound, and examples showing that neither bound dominates: is linear in density error at fixed m, whereas the tail bound is uniform in m. Appendix L.2 gives smooth normalized density pairs with m = 1, p = 1/2, and excess length e/3, ruling out a uniform bound. This establishes the error order, not optimal dependence on m or a statistical minimax rate.
5 From the oracle to a fitted procedure
5.1 Quantile histograms
Take
Let be Lebesgue measure. Fix an integer . Using training data independent of the calibration and test data, obtain endpoints
where estimates the j/B-quantile of the conditional distribution of Y given X = x, for .
Let for , , and . Assign probability to each bin and define
Define by (5) with . Since is constant on each bin, is a union of entire bins for every fixed and .
5.2 An explicit approximation bound
Condition on the training data used to construct the endpoints . Let be the jointly measurable true conditional density, with for every , and define
Assume that, for constants and ,
for all and . Define
Theorem 9 (Quantile error controls excess length). Under (33), let
where is defined in (34). Then
and, for every calibration size m,
Proof. Fix x and a bin . Write
By (34) and (33),
It follows that
For , (33) gives
Since ,
The last inequality follows from (38) and the definition of in (35). Taking the supremum over and proves (36). By (27) with , the assumption of Theorem 5 is satisfied. Applying that theorem with and using (36) gives (37).
5.3 Kernel histograms
Let and be as in (30), and let be the standard normal density and CDF. For , define the Gaussian kernel normalized on by
Given training responses and measurable training weights with , set
Training is independent of final calibration and test data. Section 5.4 defines the forest weights.
Partition into equal-width bins , including in the last bin. For common to all and , define
(40)
Writing , the bin score is ; these probabilities need not be equal. The densities are positive even at . Calibration therefore returns a union of entire bins. The common affine density mixture in (40) preserves all density comparisons and ties. Thus, for every calibration sample, query, and randomization value,
Proposition 10 (Kernel estimation and excess length). Let be an integer and suppose . For each , let be iid training responses drawn from the conditional distribution of given , with true density . Set
and use (40) to construct and as estimates of . Assume (33), and set , which is finite because each is Lipschitz on and is finite. Fix , an integer , and , and define
Writing for expectation over the training data,
(43)
Here denotes the norm defined in (19). For every final calibration size ,
Conditional on the training data, the rule defined by (5) has target marginal coverage exactly p.
The proof is in Appendix F.
For the equal-weight estimators in Proposition 10, taking and gives . Consequently, for every fixed ,
5.4 Forest weights and density error
Let , where , and fit a regression forest with trees. The training sample and fitting randomization are independent of final calibration and test data; see Appendix C.1 for the fitting procedure. For tree , let be the terminal region containing , and define
Count each original observation once, regardless of bootstrap multiplicity. Every leaf contains at least one original input, so
is well defined. Each tree assigns weight to observations in the leaf containing x and zero to the others; averages these weights over trees. Thus and . These training weights estimate the conditional distribution and are distinct from the covariate-shift ratio .
Using these weights in (40) gives the forest kernel histogram. With from (32), define its empirical conditional CDF and error:
(46)
The expectation averages over the training sample and the forest-fitting randomization described in Appendix C.1.
For quantile histograms, choose a permutation of such that , and define
In the ordering , ties between training responses are broken by their original observation indices. For each fixed and , define
Then and . Define
The denominator in the middle branch is strictly positive. At a repeated cumulative weight, this rule takes the last corresponding response; between distinct cumulative weights, it interpolates from the last response at the lower weight to the first response at the upper weight.
For , set
(47)
These endpoints are strictly increasing. For the bins defined as in (31) using these endpoints, define
(48)
Proposition 11 (Density error from forest CDF error). Let and be as in (30). Keep the oracle positivity assumption on f and assume the Lipschitz condition in (33), with constant K. Use the forest training weights defined in (45) to construct the kernel score in (40). Let be defined in (46), and write . For an integer and , define
Then
and, for every final calibration size m,
(51)
where is defined in (22). These kernel bounds require no uniform positive lower bound on and allow any common .
If, in addition, as in (33), use the same weights to construct in (48), where , and define
(52)
Then
Under this additional lower bound, the length bounds simplify to
(54)
The proof is in Appendix G. The same appendix also establishes for fixed with , under the forest consistency conditions specified there.
6 Choose the score by calibrated target length
Let be the number of candidate scores. Using training data, construct measurable scores with different parameter choices.
We select a score by estimated prediction-set length and use independent data for final calibration, following Yang and Kuchibhotla (2025). Continue to use and .
6.1 Selection from reused data pools
Condition on the training data and fitting randomization, so that the candidate scores are fixed. Use two independent pools, also independent of training:
Call the labeled pool and the input pool. Given the labeled pool, draw independent bootstrap calibration samples , each containing observations sampled uniformly with replacement from that pool. Use the input pool to estimate target expected length.
For the selection bound, assume that the density ratio w satisfies
Using the inclusion probability from (6), estimate each candidate's target expected length by
(57)
with a fixed tie rule. After selection, calibrate the selected score on a new sample of size m from P, independent of training and selection.
Theorem 12 (Selection from reused data pools). Let and be as in (30), and assume (56). Let denote expectation over the labeled pool, the input pool, and the bootstrap draws used to form . Conditional on training and fitting randomization, the following bounds hold.
If , define
(58) and
(59)
Then
For deterministic sample sizes and M, averaging over training gives
Neither bound requires a positive lower bound on the conditional density.
If, in addition, , define
For every , there is also the bound
When is fixed across training samples, (61) also holds with replaced by . With independent final calibration, the selected rule has target marginal coverage exactly , conditional on training and selection.
The proof is in Appendix I. The four terms in (59) account for the input pool, the finite number of bootstrap samples, the labeled pool, and repeated indices within a bootstrap sample. For fixed and , this bound tends to zero as . The complementary bound (63) instead allows fixed when grow and . Neither bound is uniformly smaller than the other; the latter remains useful for the experimental allocation .
6.2 Oracle-length consistency at fixed calibration size
Corollary 13 (Forest kernel histograms at fixed calibration size). Fix and , with . Assume the oracle positivity condition on and the Lipschitz condition in (33), with independent of . Fit the forest weights independently of calibration and test data. Let be as in (46). For deterministic integers and bandwidths , suppose
For deterministic common to all , use (40) to construct , and calibrate on a fresh sample of fixed size . Then
Here is conditional on training, and is the same finite-m oracle for every . Conditional on training, has target marginal coverage exactly at every .
The proof is in Appendix J. No uniform positive lower bound on is required. The condition limits bin growth relative to CDF error.
Selection at fixed calibration size. The next corollary adds pooled selection, allowing the candidate library and selection data to grow while the final calibration size remains fixed.
Corollary 14 (Oracle-length consistency after selection at fixed ). Fix , the known density ratio , the coverage level , and with . Assume (56). Suppose ()-almost everywhere and on , with a constant independent of the training size . Let the forest weights be fitted independently of the selection, final calibration, and test data, and suppose in (46).
For deterministic integers and each , include the kernel histogram score in (40) with
using these weights. Within each candidate, is common to all . Other training-fitted scores may also be included; let be the deterministic total number of candidates. For a fixed integer , use (57) with pool sizes and , and bootstrap samples. If
then
The comparator is the same finite-m oracle for every n. Independent final calibration gives target marginal coverage exactly p at every training size, conditional on training and selection.
The proof is in Appendix J.1. No rate for is needed: one permitted choice is , proportional to , and proportional to . The required excludes fixed . Appendix K treats growing with fixed ; Appendix H treats independent calibration samples.
7 Experiments
The main benchmark uses randomized weighted calibration with target coverage . Section 7.5 and Appendices D.1 and D.3 report additional coverage levels and shift settings.
7.1 Known-density simulations
Calibration data follow , with ; test data follow , with and . Both laws have the same conditional response distribution. Weighted calibration uses
Let and denote the conditional densities of given and . For , define the beta density
We use the following four pairs of conditional densities.
| Case | ||
|---|---|---|
| Asymmetric unimodal | ||
| Heteroscedastic | ||
| Separated modes | ||
| Unequal mode weights |
Here , and each density has a uniform component of weight 0.1.
We use training observations with and with , where . We set and . The seven candidate conditional-density estimates are four empirical-quantile histograms with bins and three kernel histograms with bandwidths , each using 80 equal-width bins on . Further implementation details are given in Appendix B.
For kernel estimation of at , use : weight within group and zero outside it.
For length selection, calibrate each fixed candidate on 30 independent samples of size from . For each sample, give the lengths at and , averaged over . Weight these by and , their target probabilities at , then average over the 30 samples and select the smallest mean. Integration over and is exact; the 30 samples approximate the calibration expectation.
For fitted densities , , and the same samples , , negative log-likelihood (NLL) selection uses
NLL evaluates density fit without temporary calibration. Both selectors break ties by the smallest index and calibrate the selected reciprocal density score on the same fresh sample of observations from . Training, selection, and final calibration are independent.
For all four cases, we also vary at and . For the asymmetric and separated-mode cases, we vary at and . This gives 24 distinct configurations, each repeated independently 50 times. Within each repetition, all methods share the same data. Across training sizes, training samples are nested, while the selection and final calibration samples remain unchanged.
The oracle uses the true density and the same final calibration sample. We integrate length and coverage over and randomization, then report means and standard errors over 50 repetitions, with paired oracle differences. Appendix B gives numerical details. At , the primary selector's paired oracle gaps are 0.00439 (SE 0.00138), -0.00030 (0.00121), 0.00298 (0.00180), and 0.00164 (0.00251) (Table 1; Figure 2). All four gaps are smaller at than at , without necessarily decreasing at intermediate sizes. Fixed bin counts and bandwidths do not ensure oracle convergence. Negative gaps can arise from variation across the 50 repetitions: oracle optimality averages over calibration samples and need not hold for each realized sample.
For separated and unequal modes, our selector's mean lengths are 0.5746 and 0.5583, versus 0.7920 and 0.7647 for DCP-opt. Our sets average 1.762 and 1.776 disjoint intervals; length excludes the gaps. Gao-style two-component lengths are 0.5804 and 0.5676, and HPD is competitive. NLL selection is slightly shorter in all four settings.
| Method | Asymmetric | Heterosc. | Separated | Unequal |
|---|---|---|---|---|
| Known-density oracle | 0.4603 (0.0060) | 0.4663 (0.0055) | 0.5716 (0.0066) | 0.5566 (0.0067) |
| Density: length selection | 0.4647 (0.0062) | 0.4660 (0.0054) | 0.5746 (0.0069) | 0.5583 (0.0064) |
| Density: NLL selection | 0.4639 (0.0060) | 0.4644 (0.0055) | 0.5740 (0.0066) | 0.5563 (0.0066) |
| Density: one tuning bag | 0.4687 (0.0080) | 0.4709 (0.0063) | 0.5770 (0.0069) | 0.5649 (0.0073) |
| CTI: fixed | 0.4702 (0.0060) | 0.4726 (0.0072) | 0.6092 (0.0076) | 0.5984 (0.0078) |
| Density: quantiles only | 0.4645 (0.0060) | 0.4667 (0.0058) | 0.5766 (0.0068) | 0.5686 (0.0069) |
| Density: kernels only | 0.4633 (0.0060) | 0.4652 (0.0055) | 0.5749 (0.0068) | 0.5560 (0.0067) |
| HPD score | 0.4627 (0.0061) | 0.4673 (0.0058) | 0.5780 (0.0070) | 0.5578 (0.0065) |
| PIT score | 0.5208 (0.0076) | 0.4676 (0.0062) | 0.8006 (0.0027) | 0.7698 (0.0029) |
| DCP-opt score | 0.4636 (0.0058) | 0.4682 (0.0060) | 0.7920 (0.0026) | 0.7647 (0.0032) |
| CQR score | 0.5381 (0.0034) | 0.4670 (0.0056) | 0.8052 (0.0022) | 0.7775 (0.0024) |
| Gao-style, | 0.4631 (0.0062) | 0.4692 (0.0065) | 0.5804 (0.0070) | 0.5676 (0.0068) |
Table 1: Synthetic expected lengths at training labels per group, , ratio 3, and . Parentheses are standard errors across 50 independent repetitions. The oracle is the exact finite- weighted density rule, not the population highest-density set. All fitted methods use the same data within a repetition.

Figure 2: Excess expected length above the weighted finite- oracle at and shift ratio 3. Bars are 1.96 times the standard error of the paired oracle difference, computed from 50 independent repetitions. The zero line denotes oracle risk. Training observations are counted per group; design and final calibration sizes stay fixed.
7.2 Fixed calibration with densities approaching zero
We remove the uniform component from two cases in Section 7.1:
These Lipschitz densities are positive on but vanish at both endpoints. Fix , , , and . For , use training responses per group (total ), the two independent selection pools in (55) with , independent of training, and bootstrap calibration samples of size drawn from the labeled pool. Selection uses (57), including the observed input-pool group counts and self-normalized weights (1,3).
Using weight 1/n within each input group, construct
kernel-histogram candidates as in Section 5.3, with
Set the uniform-mixture weight in (40) to for every candidate.
The within-group CDF error in (46) satisfies by DKW-Massart (Massart, 1990); see (73). For ,
Thus these candidates satisfy (64). With , and , the selection condition (67) in Corollary 14 also holds. The proof in Appendix J.1 applies to the within-group weights used here.
We include two controls: selection from the same library and pools with only r = 30 bootstrap samples, and direct use of candidate without selection.
We use 50 independent repetitions, nested training/pool prefixes, and shared initial bootstrap draws. All sizes and methods share final calibration and the finite-m oracle; evaluation follows Section 7.1. Serial one-thread times include fitting, selection, calibration, and prediction volume, excluding data generation, true-density coverage/oracle integration, and output. Selectors fit the whole library; the prescribed method fits only , without selection.
Figure 3 shows gaps decreasing from 0.00745 to -0.00108 and from 0.01381 to 0.00090. Both final gaps are within 1.96 standard errors of zero. Final coverages are 0.9020 (SE 0.0034) and 0.9083 (0.0029), versus oracle coverages 0.9034 (0.0033) and 0.9085 (0.0028). At n = 8000, growing-r_n selection takes 0.228/0.230 seconds, versus 0.195/0.201 for r = 30. Its paired length differences from r = 30 are -0.00057 (SE 0.00030) and 0.00066 (0.00050), with no clear advantage. The prescribed estimator takes 0.025/0.026 seconds, with mean oracle gaps 0.00500/0.00258. The complete numerical table is retained in the supplementary result files.
7.3 Public regression datasets under designed shift
Four public datasets use 30 shared splits, allocating approximately 40/15/10/15/20% to training, the labeled pool, the input pool, final calibration, and testing; the pools are defined in Section 6.1.




Figure 3: Fixed-m comparison of growing- and selection with the prescribed estimator (no selection). Left: paired oracle gaps with 1.96 Monte Carlo standard-error bars over 50 repetitions. Right: mean total time on a logarithmic scale. The design and timing scope are specified in the text.
Lengths use the transformed [0,1] scale in (71), with training-fitted . Relative shift weights are (1,3), with (1,1) as a control; Section 7.5 uses (1,10). Appendix C.1 gives the full protocol.
The primary method selects among 12 forest-weighted quantile and kernel histograms. HPD, PIT, DCP-opt, and CQR use the same fits. Ablations change the selection criterion, use fixed CTI, or restrict the histogram family. Other baselines are reference-classification density estimation (WQ) (Wang and Qiao, 2025), two-interval DP (Gao et al., 2025), and fixed or tuned Ad-EffOrt (Le Bars and Humbert, 2025).
Length selection uses (57) with r = 30: labels from the 15% pool and inputs from the 10% pool. NLL uses (69) on labels from both pools (25%). Candidate counts are 12 for the full histogram library, two for selected WQ, six for DP, and three for tuned Ad-EffOrt.
Length comparisons. The primary selector is shorter than fixed CTI, choosing kernels in 23, 26, 26, and 21 shifted splits on Power Plant, Concrete, Real Estate, and Yacht. This comparison changes both estimation and selection; identical quantile bins give CTI and inverse-density scores
| Method | Power Plant | Concrete | Real Estate | Yacht |
|---|---|---|---|---|
| 0.0912 (0.0015) | 0.2303 (0.0037) | 0.2345 (0.0047) | 0.0870 (0.0045) | |
| Density: length selection | 0.8998 (0.0021) | 0.9002 (0.0055) | 0.9026 (0.0071) | 0.9009 (0.0134) |
| 0.0893 (0.0005) | 0.2354 (0.0039) | 0.2414 (0.0058) | 0.0937 (0.0058) | |
| Density: NLL selection | 0.8973 (0.0021) | 0.9024 (0.0052) | 0.9101 (0.0060) | 0.8947 (0.0159) |
| 0.0913 (0.0015) | 0.2289 (0.0034) | 0.2382 (0.0047) | 0.0915 (0.0048) | |
| Density: one tuning bag | 0.9000 (0.0021) | 0.8997 (0.0053) | 0.9027 (0.0073) | 0.9003 (0.0136) |
| 0.1023 (0.0005) | 0.3088 (0.0044) | 0.3056 (0.0086) | 0.2112 (0.0111) | |
| CTI: fixed QRF | 0.8994 (0.0022) | 0.8954 (0.0061) | 0.9003 (0.0083) | 0.8967 (0.0172) |
| 0.0978 (0.0019) | 0.2429 (0.0036) | 0.2943 (0.0185) | 0.1008 (0.0065) | |
| Density: quantiles only | 0.9013 (0.0022) | 0.8961 (0.0050) | 0.8975 (0.0089) | 0.8899 (0.0157) |
| 0.0893 (0.0005) | 0.2310 (0.0040) | 0.2361 (0.0045) | 0.0821 (0.0036) | |
| Density: kernels only | 0.8973 (0.0021) | 0.9015 (0.0054) | 0.9037 (0.0066) | 0.9029 (0.0141) |
| 0.0891 (0.0005) | 0.2195 (0.0039) | 0.2282 (0.0050) | 0.0729 (0.0035) | |
| HPD score | 0.8974 (0.0021) | 0.9011 (0.0051) | 0.8990 (0.0078) | 0.8981 (0.0168) |
| 0.0892 (0.0006) | 0.2183 (0.0037) | 0.2277 (0.0054) | 0.1032 (0.0073) | |
| PIT score | 0.8984 (0.0023) | 0.8961 (0.0060) | 0.8988 (0.0084) | 0.8864 (0.0145) |
| 0.0883 (0.0005) | 0.2132 (0.0038) | 0.2314 (0.0069) | 0.0910 (0.0047) | |
| DCP-opt score | 0.8980 (0.0022) | 0.8956 (0.0060) | 0.8961 (0.0078) | 0.8865 (0.0148) |
| 0.0902 (0.0006) | 0.2346 (0.0036) | 0.2384 (0.0047) | 0.1942 (0.0088) | |
| CQR score | 0.8967 (0.0022) | 0.8993 (0.0066) | 0.8961 (0.0082) | 0.9017 (0.0112) |
| 0.1046 (0.0006) | 0.3072 (0.0069) | 0.2872 (0.0083) | 0.2164 (0.0106) | |
| WQ: fixed | 0.8987 (0.0022) | 0.8905 (0.0069) | 0.8959 (0.0103) | 0.8765 (0.0189) |
| 0.1046 (0.0006) | 0.3072 (0.0069) | 0.2963 (0.0079) | 0.2164 (0.0106) | |
| WQ: selected | 0.8987 (0.0022) | 0.8905 (0.0069) | 0.9009 (0.0093) | 0.8765 (0.0189) |
| 0.0914 (0.0006) | 0.2311 (0.0052) | 0.2893 (0.0172) | 0.0951 (0.0058) | |
| Gao-style, k = 2 | 0.9013 (0.0024) | 0.8987 (0.0047) | 0.8972 (0.0090) | 0.9111 (0.0124) |
| 0.1033 (0.0005) | 0.2233 (0.0038) | 0.2754 (0.0068) | 0.1126 (0.0045) | |
| Ad-EffOrt: fixed | 0.8987 (0.0019) | 0.9046 (0.0048) | 0.9013 (0.0095) | 0.9063 (0.0127) |
| 0.1033 (0.0005) | 0.2130 (0.0037) | 0.2704 (0.0073) | 0.1047 (0.0040) | |
| Ad-EffOrt: tuned | 0.8987 (0.0019) | 0.9016 (0.0063) | 0.9037 (0.0084) | 0.9039 (0.0142) |
Table 2: Main real-data results at shift ratio 3 and nominal coverage 0.9. Each cell gives expected length on the first line and coverage on the second line, both as mean (split standard error) over 30 shared splits. Coverage is a probability. Length is measured on the training-transformed [0, 1] scale. Target averages use self-normalized importance weights. All rows use the same randomized weighted final calibration; Gao-style and Ad-EffOrt are the stated weighted adaptations.
the same ordering.
Against NLL selection from the same 12 fits, its paired length change is +0.00186 (SE 0.00132), −0.00512 (0.00242), −0.00692 (0.00436), and −0.00675 (0.00365). Thirty tuning bags do not improve on one in every dataset. Both WQ variants give longer mean sets. They coincide on Power Plant, Concrete, and Yacht because all splits select the fixed leaf size; Real Estate selects it in 28 splits. HPD is shorter than the primary selector on all four datasets, DCP-opt on the first three, tuned Ad-EffOrt on Concrete, and kernel-only selection on Power Plant and Yacht. True-density oracle optimality therefore does not imply that the fitted selector is shortest.
Coverage and geometry. Tables 8 and 9 give the no-shift control and group coverages. The primary selector averages 1.005–1.183 positive-length components; supplementary files give complete counts. Its group coverages are 0.8403/0.9238 on Real Estate and 1.0000/0.8708 on Yacht; HPD also shows substantial group differences. The theorem constrains marginal coverage.
Across 120 main-benchmark dataset–shift–method cells, mean coverage ranges from 0.8733 to 0.9111; the lowest is no-shift Yacht PIT (SE 0.0138). All splits are retained. Standard errors measure within-dataset split variation, not variation across datasets.
7.4 Separating fitted-score and selection effects
Table 3 varies either the score at one fitted density or selection at a fixed score. NLL15 and length selection share the 15% labeled pool; main-table NLL uses 25%. Fits, final calibration, and testing are shared. This exploratory follow-up reuses the original 30 splits; see Appendix C.2.
| A. Common NLL15 fit: change the score | ||
|---|---|---|
| Dataset | HPD – inverse density | DCP-opt – inverse density |
| Power Plant | -0.00025 (0.00025) | -0.00137 (0.00029) |
| Concrete | -0.00173 (0.00239) | -0.01806 (0.00318) |
| Real Estate | -0.00178 (0.00332) | -0.00978 (0.00471) |
| Yacht | +0.00375 (0.00290) | +0.00477 (0.00661) |
| B. Fixed score: length selection – NLL15 selection | ||
|---|---|---|
| Dataset | Inverse-density score | HPD score |
| Power Plant | +0.00186 (0.00132) | 0.00000 (0.00000) |
| Concrete | -0.00512 (0.00242) | -0.01414 (0.00251) |
| Real Estate | -0.00852 (0.00462) | -0.01302 (0.00478) |
| Yacht | -0.00871 (0.00406) | -0.02656 (0.00538) |
Table 3: Controlled length differences at shift ratio 3. Entries are paired means (standard errors) over 30 splits, on the transformed [0, 1] response scale. Negative values favor the first method in each difference. Panel A holds the selected density fixed; Panel B holds the score and the labeled tuning budget fixed. Uncertainty describes split variation within each dataset.
At the common NLL15 fit, all four descriptive 95% intervals for HPD minus inverse density contain zero, without establishing equivalence. At the fixed kernel fit, HPD is shorter on Power Plant and Yacht; directions vary across the library. For HPD, length selection reduces mean length by about 6%, 5%, and 27% on Concrete, Real Estate, and Yacht relative to NLL15.
On Yacht, HPD’s 0.01410 mean advantage splits algebraically into 0.00411 from changing the score at the inverse-density-selected fit and 0.00999 from switching fits. This is not a causal attribution. HPD can change pooled score ordering through its input-dependent transformation; the comparison does not establish general robustness to density-estimation error.
In six known-density scenarios, 50 paired repetitions did not resolve a difference between true-density and true-HPD lengths (Table 6); this does not establish equality.
A supplementary joint inverse-density/HPD library reduces computation by constructing fewer histograms but does not consistently shorten sets relative to HPD (Appendix D.3).
7.5 Inverse density and DCP-opt under stronger shift
Table 4 compares the inverse-density selector with DCP-opt at relative shift weights (1, 10) and . Both methods follow Section 7.3 with the same 12 fitted densities. DCP-opt interval centers, length-based candidate selection, and independent final calibration are recomputed at each .
| Dataset | Length (SE) | Coverage (%) | Seconds | |||||
|---|---|---|---|---|---|---|---|---|
| Density | DCP-opt | Density | DCP-opt | Density | DCP-opt | |||
| Power Plant | 0.6 | 0.04290 (0.00030) | 0.04394 (0.00027) | 60.39 | 60.47 | 5.151 | 6.453 | |
| 0.7 | 0.05395 (0.00041) | 0.05472 (0.00031) | 69.87 | 69.87 | 5.157 | 6.470 | ||
| 0.8 | 0.06894 (0.00046) | 0.06856 (0.00048) | 79.91 | 79.72 | 5.162 | 6.497 | ||
| 0.9 | 0.09242 (0.00212) | 0.08914 (0.00058) | 89.97 | 89.77 | 5.161 | 6.453 | ||
| Concrete | 0.6 | 0.10501 (0.00220) | 0.10581 (0.00225) | 59.82 | 59.01 | 0.299 | 0.503 | |
| 0.7 | 0.13502 (0.00247) | 0.13170 (0.00250) | 69.35 | 68.84 | 0.299 | 0.499 | ||
| 0.8 | 0.17736 (0.00339) | 0.16557 (0.00270) | 80.04 | 79.53 | 0.298 | 0.495 | ||
| 0.9 | 0.23208 (0.00371) | 0.21865 (0.00417) | 90.02 | 89.87 | 0.299 | 0.476 | ||
| Real Estate | 0.6 | 0.09932 (0.00380) | 0.10257 (0.00386) | 59.81 | 60.28 | 0.166 | 0.291 | |
| 0.7 | 0.12690 (0.00442) | 0.12843 (0.00479) | 69.39 | 69.72 | 0.166 | 0.284 | ||
| 0.8 | 0.16706 (0.00535) | 0.15387 (0.00387) | 81.10 | 80.03 | 0.166 | 0.280 | ||
| 0.9 | 0.22761 (0.00715) | 0.22804 (0.01009) | 90.52 | 89.56 | 0.166 | 0.268 | ||
| Yacht | 0.6 | 0.03785 (0.00199) | 0.04201 (0.00223) | 57.55 | 56.96 | 0.159 | 0.263 | |
| 0.7 | 0.05283 (0.00302) | 0.05677 (0.00279) | 68.54 | 67.40 | 0.159 | 0.254 | ||
| 0.8 | 0.07230 (0.00537) | 0.07538 (0.00292) | 81.23 | 79.80 | 0.158 | 0.250 | ||
| 0.9 | 0.09364 (0.00551) | 0.11366 (0.00715) | 90.39 | 90.20 | 0.158 | 0.235 | ||
Table 4: Inverse-density and DCP-opt length selection at shift ratio 10: means over 30 paired splits, with length standard errors in parentheses. Length is measured on the training-transformed [0, 1] scale. Timing is from a separate serial, one-thread run and includes the full fitting, selection, and final calibration/evaluation costs defined in Section 7.6. Compare times within this table. Coverage and timing standard errors and paired intervals are supplied with the reproduction files.
Inverse density gives shorter mean sets in 10 of 16 combinations, including all datasets at ; DCP-opt is shorter in the other six. Unadjusted 95% paired intervals favor each method in three cases and contain zero in ten. On Yacht at , lengths are 0.09364 and 0.11366, with coverages 90.39% and 90.20%. Inverse density is faster in all 16 cases; DCP-opt takes 1.25–1.76 times as long. Length comparisons must also account for differences in achieved coverage.
7.6 Computational cost
Table 5 times the unchanged , ratio-3 benchmark in Table 2. Panel A uses four split workers, each with one numerical thread; Panel B uses serial one-thread runs and alternating method order. Both reproduce selections and predictions. Compare times within panels; the comparisons in Table 4 and Appendix D.3 use separate serial runs.
Timing protocol. Times include fitting/query setup, histograms, scores, selection, final calibration, and full-test length, coverage, and component evaluation integrated over randomization. They exclude loading, splitting, transformation, weights, imports, output, and validation. Shared work is charged in full to each method. Totals sum measured stages; they are not cold-start times, single-input latency, or summable wall times. The reproduction files record versions and stages, but not the processor.
Panel A charges density, NLL, HPD, and DCP-opt for two forests and 12 histograms; Gao for two forests and six quantile histograms; and tuned Ad-EffOrt for three configurations. Selection includes NLL or 30 resamples; scores include HPD ordering, DCP centers, or Gao DP. Fixed CTI uses one forest and histogram, querying only calibration and test inputs.
| A. Four split workers; one numerical thread per worker | |||||
|---|---|---|---|---|---|
| Method | Power Plant | Concrete | Real Estate | Yacht | |
| Density: length selection | 5.7861 (0.0680) | 0.3096 (0.0068) | 0.1803 (0.0055) | 0.1779 (0.0053) | |
| Density: NLL selection | 5.4297 (0.0642) | 0.2889 (0.0065) | 0.1710 (0.0053) | 0.1695 (0.0052) | |
| CTI: fixed QRF | 1.1620 (0.0259) | 0.1088 (0.0034) | 0.0707 (0.0025) | 0.0762 (0.0027) | |
| HPD score | 5.9223 (0.0682) | 0.3237 (0.0065) | 0.1863 (0.0056) | 0.1830 (0.0055) | |
| DCP-opt score | 7.4235 (0.0924) | 0.5075 (0.0097) | 0.2918 (0.0090) | 0.2710 (0.0079) | |
| Gao-style, k = 2 | 5.5337 (0.0653) | 0.3354 (0.0071) | 0.1923 (0.0056) | 0.1876 (0.0054) | |
| Ad-EffOrt: tuned | 3.4779 (0.0838) | 0.9653 (0.0151) | 0.6491 (0.0206) | 0.7011 (0.0202) | |
| B. Serial splits; one numerical thread | |||||
| Density: length selection | 4.8080 (0.0370) | 0.2899 (0.0026) | 0.1553 (0.0019) | 0.1554 (0.0030) | |
| WQ: fixed† | 3.0437 (0.0205) | 0.3351 (0.0055) | 0.1410 (0.0017) | 0.1086 (0.0015) | |
| WQ: selected | 5.7629 (0.0332) | 0.5583 (0.0069) | 0.2373 (0.0026) | 0.1963 (0.0025) | |
Table 5: Seconds per split at shift ratio 3 and : means (standard errors) over the 30 splits of Table 2. Compare methods within each timing panel. Costs follow the protocol above. The density selector is a common reference; †fixed WQ includes unused tuning-input preparation.
Cost comparisons. In Panel A, fixed CTI and NLL are faster than length selection on all datasets. HPD costs 2.4%–4.5% more and gives shorter sets; DCP-opt costs 1.28–1.64 times as much, including interval centers. Excluding fitting/query setup, length selection costs 7.6–17.1 times as much as NLL. Gao and tuned Ad-EffOrt have no consistent cost ordering. In Panel B, selected WQ is slower on all four datasets; fixed WQ is faster on Power Plant, Real Estate, and Yacht. These comparisons depend on the implementations and unequal budgets in Section 7.3.
8 Related work and benchmark scope
Finite-sample optimality. Faulkenberry (1973) constructs prediction regions by conditioning on a sufficient statistic. Hoff (2023) combines conditional testing with Bayes risk minimization under frequentist coverage constraints; Koning and van Meer (2025, Theorem 8 and Corollary 2) derive conformal optimality within an e-value framework. Tibshirani, Barber, and Ramdas (2026) give a direct testing derivation and explain these precedents. Our proof applies conditional optimization to weighted permutation constraints, with risk under and validity over .
Density estimation and prediction sets. Weighted calibration and density-based regions are established (Tibshirani et al., 2019; Izbicki et al., 2020, 2022). Wang and Qiao (2025) estimate conditional densities by reference-distribution classification for weighted treatment-effect inference, motivated by a population density-threshold optimum. Our finite- benchmark includes calibration randomness. CTI supplies our equal-mass quantile-bin ordering (Luo and Zhou, 2025). Full CD-split partitions inputs and calibrates locally; our global comparator uses one calibration cell. HPD-split and DCP transform estimated densities or CDFs, with DCP also adjusting interval shape (Izbicki et al., 2022; Chernozhukov et al., 2021). Their benchmarks and Gao et al. (2025)'s restriction to intervals differ from ours. Other interval methods include CQR, CHR, and CIR/CIR+ (Romano et al., 2019; Sesia and Romano, 2021; Guo et al., 2026).
Selection and data reuse. CPL optimizes length under coverage moments (Kiyani et al., 2024); EffOrt and Ad-EffOrt optimize error quantiles (Le Bars and Humbert, 2025). VFCP selects by width before independent final calibration (Yang and Kuchibhotla, 2025). ModSel-CP and ModSel-CP-LOO incorporate the hypothesized response into selection, retaining exchangeable finite-sample coverage without a separate selection/calibration split and providing width guarantees under candidate-class regularity (Liang et al., 2026). Our separate-pool selector uses fresh weighted calibration and targets a fixed- oracle. Their published guarantees assume exchangeability, so we do not include a weighted adaptation.
ORCA learns radii around conditional samples (Zheng and Zhu, 2026); WGCP combines generated quantiles with estimated shift weights (Li et al., 2026). Isaev et al. (2026) study nonasymptotic CQR and fixed-score calibration limits under known shift. Theorem 1 compares all rules valid over at the same calibration size.
9 Discussion
The consistency results require growing estimation resolution and selection resources; the original fixed-library, 30-resample experiments do not implement these sequences. Optimality requires validity over (Appendix A) and concerns marginal coverage and volume on the stated response scale. It does not imply conditional coverage, optimality among -interval sets, or shortest original-unit length after a nonlinear transformation. All formal coverage guarantees use the true density ratio; estimated-weight error remains outside this analysis.
Acknowledgments and disclosures
Funding. Supported in part by the Simons Foundation (SFI-MPS-TSM-00025603).
Competing interests. The author declares no competing interests.
AI use disclosure. GPT-6 contributed to this work at the level of a research collaborator. The author takes full responsibility for the content of this paper.
A The validity class and infinite-volume risks
Validity only for iid laws permits a smaller risk. The larger null class in Theorem 1 is necessary for its claim. A counterexample already exists when . Take , , with Lebesgue measure, and . Report when the calibration response belongs to , and report otherwise. For any iid response law, writing gives coverage
For the reference density equal to 2 on and 2/3 on its complement, and this rule has expected length 5/8. The inverse-density oracle has inclusion probabilities 7/8 on and 5/8 on its complement, hence expected length
The iid-valid rule fails on a bag with one response in each part: its orbitwise coverage is 1/2. Thus optimality among methods valid over all weighted-exchangeable laws cannot be replaced by optimality among methods required to be valid only over iid-source shift laws.
Proposition 15 (An unavoidable infinite-volume event). Suppose . If
every rule valid over has . In particular, this holds at every finite when is essentially unbounded under .
Proof. First symmetrize the rule as in Proposition 3, which preserves its target risk. At a fixed with , apply (13) to each augmented candidate . The total contribution from the calibration positions is at most . Therefore, for every ,
On the event in (70), this is a positive constant over a set of infinite -measure. Tonelli's theorem gives infinite conditional expected volume and then infinite risk. If is essentially unbounded under , the conditional probability of (70) is positive for every finite value of .
The oracle theorem therefore extends to infinite reference measure, but its value need not be finite. Quantitative claims about excess length require a finite oracle risk or a finite-volume evaluation scale. A fixed transformation of an unbounded response into a bounded interval changes the volume objective: transforming prediction sets back requires the inverse-transformation Jacobian when measuring original-scale length.
B Synthetic distributions and complete configuration grid
Section 7.1 specifies the density pairs, sampling design, bin counts, and bandwidths. Quantile histograms use empirical quantiles without grid shrinkage and fixed outer endpoints 0 and 1. Each Gaussian kernel is normalized on before bin integration; the resulting kernel histogram is mixed with the uniform density using weight . Fixed CTI uses ; Gao-style DP selects among the four quantile fits. Ad-EffOrt is not run in this two-group comparison.
The accompanying Supplementary_results/ files report sensitivity to calibration size and shift at , together with all 24 original configurations: 50 repetitions and 11 fitted methods give 13,200 rows, with oracle comparisons and paired standard errors.
Oracle evaluation. For each score threshold arising from weighted calibration of , we compute the intervals forming . Interior endpoints solve on each monotone-density branch, with absolute root tolerance ; outer endpoints may be 0 or 1. At final evaluation, an interval has conditional probability given . These CDFs use the uniform and beta components of the specified mixtures. For each reported mean, the standard error is the sample standard deviation divided by . Oracle-gap errors are calculated from the 50 within-repetition differences, rather than from separate method and oracle standard errors.
C Real-data protocol and implementation details
C.1 Real-data protocol and implemented comparators
Data and splits. Each observation is , with feature vector and scalar response . There are features; is feature of observation . For , is its th coordinate.
We retain all numeric observations in four UCI datasets, remove Real Estate's identifier column, and use Power Plant's first worksheet once. The covariate shifts are designed.¹
| Dataset | Rows | Features | Shift variable |
|---|---|---|---|
| Power Plant | 9568 | 4 | Ambient temperature |
| Concrete | 1030 | 8 | Age |
| Real Estate | 414 | 6 | Distance to nearest MRT station |
| Yacht | 308 | 6 | Froude number |
Methods share each split, using the allocation in Section 7.3 with the first four counts rounded down. Each dataset uses 30 repetitions (identifiers 10–39), seed 20261020, and dataset-specific random streams; pilots are excluded.
Response scale and shift. Using the training responses , where , define
where is the empirical -quantile of training responses, linearly interpolated between order statistics. Set
We apply the sigmoid transformation
Within each repetition, apply the same training-fitted and to the remaining data partitions. Set ; reported lengths are Lebesgue measures on this transformed scale, not in original response units. For the designated input feature , define
For each , we define the target distribution by
Thus gives , while assigns relative weights 1 and to the lower and upper groups, respectively.
¹Primary UCI data references: Power Plant, https://doi.org/10.24432/C5002N; Concrete, https://doi.org/10.24432/C5PK67; Real Estate, https://doi.org/10.24432/C5J30W; Yacht, https://doi.org/10.24432/C5XG7R. Retrieved October 19, 2026.
Fitting the regression forests. Fit an ensemble of regression trees (Meinshausen, 2006) by the squared-error bootstrap procedure below, producing the leaf partitions in Section 5.4. Use trees and responses ; training and fitting randomization are independent of final calibration and test data. Numerical settings follow the construction.
-
Draw a training resample for each tree. For tree , draw indices independently and uniformly with replacement from . Let count the draws of observation , so ; counts may be zero or exceed one.
-
Learn the tree's input-space partition. In tree , node has input region . The root is , containing . Observation has fitting weight ; those with do not affect fitting.
At each node , draw a fresh initial candidate feature set uniformly from all subsets of of size
Features constant among bootstrap observations in cannot split the node. The implementation may then examine additional features; is the set actually examined.
For , thresholds are midpoints between consecutive distinct feature- values among bootstrap observations in . Split gives
The children partition .
For any node region B with positive bootstrap weight, define
Let contain the examined pairs , , satisfying the minimum-leaf and other splitting constraints. If nonempty, choose
This maximizes the reduction in squared error because is fixed. Create two child nodes with regions and .
- Stop growing and retain the terminal leaves. Fix a minimum leaf size before fitting. For node of tree t, define its sample count by
This counts distinct bootstrap-selected observations in the node. Split recursively from the root; retain a terminal leaf when fitting responses are equal or no admissible split gives two children with at least observations each.
Each tree has terminal regions partitioning . For query , is the leaf containing in tree . Repeat for .
- Construct the conditional-distribution weights. In each fitted tree , route every original input , including those with , through the fitted feature-threshold rules. Form as in Section 5.4; assign weight to each observation in this leaf and zero outside, then average over trees as in (45). Bootstrap multiplicities affect fitting only, not this original-sample averaging. These weights define the conditional CDF and histograms.
Forest-fitting resamples differ from the later selection resamples. The local weights also differ from the covariate-shift weights used for calibration and target evaluation.
Fitted library. Two 80-tree bootstrap regression forests (Meinshausen, 2006) use minimum leaf sizes 5 and 20, and feature fraction 0.8. Their original-sample observation weights are defined in (45). Six quantile histograms use , with endpoints 0 and 1 and interior quantiles shrunk 2% toward the uniform grid. Six kernel histograms share the forest weights, mix Gaussian kernels individually truncated to , use bandwidths 0.02, 0.05, 0.1, and integrate onto 80 equal-width cells. Their masses receive a uniform mixture.
Selection and calibration. Length selection uses (57) with r = 30 and the allocations in Section 7.3. Methods share resamples and input pools. The 30 resamples reuse one labeled pool, not 30 independent samples from P. Final calibration uses (5) at level p (p = 0.9 in the main benchmark).
Implemented methods. Write for fitted cell width and mass, and . Smaller scores are preferred; selection minimizes bootstrap length unless specified otherwise. Result-file identifiers are:
-
density_length: select among all 12 histograms using score .
-
density_singlebag: select the same 12 scores using the original labeled pool without resampling.
-
density_nll: select the same 12 fits by target-weighted negative log density, then use their inverse-density score.
-
cti_fixed: fixed leaf-size-20, quantile histogram; its score is order-equivalent to CTI bin width (Luo and Zhou, 2025).
-
quantile_length: density selection over the six quantile fits.
-
kernel_length: density selection over the six kernel fits.
-
hpd_length: select among 12 fits using (Izbicki et al., 2022); the strict inequality preserves density ties.
-
pit_length: 12 fits, score (Chernozhukov et al., 2021).
-
dcp_opt_length: 12 fits, score , where minimizes over (Chernozhukov et al., 2021).
-
cqr_length: 12 fits, score (Romano et al., 2019).
-
wq_rf_fixed: reference-classification density score with minimum leaf size 5 (Wang and Qiao, 2025).
-
wq_rf_selected: select minimum leaf size from with the same length objective.
-
gao_union2_length: six quantile fits; exact whole-cell DP selects cells in at most two intervals. Adjacent-cell expansion and boundary-cell contraction create a nested family, scored by entry rank divided by (Gao et al., 2025).
-
adefort: fixed smoothing 0.05, score (Le Bars and Humbert, 2025).
-
adefort_tuned: select smoothing from with the same length objective.
Ad-EffOrt uses a 32-unit tanh center, 150 MSE warm-start steps, 500 kernel quantile-gradient Adadelta steps, training-only checkpoint selection, and a 120-iteration boosted residual-quantile model. Gao uses nominal anchor mass , without the theoretical inflation. Both are independent weighted adaptations, not reproductions of published models or results. Candidate counts and computational budgets differ by family.
Reference-classification scores. We use the density-estimation component of Algorithm 1 in Wang and Qiao (2025), omitting its treatment-effect stage. For each training input, draw a reference response from an untruncated Gaussian with the training-response mean and 1.5 times its empirical standard deviation on the transformed scale. A binary forest distinguishes observed from reference pairs. With fitted observed-pair probability and reference density , use score . Clip probabilities to , without input-specific renormalization. Each classifier has 80 bootstrap trees and feature fraction 0.8; both leaf-size candidates share reference draws.
Integrate lengths on classifier response partitions using Gaussian level equations, without a response grid. The estimate need not integrate to one, so Proposition 8 does not apply; weighted calibration still gives coverage.
Evaluation. Use weighted source-test averages for target coverage and mean length, integrating randomization analytically for coverage, length, and positive-length component counts. Report shift-group coverage and timing. Standard errors describe split variation within each fixed dataset; method differences are paired by split.
Observed optimization and split diagnostics. All 90 Power Plant Ad-EffOrt fits (30 splits, three smoothing values) retain an MSE warm-start checkpoint: later steps do not improve the training quantile criterion. This concerns our implementation, not an optimally tuned original pipeline. All final splits are retained, including Yacht coverage 0.6681 for the density selector in repetition 29 and 0.5969 for HPD in repetition 32. Marginal coverage averages over calibration samples, not each realized split.
C.2 Protocol for the controlled score and selection diagnostic
Real data and comparison units. Use Appendix C.1's protocol at ratio 3 and . Evaluate inverse-density, HPD, and DCP-opt on all 12 fits with shared final calibration and test data excluded from selection. NLL15 and length selection share the 15% labeled pool; length selection also uses the 10% input pool without responses. NLL25 adds those responses for a budget check. Length selection uses bootstrap samples.
Anchors are the leaf-size-20 kernel with bandwidth 0.05, NLL15, and each score's length-selected fit. Retain all 12-fit comparisons; average within splits before computing errors. Descriptive paired 95% intervals use without multiplicity adjustment and measure split variation in reused datasets. This follow-up is exploratory. For Yacht, change inverse density to HPD at the inverse-density-selected fit, then switch to the HPD-selected fit. These score and fit components sum to the total difference in each split.
Computational comparisons. Timing is serial and single-threaded; each method pays the common 12-fit training/query cost under Section 7.6's convention.
Known-density check. The six scenarios use the four density pairs in Section 7.1, plus the asymmetric and separated-mode pairs after removing their uniform components and renormalizing. Source group probabilities are and target probabilities are . We fix and , use 50 repetitions (indices 10–59, seed 20261026), and take nested training samples of 500, 2000, and 8000 observations per group. All scores and training sizes share 200 labeled source observations, 200 independent source inputs, and fresh final calibration in each repetition. Length selection uses 30 bootstrap samples; NLL uses the same 200 labels. The seven fitted candidates are those specified in Appendix B.
True scores use analytic beta-mixture densities and CDFs. Density contours and HPD inversions use scalar roots on monotone-density branches, with root tolerance . The true DCP-opt center is computed by comparing quantile widths at boundary points and stationary candidates found from derivative sign changes on a 513-point bracket grid; resolution sensitivity was checked separately. Integrate conditional interval masses and common randomization for length and coverage. The true reference is training-size independent and counted once per repetition, not three times.
| Scenario | True HPD – true density | True DCP-opt – true density |
|---|---|---|
| Asymmetric | +0.00055 (0.00068) | +0.00338 (0.00107) |
| Heteroscedastic | +0.00033 (0.00125) | +0.00033 (0.00125) |
| Separated modes | +0.00022 (0.00082) | +0.20079 (0.00795) |
| Unequal modes | -0.00063 (0.00118) | +0.20772 (0.00682) |
| Asymmetric, no floor | -0.00024 (0.00102) | +0.00123 (0.00168) |
| Separated modes, no floor | +0.00149 (0.00102) | +0.25701 (0.00404) |
Table 6: True-score length differences in the diagnostic simulations, with . Entries are paired means (standard errors) over 50 repetitions. True references are counted once per repetition; uncorrected descriptive 95% intervals use the quantile.
D Additional real-data results
D.1 Inverse-density and HPD scores at lower coverage levels
This exploratory comparison follows Appendix C.1, using , relative weights (1, 10) and (1, 20), and the same 12 fitted densities for both methods. Table 7 reports transformed-scale length, coverage, and runtime; timing follows Section 7.6.
Inverse density has shorter mean sets in nine of 12 combinations at ratio 10 and ten at ratio 20. Unadjusted 95% paired length intervals favor inverse density in seven combinations at each ratio; the remaining intervals contain zero. Inverse density is faster in all 24 combinations; HPD takes 1.02–1.05 times as long. Split-level results and paired intervals accompany this table.
Achieved coverage also matters. On Real Estate at ratio 20 and , inverse density and HPD attain 27.35% and 30.27%. On Yacht at ratio 20 and , HPD is shorter but attains 46.64%, compared with 49.05% for inverse density. These length differences therefore cannot be read as gains at equal achieved coverage.
D.2 No-shift and group-coverage controls
Tables 8 and 9 report the no-shift control and shift-group coverage for the main benchmark.
D.3 Coverage levels and a joint score library
We compare 12-score selectors at and shift ratio 3 under Appendix C.1. Inverse density and HPD each use 12 densities; joint selection applies both scores to six, retaining
| Dataset | p | Length (SE) | Coverage (%) | Time (s) | |||
|---|---|---|---|---|---|---|---|
| Density | HPD | Density | HPD | Density | HPD | ||
| Relative shift weights (1, 10) | |||||||
| Power Plant | 0.3 | 0.01746 (0.00021) | 0.02004 (0.00019) | 30.27 | 30.83 | 5.432 | 5.567 |
| 0.4 | 0.02486 (0.00023) | 0.02635 (0.00026) | 40.60 | 40.87 | 5.438 | 5.558 | |
| 0.5 | 0.03347 (0.00033) | 0.03445 (0.00024) | 50.53 | 50.21 | 5.436 | 5.571 | |
| Concrete | 0.3 | 0.04082 (0.00222) | 0.04778 (0.00184) | 30.87 | 31.48 | 0.331 | 0.348 |
| 0.4 | 0.05858 (0.00239) | 0.06597 (0.00252) | 40.21 | 40.35 | 0.331 | 0.346 | |
| 0.5 | 0.08078 (0.00255) | 0.08629 (0.00277) | 50.23 | 49.80 | 0.332 | 0.347 | |
| Real Estate | 0.3 | 0.04149 (0.00285) | 0.05187 (0.00292) | 27.67 | 29.16 | 0.175 | 0.181 |
| 0.4 | 0.05925 (0.00309) | 0.06682 (0.00333) | 38.51 | 41.59 | 0.175 | 0.182 | |
| 0.5 | 0.07590 (0.00334) | 0.08545 (0.00358) | 49.05 | 50.49 | 0.175 | 0.181 | |
| Yacht | 0.3 | 0.01512 (0.00155) | 0.01487 (0.00159) | 29.10 | 28.12 | 0.170 | 0.175 |
| 0.4 | 0.02132 (0.00143) | 0.02065 (0.00145) | 39.41 | 37.60 | 0.170 | 0.176 | |
| 0.5 | 0.02943 (0.00172) | 0.02644 (0.00153) | 47.85 | 46.85 | 0.171 | 0.176 | |
| Relative shift weights (1, 20) | |||||||
| Power Plant | 0.3 | 0.01754 (0.00022) | 0.02023 (0.00019) | 30.21 | 30.81 | 5.428 | 5.562 |
| 0.4 | 0.02509 (0.00027) | 0.02651 (0.00027) | 40.66 | 40.83 | 5.432 | 5.560 | |
| 0.5 | 0.03361 (0.00034) | 0.03467 (0.00026) | 50.53 | 50.07 | 5.434 | 5.562 | |
| Concrete | 0.3 | 0.04076 (0.00228) | 0.04831 (0.00194) | 30.88 | 31.61 | 0.331 | 0.346 |
| 0.4 | 0.05896 (0.00245) | 0.06663 (0.00250) | 40.32 | 40.61 | 0.332 | 0.348 | |
| 0.5 | 0.08090 (0.00257) | 0.08639 (0.00282) | 50.23 | 49.83 | 0.331 | 0.346 | |
| Real Estate | 0.3 | 0.04062 (0.00275) | 0.05223 (0.00284) | 27.35 | 30.27 | 0.175 | 0.182 |
| 0.4 | 0.05864 (0.00303) | 0.06642 (0.00342) | 38.73 | 41.38 | 0.176 | 0.182 | |
| 0.5 | 0.07681 (0.00312) | 0.08542 (0.00355) | 50.02 | 50.53 | 0.175 | 0.181 | |
| Yacht | 0.3 | 0.01600 (0.00167) | 0.01657 (0.00173) | 28.88 | 29.14 | 0.170 | 0.176 |
| 0.4 | 0.02302 (0.00154) | 0.02197 (0.00150) | 39.98 | 37.53 | 0.171 | 0.176 | |
| 0.5 | 0.03057 (0.00168) | 0.02752 (0.00161) | 49.05 | 46.64 | 0.170 | 0.176 | |
Table 7: Inverse-density and HPD selection at lower coverage levels: means over 30 shared splits, with length standard errors in parentheses. Both methods use the same 12 densities and training-transformed [0, 1] responses. Timing follows Section 7.6 and charges the full shared fitting cost to each method. Coverage and timing standard errors, and paired intervals, are in the reproduction files.
and for each forest. This subset was fixed before the follow-up, after examining the datasets and splits. Selection and final calibration are repeated at every . Theorem 12 applies under its assumptions. Complete means, standard errors, and paired intervals are in joint_score_comparison/Joint12_vs_HPD_summary.csv. This separate serial, one-thread timing run follows Section 7.6; compare times within this study.
Joint selection is faster in all 16 combinations: savings relative to HPD are 35.1%-35.3% on Power Plant and 3.5%-7.5% elsewhere, from fewer histograms with both forests fully charged. Its mean length is smaller than HPD in six combinations and inverse density in 13. All six gains over HPD accompany lower coverage; on Real Estate at , coverages are 67.95% and 70.06%, with paired 95% difference interval [-3.99, -0.21] percentage points. Unadjusted 95% paired length intervals favor joint selection only on Power Plant at and HPD only on Concrete at ; the other 14 contain zero. This does not establish consistent length improvement or noninferiority to HPD.
| Method | Power Plant | Concrete | Real Estate | Yacht |
|---|---|---|---|---|
| 0.0895 (0.0008) | 0.2273 (0.0044) | 0.2600 (0.0064) | 0.0741 (0.0045) | |
| Density: length selection | 0.8997 (0.0022) | 0.8982 (0.0054) | 0.8978 (0.0069) | 0.8986 (0.0132) |
| 0.0882 (0.0005) | 0.2320 (0.0035) | 0.2559 (0.0058) | 0.0713 (0.0032) | |
| Density: NLL selection | 0.8975 (0.0021) | 0.9009 (0.0051) | 0.8967 (0.0066) | 0.8837 (0.0132) |
| 0.0897 (0.0008) | 0.2277 (0.0038) | 0.2729 (0.0110) | 0.0747 (0.0044) | |
| Density: one tuning bag | 0.9003 (0.0022) | 0.9006 (0.0049) | 0.9051 (0.0065) | 0.8995 (0.0132) |
| 0.1014 (0.0005) | 0.3038 (0.0043) | 0.3189 (0.0069) | 0.1545 (0.0085) | |
| CTI: fixed QRF | 0.8984 (0.0022) | 0.8933 (0.0060) | 0.8973 (0.0082) | 0.8980 (0.0125) |
| 0.0953 (0.0011) | 0.2381 (0.0036) | 0.2947 (0.0124) | 0.0740 (0.0048) | |
| Density: quantiles only | 0.9015 (0.0024) | 0.8984 (0.0050) | 0.8921 (0.0089) | 0.8914 (0.0143) |
| 0.0882 (0.0005) | 0.2253 (0.0037) | 0.2588 (0.0060) | 0.0708 (0.0030) | |
| Density: kernels only | 0.8975 (0.0021) | 0.8999 (0.0054) | 0.8982 (0.0067) | 0.8993 (0.0135) |
| 0.0878 (0.0005) | 0.2113 (0.0031) | 0.2526 (0.0053) | 0.0517 (0.0022) | |
| HPD score | 0.8982 (0.0021) | 0.8970 (0.0052) | 0.8973 (0.0072) | 0.8930 (0.0118) |
| 0.0877 (0.0006) | 0.2110 (0.0031) | 0.2542 (0.0064) | 0.0658 (0.0047) | |
| PIT score | 0.8985 (0.0024) | 0.8971 (0.0058) | 0.8973 (0.0076) | 0.8733 (0.0138) |
| 0.0868 (0.0005) | 0.2069 (0.0032) | 0.2509 (0.0058) | 0.0620 (0.0035) | |
| DCP-opt score | 0.8974 (0.0020) | 0.8943 (0.0060) | 0.8929 (0.0076) | 0.8853 (0.0124) |
| 0.0895 (0.0005) | 0.2291 (0.0032) | 0.2579 (0.0048) | 0.1455 (0.0081) | |
| CQR score | 0.8986 (0.0023) | 0.9027 (0.0064) | 0.8961 (0.0077) | 0.8849 (0.0099) |
| 0.1037 (0.0006) | 0.3060 (0.0065) | 0.3048 (0.0084) | 0.1602 (0.0080) | |
| WQ: fixed | 0.8976 (0.0021) | 0.8893 (0.0068) | 0.8900 (0.0099) | 0.8834 (0.0149) |
| 0.1037 (0.0006) | 0.3060 (0.0065) | 0.3048 (0.0084) | 0.1602 (0.0080) | |
| WQ: selected | 0.8976 (0.0021) | 0.8893 (0.0068) | 0.8900 (0.0099) | 0.8834 (0.0149) |
| 0.0902 (0.0006) | 0.2241 (0.0037) | 0.2994 (0.0141) | 0.0601 (0.0032) | |
| Gao-style, k = 2 | 0.9015 (0.0023) | 0.8969 (0.0051) | 0.8963 (0.0085) | 0.8942 (0.0104) |
| 0.1011 (0.0004) | 0.2214 (0.0035) | 0.2898 (0.0058) | 0.1033 (0.0039) | |
| Ad-EffOrt: fixed | 0.8998 (0.0019) | 0.8990 (0.0047) | 0.8985 (0.0082) | 0.8945 (0.0106) |
| 0.1011 (0.0004) | 0.2127 (0.0035) | 0.2836 (0.0061) | 0.0981 (0.0033) | |
| Ad-EffOrt: tuned | 0.8998 (0.0019) | 0.8964 (0.0056) | 0.9000 (0.0088) | 0.8971 (0.0109) |
Table 8: No-shift control at nominal coverage 0.9. Each cell gives expected length on the first line and coverage on the second line, both as mean (split standard error) over 30 shared splits. Coverage is a probability; length uses the training-transformed [0, 1] scale. The splits and fitted estimators are shared with the shifted evaluation.
E Implementation verification and reproducibility
Audits check candidate self-weight, weighted ties, common-U randomization, histogram integration, CTI ordering, Gao DP, Ad-EffOrt gradients, and agreement of direct and vectorized resample calculations. Saved counts, tolerances, and independent summary/paired-difference checks cover 3600 main real-data, 13200 original synthetic, 1800 vanishing-density, and 1440 four-level records; pilots remain separate.
Main and WQ records are documented in repro/README.txt and wang_qiao_comparison/README.txt. The vanishing-density experiment/README.txt includes a separate 5000-calibration audit: oracle coverages 0.90060 (cluster SE 0.00052) and 0.90011 (0.00054), beyond the 50 formal repetitions. Four-level code, results, and audits are in joint_score_comparison/; its baselines
| Method | Power Plant | Concrete | Real Estate | Yacht |
|---|---|---|---|---|
| 0.9053 (0.0024) | 0.8988 (0.0100) | 0.8403 (0.0104) | 1.0000 (0.0000) | |
| Density: length selection | 0.8980 (0.0024) | 0.9006 (0.0056) | 0.9238 (0.0086) | 0.8708 (0.0187) |
| 0.9063 (0.0021) | 0.9163 (0.0090) | 0.8499 (0.0104) | 0.9918 (0.0036) | |
| HPD score | 0.8945 (0.0024) | 0.8989 (0.0051) | 0.9163 (0.0097) | 0.8717 (0.0217) |
| 0.9044 (0.0023) | 0.9152 (0.0087) | 0.8482 (0.0125) | 0.9942 (0.0024) | |
| DCP-opt score | 0.8958 (0.0024) | 0.8928 (0.0062) | 0.9128 (0.0093) | 0.8569 (0.0184) |
| 0.8919 (0.0029) | 0.8715 (0.0135) | 0.8481 (0.0158) | 0.9930 (0.0030) | |
| WQ: selected | 0.9008 (0.0027) | 0.8936 (0.0067) | 0.9187 (0.0106) | 0.8420 (0.0254) |
| 0.9037 (0.0028) | 0.9052 (0.0115) | 0.8648 (0.0138) | 0.9844 (0.0047) | |
| Gao-style, k = 2 | 0.9005 (0.0026) | 0.8977 (0.0047) | 0.9093 (0.0100) | 0.8895 (0.0160) |
| 0.9012 (0.0028) | 0.8872 (0.0092) | 0.8799 (0.0113) | 0.9715 (0.0077) | |
| Ad-EffOrt: tuned | 0.8979 (0.0021) | 0.9042 (0.0065) | 0.9135 (0.0100) | 0.8852 (0.0173) |
Table 9: Coverage in the two input groups defining the ratio-3 shift. Each cell gives Group 0 on the first line and Group 1 on the second, with split standard errors in parentheses. These are diagnostics, not the coverage constraint optimized by the theorem.
exactly reproduce preceding predictions.
For ratio-10, dcp_shift10_comparison/README.txt documents 960 records, candidate losses, stage timings, and independent checks of weighted coverage, length integration, and paired summaries.
Supplementary_results/ retains complete vanishing-density, synthetic-configuration, and connected-component tables and archived exploratory comparisons omitted here.
F Kernel histogram error bounds
Proof of Proposition 10. All norms and integrals in this proof are on unless stated otherwise. We first control density error within one group and suppress its index. Write and
The Gaussian tail integral gives
Using Lipschitz continuity and ,
Since , we have and
Consequently, . This bound includes the boundary normalization; it does not assume a uniform pointwise bias bound at the endpoints.
Let replace a function by its average on each bin, using the factor . It is an contraction. The binning error satisfies
For and , we have and . Independence within the group and Cauchy-Schwarz give
Combining these inequalities proves the first bound in (43) for each group and hence for their -weighted average. The second follows from and .
For the length bound, (41) and Corollary 7, with , give
Taking expectations over the training data and using (43) proves (44). Finally, positivity, finiteness, and independence of the fitted score allow Proposition 4 to give exact coverage.
G Forest CDF error and density error
Proof of Proposition 11. For any fixed and , the Lipschitz condition gives
Since and , averaging this inequality over yields
where the last step uses . Taking the supremum over and gives . Thus is finite even when is infinite. Fix the training data and throughout the next two steps.
Kernel histograms. Define the kernel distribution function
For fixed , this function is nonincreasing in . Indeed, if has density , differentiation gives
Its total variation on is at most one. Integration by parts against the signed measure with distribution function therefore gives
The endpoint terms vanish because the signed cumulative mass is zero below and at . Let . The last display bounds the difference between the distribution functions of and . If is that difference at the th bin boundary, then and . Consequently,
where is the bin-averaging operator used in Appendix F. Its contraction property, together with the smoothing and binning bounds established there, yields
Quantile histograms. For this part, assume also . Continuity of implies that every jump of is at most . For linear interpolation of weighted CDF knots, the discrepancy between the empirical CDF at the interpolated quantile and its probability level is at most the largest jump. This remains true with repeated response values or zero weights: a nonconstant interpolation segment spans at most one positive CDF increment, and equal response values contribute at most their combined atom. Thus, for ,
Moving this quantile by at most changes by at most . Hence, for the endpoints in (47),
Write and . Comparison with the true average density in each bin gives
The endpoint errors at are zero, so
Since ,
Taking expectations over training data and proves (50) and (53).
Prediction-set length. Use (41) and apply Proposition 8, with , to the normalized unmixed density, using (50). This gives (51) without assuming . Under the additional lower bound , (24) applies to both the kernel and the quantile density estimates. Together with their density bounds, it gives (54), uniformly over .
Convergence of . Fix with . For the original-sample forest weights in (45), Theorem 4.3 of Elie-Dit-Cosaque and Maume-Deschamps (2022) gives almost surely for each fixed under its stated sampling conditions and Assumptions 4.2–4.4.
Since , bounded convergence gives
Because , this convergence also holds for -almost every . Furthermore, . Interchanging the two expectations and applying dominated convergence therefore yields
Empirical CDF error within groups. In Section 7.2, each group contains iid training responses with conditional CDF . Define
The Dvoretzky–Kiefer–Wolfowitz–Massart inequality (Massart, 1990) gives, for every ,
Integrating this tail bound yields
Since and , the error in (46) satisfies
No positive lower bound on the true densities is required. This rate concerns the within-group empirical CDFs. The kernel-histogram proof above also applies to these weights: it uses only nonnegative, normalized training weights through .
H Selection from independent calibration samples
Use the scores and response domain from Section 6. Draw independent pairs , , independently of training; each contains source observations. With from (6), select
(74) using a fixed tie rule. Return with fresh and , independent of one another and of training and selection.
Theorem 16 (Selection and an oracle bound). Conditional on the training data, for any , with probability at least over the selection data,
Conditional on the training and selection data, the final rule has coverage exactly p under .
Proof. Conditional on training, the summands in (74) are independent, lie in , and have mean . Hoeffding's inequality and a union bound give, with probability at least ,
The minimizing property of then gives , proving (75). Independent final calibration gives exact coverage by Proposition 4.
I Proof of the pooled-selection bound
Proof of Theorem 12. Condition on the training data throughout. All scores and weights are then fixed. For candidate k, write
Both lengths lie in . The function is symmetric in the calibration observations, and . The minimizing property of implies
A direct finite-m bound. Assume first that . We use the following elementary consequence of an exponential-moment bound: if centered random variables satisfy for every real , then
Indeed, for , the exponential of the maximum is bounded by ; Jensen's inequality and minimization over give the stated bound. Independence between candidates is not needed.
Let be the empirical law of the labeled pool, and define
Conditional on the labeled pool, the summands defining are independent, bounded by , and have mean . Hoeffding's exponential-moment bound and the preceding maximum inequality give
Average over all subsets of m distinct pool indices:
The expectation of is . Put . For each permutation of the indices, average over the first disjoint blocks of observations in that order. Each such block average has exponential moment, after centering, at most . Its average over all permutations is , so convexity of the exponential gives the same bound for . Consequently,
In the product-law average defining , all indices are distinct with probability . Conditional on this event their average is , by symmetry of . All other terms remain in . Thus, for every realized pool,
The upper bound in (58) follows by a union bound over the pairs of sampled indices.
For the input pool, set
This expression for agrees with its previous definition. Conditional on the labeled pool and all bootstrap samples, is fixed and the input pool remains iid from . Since and ,
Each numerator summand has mean zero and belongs to the interval , of length . The denominator is at least . The same exponential-moment argument therefore yields
The triangle inequality, (77)–(80), and (76) prove (60).
A complementary bound when . The following argument allows every .
Weighted empirical distribution functions. First consider iid observations from any distribution on , with the weights in (56). For a fixed score , put
Let be the supremum error of the unnormalized numerator, including its limit at . Symmetrization gives
where the are independent random signs. Conditional on the observations, sort them by score. The displayed sums form a subset of the partial sums of independent, mean-zero random variables. The maximal inequality for these partial sums bounds the conditional expected maximum by . Thus . Since the empirical denominator is at least after division by , and the error in the mean weight is at most ,
This argument permits arbitrary ties and also applies conditionally when R is the empirical distribution of the labeled pool.
Length stability under calibration. Fix a score and write . For any calibration bag of size , let be its normalized weighted score distribution function and set . Define
For comparison, use the population rule with inclusion event
and denote its target expected length by . Here denotes the left limit at t.
Use 1 - V as the auxiliary randomization in (5). Its inclusion event can then be written as
Its left side differs from by at most . Under and independent , the latter random variable is uniform on , including when has atoms. The two inclusion events therefore disagree with probability at most . Since , integration with respect to is at most times integration with respect to . Consequently,
For a fresh iid calibration sample, (81) implies
The resampled calibration bags. Let be the weighted score distribution function of the source labeled pool. By (81), its expected distance from is at most . Conditional on this pool, each bootstrap bag is iid from its empirical distribution, so
Use and as defined above. Jensen's inequality and (82) give
This bound holds for every ; increasing r is not required.
The input pool and selection. Conditional on the labeled pool and bootstrap bags, the centered-ratio identity used for (80) has denominator at least . Its numerator is the average of independent, mean-zero variables in an interval of length . Cauchy–Schwarz and the variance bound for a bounded variable therefore give
Together with (83) and (84), this proves
Bound the maximum in (76) by the sum and take expectations to obtain (63). For either selection bound, add and average over training data. This gives (61) and its stated alternative. Finally, conditional on training and selection, the chosen score is fixed and the final calibration and test observations are independent of those data. Proposition 4 gives coverage exactly .
J Proofs of oracle-length consistency at fixed calibration size
Proof of Corollary 13. For fixed , Proposition 11 gives the bound in (65). All three terms of vanish by (64), since is independent of . The score is finite and measurable conditional on training, so independent final calibration and test data give exact coverage by Proposition 4.
J.1 Consistency after selection at fixed calibration size
Proof of Corollary 14. For each included kernel candidate , Proposition 11 bounds its expected density error by
where . Proposition 8 and (61) therefore give, whenever ,
By (41), density error is evaluated before mixing. Additional scores can only improve the best-candidate comparator.
Fix . Since , this candidate is eventually included, and makes its limiting approximation term at most . Let . Condition (67) also implies . Since is fixed, eventually , and every term of (59) tends to zero. Equation (85) proves (68). Exact coverage follows from Theorem 12 and independence of the final calibration sample.
K Oracle length after selection with growing calibration size
Remark 17 (Selection with growing calibration size). Assume (33) and (56) with constants independent of sample size, and suppose the forest weights satisfy . Include at least one of the following families constructed from these weights, for :
Within each kernel candidate, is common to all . Additional training-fitted scores are allowed; let be the total library size. Fit all scores independently of selection, final calibration, and test data. Use (57) with sizes . If
then, for any fixed , including r = 30,
The oracle uses the current size . Independent final calibration gives exact target marginal coverage p at each sample size.
Proof. For a level- candidate, Proposition 11 gives , with independent of . For quantile histograms this uses . Fix , let , and then let ; the best-candidate gap tends to zero. Condition (87) also gives . The complementary bound in Theorem 12 proves (88) and the coverage statement.
L A linear density-error bound at fixed calibration size
L.1 Proof of Proposition 8
Write and assume . All densities below are jointly measurable, finite, nonnegative, and integrate to one for -almost every input. On exceptional input fibers, choose the uniform density . For a conditional density , let
The input laws and weight function remain fixed as varies, and . The loss in this display integrates out the conformal randomization and lies in . It does not involve a test response.
We first prove a sharper weighted bound. Define
(89)
Since ,
We will show
No positive lower or finite uniform upper bound on w is needed.
Changing one calibration response. Fix a score , all calibration inputs, and a query with . Replace only calibration response , whose input has weight . Put
Here and is unchanged by the replacement. According as the th score is below, equal to, or above the query score, (6) equals
These values satisfy . For they are all zero, and for they are all one. In the remaining range, the left inequality is immediate if ; otherwise it follows from , which is equivalent to . The right inequality follows by comparing denominators and clipping. As clipping is 1-Lipschitz, . Writing , we obtain
This calculation includes score ties and zero-weight calibration points.
Changing the calibration law. Let be another normalized conditional density. For each input , put and . A conditional coupling of the two response laws is
where the second term is zero when . The first term has mass and the second has mass ; their marginals are the required laws. The residual densities have disjoint supports, so . Joint measurability and the standard Borel assumption make a measurable probability kernel.
Draw shared inputs iid from and, conditionally independently, draw the response pairs from . Replace their responses one at a time and apply (92). For ,
the set contributes zero. The triangle inequality and Tonelli's theorem therefore give, for every fixed score ,
This bound is uniform over the fixed score. Intermediate samples in the replacement argument need not be iid, since (92) is deterministic.
Comparing the two oracle rules. Suppose first that almost everywhere. Under and its shifted target law, the validity class is still : its definition depends on and , not on the conditional density. Theorem 1 thus gives
Adding and subtracting these two risks and using (93) for each score yields
True-law oracle optimality gives nonnegativity, and the bounded loss gives the upper bound V.
If can vanish, replace it only for this argument by , where . This common affine transformation preserves every density comparison and tie, including comparisons across inputs. Consequently for every sample and every conformal randomization. Moreover, , so . Apply the positive-density result and let . This proves (91) without changing the delivered prediction rule.
By (90), the new term is at most . Combining it with Corollary 7 proves (28). Conditional on independent training, the same argument applies to each fitted density. Averaging each upper bound separately, and then taking the infimum over , proves (29). In particular, fixed and imply expected excess length . Exact conditional coverage follows from Proposition 4.
L.2 Sharpness of the linear density-error order
Take a single input value, , , Lebesgue measure, , and . For , set
Both densities are smooth, take values in , and have derivatives bounded in magnitude by one. Their error is
For and , a query score below the calibration score is included with probability one, a score above it with probability zero, and a tie with probability . The oracle density is increasing, so its set has length ; the fitted density is decreasing, so its set has length , almost surely in . Ties occur only at and have zero Lebesgue measure. Since
we obtain
Thus no uniform bound holds over these smooth density pairs, even with a common positive density lower bound. The true density varies with ; this is not a local lower bound at one fixed density. The example does not establish optimal dependence on , , or , an optimal constant, or a statistical minimax rate.
L.3 Why the previous bound remains useful
The two bounds control different regimes. With and , if , then
For and , this is smaller than . In contrast, for ,
Hence when . These comparisons concern the upper bounds, not attained risks. The older bound is uniform in , whereas the new linear term is particularly useful when is fixed and density error is small.
References
Anastasios N. Angelopoulos and Stephen Bates. Conformal prediction: A gentle introduction. Foundations and Trends in Machine Learning, 16(4):494–591, 2023. URL https://doi.org/10.1561/2200000101.
Victor Chernozhukov, Kaspar Wüthrich, and Yinchu Zhu. Distributional conformal prediction. Proceedings of the National Academy of Sciences, 118(48):e2107794118, 2021. URL https://pmc.ncbi.nlm.nih.gov/articles/PMC8640792/.
Kévin Elie-Dit-Cosaque and Véronique Maume-Deschamps. Random forest estimation of conditional distribution functions and conditional quantiles. Electronic Journal of Statistics, 16(2):6553–6583, 2022. URL https://doi.org/10.1214/22-EJS2094.
G. David Faulkenberry. A method of obtaining prediction intervals. Journal of the American Statistical Association, 68(342):433–435, 1973. URL https://doi.org/10.1080/01621459.1973.10482450.
Chao Gao, Liren Shan, Vaidehi Srinivas, and Aravindan Vijayaraghavan. Volume optimality in conformal prediction with structured prediction sets. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pages 18495–18527, 2025. URL https://proceedings.mlr.press/v267/gao25k.html.
Naixin Guo, Rui Luo, and Zhixin Zhou. Fast conformal prediction using conditional interquantile intervals. Proceedings of the AAAI Conference on Artificial Intelligence, 40(26):21468–21476, 2026. URL https://ojs.aaai.org/index.php/AAAI/article/view/39294.
Peter D. Hoff. Bayes-optimal prediction with frequentist coverage control. Bernoulli, 29(2):901–928, 2023. URL https://arxiv.org/abs/2105.14045.
Rustam Isaev, Anton Conrad, Denis Belomestny, Eric Moulines, and Sergey Samsonov. Conformalized quantile regression and minimax limits of fixed-score calibration under known covariate shift. arXiv preprint arXiv:2609.24929, 2026. URL https://arxiv.org/abs/2609.24929. Version 1, September 21, 2026.
Rafael Izbicki, Gilson Shimizu, and Rafael Stern. Flexible distribution-free conditional predictive bands using density estimators. In Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics, volume 108 of Proceedings of Machine Learning Research, pages 3068–3077, 2020. URL https://proceedings.mlr.press/v108/izbicki20a.html.
Rafael Izbicki, Gilson Shimizu, and Rafael B. Stern. CD-split and HPD-split: Efficient conformal regions in high dimensions. Journal of Machine Learning Research, 23(87):1–32, 2022. URL https://www.jmlr.org/papers/v23/20-797.html.
Shayan Kiyani, George Pappas, and Hamed Hassani. Length optimization in conformal prediction. In Advances in Neural Information Processing Systems, volume 37, 2024. URL https://arxiv.org/abs/2406.18814.
Nick W. Koning and Sam van Meer. Fuzzy prediction sets: Conformal prediction with e-values. arXiv preprint arXiv:2509.13130, 2025. URL https://arxiv.org/abs/2509.13130v3. First posted in 2025; version 3, March 31, 2026.
Batiste Le Bars and Pierre Humbert. On volume minimization in conformal regression. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pages 3030–3053, 2025. URL https://proceedings.mlr.press/v267/bars25a.html.
Cheng Li, Siming Zheng, and Yuanyuan Lin. Generative conformal prediction under covariate shift. Journal of Computational and Graphical Statistics, 2026. URL https://www.tandfonline.com/doi/full/10.1080/10618600.2026.2703276. Published online August 20, 2026.
Ruiting Liang, Wanrong Zhu, and Rina Foygel Barber. Conformal prediction after data-dependent model selection. Journal of the American Statistical Association, 2026. URL https://doi.org/10.1080/01621459.2026.2663588.
Rui Luo and Zhixin Zhou. Conformal thresholded intervals for efficient regression. Proceedings of the AAAI Conference on Artificial Intelligence, 39(18):19216–19223, 2025. URL https://ojs.aaai.org/index.php/AAAI/article/view/34115.
Pascal Massart. The tight constant in the Dvoretzky–Kiefer–Wolfowitz inequality. The Annals of Probability, 18(3):1269–1283, 1990. URL https://doi.org/10.1214/aop/1176990746.
Nicolai Meinshausen. Quantile regression forests. Journal of Machine Learning Research, 7:983–999, 2006. URL https://www.jmlr.org/papers/v7/meinshausen06a.html.
Yaniv Romano, Evan Patterson, and Emmanuel J. Candès. Conformalized quantile regression. In Advances in Neural Information Processing Systems, volume 32, 2019. URL https://arxiv.org/abs/1905.03222.
Matteo Sesia and Yaniv Romano. Conformal prediction using conditional histograms. In Advances in Neural Information Processing Systems, volume 34, 2021. URL https://arxiv.org/abs/2105.08747.
Glenn Shafer and Vladimir Vovk. A tutorial on conformal prediction. Journal of Machine Learning Research, 9:371–421, 2008. URL https://www.jmlr.org/papers/v9/shafer08a.html.
Ryan J. Tibshirani, Rina Foygel Barber, Emmanuel J. Candès, and Aaditya Ramdas. Conformal prediction under covariate shift. In Advances in Neural Information Processing Systems, volume 32, 2019. URL https://arxiv.org/abs/1904.06019.
Ryan J. Tibshirani, Rina Foygel Barber, and Aaditya Ramdas. Conformal prediction through the lens of hypothesis testing: Universality, impossibility, and optimality. arXiv preprint arXiv:2608.27310, 2026. URL https://arxiv.org/abs/2608.27310v2. Version 2.
Baozhen Wang and Xingye Qiao. Conformal inference of individual treatment effects using conditional density estimates. Proceedings of the AAAI Conference on Artificial Intelligence, 39(20):21009–21016, 2025. URL https://doi.org/10.1609/aaai.v39i20.35397.
Yachong Yang and Arun Kumar Kuchibhotla. Selection and aggregation of conformal prediction sets. Journal of the American Statistical Association, 120(549):435–447, 2025. URL https://arxiv.org/abs/2104.13871.
Minxing Zheng and Shixiang Zhu. Generative conformal prediction with optimized coverage allocation. arXiv preprint arXiv:2410.13735, 2026. URL https://arxiv.org/abs/2410.13735. Version 3, October 12, 2026; first posted in 2024 under a different title.