PAC Learnability
The finite-class PAC result explains when this sample-based selection is reliable: under realizability and with a sufficiently large sample, every ERM hypothesis is probably approximately correct.
Why Capacity Matters
A learning algorithm must choose a hypothesis from a hypothesis class. If the class can represent many different labelings of the same points, it has considerable capacity. That flexibility can help the class represent a target rule, but it also means that the learner has many possible rules to consider. PAC learnability studies when a learner can still select a hypothesis that performs well beyond the training sample.
Tracing Every Labeling
Let C be a finite set of points from the input space. Each point in C can receive label 0 or label 1. If C contains two points, there are four possible labelings: both points labeled 0, the first labeled 0 and the second labeled 1, the first labeled 1 and the second labeled 0, and both points labeled 1. A hypothesis class shatters C when it contains hypotheses that realize every one of those possible labelings on C.
Checking Whether Two Points Are Shattered
Suppose a hypothesis class contains four hypotheses whose labelings on the chosen points a and b are 00, 01, 10, and 11. Is the set containing a and b shattered?
- 1List the possible labelings
Two binary-labeled points have four possible labelings: 00, 01, 10, and 11.
- 2Compare the class with the list
The hypothesis class realizes all four labelings on the same two points.
- 3Apply the definition
Because every possible labeling is realized, the chosen two-point set is shattered.
Yes. The hypothesis class shatters the chosen set containing a and b.
From Shattered Sets to VC-Dimension
The VC-dimension of a hypothesis class H, written VCdim(H), is the maximal size of a set that H shatters. It measures capacity through the largest collection of points on which the class can realize every binary labeling.
A particular shattered set and the VC-dimension are different objects. A shattered set is one specific set of points. The VC-dimension is a size: it records the largest size of any set that the class can shatter. If a class shatters one set of size three, that establishes only that its VC-dimension is at least three. A larger shattered set might still exist. If the class can shatter sets of arbitrarily large size, its VC-dimension is infinite.
| Object | What it tells you |
|---|---|
| A particular shattered set | The class realizes every binary labeling on this chosen set. |
| VC-dimension | The maximum size of any set that the class can shatter. |
| A shattered set of size three | The VC-dimension is at least three, unless a larger maximum has already been established. |
| Infinite VC-dimension | The class can shatter sets of arbitrarily large size. |
Keep the specific set and the maximum size conceptually separate.
Capacity and Learnability
The connection to learning appears when an adversary may choose a distribution and a target labeling. If a hypothesis class contains every possible labeling of a chosen set, it has no useful restriction on the rules it may consider on that set. The No-Free-Lunch consequence is that, without restricting the hypothesis class, an adversary can construct a distribution on which a particular learning algorithm performs poorly, even though another algorithm succeeds on that same distribution.
PAC learnability places structure around this problem. The adversary is restricted to distributions for which some hypothesis in the class has zero risk. Under this realizability condition, the learner is not asked to approximate a target that the class cannot represent at all. The class's capacity still matters because it determines how many different rules are available to explain the observed sample.
The ERM Selection Process
Empirical risk minimization, or ERM, chooses a hypothesis with minimum empirical risk from the hypothesis class. For a finite hypothesis class, the learner evaluates the candidate hypotheses on the training sample and selects one whose observed error is as small as possible.
ERM uses the sample to compare candidates. It does not directly observe the true risk on the whole distribution. The finite-class PAC result explains when this sample-based selection is reliable: under realizability and with a sufficiently large sample, every ERM hypothesis is probably approximately correct.
Selecting Among Three Candidates
A finite hypothesis class contains three candidate hypotheses. On the training sample, the candidates make respectively four, one, and two mistakes. Which candidate can ERM select?
- 1Evaluate each candidate
The learner measures each candidate's empirical error on the same training sample.
- 2Compare the errors
The observed error counts are four, one, and two.
- 3Apply ERM
ERM selects a hypothesis with minimum empirical error, so the candidate with one mistake is selected.
ERM selects the candidate with one observed mistake. If multiple candidates tie for the minimum, the rule can select any minimum-empirical-risk hypothesis.
Probably Approximately Correct
PAC means probably approximately correct. A learned hypothesis is approximately correct when its true error is within an allowed error tolerance. It is probably correct when that accuracy statement holds with high probability over the random choice of the training sample.
The guarantee is probabilistic because it concerns the random training sample. It does not claim that every possible sample produces an accurate hypothesis. Instead, for samples of the required size, it states that the desired accuracy holds with probability at least 1 minus delta. The error tolerance describes how much true error is allowed; delta describes the probability of failing to meet that accuracy.
Sample Size and Guarantee Strength
The finite-class PAC result connects three parts of the learning situation: the sample size, the allowed error, and the confidence requirement. The source states that, under realizability, a sufficiently large sample makes the finite-class ERM rule probably approximately correct. The confidence statement is expressed as probability at least 1 minus delta over samples of the required size.
| Quantity | Role in the PAC result |
|---|---|
| Sample size | Must be sufficiently large for the finite-class ERM guarantee to apply. |
| Allowed error | Specifies how much true error the learned hypothesis may have while still meeting the accuracy requirement. |
| Confidence | Specifies how likely the accuracy statement is to hold over the random training sample; the source expresses this as at least 1 minus delta. |
| Finite hypothesis class | Provides the candidate set from which ERM selects a minimum-empirical-risk hypothesis. |
The result is a relationship among data, accuracy, confidence, and the candidate class.
The Realizability Requirement
Realizability requires that at least one hypothesis in the hypothesis class has zero risk for the distribution and labeling function under consideration. In other words, the class contains a perfect hypothesis for that learning situation.
This assumption matters because the finite-class PAC result is stated only for distributions and labeling functions for which a zero-risk hypothesis exists in the class. Under that condition, ERM can search for a hypothesis that fits the sample while the theorem connects sufficient sample size to performance beyond the sample. If no perfect hypothesis exists in the class, the realizable finite-class result described here does not apply as stated.
Common Reasoning Mistakes
Common mistake Treating one shattered set as the VC-dimension
What it looks likeA class shatters a set of size three, so its VC-dimension is declared to be exactly three.
Why it failsShattering a set of size three proves only that the VC-dimension is at least three. A larger shattered set may exist.
Do this insteadUse the VC-dimension only after identifying the maximum size of any shattered set, or state the result as a lower bound.
Common mistake Checking only one labeling
What it looks likeThe class realizes the labeling 01 on a chosen two-point set, so the set is called shattered.
Why it failsShattering requires every possible 0/1 labeling on the same chosen set.
Do this insteadList all possible binary labelings and verify that the class realizes each one.
Common mistake Reading PAC as a guarantee for every sample
What it looks likeThe PAC result says that every training sample produces an accurate hypothesis.
Why it failsThe guarantee is probabilistic over the random choice of the training sample.
Do this insteadInterpret the statement as accuracy holding with probability at least 1 minus delta for samples of the required size.
Common mistake Ignoring realizability
What it looks likeThe finite-class ERM result is applied even though no hypothesis in the class has zero risk.
Why it failsThe stated finite-class PAC result assumes that a zero-risk hypothesis exists in the class.
Do this insteadCheck the realizability assumption before applying the result.
Common mistake Confusing empirical error with true error
What it looks likeThe ERM hypothesis has minimum training error, so its true error is assumed to be minimum automatically.
Why it failsERM directly compares empirical errors on the observed sample. PAC analysis is what connects this selection to performance beyond the sample under the stated assumptions.
Do this insteadKeep the training-sample measurement and the distribution-wide guarantee conceptually separate.
Practice Check
A hypothesis class realizes the labelings 000, 001, 010, 011, 100, 101, 110, and 111 on three chosen points. What can you conclude about shattering and VC-dimension? Then explain what additional information would be needed to claim that the VC-dimension equals three.
Hints
- First compare the realized labelings with all possible binary labelings of three points.
- Then separate the fact that one set is shattered from the question of whether a larger set can also be shattered.
A finite hypothesis class is used with ERM. State the two conditions needed for the finite-class PAC conclusion described in this article, and identify what the probability statement is taken over.
Hints
- One condition concerns whether a perfect hypothesis exists in the class.
- The other concerns how much data is available.
- The probability concerns the random training sample.
Key Takeaways
- 1A hypothesis class shatters a chosen set when it realizes every possible 0/1 labeling of that set.
- 2The VC-dimension is the maximum size of any set the class can shatter; one shattered set gives a lower bound unless larger sets have been ruled out.
- 3PAC means probably approximately correct: the learned hypothesis has bounded true error with high probability over the random training sample.
- 4ERM selects a minimum-empirical-risk hypothesis from a finite hypothesis class.
- 5Under realizability and with a sufficiently large sample, the finite-class ERM rule is probably approximately correct.
At a glance
- Shattering measures whether a class can realize every binary labeling on one chosen set.
- VC-dimension records the largest size of a set that can be shattered, not the identity of one particular set.
- ERM chooses a hypothesis with minimum empirical error from a finite class.
- The finite-class PAC guarantee requires realizability and a sufficiently large sample.
- Probably approximately correct combines an error tolerance with a high-probability statement over random training samples.