Understanding Machine Learning XXIII: Multiclass LearnabilityTextbook
Motivation
Chapter 17 introduced multiclass prediction; Chapter 29 of Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms (doi:10.1017/CBO9781107298019), asks the two questions the fundamental theorem answered for binary classes: which classes of multiclass predictors are PAC learnable with respect to the 0–1 loss, and with what sample complexity. Natarajan's dimension generalizes the VC dimension by shattering with two disagreeing label functions, and the multiclass fundamental theorem (Theorem 29.3) bounds the uniform-convergence, agnostic and realizable sample complexities in terms of it, up to logarithmic factors in the number of labels ; the only new ingredient in its proof is Natarajan's lemma, the multiclass substitute for Sauer's lemma. The chapter then computes or bounds the Natarajan dimension of the classes that matter, One-versus-All and general reductions to binary classifiers, and linear multiclass predictors (Theorem 29.7). Its last section is a warning: unlike the binary case, not all ERMs are equal, and with infinitely many labels a class can be learnable by one ERM and not by another, so learnability and uniform convergence come apart (Claim 29.9).
Setting
is a class of functions from to a finite label set with . is shattered by if there are with everywhere on such that every is realized by some agreeing with on and with on (Definition 29.1); is the largest size of a shattered set (Definition 29.2). One-versus-All builds from binary classifiers, the smaller label on ties; a general reduction applies a rule to binary classifiers; the linear class predicts for a class-sensitive feature map (29.1). The class of §29.4 has labels , the finite and cofinite subsets of plus a special label, and hypotheses if and otherwise; returns on an all- sample and returns .
Formalization targets
Goal: Theorem 29.3
There are absolute constants such that every class with satisfies
the upper bounds by every ERM learner and the lower bounds for small and , in the format of Mission IV's Theorem 6.8.
Milestones
Lemma 29.4 (Natarajan: ); Lemma 29.5 (the Natarajan dimension of One-versus-All is ); Theorem 29.7 (); Claim 29.9(1) ( needs examples); Claim 29.9(2) ( fails with constant probability on examples). Further items: the equality for two classes, and Lemma 29.6 for general reductions.
Significance
Theorem 29.3 is the multiclass fundamental theorem of Natarajan (1989) and Ben-David, Cesa-Bianchi, Haussler and Long (1995): finite Natarajan dimension characterizes multiclass learnability, and the sample complexity is linear in it, with the dependence on confined to logarithms. Natarajan's lemma is the combinatorial core, and the dimension bounds of §29.3 are what make the theorem usable: a One-versus-All scheme over a class of VC dimension costs , and a linear multiclass predictor costs at most its number of parameters, so the multivector construction of Chapter 17 is learnable with examples. Claim 29.9 is a genuine phenomenon of Daniely, Sabato, Ben-David and Shalev-Shwartz (2011): in multiclass classification the choice of ERM matters, and the equivalence "learnable iff uniform convergence" of the binary theory is false, which is why Conjecture 29.10 about good ERMs is open in the form the chapter states it.
Difficulty
The equality with the VC dimension for two labels is a direct comparison of the two shattering definitions. Natarajan's lemma is a Sauer-type induction on , in which a shattered set must be produced from two hypotheses that differ at a point; the exercise-level proof of the book becomes a careful double induction formally. Theorem 29.3's upper bounds follow the binary proof of Chapter 28 with Natarajan's lemma in place of Sauer's, hence Massart's lemma and Theorem 26.5 for the agnostic case and the double-sample argument for the realizable case; the lower bounds reduce to the binary ones by embedding a binary class into a multiclass one on a shattered set. These are long formal developments, and the theorem is stated with unspecified constants for that reason. Lemmas 29.5 and 29.6 are counting: a shattered has , Sauer's lemma bounds the right side by , and the resulting inequality is solved. For Lemma 29.5's printed this fails only at . There a shattered set splits by the label pair into parts shattered by (pairs ) or by (other pairs). The first class has at most traces on points. Theorem 29.7 maps a shattered set into by , up to sign, and shows the image is shattered by homogeneous halfspaces; the tie-breaking rule decides which sign and which halfspace convention to use. Claim 29.9(1) is the bound ; Claim 29.9(2) needs only that at most of the light points appear in the sample, an event of probability at least by Markov's inequality when , which exceeds the claimed .
Formalization scope
Labels are an arbitrary finite type, shattering and the Natarajan dimension are stated with witnesses defined on all of , and the dimension is a supremum in . The multiclass 0–1 loss, the ERM property, agnostic PAC learnability and uniform convergence are Mission I's generic notions; the realizable multiclass PAC property is defined here in the shape of Definition 3.1 with as the error, since Mission I's binary version is -specific. Theorem 29.3 is stated exactly as Mission IV states Theorem 6.8, with existential constants, upper bounds for every ERM learner of a nonempty measurable class with the countable-approximation property (the measurability device of Remark 3.1), and lower bounds for , , . Argmax predictors, both One-versus-All and , break ties towards the smallest label; the book states this rule for One-versus-All, and some fixed rule is necessary for Theorem 29.7, since with arbitrary tie-breaking every function is an argmax predictor of the zero mapping. Lemmas 29.5 and 29.6 are stated per shattered set. Lemma 29.5 keeps the printed , which is true although the book's step fails for small . Lemma 29.6 uses , which the counting supports, because the printed is false at . Theorem 29.3's uniform-convergence upper bound is stated for . At the confidence term vanishes as , the bound reaches , and a single example is not representative. The class of §29.4 has labels Option of the subtype of finite-or-cofinite sets, with the discrete σ-algebra, and the two ERMs are predicates fixing the output on all- samples; Claim 29.9(1) is stated for countable with measurable singletons and Claim 29.9(2) for finite of size at least , with the proof's own distribution, as target, and every in place of the book's unspecified constant .
Not stated: Corollary 29.8 (its lower bound is cited, not proved), Conjecture 29.10, the exercises.
Selected references
- S. Shalev-Shwartz, S. Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press, 2014, Chapter 29. doi:10.1017/CBO9781107298019
- B. K. Natarajan, On learning sets and functions, Machine Learning 4, 1989. doi:10.1007/BF00114804
- S. Ben-David, N. Cesa-Bianchi, D. Haussler, P. M. Long, Characterizations of learnability for classes of {0, …, n}-valued functions, Journal of Computer and System Sciences 50(1), 1995. doi:10.1006/jcss.1995.1008
- D. Haussler, P. M. Long, A generalization of Sauer's lemma, Journal of Combinatorial Theory A 71(2), 1995. doi:10.1016/0097-3165(95)90001-2
- A. Daniely, S. Sabato, S. Ben-David, S. Shalev-Shwartz, Multiclass learnability and the ERM principle, COLT 2011; Journal of Machine Learning Research 16, 2015.
- A. Daniely, S. Sabato, S. Shalev-Shwartz, Multiclass learning approaches: a theoretical comparison with implications, NIPS 2012.