Graph Dimension, Pseudo-Cubes, and the Daniely–Shalev-Shwartz Dimension #
For binary classification (β = Bool), the Vapnik–Chervonenkis dimension characterizes both
uniform convergence and PAC learnability. For multiclass concept classes C : ConceptClass α β,
three distinct combinatorial dimensions govern different regimes:
- Natarajan dimension (
NatarajanShatters,natarajanDiminCslibFrontier/MachineLearning/PACLearning/NatarajanDimension.lean; [Nat89]): pairs of witness labelingsf₀, f₁ : α → βrealizing all2 ^ |W|binary choices onW. - Daniely–Shalev-Shwartz (DS) dimension (
IsPseudoCube,DSShatters,dsDim; [DSS14]; [BCD+22]): the largest size of a finite setWon which the restriction ofCcontains a pseudo-cube — a nonempty finite setPof labelings ofWin which everyf ∈ Pand coordinatei ∈ Wadmits ani-neighborg ∈ Pdiffering fromfexclusively ati. Finite DS dimension characterizes multiclass PAC learnability over arbitrary label spaces [BCD+22]. - Graph dimension (
GraphShatters,graphDim; [Nat89]; [BDCBHL95]): a single reference labelingf : α → βagainst which every subsetB ⊆ Wis realized by somec ∈ Cagreeing withfonBand disagreeing withfonW \ B, equivalently the VC dimension of the binary concept-graph classconceptGraph Conα × β(graphDim_eq_evcDim_conceptGraph).
This module develops GraphShatters/graphDim and IsPseudoCube/DSShatters/dsDim, connects
them to Sauer's lemma (GrowthFunction.lean) and Natarajan's lemma (NatarajanDimension.lean),
proves the universal hierarchy natarajanDim C ≤ dsDim C ≤ graphDim C together with their
quantitative O(d log |β|) equivalence over finite label spaces (graphDim_le_mul_natarajanDim),
and establishes strict separations at both inequalities (hexagonClass for |β| = 3 and
revealingSetClass for infinite label spaces).
Main definitions #
GraphShatters C W,graphDim C,HasFiniteGraphDim C: graph shattering and graph dimension.conceptGraph C: the binary graph class{(x, y) ↦ decide (c x = y) | c ∈ C}onα × β.IsPseudoCube P: a nonemptyFinset (ι → β)closed under coordinatei-neighbors.DSShatters C W,dsDim C,HasFiniteDSDim C: DS-shattering and the Daniely–Shalev-Shwartz dimension.hexagonClass: the 6-cycle{f : Fin 2 → Fin 3 | f 0 ≠ f 1}separatingnatarajanDimfromdsDimat three labels.revealingSetClass α: the class{x ↦ if x ∈ B then none else some B | B : Finset α}separatingdsDim(= 1) fromgraphDim(= ⊤) on infinite domains.
Main results #
graphDim_eq_evcDim_conceptGraph:graphDim C = evcDim (conceptGraph C).ncard_restriction_le_sum_choose_graphDim: Sauer–Shelah growth bound((· ∘ x) '' C).ncard ≤ ∑_{i ≤ d} C(n |β|, i)for classes of graph dimension at mostd.IsPseudoCube.image_precomp: injective coordinate projections of pseudo-cubes are pseudo-cubes.IsPseudoCube.two_pow_card_le_card: every pseudo-cube onιhas at least2 ^ |ι|elements.isPseudoCube_iff_eq_univ_of_card_eq_two,dsDim_eq_evcDim: on two-element label spaces (andBool), pseudo-cubes are full Boolean hypercubes anddsDim C = evcDim C.DSShatters.finite: only finite sets can be DS-shattered.NatarajanShatters.dsShatters,DSShatters.graphShatters,natarajanDim_le_dsDim,dsDim_le_graphDim: the multiclass shattering and dimension hierarchynatarajanDim C ≤ dsDim C ≤ graphDim C.GraphShatters.two_pow_card_le_natarajanSum,card_le_of_graphShatters,graphDim_le_mul_natarajanDim,hasFiniteDSDim_iff_hasFiniteNatarajanDim,hasFiniteGraphDim_iff_hasFiniteNatarajanDim: over finite label spaces,graphDim C ≤ 4 * natarajanDim C * (⌊log₂ |β|⌋ + 2), so finiteness of all three dimensions is equivalent.natarajanDim_hexagonClass,dsDim_hexagonClass,graphDim_hexagonClass:1 < 2 = 2onFin 2 → Fin 3.natarajanDim_revealingSetClass,dsDim_revealingSetClass,graphDim_revealingSetClass_of_infinite:1 = 1 < ⊤on infinite domains.
References #
- S. Ben-David, N. Cesa-Bianchi, D. Haussler, P. M. Long, Characterizations of Learnability for
Classes of
{0, …, n}-Valued Functions - N. Brukhim, D. Carmon, I. Dinur, S. Moran, A. Yehudayoff, A Characterization of Multiclass Learnability
- A. Daniely, S. Shalev-Shwartz, Optimal Learners for Multiclass Problems
- B. K. Natarajan, On Learning Sets and Functions
- S. Shalev-Shwartz, S. Ben-David, Understanding Machine Learning: From Theory to Algorithms
Graph shattering and the graph dimension #
A concept class C G-shatters (graph-shatters) a set W if there is a reference labeling
f : α → β such that for every B ⊆ W some concept c ∈ C agrees with f on B and disagrees
with f at every point of W \ B [Natarajan1989; BenDavidCesaBianchiHausslerLong1995].
The graph dimension of C is the supremum in ℕ∞ of the sizes of finite G-shattered sets.
The graph dimension is finite.
Binary concept-graph class {(x, y) ↦ decide (c x = y) | c ∈ C} on α × β.
The graph dimension of C equals the extended VC dimension of conceptGraph C.
With Bool labels, graph shattering coincides with ordinary VC shattering.
With Bool labels, the graph and extended VC dimensions agree.
Sauer–Shelah growth bound for graph dimension [Natarajan1989;
BenDavidCesaBianchiHausslerLong1995]: if graphDim C ≤ d and β is finite, C realizes at most
∑_{i ≤ d} C(n |β|, i) labelings on any n points x : Fin n → α.
Pseudo-cubes and the Daniely–Shalev-Shwartz (DS) dimension #
A finite set P of labelings ι → β is a pseudo-cube on ι if it is nonempty and every
f ∈ P and coordinate i : ι admits an i-neighbor g ∈ P differing from f exclusively at
coordinate i [DanielyShalevShwartz2014; BrukhimCarmonDinurMoranYehudayoff2022].
Precomposing along an injection projects a pseudo-cube onto a smaller coordinate set.
Every pseudo-cube on a finite coordinate set ι has at least 2 ^ |ι| elements.
Over a two-element label space, a finite family on ι is a pseudo-cube iff it is the entire
hypercube Finset.univ.
A concept class C DS-shatters a set W if the restriction of C to W contains a
pseudo-cube on W [DanielyShalevShwartz2014; BrukhimCarmonDinurMoranYehudayoff2022].
The Daniely–Shalev-Shwartz (DS) dimension of C is the supremum in ℕ∞ of the sizes of
finite DS-shattered sets [DanielyShalevShwartz2014; BrukhimCarmonDinurMoranYehudayoff2022].
The DS dimension is finite.
Only finite sets can be DS-shattered: each coordinate of W requires a distinct i-neighbor in
the finite pseudo-cube P.
DS-shattering transfers along restrictions e : γ → α: if (· ∘ e) '' C DS-shatters W,
then e is injective on W and C DS-shatters e '' W.
For a finite set W and Bool labels, DS-shattering coincides with ordinary VC shattering.
With Bool labels, the DS and extended VC dimensions agree.
Every finite N-shattered set is DS-shattered via its embedded 2 ^ |W| Boolean hypercube.
Every finite DS-shattered set is G-shattered: starting from any anchor f₀ ∈ P, walking along
coordinate neighbors one element of W \ B at a time produces a labeling in P agreeing with f₀
on B and disagreeing with f₀ on W \ B.
Every N-shattered set is G-shattered.
The Natarajan dimension never exceeds the Daniely–Shalev-Shwartz dimension.
The Daniely–Shalev-Shwartz dimension never exceeds the graph dimension.
The Natarajan dimension never exceeds the graph dimension.
Quantitative equivalence over finite label spaces (O(d log |β|)) #
If C G-shatters W and N-shatters no finite set of size exceeding d, then
2 ^ |W| ≤ natarajanSum |W| |β| d.
Ben-David–Cesa-Bianchi–Haussler–Long O(d log |β|) graph-dimension bound
[BDCBHL95]: over a finite label space β, if every finite N-shattered
set of C has size at most d, then every finite G-shattered set of C has size at most
4 * d * (⌊log₂ |β|⌋ + 2).
Over a finite label space, graphDim C ≤ 4 * natarajanDim C * (⌊log₂ |β|⌋ + 2).
Over a finite label space, dsDim C ≤ 4 * natarajanDim C * (⌊log₂ |β|⌋ + 2).
Over a finite label space, graphDim C is finite iff natarajanDim C is finite.
Over a finite label space, dsDim C is finite iff natarajanDim C is finite.
hexagonClass has Natarajan dimension 1: no 2 × 2 Cartesian product fits inside the
off-diagonal of Fin 3 × Fin 3.
hexagonClass DS-shatters {0, 1} as a 2-dimensional 6-cycle pseudo-cube, so
dsDim hexagonClass = 2.
hexagonClass also has graph dimension 2.
Revealing-subset concept associated with B : Finset α: outputs none on B and reveals the
entire active set some B outside B [BenDavidCesaBianchiHausslerLong1995;
DanielyShalevShwartz2014].
The revealing-subset class {revealingConcept B | B : Finset α}: every finite subset is
G-shattered against constant none, yet any non-none label uniquely identifies B, preventing
any 2-dimensional pseudo-cube.
revealingSetClass α G-shatters every finite subset W : Finset α.
On any infinite domain, revealingSetClass α has infinite graph dimension (⊤).
No set of two or more points is DS-shattered by revealingSetClass α.
On any nonempty domain, revealingSetClass α has DS dimension 1.
On any nonempty domain, revealingSetClass α has Natarajan dimension 1.