The Natarajan dimension and Natarajan's lemma #
The Natarajan dimension extends the VC dimension from binary to multiclass concept classes
C : ConceptClass α β [ShalevShwartzBenDavid2014, Section 29.1; Natarajan1989]. A set W is
N-shattered by C if there are two labelings f₀ f₁ : α → β that differ at every point of W
such that for every B ⊆ W some concept of C agrees with f₀ on B and with f₁ on W \ B
(Definition 29.1). The Natarajan dimension is the supremum in ℕ∞ of the sizes of finite
N-shattered sets (Definition 29.2). With Bool labels N-shattering is ordinary shattering, so the
Natarajan dimension is the VC dimension (natarajanDim_eq_evcDim).
Natarajan's lemma replaces Sauer's lemma in the multiclass fundamental theorem
[ShalevShwartzBenDavid2014, Lemma 29.4]. With k labels, a set of labelings of n points whose
N-shattered sets have at most d points has at most
∑_{i ≤ d} (n choose i) (k choose 2) ^ i
elements (ncard_le_natarajanSum). The proof is the induction suggested in
[ShalevShwartzBenDavid2014, Exercise 29.3], splitting off one point: a labeling of the remaining
points that extends with s labels at the new point is counted once among the tails and once for
each of the s choose 2 ≥ s - 1 pairs of those labels, and the tails extending with both labels
of a fixed pair N-shatter only sets of at most d - 1 points. The hint sums over ordered pairs of
labels; unordered pairs give the factor k choose 2. With at least one label the sum is at most
(n + 1) ^ d k ^ (2 d) (natarajanSum_le). For a class on a finite domain α this gives
|C| ≤ |α| ^ Ndim(C) k ^ (2 Ndim(C)), the form of Lemma 29.4 (ncard_le_card_pow_natarajanDim).
The source states Lemma 29.4 for classes of functions from X to [k]; here the labels are any
finite type.
Main definitions #
NatarajanShatters C W: the concept classCN-shatters the setW.natarajanDim C: the Natarajan dimension ofC.HasFiniteNatarajanDim C: the N-shattered finite sets ofChave bounded size.natarajanSum n k d: the bound∑_{i ≤ d} (n choose i) (k choose 2) ^ iof Natarajan's lemma.
Main results #
NatarajanShatters.subset,NatarajanShatters.superset: (anti)monotonicity.NatarajanShatters.of_restrict: N-shattering transfers from the restriction of a class to sample points back to the points themselves.NatarajanShatters.image_comp,natarajanShatters_image_equiv_comp,natarajanDim_image_equiv_comp: invariance under injective and bijective label maps.natarajanShatters_iff_setShatters,natarajanDim_eq_evcDim,natarajanDim_eq_evcDim_of_equiv,hasFiniteNatarajanDim_iff_hasFiniteVCDim: with two labels the Natarajan dimension is the VC dimension.natarajanSum_two: atk = 2labels,natarajanSumreduces to the binary Sauer–Shelah sum∑_{i ≤ d} (n choose i).ncard_le_natarajanSum,ncard_restriction_le_natarajanSum: Natarajan's lemma for sets of labelings and for the labelings a class realizes on sample points.natarajanSum_le_sum_choose_mul,natarajanSum_le,ncard_le_card_pow_natarajanDim: the polynomial form of Lemma 29.4.
References #
A concept class C N-shatters a set W if there are labelings f₀ f₁ : α → β that differ
at every point of W such that for every B ⊆ W some concept c ∈ C agrees with f₀ on B and
with f₁ on W \ B [ShalevShwartzBenDavid2014, Definition 29.1].
The Natarajan dimension is the supremum of the sizes of finite N-shattered sets.
Unbounded sizes give ⊤ [ShalevShwartzBenDavid2014, Definition 29.2].
The Natarajan dimension is finite.
N-shattering is anti-monotone in the shattered set.
N-shattering is monotone in the concept class.
A class N-shatters some set only if it is nonempty.
Every nonempty class N-shatters the empty set.
N-shattering transfers from the labelings a class realizes on the points e : γ → α back to
the points: if (· ∘ e) '' C N-shatters W, then e is injective on W and C N-shatters
e '' W.
Post-composing concepts with an injective map on labels preserves N-shattering.
N-shattering is invariant under relabeling by an equivalence e : β ≃ γ.
The Natarajan dimension is invariant under relabeling by an equivalence e : β ≃ γ.
With Bool labels, N-shattering is ordinary shattering.
With Boolean labels the Natarajan and VC dimensions agree, including at infinity.
For any two-element label type e : β ≃ Bool (for instance finTwoEquiv : Fin 2 ≃ Bool),
the Natarajan dimension agrees with the VC dimension of the relabeled binary class.
With Boolean labels, finite Natarajan dimension coincides with finite VC dimension.
Every finite N-shattered set has size at most the Natarajan dimension.
Every finite set N-shattered by a class of finite Natarajan dimension has size at most the untopped Natarajan dimension.
Evaluating the untopped Natarajan dimension from an equation natarajanDim C = d.
Bounding the Natarajan dimension amounts to bounding every finite N-shattered set.
A class has finite Natarajan dimension iff its finite N-shattered sets have bounded size.
Every class on a finite domain has finite Natarajan dimension.
A positive finite Natarajan dimension is attained by an N-shattered set of that size.
Natarajan's lemma #
The bound ∑_{i ≤ d} (n choose i) (k choose 2) ^ i of Natarajan's lemma on the number of
labelings of n points with k labels whose N-shattered sets have at most d points. The body
is exposed so that clients can evaluate the bound.
With at most one label no pair of distinct labels exists, so natarajanSum n k d = 1.
At k = 2 labels, (2 choose 2) = 1, so natarajanSum reduces to the binary Sauer–Shelah
sum ∑_{i ≤ d} (n choose i).
Pascal's rule for natarajanSum.
Natarajan's lemma [ShalevShwartzBenDavid2014, Lemma 29.4 and Exercise 29.3]: a set of
labelings of n points with k labels whose N-shattered finite sets have at most d points has
at most ∑_{i ≤ d} (n choose i) (k choose 2) ^ i elements.
Natarajan's lemma for the labelings i ↦ c (x i) that a class realizes on sample points
x : Fin n → α: if C N-shatters no finite set of more than d points, there are at most
∑_{i ≤ d} (n choose i) (k choose 2) ^ i of them. Repeated sample points are allowed.
Factored upper bound on natarajanSum: with at least one label,
∑_{i ≤ d} (n choose i) (k choose 2) ^ i ≤ (∑_{i ≤ d} (n choose i)) k ^ (2 d).
Natarajan's lemma in the form of [ShalevShwartzBenDavid2014, Lemma 29.4]: a class on a
finite domain α with k labels has at most |α| ^ Ndim(C) k ^ (2 Ndim(C)) members.