Computational Learning Theory
Under what conditions is a learning algorithm guaranteed to perform well?
Probably Approximately Correct
The core philosophy of Probably Approximately Correct (PAC) is that we cannot expect a learner to learn a concept perfectly every single time (because we rely on a random sample of data). Instead, we aim for a learner that will probably (with high confidence) produce a hypothesis that is approximately correct (has very low error).
Formal definitions:
(Instance Space): The set of all possible examples/instances. (Concept Class): The set of target concepts we want to learn. A concept is a function . (Distribution): A fixed, but unknown, probability distribution over the instances . (Hypothesis Space): The set of possible hypotheses the learner considers to approximate the concept . - True Error (
): The probability that the hypothesis disagrees with the true concept on a randomly drawn instance from : - Approximately Correct: The learner outputs a hypothesis
such that the error is bounded by a small parameter :
A major goal of PAC theory is determining the bound on
- Discrete Hypothesis Spaces: A consistent learner is one that produces a hypothesis with zero error on the training set. But, fitting the training data does not guarantee the true error is low. The Version Space is the set of all hypotheses consistent with the training data. We want this version space to be
-exhausted, meaning it contains no hypotheses with a true error . The bound for the number of samples required to ensure this with probability is: - Continuous Hypothesis Spaces: The slides provide a concrete example of learning an axis-parallel rectangle in a 2D plane.
- Strategy: the learning finds the tightest fit rectangle
around the positive training examples. - Analysis: The error is the area difference between the true rectangle
and the learned rectangle . By analyzing the probability that training points "miss" the error strips along the edges, we can derive a sample bound. - The bound: For axis-parallel rectangles, the sample complexity is:
- This shows that even with infinite possible rectangles we can find a finite sample size to guarantee PAC learning.
- Strategy: the learning finds the tightest fit rectangle
- VC-dimension: For general continuous spaces where we cannot count
, we use the Vapnik-Chervonenkis (VC) dimension. The VC-dimension replaces in the sample complexity formula. It measures the "capacity" or complexity of the hypothesis space (roughly, how flexible the model is).
There is a fundamental trade-off between the number of samples
No Free Lunch Theorem: Across all problems, no single learner is better than any other. A learner only performs well if its hypothesis space is suited to the problem.
Weak vs Strong Learners
A Strong learner (PAC-learner) is a learner that can achieve an arbitrarily small error
A Weak Learner is a learner that performs only slightly better than random guessing with some fixed error rate and a fixed confidence.
It has been Mathematically proven that if a "weak" learner exists, it can be "boosted" into a strong learner. This means that strict PAC requirements are not always necessary, we just need a learner that is slightly better than a coin toss.
The original idea behind boosting involves resampling the training data.
- Train a weak learner
- Identify the objects that were misclassified.
- Repeat 1-2 with the misclassified objects, some number of times.
- The final prediction is made by a majority vote of the collection of weak learners.
Adaptive Boosting (AdaBoost)
AdaBoost is a constructive algorithm designed to implement the theoretical promise of boosting: turning a weak learner into a strong PAC learner. Instead of resampling the data like original boosting, AdaBoost works by explicitly re-weights the training instances.
- Linear Additive Model: AdaBoost builds a strong classifier
by creating a weighted sum of weak classifiers. The final decision is a linear combination of these weak learners: - Exponential Loss: The algorithm optimizes the model by minimizing an exponential loss function rather than a standard 0-1 loss. The loss
over training examples is defined as: - Optimizing all weights
and classifiers simultaneously is an open problem. Therefore, AdaBoost uses a "greedy" incremental approach: - At each step
, the algorithm fixes the previously learned ensemble ( ) and only attempts to find the best new weak classifier and its weight to add to the sum.
- At each step
The full algorithm:
- Initialize Weights: Start by assigning every training object an equal weight
. - Train Weak Classifier: Train a new classifier
that minimizes the weighted error on the training set. This forces the learner to focus on objects with high weights (those that were previously misclassified).