Vapnik–Chervonenkis theory: Difference between revisions
(fix) |
(No difference)
|
Latest revision as of 20:13, 6 February 2024
Machine learning and data mining |
---|
![]() |
Vapnik–Chervonenkis theory (also known as VC theory) was developed during 1960–1990 by Vladimir Vapnik and Alexey Chervonenkis. The theory is a form of computational learning theory, which attempts to explain the learning process from a statistical point of view.
Introduction
VC theory covers at least four parts (as explained in The Nature of Statistical Learning Theory[1]):
- Theory of consistency of learning processes
- What are (necessary and sufficient) conditions for consistency of a learning process based on the empirical risk minimization principle?
- Nonasymptotic theory of the rate of convergence of learning processes
- How fast is the rate of convergence of the learning process?
- Theory of controlling the generalization ability of learning processes
- How can one control the rate of convergence (the generalization ability) of the learning process?
- Theory of constructing learning machines
- How can one construct algorithms that can control the generalization ability?
VC Theory is a major subbranch of statistical learning theory. One of its main applications in statistical learning theory is to provide generalization conditions for learning algorithms. From this point of view, VC theory is related to stability, which is an alternative approach for characterizing generalization.
In addition, VC theory and VC dimension are instrumental in the theory of empirical processes, in the case of processes indexed by VC classes. Arguably these are the most important applications of the VC theory, and are employed in proving generalization. Several techniques will be introduced that are widely used in the empirical process and VC theory. The discussion is mainly based on the book Weak Convergence and Empirical Processes: With Applications to Statistics.[2]
Overview of VC theory in empirical processes
Background on empirical processes
Let [math]\displaystyle{ (\mathcal{X}, \mathcal{A}) }[/math] be a measurable space. For any measure [math]\displaystyle{ Q }[/math] on [math]\displaystyle{ (\mathcal{X}, \mathcal{A}) }[/math], and any measurable functions [math]\displaystyle{ f:\mathcal{X} \to \mathbf{R} }[/math], define
- [math]\displaystyle{ Qf = \int f dQ }[/math]
Measurability issues will be ignored here, for more technical detail see.[1] Let [math]\displaystyle{ \mathcal{F} }[/math] be a class of measurable functions [math]\displaystyle{ f:\mathcal{X} \to \mathbf{R} }[/math] and define:
- [math]\displaystyle{ \| Q\|_{\mathcal{F}} = \sup \{\vert Qf \vert \ : \ f \in \mathcal{F} \}. }[/math]
Let [math]\displaystyle{ X_1, \ldots, X_n }[/math] be independent, identically distributed random elements of [math]\displaystyle{ (\mathcal{X}, \mathcal{A}) }[/math]. Then define the empirical measure
- [math]\displaystyle{ \mathbb{P}_n = n^{-1} \sum_{i = 1}^n \delta_{X_i}, }[/math]
where δ here stands for the Dirac measure. The empirical measure induces a map [math]\displaystyle{ \mathcal{F} \to \mathbf{R} }[/math] given by:
- [math]\displaystyle{ f \mapsto \mathbb{P}_n f = \frac 1 n (f(X_1 ) + ... + f(X_n)) }[/math]
Now suppose P is the underlying true distribution of the data, which is unknown. Empirical Processes theory aims at identifying classes [math]\displaystyle{ \mathcal{F} }[/math] for which statements such as the following hold:
- uniform law of large numbers:
[math]\displaystyle{ \| \mathbb{P}_n - P\|_{\mathcal{F}} \underset{n}{\to} 0, }[/math]
- That is, as [math]\displaystyle{ n\to \infty }[/math],
[math]\displaystyle{ \left| \frac 1 n (f(X_1 ) + ... + f(X_n)) - \int f dP \right| \to 0 }[/math]
- uniformly for all [math]\displaystyle{ f \in \mathcal{F} }[/math].
- uniform central limit theorem:
- [math]\displaystyle{ \mathbb{G}_n = \sqrt{n} (\mathbb{P}_n - P) \rightsquigarrow \mathbb{G}, \quad \text{in } \ell^{\infty}(\mathcal{F}) }[/math]
In the former case [math]\displaystyle{ \mathcal{F} }[/math] is called Glivenko–Cantelli class, and in the latter case (under the assumption [math]\displaystyle{ \forall x, \sup\nolimits_{f \in \mathcal{F}}\vert f(x) - Pf \vert \lt \infty }[/math]) the class [math]\displaystyle{ \mathcal{F} }[/math] is called Donsker or P-Donsker. A Donsker class is Glivenko–Cantelli in probability by an application of Slutsky's theorem .
These statements are true for a single [math]\displaystyle{ f }[/math], by standard LLN, CLT arguments under regularity conditions, and the difficulty in the Empirical Processes comes in because joint statements are being made for all [math]\displaystyle{ f \in \mathcal{F} }[/math]. Intuitively then, the set [math]\displaystyle{ \mathcal{F} }[/math] cannot be too large, and as it turns out that the geometry of [math]\displaystyle{ \mathcal{F} }[/math] plays a very important role.
One way of measuring how big the function set [math]\displaystyle{ \mathcal{F} }[/math] is to use the so-called covering numbers. The covering number
- [math]\displaystyle{ N(\varepsilon, \mathcal{F}, \|\cdot\|) }[/math]
is the minimal number of balls [math]\displaystyle{ \{g: \|g - f\| \lt \varepsilon \} }[/math] needed to cover the set [math]\displaystyle{ \mathcal{F} }[/math] (here it is obviously assumed that there is an underlying norm on [math]\displaystyle{ \mathcal{F} }[/math]). The entropy is the logarithm of the covering number.
Two sufficient conditions are provided below, under which it can be proved that the set [math]\displaystyle{ \mathcal{F} }[/math] is Glivenko–Cantelli or Donsker.
A class [math]\displaystyle{ \mathcal{F} }[/math] is P-Glivenko–Cantelli if it is P-measurable with envelope F such that [math]\displaystyle{ P^{\ast} F \lt \infty }[/math] and satisfies:
- [math]\displaystyle{ \forall \varepsilon \gt 0 \quad \sup\nolimits_{Q} N(\varepsilon \|F\|_Q, \mathcal{F}, L_1(Q)) \lt \infty. }[/math]
The next condition is a version of the celebrated Dudley's theorem. If [math]\displaystyle{ \mathcal{F} }[/math] is a class of functions such that
- [math]\displaystyle{ \int_0^{\infty} \sup\nolimits_{Q} \sqrt{\log N \left (\varepsilon \|F\|_{Q,2}, \mathcal{F}, L_2(Q) \right )} d \varepsilon \lt \infty }[/math]
then [math]\displaystyle{ \mathcal{F} }[/math] is P-Donsker for every probability measure P such that [math]\displaystyle{ P^{\ast} F^2 \lt \infty }[/math]. In the last integral, the notation means
- [math]\displaystyle{ \|f\|_{Q,2} = \left(\int |f|^2 d Q\right)^{\frac{1}{2}} }[/math].
Symmetrization
The majority of the arguments of how to bound the empirical process, rely on symmetrization, maximal and concentration inequalities and chaining. Symmetrization is usually the first step of the proofs, and since it is used in many machine learning proofs on bounding empirical loss functions (including the proof of the VC inequality which is discussed in the next section) it is presented here.
Consider the empirical process:
- [math]\displaystyle{ f \mapsto (\mathbb{P}_n - P)f = \dfrac{1}{n} \sum_{i = 1}^n (f(X_i) - Pf) }[/math]
Turns out that there is a connection between the empirical and the following symmetrized process:
- [math]\displaystyle{ f \mapsto \mathbb{P}^0_n f = \dfrac{1}{n} \sum_{i = 1}^n \varepsilon_i f(X_i) }[/math]
The symmetrized process is a Rademacher process, conditionally on the data [math]\displaystyle{ X_i }[/math]. Therefore, it is a sub-Gaussian process by Hoeffding's inequality.
Lemma (Symmetrization). For every nondecreasing, convex Φ: R → R and class of measurable functions [math]\displaystyle{ \mathcal{F} }[/math],
- [math]\displaystyle{ \mathbb{E} \Phi (\|\mathbb{P}_n - P\|_{\mathcal{F}}) \leq \mathbb{E} \Phi \left(2 \left \|\mathbb{P}^0_n\right \|_{\mathcal{F}} \right) }[/math]
The proof of the Symmetrization lemma relies on introducing independent copies of the original variables [math]\displaystyle{ X_i }[/math] (sometimes referred to as a ghost sample) and replacing the inner expectation of the LHS by these copies. After an application of Jensen's inequality different signs could be introduced (hence the name symmetrization) without changing the expectation. The proof can be found below because of its instructive nature. The same proof method can be used to prove the Glivenko–Cantelli theorem.[3]
Introduce the "ghost sample" [math]\displaystyle{ Y_1,\ldots, Y_n }[/math] to be independent copies of [math]\displaystyle{ X_1,\ldots, X_n }[/math]. For fixed values of [math]\displaystyle{ X_1,\ldots, X_n }[/math] one has:
- [math]\displaystyle{ \|\mathbb{P}_n - P\|_{\mathcal{F}} = \sup_{f \in \mathcal{F}} \dfrac{1}{n} \left|\sum_{i = 1}^n f(X_i) - \mathbb{E} f(Y_i) \right| \leq \mathbb{E}_{Y} \sup_{f \in \mathcal{F}} \dfrac{1}{n} \left|\sum_{i = 1}^n f(X_i) - f(Y_i) \right| }[/math]
Therefore, by Jensen's inequality:
- [math]\displaystyle{ \Phi(\|\mathbb{P}_n - P\|_{\mathcal{F}}) \leq \mathbb{E}_{Y} \Phi \left(\left\| \dfrac{1}{n}\sum_{i = 1}^n f(X_i) - f(Y_i) \right\|_{\mathcal{F}} \right) }[/math]
Taking expectation with respect to [math]\displaystyle{ X }[/math] gives:
- [math]\displaystyle{ \mathbb{E}\Phi(\|\mathbb{P}_n - P\|_{\mathcal{F}}) \leq \mathbb{E}_{X} \mathbb{E}_{Y} \Phi \left(\left\| \dfrac{1}{n}\sum_{i = 1}^n f(X_i) - f(Y_i) \right\|_{\mathcal{F}}\right) }[/math]
Note that adding a minus sign in front of a term [math]\displaystyle{ f(X_i) - f(Y_i) }[/math] doesn't change the RHS, because it's a symmetric function of [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math]. Therefore, the RHS remains the same under "sign perturbation":
- [math]\displaystyle{ \mathbb{E} \Phi \left( \left\| \dfrac{1}{n}\sum_{i = 1}^n e_i \left(f(X_i) - f(Y_i)\right) \right\|_{\mathcal{F}} \right) }[/math]
for any [math]\displaystyle{ (e_1,e_2,\ldots,e_n) \in \{-1,1\}^n }[/math]. Therefore:
- [math]\displaystyle{ \mathbb{E}\Phi(\|\mathbb{P}_n - P\|_{\mathcal{F}}) \leq \mathbb{E}_{\varepsilon} \mathbb{E} \Phi \left(\left\| \dfrac{1}{n}\sum_{i=1}^n \varepsilon_i \left(f(X_i) - f(Y_i)\right) \right\|_{\mathcal{F}} \right) }[/math]
Finally using first triangle inequality and then convexity of [math]\displaystyle{ \Phi }[/math] gives:
- [math]\displaystyle{ \mathbb{E}\Phi(\|\mathbb{P}_n - P\|_{\mathcal{F}}) \leq \dfrac{1}{2}\mathbb{E}_{\varepsilon} \mathbb{E} \Phi \left( 2 \left \| \dfrac{1}{n}\sum_{i = 1}^n \varepsilon_i f(X_i)\right\|_{\mathcal{F}} \right) + \dfrac{1}{2}\mathbb{E}_{\varepsilon} \mathbb{E} \Phi \left( 2 \left\| \dfrac{1}{n}\sum_{i = 1}^n \varepsilon_i f(Y_i)\right\|_{\mathcal{F}} \right) }[/math]
Where the last two expressions on the RHS are the same, which concludes the proof.
A typical way of proving empirical CLTs, first uses symmetrization to pass the empirical process to [math]\displaystyle{ \mathbb{P}_n^0 }[/math] and then argue conditionally on the data, using the fact that Rademacher processes are simple processes with nice properties.
VC Connection
It turns out that there is a fascinating connection between certain combinatorial properties of the set [math]\displaystyle{ \mathcal{F} }[/math] and the entropy numbers. Uniform covering numbers can be controlled by the notion of Vapnik–Chervonenkis classes of sets – or shortly VC sets.
Consider a collection [math]\displaystyle{ \mathcal{C} }[/math] of subsets of the sample space [math]\displaystyle{ \mathcal{X} }[/math]. [math]\displaystyle{ \mathcal{C} }[/math] is said to pick out a certain subset [math]\displaystyle{ W }[/math] of the finite set [math]\displaystyle{ S = \{x_1,\ldots, x_n\} \subset \mathcal{X} }[/math] if [math]\displaystyle{ W = S \cap C }[/math] for some [math]\displaystyle{ C \in \mathcal{C} }[/math]. [math]\displaystyle{ \mathcal{C} }[/math] is said to shatter S if it picks out each of its 2n subsets. The VC-index (similar to VC dimension + 1 for an appropriately chosen classifier set) [math]\displaystyle{ V(\mathcal{C}) }[/math] of [math]\displaystyle{ \mathcal{C} }[/math] is the smallest n for which no set of size n is shattered by [math]\displaystyle{ \mathcal{C} }[/math].
Sauer's lemma then states that the number [math]\displaystyle{ \Delta_n(\mathcal{C}, x_1, \ldots, x_n) }[/math] of subsets picked out by a VC-class [math]\displaystyle{ \mathcal{C} }[/math] satisfies:
- [math]\displaystyle{ \max_{x_1,\ldots, x_n} \Delta_n(\mathcal{C}, x_1, \ldots, x_n) \leq \sum_{j = 0}^{V(\mathcal{C}) - 1} {n \choose j} \leq \left( \frac{n e}{V(\mathcal{C}) - 1}\right)^{V(\mathcal{C}) - 1} }[/math]
Which is a polynomial number [math]\displaystyle{ O(n^{V(\mathcal{C}) - 1}) }[/math] of subsets rather than an exponential number. Intuitively this means that a finite VC-index implies that [math]\displaystyle{ \mathcal{C} }[/math] has an apparent simplistic structure.
A similar bound can be shown (with a different constant, same rate) for the so-called VC subgraph classes. For a function [math]\displaystyle{ f : \mathcal{X} \to \mathbf{R} }[/math] the subgraph is a subset of [math]\displaystyle{ \mathcal{X} \times \mathbf{R} }[/math] such that: [math]\displaystyle{ \{(x,t): t \lt f(x)\} }[/math]. A collection of [math]\displaystyle{ \mathcal{F} }[/math] is called a VC subgraph class if all subgraphs form a VC-class.
Consider a set of indicator functions [math]\displaystyle{ \mathcal{I}_{\mathcal{C}} = \{1_C: C \in \mathcal{C} \} }[/math] in [math]\displaystyle{ L_1(Q) }[/math] for discrete empirical type of measure Q (or equivalently for any probability measure Q). It can then be shown that quite remarkably, for [math]\displaystyle{ r \geq 1 }[/math]:
- [math]\displaystyle{ N(\varepsilon, \mathcal{I}_{\mathcal{C}}, L_r(Q)) \leq KV(\mathcal{C}) (4e)^{V(\mathcal{C})} \varepsilon^{-r (V(\mathcal{C}) - 1)} }[/math]
Further consider the symmetric convex hull of a set [math]\displaystyle{ \mathcal{F} }[/math]: [math]\displaystyle{ \operatorname{sconv}\mathcal{F} }[/math] being the collection of functions of the form [math]\displaystyle{ \sum_{i =1}^m \alpha_i f_i }[/math] with [math]\displaystyle{ \sum_{i =1}^m |\alpha_i| \leq 1 }[/math]. Then if
- [math]\displaystyle{ N \left (\varepsilon\|F\|_{Q,2}, \mathcal{F}, L_2(Q) \right) \leq C \varepsilon^{-V} }[/math]
the following is valid for the convex hull of [math]\displaystyle{ \mathcal{F} }[/math]:
- [math]\displaystyle{ \log N \left (\varepsilon\|F\|_{Q,2}, \operatorname{sconv}\mathcal{F}, L_2(Q) \right ) \leq K \varepsilon^{-\frac{2V}{V + 2}} }[/math]
The important consequence of this fact is that
- [math]\displaystyle{ \frac{2V}{V + 2} \lt 2, }[/math]
which is just enough so that the entropy integral is going to converge, and therefore the class [math]\displaystyle{ \operatorname{sconv}\mathcal{F} }[/math] is going to be P-Donsker.
Finally an example of a VC-subgraph class is considered. Any finite-dimensional vector space [math]\displaystyle{ \mathcal{F} }[/math] of measurable functions [math]\displaystyle{ f:\mathcal{X} \to \mathbf{R} }[/math] is VC-subgraph of index smaller than or equal to [math]\displaystyle{ \dim(\mathcal{F}) + 2 }[/math].
Proof: Take [math]\displaystyle{ n = \dim(\mathcal{F}) + 2 }[/math] points [math]\displaystyle{ (x_1, t_1), \ldots, (x_n, t_n) }[/math]. The vectors:
- [math]\displaystyle{ (f(x_1), \ldots, f(x_n)) - (t_1, \ldots, t_n) }[/math]
are in a n − 1 dimensional subspace of Rn. Take a ≠ 0, a vector that is orthogonal to this subspace. Therefore:
- [math]\displaystyle{ \sum_{a_i \gt 0} a_i (f(x_i) - t_i) = \sum_{a_i \lt 0} (-a_i) (f(x_i) - t_i), \quad \forall f \in \mathcal{F} }[/math]
Consider the set [math]\displaystyle{ S = \{(x_i, t_i): a_i \gt 0\} }[/math]. This set cannot be picked out since if there is some [math]\displaystyle{ f }[/math] such that [math]\displaystyle{ S = \{(x_i,t_i): f(x_i) \gt t_i\} }[/math] that would imply that the LHS is strictly positive but the RHS is non-positive.
There are generalizations of the notion VC subgraph class, e.g. there is the notion of pseudo-dimension. The interested reader can look into.[4]
VC inequality
A similar setting is considered, which is more common to machine learning. Let [math]\displaystyle{ \mathcal{X} }[/math] is a feature space and [math]\displaystyle{ \mathcal{Y} = \{0,1\} }[/math]. A function [math]\displaystyle{ f : \mathcal{X} \to \mathcal{Y} }[/math] is called a classifier. Let [math]\displaystyle{ \mathcal{F} }[/math] be a set of classifiers. Similarly to the previous section, define the shattering coefficient (also known as growth function):
- [math]\displaystyle{ S(\mathcal{F},n) = \max_{x_1,\ldots, x_n} |\{(f(x_1), \ldots, f(x_n)), f \in \mathcal{F}\}| }[/math]
Note here that there is a 1:1 go between each of the functions in [math]\displaystyle{ \mathcal{F} }[/math] and the set on which the function is 1. We can thus define [math]\displaystyle{ \mathcal{C} }[/math] to be the collection of subsets obtained from the above mapping for every [math]\displaystyle{ f \in \mathcal{F} }[/math]. Therefore, in terms of the previous section the shattering coefficient is precisely
- [math]\displaystyle{ \max_{x_1,\ldots, x_n} \Delta_n(\mathcal{C}, x_1, \ldots, x_n) }[/math].
This equivalence together with Sauer's Lemma implies that [math]\displaystyle{ S(\mathcal{F},n) }[/math] is going to be polynomial in n, for sufficiently large n provided that the collection [math]\displaystyle{ \mathcal{C} }[/math] has a finite VC-index.
Let [math]\displaystyle{ D_n = \{(X_1, Y_1), \ldots, (X_n,Y_m)\} }[/math] is an observed dataset. Assume that the data is generated by an unknown probability distribution [math]\displaystyle{ P_{XY} }[/math]. Define [math]\displaystyle{ R(f) = P(f(X) \neq Y) }[/math] to be the expected 0/1 loss. Of course since [math]\displaystyle{ P_{XY} }[/math] is unknown in general, one has no access to [math]\displaystyle{ R(f) }[/math]. However the empirical risk, given by:
- [math]\displaystyle{ \hat{R}_n(f) = \dfrac{1}{n}\sum_{i = 1}^n \mathbb{I}(f(X_i) \neq Y_i) }[/math]
can certainly be evaluated. Then one has the following Theorem:
Theorem (VC Inequality)
For binary classification and the 0/1 loss function we have the following generalization bounds:
- [math]\displaystyle{ \begin{align} P\left(\sup_{f \in \mathcal{F}} \left |\hat{R}_n(f) - R(f) \right | \gt \varepsilon \right) &\leq 8 S(\mathcal{F},n) e^{-n\varepsilon^2/32} \\ \mathbb{E}\left[\sup_{f \in \mathcal{F}} \left |\hat{R}_n(f) - R(f) \right | \right] &\leq 2 \sqrt{\dfrac{\log S(\mathcal{F},n) + \log 2}{n}} \end{align} }[/math]
In words the VC inequality is saying that as the sample increases, provided that [math]\displaystyle{ \mathcal{F} }[/math] has a finite VC dimension, the empirical 0/1 risk becomes a good proxy for the expected 0/1 risk. Note that both RHS of the two inequalities will converge to 0, provided that [math]\displaystyle{ S(\mathcal{F},n) }[/math] grows polynomially in n.
The connection between this framework and the Empirical Process framework is evident. Here one is dealing with a modified empirical process
- [math]\displaystyle{ \left|\hat{R}_n - R \right |_{\mathcal{F}} }[/math]
but not surprisingly the ideas are the same. The proof of the (first part of) VC inequality, relies on symmetrization, and then argue conditionally on the data using concentration inequalities (in particular Hoeffding's inequality). The interested reader can check the book [5] Theorems 12.4 and 12.5.
References
- ↑ 1.0 1.1 The Nature of Statistical Learning Theory. Information Science and Statistics. Springer-Verlag. 2000. ISBN 978-0-387-98780-4.
- ↑ van der Vaart, Aad W.; Wellner, Jon A. (2000). Weak Convergence and Empirical Processes: With Applications to Statistics (2nd ed.). Springer. ISBN 978-0-387-94640-5. https://books.google.com/books?id=zdDkBwAAQBAJ.
- ↑ Devroye, L., Gyorfi, L. & Lugosi, G. A Probabilistic Theory of Pattern Recognition. Discrete Appl Math 73, 192–194 (1997).
- ↑ Pollard, David (1990). Empirical Processes: Theory and Applications. NSF-CBMS Regional Conference Series in Probability and Statistics Volume 2. ISBN 978-0-940600-16-4.
- ↑ Gyorfi, L.; Devroye, L.; Lugosi, G. (1996). A probabilistic theory of pattern recognition. (1st ed.). Springer. ISBN 978-0387946184.
- See references in articles: Richard M. Dudley, empirical processes, Shattered set.[circular reference]
- Bousquet, Olivier; Elisseeff, Andr´e (1 March 2002). "Stability and Generalization". The Journal of Machine Learning Research 2: 499–526. doi:10.1162/153244302760200704. https://dl.acm.org/doi/pdf/10.1162/153244302760200704. Retrieved 10 December 2022.
- Vapnik, V.; Chervonenkis, A. (2004). "On the Uniform Convergence of Relative Frequencies of Events to Their Probabilities". Theory Probab. Appl. 16 (2): 264–280. doi:10.1137/1116025.
![]() | Original source: https://en.wikipedia.org/wiki/Vapnik–Chervonenkis theory.
Read more |