VC Theory and PAC Learning
An introduction to VC theory and PAC learning, including the foundations of statistical learning theory.
Learning from Samples
The goal of learning from samples is to learn an unknown function from as few samples as possible. We receive inputs drawn i.i.d. from a distribution and query the oracle (a black box). The oracle outputs the value . From these input-output pairs, we want to reconstruct or approximately learn the function.
Let us take a specific example and learn a toy function under specific conditions.
Suppose is a finite domain, the inputs are drawn uniformly from , and . We are promised that is either constant on the entire domain or assigns each label to exactly half of the domain. That is, either
Now, we have two options, and I need to figure out which kind of function the oracle represents. I draw samples and look at their outputs. The outputs may be different, or they may all be the same. If I observe both and , I can immediately say that the function is balanced because of the promise. If all the outputs are the same, however, I cannot be certain. My learning rule will declare the function constant in that case, so all I can talk about is the probability that this decision is wrong.
For example, let us say that I have drawn three samples and all are in the class. Can I say that the function is constant? No. A balanced function could also produce those three outputs. Nor can I say for sure that it is balanced and that drawing more samples will reveal this. My whole issue is to figure out how many samples I need before making a decision, so I must choose that number in advance.
Then comes the idea of probability. If the function is balanced, each draw has probability of producing either label. Therefore, the probability that three draws are all is
The same is true for three outputs that are all . Thus, the probability that all three outputs are the same, causing my learning rule to mistake a balanced function for a constant one, is
So, now comes the big question: how much risk of being fooled by the sampled observations can I afford? I shall call this limit , where .
If I draw samples, the probability that a balanced function produces only one label is
Therefore, I will choose enough samples that
This makes sure that the probability of my learning rule being fooled by the sampled observations is at most .
Equivalently, I need
Since the number of samples must be an integer, the smallest such choice is .
We can distinguish between case A and case B with probability atleast using queries. under finite no. of samples.
Goals in Learning Theory
Given a function , and knowing that , where is a set of structured functions, we want to learn using as few queries as possible to the black box, with a success probability of at least .
Ideally, we want to learn exactly, but that is quite hard to achieve.
Here, learning means that, with probability at least over the sampled observations, your algorithm will output some such that
This is called -PAC learning. We need to figure out . For this, we need to know the sample complexity. Sample complexity is denoted by
which is the number of i.i.d. samples from I need to learn with these guarantees. If the sample complexity is higher, then the function class is harder to learn.
Inner product, Affine functions and Hyperplanes
Inner Product
Let us say . Given two points . denotes the inner product between . Inner product is defined as
where and
Affine functions over
An affine function is defined as
where
Hyperplanes
An affine function assigns a real value to every point in . A natural question to ask is: what is the set of points that receive the same value under this function? In particular, the set of points where the affine function evaluates to zero forms a geometric object known as a hyperplane.
Given an affine function
the hyperplane induced by this affine function is the set of all points whose function value is zero. Formally,
The hyperplane partitions the space into two half-spaces:
and
Thus, every point in either lies on the hyperplane or belongs to one of the two half-spaces.
Radon's Theorem
The theorem is referred from convex geometry.
Let be points in . Then two partitions and of the aove points such that and of the above points cannot be separated by a linear classifier. This means that we can make such partitions for which we can never make a linear classifier to partition them. (think of yin-yang diagram).
Proof
Using the fact that any vectors in are linearly DEPENDENT, we can show that in not all being zeros, such that
Let us say is origin and Since
there must exist both positive and negative coefficients (otherwise all the coefficients would have to be zero).
Define
Now partition the given points into
Using
we obtain
Let
where the equality follows from
Dividing both sides by , we get
Notice that all the coefficients on both sides are non-negative and sum to . Hence, both sides represent convex combinations of points in and , respectively.
Therefore, there exists a point that belongs to both convex hulls. Hence,
Since two sets whose convex hulls intersect cannot be separated by a linear hyperplane, the partitions and cannot be separated by a linear classifier.
VC Theory
VC Theory is one of the foundational theories in learning.
(As of now, I am very new to this and cannot appreciate VC Theory correctly, but soon I shall rephrase the VC Theory).
Let us introduce the Universe and Ranges.
We denote Universe with '' and Ranges with ''.
where, . is the collection of subsets of the universe. This tuple together is called a set system.
Projection
Given that , projection is defined as the following:
given that .

Geometrically, the projection is obtained by restricting every range in to the subset . Thus, each projected range is the intersection , and the collection of all such intersections forms .
Example
Let us understand all this using a small emperical example. Let us say my universe is and my ranges are , where
Each is a subset of
If I collect all those \mathcal and store in a set, i.e.,
it is called family of ranges or simply ranges (). The tuple is called a set system.
Now, choose a subset . Now interseting this with each , we get the following:
If we collect them and store in a set , we get
and this is the .
Shattering
Now let us ignore and look only at and see what all are the subsets of ?
Let us now compare with and see, how do they differ.
We can see that and . This means that the projection of onto does not cover all possible subsets of . In other words, the set system does not shatter the subset
A set system is said to shatter a subset if the projection of onto covers all possible subsets of .
Formally, shatters if
VC Dimension
We denote the VC dimension of a set system as or simply .
The VC dimension is defined as the size of the largest subset that can be shattered by .