Theorem 5: impossibility theorem for the separate space
ProvedOODLearnable.impossibility_separate_spaceLet , let be a loss with iff , and let be a hypothesis space that is separate for OOD (Assumption 1). Let map the ID labels to and the OOD label to . If
then OOD detection is not learnable in the separate space for .
So, unlike supervised learning, a finite VC dimension does not guarantee learnability of OOD detection even when ID and OOD supports are disjoint.
Formalization Note Cardinalities and the supremum are taken in . Supports in the definition of are topological supports in . 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 impossibility_separate_space {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)
(hVC : vcDim (phiComp H) < ⊤)
(hsup : (⨆ h ∈ H, {x | h x ≠ Fin.last K}.encard) = ⊤) :
¬ IsLearnable ℓ (separateSpace : Set (Domain 𝒳 K)) H := by sorry
end OODLearnableRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Fix natural numbers (the ambient dimension) and (the number of in-distribution classes), and an arbitrary subset . carries the subspace topology and the Borel -algebra it induces. No condition is placed on : it may be empty, finite, non-measurable, and so on.
The label set is :
- labels are the in-distribution (ID) labels;
- is the out-of-distribution (OOD) label.
The data. The theorem takes the following objects and hypotheses.
- The loss. A loss such that for all labels . The first argument is the predicted label and the second is the true label.
- The hypothesis class. A set of functions such that:
- Measurability. Every is measurable, with the Borel -algebra on and the discrete -algebra on labels.
- Separate for OOD. For every there is some with . If , this forces .
- Finite VC dimension of the binarized class. Let if and otherwise, and let . A finite set is shattered if for every there is with for all . (The empty set is shattered exactly when .) The VC dimension is the supremum of over shattered finite ; it is if none exists. The hypothesis requires it to be a finite natural number.
- Unbounded ID regions. The following holds, where is cardinality in :
That is, either some $h\in H$ assigns ID labels to infinitely many points, or these finite counts are unbounded. This hypothesis cannot hold if $\mathcal X$ is finite (including empty). It also cannot hold if $K=0$, since then every $h$ takes only the value $K+1$ and the supremum is $0$. So whenever all hypotheses hold, $K\ge 1$ and $\mathcal X$ is infinite.
Domains. A domain consists of three pieces:
- a probability measure on ;
- a probability measure on ;
- a number .
Write for the first marginal of .
The separate space is the set of all domains with
Here supports are taken in the subspace topology of : a point is in the support if every open neighbourhood of it has positive measure. There is no restriction on ; in particular is allowed.
Risks. For a function , with values in , define
Algorithms and learnability. An algorithm assigns to each and each sample a function . The samples contain ID data only, and no measurability of is required. The training law is the -fold product of .
Conclusion. OOD detection is not learnable in for . That is, there do not exist an algorithm and a real sequence satisfying all of the following:
- for every and every sample ;
- is non-increasing and ;
- for every domain and every , the map is almost-everywhere measurable with respect to , and
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.