Theorem 2 (as proved): asymmetric conformalization controls each tail
ProvedConformalizedQuantileRegression.cqr_asymmetric_coverageLet , , be exchangeable. Partition into disjoint sets with and and fit with a measurable quantile regression algorithm on . Let . Let be the -th empirical quantile of and the -th empirical quantile of , and let . Then
- ;
- ;
- consequently, with ,
Controlling the two tails separately gives a stronger guarantee than Theorem 1, at the price of slightly longer intervals.
Formalization Note This is Theorem 2 as its proof establishes it. The paper prints the uninflated levels and , for which the claim is false (with , , i.i.d. standard normal responses and , the three probabilities are instead of at least ); its proof applies Lemma 2, which requires the inflated levels used here. In the paper in Theorem 2 are the two tail miscoverage rates (not the quantile levels , of Section 2), and the range is the range of Lemma 2. The split is fixed and the empirical quantiles are valued in the extended reals.
import Mathlib import Definitions.Def_ConformalizedQuantileRegression_Basic open MeasureTheory ProbabilityTheory
namespace ConformalizedQuantileRegression
theorem cqr_asymmetric_coverage {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
[IsProbabilityMeasure P] {p n : ℕ} (Z : Fin (n + 1) → Ω → Sample p) (hZ : IsExchangeable P Z)
(I₁ I₂ : Finset (Fin n)) (hdisj : Disjoint I₁ I₂) (hsplit : I₁ ∪ I₂ = Finset.univ)
(hI₂ : I₂.Nonempty) (A : QRAlgorithm p I₁) (hA : IsMeasurableAlgorithm A)
(αlo αhi : ℝ) (hlo0 : 0 < αlo) (hlo1 : αlo < 1) (hhi0 : 0 < αhi) (hhi1 : αhi < 1) :
ENNReal.ofReal (1 - αlo) ≤
P {ω | ((fitQR A (fun i => Z i.castSucc ω)).1 (Z (Fin.last n) ω).1 : EReal) -
loCorrection A I₂ ((1 - αlo) * (1 + 1 / (I₂.card : ℝ))) (fun i => Z i.castSucc ω) ≤
((Z (Fin.last n) ω).2 : EReal)} ∧
ENNReal.ofReal (1 - αhi) ≤
P {ω | ((Z (Fin.last n) ω).2 : EReal) ≤
((fitQR A (fun i => Z i.castSucc ω)).2 (Z (Fin.last n) ω).1 : EReal) +
hiCorrection A I₂ ((1 - αhi) * (1 + 1 / (I₂.card : ℝ))) (fun i => Z i.castSucc ω)} ∧
ENNReal.ofReal (1 - (αlo + αhi)) ≤
P {ω | (Z (Fin.last n) ω).2 ∈
asymInterval A I₂ ((1 - αlo) * (1 + 1 / (I₂.card : ℝ)))
((1 - αhi) * (1 + 1 / (I₂.card : ℝ))) (fun i => Z i.castSucc ω) (Z (Fin.last n) ω).1} := by sorry
end ConformalizedQuantileRegressionRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let be a probability space, and let . Let
be random samples. Write , with feature vector and response . The first samples are the data, and is the test point. The family is assumed exchangeable, which means two things:
- each is measurable;
- for every permutation of , the joint law of under equals the joint law of .
Data split. Let satisfy:
- ;
- ;
- , so .
may be empty. Put .
Algorithm. Let be any map that takes an -indexed family of samples to a pair of functions , each from to . The only assumption on is that both maps
are jointly measurable. Nothing requires , and nothing requires these functions to be quantile estimates of any kind.
Levels. Let be reals with and . No relation between them is assumed; in particular may be . Define the inflated levels
Both are positive, and either one can exceed .
Fitted functions and scores. For each outcome , let . These functions depend only on the samples indexed by . For , define the one-sided calibration scores
Empirical quantile. For values , the empirical CDF is
The empirical quantile at level is an extended real:
The infimum of the empty set is . Since here, this gives:
- if , then ;
- if , then is the -th smallest of the , counted with multiplicity.
Let computed from , and computed from .
Conclusion. The theorem asserts all three of the following inequalities:
where the interval is
The event in (iii) is exactly the intersection of the events in (i) and (ii).
Notes on the conclusion.
- Lower bound in (iii). The left side is the positive part of . When , it is and (iii) holds trivially.
- Extended-real arithmetic. All comparisons are made in the extended reals.
- If , the lower endpoint is and the event in (i) holds for every outcome.
- If , the upper endpoint is and the event in (ii) holds for every outcome.
- In particular, (i) is automatic whenever , and (ii) is automatic whenever .
- Unconditional probabilities. The probabilities are marginal, taken jointly over the data and the test point. They are values of on these sets; the statement does not separately assert that the sets are measurable.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.