Introduction to PAC Learning
PAC learnability is a definition involving a hypothesis class H, a function m_H, and a learning algorithm.
From Examples to a Guarantee
PAC learning is a precise way to describe when a hypothesis class H can be learned by an algorithm. It does not merely say that an algorithm performs well on some examples. It specifies how many labeled examples are needed, how accurate the returned hypothesis should be, and how confident we should be in that accuracy.
The central process is this: examples come from a distribution D over an instance space X and receive labels from a target function f. A learning algorithm receives enough labeled examples and returns a hypothesis h from the hypothesis class H. PAC learnability requires a guarantee about the loss of h, not just its behavior on the examples used for training.
The PAC Symbols
Each symbol in the definition has a distinct job. H is the hypothesis class: the collection of hypotheses the learning system can consider. The function m_H determines the sample threshold. For chosen accuracy epsilon and confidence delta, the learner must receive at least m_H(epsilon, delta) examples. D is a distribution over the instance space X, and f is the labeling function that supplies the labels. The algorithm returns h, the learned hypothesis.
| Symbol | Role in the definition |
|---|---|
| H | Hypothesis class available to the learner |
| m_H | Function that determines the required sample threshold |
| epsilon | Requested accuracy parameter |
| delta | Allowed confidence-failure parameter |
| D | Distribution over the instance space X |
| f | Target labeling function |
| h | Hypothesis returned by the learning algorithm |
The main objects in the PAC learning definition.
Following the Guarantee
A hypothesis class H is PAC learnable when there is a sample-complexity function m_H and a suitable learning algorithm such that, whenever the number of labeled examples m is at least m_H(epsilon, delta), the algorithm returns a hypothesis h whose loss is at most epsilon with probability at least 1 minus delta. This requirement must hold for every allowed choice of epsilon and delta, every distribution D over X, and every labeling function f for which the realizable assumption holds.
Reading a PAC Guarantee
Suppose a learner is being analyzed with a hypothesis class H, accuracy parameter epsilon, confidence parameter delta, and a sample-complexity function m_H. What must be checked before the guarantee can be applied?
Choose the learning settings: Specify the desired accuracy epsilon and confidence parameter delta.
Check the sample threshold: Determine the threshold supplied by m_H(epsilon, delta), then check that the available number of labeled examples m is at least that threshold.
Check the data assumptions: The examples must be understood relative to a distribution D over X and a target labeling function f, and the realizable assumption must hold with respect to H, D, and f.
Interpret the result: After learning, the returned hypothesis h is guaranteed to have loss at most epsilon with probability at least 1 minus delta.
The definition supplies a conditional guarantee. It does not claim a particular numerical sample bound unless m_H is known.
Why Realizability Matters
The realizable assumption is a condition connecting H, D, and f. It says that the target labeling situation is compatible with the hypothesis class being considered. Under this assumption, the class contains a hypothesis capable of representing the target labeling behavior, so a hypothesis with zero training error can exist for the labeled examples.
This condition matters because the stated PAC guarantee is made for the realizable setting. Without it, a learner might be asked to find a hypothesis in H that agrees with labels that no hypothesis in H can represent. In that situation, zero training error is not guaranteed to be achievable, so the definition would need a different assumption or guarantee.
Feature Learning as Representation
A machine learning method cannot work directly with an unspecified instance space. It needs instances to be expressed in a feature representation. Feature learning addresses this preparation step by learning a function psi that maps instances from X into d-dimensional feature vectors.
Before the mapping, an item is described only as an element of X. After the mapping, the same item is available as a vector with d coordinates. The learned function psi is therefore a transformation that creates a usable description of each instance. The purpose is to produce a representation that supports a suitable hypothesis class for the task.
Learning Versus Selecting Features
| Approach | Starting point | Main operation |
|---|---|---|
| Feature selection | A predefined feature space R^d | Chooses some of the available features |
| Feature transformation | A predefined feature space R^d | Changes individual features |
| Feature learning | Instances in X | Learns a function psi that creates the representation |
Feature selection and feature transformation assume that a feature space has already been designed. Selection chooses among available features, while transformation changes individual features. Feature learning starts one step earlier: it learns how instances from X should be represented in the first place.
Polynomial Features
Polynomial regression illustrates the general pattern of constructing features first and training a linear predictor on top of them. An input x can be mapped into the constructed feature vector consisting of 1, x, x squared, and continuing through x to the power of d. The monomial construction supplies the representation; the later linear predictor operates on that representation.
Separating the Two Roles
Explain which part of polynomial regression is the representation step and which part is the prediction step.
Represent the input: The monomial construction maps x into the feature vector 1, x, x², ..., xᵈ.
Apply the predictor: A linear predictor operates on the constructed feature vector to form the regression hypothesis.
Identify the feature-learning idea: The mapping into the constructed feature vector is the representation part. The later predictor is a separate part of the learning system.
Polynomial regression demonstrates that constructing a representation and learning a predictor on that representation are distinct roles.
Common Misreadings
Treating PAC learning as a statement about one fixed dataset.
The guarantee is stated relative to every allowed distribution D and every allowed target function f under the realizable assumption.
Fix:
Track the distribution, target function, accuracy, confidence, sample threshold, and returned hypothesis together.Confusing epsilon with delta.
Epsilon bounds the permitted loss, while delta controls the probability associated with the guarantee.
Fix:
Remember: epsilon describes accuracy and delta describes confidence.Assuming m_H is automatically a numerical sample count.
m_H is the function that supplies the threshold for the chosen epsilon and delta.
Fix:
State the condition m at least m_H(epsilon, delta) unless a specific bound has been provided.Calling feature selection feature learning.
Selection starts with an existing feature space, while feature learning learns a mapping from instances into a feature vector space.
Fix:
Ask whether the procedure begins with instances in X or with a feature space already defined.Treating the polynomial predictor as the feature mapping.
The monomial construction creates the representation; the predictor acts after that representation exists.
Fix:
Separate the mapping step from the prediction step.
Practice Check
A learning algorithm receives m labeled examples. Explain what must be true for a PAC guarantee to apply, and identify the roles of H, m_H, epsilon, delta, D, f, and h in the resulting statement.
Hints
- Start with the sample threshold m at least m_H(epsilon, delta).
- Include the realizable assumption involving H, D, and f.
- End with the loss and probability guarantee for h.
A method begins with instances in X and learns a function psi that maps them into vectors with d coordinates. Is this feature selection, feature transformation, or feature learning? Explain why.
Hints
- Check whether the feature space was predefined before the method began.
- Focus on the role of psi.
Key Takeaways
- PAC learnability combines a hypothesis class H, a sample-complexity function m_H, and a learning algorithm.
- When m is at least m_H(epsilon, delta), the returned hypothesis h must have loss at most epsilon with probability at least 1 minus delta.
- The guarantee is stated for distributions D and target functions f under the realizable assumption.
- Feature learning learns a mapping psi from instances in X into d-dimensional feature vectors, unlike selection or transformation within a predefined feature space.
- Polynomial regression separates feature construction, such as 1, x, x², ..., xᵈ, from the later linear prediction step.
Key Takeaways
- PAC learning gives a formal accuracy and confidence guarantee for learning a hypothesis class.
- The sample threshold is supplied by m_H(epsilon, delta), and the learner must return h with loss at most epsilon with probability at least 1 minus delta.
- The realizable assumption ensures that the target labeling is compatible with H.
- Feature learning creates a d-dimensional representation from instances, whereas feature selection and transformation begin with a predefined feature space.
- Polynomial regression illustrates representation construction followed by prediction.