Theorem 1: full and split conformal prediction under exchangeability
ProvedConformalBeyondExchangeability.full_conformal_coverage_exchangeableLet be exchangeable, i.e. their joint law is invariant under every permutation of the indices. Let .
- Full conformal. Let be an algorithm that treats the data points symmetrically (eq. (6)), and suppose the residual vector , , is measurable. Then the full conformal set of eq. (8),
satisfies . 2. Split conformal. For every measurable pre-fitted , the split conformal interval of eq. (5), with , covers with probability at least .
This is the classical guarantee of Vovk et al. that Theorem 2 generalizes.
Formalization Note The sets of eqs. (5) and (8) are the weighted sets of eqs. (11) and (12) with , since then . The algorithm is deterministic; the paper's footnote 2 also allows randomized symmetric algorithms, which are not covered. Measurability of the residual map is the standing convention that makes the probabilities defined.
import Mathlib import Definitions.Def_ConformalBeyondExchangeability_Basic open MeasureTheory
namespace ConformalBeyondExchangeability
theorem full_conformal_coverage_exchangeable {X : Type*} [MeasurableSpace X] {n : ℕ}
(P : Measure (Fin (n + 1) → X × ℝ)) [IsProbabilityMeasure P] (hP : IsExchangeable P)
{α : ℝ} (hα0 : 0 < α) (hα1 : α < 1) :
(∀ alg : Alg X, IsSymmetric alg → Measurable (symResiduals (n := n) alg) →
1 - α ≤ P.real {z | (z (Fin.last n)).2 ∈ symFullSet alg (fun _ => 1) α z}) ∧
(∀ μ : X → ℝ, Measurable μ → 1 - α ≤ splitCoverage P μ (fun _ => 1) α) := by sorry
end ConformalBeyondExchangeabilityRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
The statement is a conjunction of two coverage guarantees. They concern a random sequence of data points under an exchangeable law.
Setting and hypotheses.
- is an arbitrary measurable space.
- is a natural number. The case , a single data point, is allowed.
- is a probability measure on , using the product -algebra with the Borel -algebra on .
- A generic point of this space is with . The last coordinate plays the role of the test point.
- is assumed exchangeable: for every permutation of , the image of under equals .
- is a real number with .
Throughout, probabilities are the real-valued measure of the indicated set of . Measurability of these sets is not assumed separately. If such a set were not measurable, its outer measure would be used.
Weights and quantile. Both parts use the weights obtained from :
For masses at points , the quantile is the smallest -quantile, an infimum over the extended reals with :
Here it is always applied with .
Part 1 (full conformal, symmetric algorithm). Let be any map that sends every finite list of points of , of any length, to a function . Assume two things about :
- Symmetric: whenever two lists are permutations of each other, returns the same function.
- Measurable residuals: the map is measurable, where
Then:
The set consists of those such that
Here , and is with replaced by :
So is refit on the list containing for each candidate . When , , so the event is .
Part 2 (split conformal, fixed model). Let be any measurable function. It is fixed and does not depend on the data. Then:
The set consists of those with
Edge cases.
- , Part 1: the quantile equals , so the event always holds.
- , Part 2: all mass sits at , so the quantile is and the set is all of .
In both parts the probability is then .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.