Lemma 4: a finite discrete separate domain with positive OOD risk prevents learnability
ProvedOODLearnable.finite_domain_positive_ood_risk_not_learnableLet , let be a loss with iff , and let be separate for OOD (Assumption 1: every has some with ). If there is a finite discrete domain in the separate space with
then OOD detection is not learnable in for .
Formalization Note "Finite discrete domain" is read as: and are both concentrated on finite sets, which is what the proof uses (it decomposes into finitely many point masses). The feature space is with the Borel structure; every hypothesis in is assumed measurable (the paper's implicit convention, needed for the risks to be defined).
import Mathlib import Definitions.Def_OODLearnable_Basic open MeasureTheory Filter Topology open scoped ENNReal NNReal
namespace OODLearnable
theorem finite_domain_positive_ood_risk_not_learnable {dim : ℕ}
{𝒳 : Set (EuclideanSpace ℝ (Fin dim))} {K : ℕ}
(ℓ : Fin (K + 1) → Fin (K + 1) → ℝ≥0) (hℓ : IsOODLoss ℓ)
(H : Set (𝒳 → Fin (K + 1))) (hHmeas : ∀ h ∈ H, Measurable h) (hA1 : SeparateForOOD H)
(D : Domain 𝒳 K) (hD : D ∈ (separateSpace : Set (Domain 𝒳 K))) (hfin : IsFiniteDiscrete D)
(hout : 0 < ⨅ h ∈ H, riskOut ℓ D h) :
¬ IsLearnable ℓ (separateSpace : Set (Domain 𝒳 K)) H := by sorry
end OODLearnableRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let and let be an arbitrary subset. It carries the subspace topology and the subspace Borel -algebra of Euclidean space. Let . The label set is :
- the labels are the in-distribution (ID) labels;
- is the out-of-distribution (OOD) label;
- every subset of is measurable.
Hypotheses. The statement assumes the following data.
-
Loss. A function such that if and only if .
-
Hypothesis class. A set of functions with two properties:
- every is measurable;
- for every there is some with . Different points may use different functions.
-
Domain. A domain , which consists of:
- a probability measure on , the ID joint distribution;
- a probability measure on , the OOD distribution;
- a number .
The ID marginal is the push-forward of to .
-
Separation. lies in the separate space , meaning
Supports are taken in the topology of . The support of a measure is the set of points all of whose neighbourhoods have positive measure.
-
Finite discreteness.
- There is a finite set with .
- There is a finite set with .
-
Positive OOD risk.
Conclusion. OOD detection is not learnable in for . Here is the set of all domains over whose ID-marginal and OOD supports are disjoint, with any prior . The conclusion concerns this whole space; the particular only serves as a witness in the hypotheses.
Explicitly, there do not exist an algorithm and a real sequence satisfying all of the following:
- is any function, with no measurability requirement. It assigns to each and each sample a function .
- for all and all .
- is non-increasing and .
- For every and every :
- the map is almost-everywhere measurable with respect to the -fold product ;
- the following bound holds:
The risks in this bound are defined as follows, with values in :
The integrals are Lebesgue integrals of non-negative functions. Sample size is unconstrained.
Edge cases and vacuity.
- . No probability measure exists on , so no domain exists and the hypotheses cannot be satisfied.
- . No probability measure exists on , so the hypotheses again cannot be satisfied.
- a single point (for example when ). Both probability measures in a finitely supported domain have that point in their support. The separation hypothesis therefore fails, and the statement is vacuous.
- Combined hypotheses. Since is concentrated on the finite set , , which takes only finitely many values. So the positive-OOD-risk hypothesis says every assigns a label other than to some point of positive -mass. This must hold together with the pointwise condition that each individual point is sent to by some member of .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.