Lemma 1 (Condition 1 part): learnability in a priori-unknown space implies the linear condition
ProvedOODLearnable.learnable_implies_linear_conditionLet be a priori-unknown space of domains over , let be a loss with iff , and let be a hypothesis space. If OOD detection is learnable in for , then the linear condition (Condition 1) holds: for every and every ,
This is the necessary condition from which the paper's impossibility theorems are derived.
Formalization Note Lemma 1 of the paper asserts that Conditions 1 and 4 hold; only the Condition 1 part is stated here (Condition 4, the multi-linear condition, is not formalized). 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 learnable_implies_linear_condition {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) (𝒟 : Set (Domain 𝒳 K))
(h𝒟 : IsPriorUnknown 𝒟) (hL : IsLearnable ℓ 𝒟 H) :
LinearCondition ℓ 𝒟 H := by sorry
end OODLearnableRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Fix a dimension and an arbitrary subset , which serves as the feature space. Its measurable sets are the traces on of Borel sets of . Fix ; is allowed.
- Labels. The full label set is . The labels are the in-distribution (ID) labels, and is the out-of-distribution (OOD) label.
- Loss. The loss is a function (finite, nonnegative values) satisfying .
- Hypotheses. is an arbitrary set of functions . Each is assumed measurable, meaning every level set is a measurable subset of . may be empty.
Domains. A domain is a triple where:
- is a probability measure on ;
- is a probability measure on ;
- .
If or , no domain exists.
For and , define the following risks, valued in :
- The integrals are Lebesgue integrals of nonnegative functions, so they are always defined but may be .
- Arithmetic is in , with the convention .
Hypothesis on the domain space. is a set of domains that is prior-unknown. That is, for every and every , the domain also belongs to . This is the same domain with its prior replaced by .
Learnability hypothesis. It is assumed that OOD detection is learnable in for : there exist an algorithm and a real sequence with the properties below. The algorithm assigns to every and every sample a function ; no measurability in is imposed on itself.
- for every and every sample .
- is non-increasing.
- . Together with (2), this forces .
- For every and every , both of the following hold, where is the -fold product of (the law of an i.i.d. sample of size ):
- the map is almost-everywhere measurable with respect to ;
- the expected risk satisfies
The infimum is taken in and equals if .
Conclusion. Under all these assumptions, and satisfy the linear condition: for every and every ,
- This is an equality in , and each of the three infima is taken separately over .
- The value is not covered.
- The prior of plays no role in the conclusion.
- If no domains exist (e.g. or ), then is empty and the conclusion holds vacuously.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.