Concepts / Generalization Bounds

Generalization Bounds

Margin separation supplies the condition for the Perceptron convergence guarantee.

  • Programming

Why the Margin Matters

A Perceptron may update its weight vector whenever it makes a mistake. The important question is not only whether it eventually finds a classifier that makes no mistakes, but also how many updates may be required. A separation margin γ supplies that information: when the training set is separated with margin γ, the Perceptron makes at most 1/γ² updates before reaching a solution with no mistakes on the entire training set.

The margin is the condition that makes the Perceptron's finite convergence guarantee possible in this setting.

Margin-Separated Training Sets

A training set is separated with margin γ when a separating boundary places every positive example and every negative example on its correct side, with the separation from the boundary measured by γ. The larger the margin, the stronger the separation condition. The generalization-bound result uses this condition to control how many mistakes-driven updates the Perceptron can make.

at least γ awayat least γ awayNegative examplescorrect sideSeparating boundarymargin γPositive examplescorrect side
What does it mean for every training example to be correctly separated from the boundary by at least margin γ?

Following the Perceptron Updates

The Perceptron update process can be viewed as a sequence. A mistake causes an update to the weight vector. The algorithm continues processing the training set. Once it reaches a classifier that makes no mistakes on the entire training set, convergence has been reached.

check resultyesafter updatenext checknoInspect trainingexampleMistakeUpdate weight vectorContinue trainingNo mistakesentire training set
How does the Perceptron move from mistakes to a classifier with no mistakes on the training set?

Reading the Guarantee

Suppose a training set is separated with margin γ = 1/5. What maximum number of Perceptron updates is supplied by the bound?

Identify the bound: For a training set separated with margin γ, the maximum number of updates is 1/γ².

Substitute the margin: With γ = 1/5, the bound becomes 1/(1/5)².

Evaluate: Since (1/5)² = 1/25, the expression is 25.

The bound allows at most 25 Perceptron updates.

The Update Bound

maximum number of Perceptron updates = 1/γ²

The bound makes the relationship between margin and work explicit. A larger margin produces a smaller value of 1/γ², while a smaller margin produces a larger value. Thus, stronger separation corresponds to a lower upper bound on the number of updates. The guarantee says that the Perceptron reaches a solution with no mistakes on the entire training set after at most this many updates.

lower boundhigher boundLarger γsmaller 1/γ²Maximum updates1/γ²Smaller γlarger 1/γ²
How does changing γ affect the maximum number of Perceptron updates?

Comparing Two Margins

Compare the update bounds for γ = 1/2 and γ = 1/4.

Use γ = 1/2: The bound is 1/(1/2)² = 4.

Use γ = 1/4: The bound is 1/(1/4)² = 16.

Compare: The smaller margin has the larger maximum-update bound.

The bound is 4 updates for γ = 1/2 and 16 updates for γ = 1/4.

Updates as a Compression Scheme

The Perceptron update bound also gives a compression result. The examples that triggered Perceptron updates can be retained as a compressed representation of the final classifier. Because there are at most 1/γ² updates, the associated compression scheme has size k satisfying k ≤ 1/γ².

examples causing updatesretainrepresentsTraining setUpdate-triggeringexamplesat most 1/γ²Compressedrepresentationsize k ≤ 1/γ²Final classifier
How can the examples that triggered updates become a compressed representation with size at most 1/γ²?

Finding the Compression Size

Suppose a training set is separated with margin γ = 1/10. What size bound does the associated compression scheme have?

Apply the compression bound: The compression size satisfies k ≤ 1/γ².

Substitute the margin: With γ = 1/10, k ≤ 1/(1/10)².

Evaluate: The expression equals 100.

The associated compression scheme has size k ≤ 100.

Connecting the Three Results

supplies guaranteefinite update processretain update examplesMargin-separatedtraining setmargin γPerceptron updatesat most 1/γ²No training mistakesCompression schemek ≤ 1/γ²
How does margin separation lead to a finite update bound and then to a compression size?

The reasoning chain is compact. First, assume the training set is separated with margin γ. Second, use that condition to bound the Perceptron's updates by 1/γ². Third, interpret the result in two ways: after at most that many updates, the Perceptron reaches a classifier with no mistakes on the entire training set; and the examples that triggered those updates provide a compression scheme of size at most 1/γ².

Common Reasoning Mistakes

  • Treating 1/γ² as the exact number of updates.

    The result gives a maximum number of updates, not necessarily the number the algorithm actually performs.

    Fix: Say that the Perceptron makes at most 1/γ² updates.

  • Describing convergence as merely finding a boundary.

    The stated convergence meaning is stronger: the solution makes no mistakes on the entire training set.

    Fix: Check convergence against the whole training set.

  • Using γ² instead of 1/γ² as the update bound.

    The guarantee uses the reciprocal of the squared margin.

    Fix: Compute the bound as 1 divided by γ².

  • Separating the compression size from the update bound.

    The associated compression scheme has size k ≤ 1/γ².

    Fix: Use the same upper bound for the retained update-triggering examples.

Check Your Understanding

EASY

A training set is separated with margin γ = 1/4. State the maximum number of Perceptron updates guaranteed by the bound, and state the corresponding compression-size bound.

Hints
  • Use the expression 1/γ² for the update bound.
  • The compression-size bound uses the same expression.

What do you think happens?

If the margin changes from γ = 1/2 to γ = 1/4, does the maximum-update bound become smaller or larger?

  • Smaller
  • Larger
  • Unchanged
Reveal answer

Answer: Larger

The bound is 1/γ². The smaller margin γ = 1/4 gives 16, whereas γ = 1/2 gives 4.

Key Takeaways

  • A training set separated with margin γ has its positive and negative examples on the correct sides of a separating boundary with separation measured by γ.
  • For such a training set, the Perceptron makes at most 1/γ² updates.
  • Convergence means reaching a classifier that makes no mistakes on the entire training set.
  • The update bound becomes a compression bound because the examples that triggered updates can be retained, with compression size k ≤ 1/γ².
  • A larger margin gives a smaller upper bound, while a smaller margin gives a larger upper bound.