Concepts / Generalization Bounds

Generalization Bounds

The update bound is obtained from that separation.

  • 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.

Key point

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.

Negative examplescorrect sideSeparating boundarymargin γPositive examplescorrect sideat least γ awayat least γ away
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.

Inspect trainingexampleMistakeUpdate weight vectorContinue trainingNo mistakesentire training setcheck resultyesafter updatenext checkno
How does the Perceptron move from mistakes to a classifier with no mistakes on the training set?
Worked example

Reading the Guarantee

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

  1. 1
    Identify the bound

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

  2. 2
    Substitute the margin

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

  3. 3
    Evaluate

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

Result

The bound allows at most 25 Perceptron updates.

The Update Bound

Formula, step by step
  1. 1
    Start with the separation margin γ.
  2. 2
    Square the margin to obtain γ².
  3. 3
    Take the reciprocal to obtain the maximum-update bound 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.

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

Comparing Two Margins

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

  1. 1
    Use γ = 1/2

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

  2. 2
    Use γ = 1/4

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

  3. 3
    Compare

    The smaller margin has the larger maximum-update bound.

Result

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/γ².

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

Finding the Compression Size

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

  1. 1
    Apply the compression bound

    The compression size satisfies k ≤ 1/γ².

  2. 2
    Substitute the margin

    With γ = 1/10, k ≤ 1/(1/10)².

  3. 3
    Evaluate

    The expression equals 100.

Result

The associated compression scheme has size k ≤ 100.

Connecting the Three Results

Margin-separatedtraining setmargin γPerceptron updatesat most 1/γ²No training mistakesCompression schemek ≤ 1/γ²supplies guaranteefinite update processretain update examples
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

  • Common mistake

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

    What it looks like
    For γ = 1/2, the bound is 4.
    Why it fails

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

    Do this instead

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

  • Common mistake

    Describing convergence as merely finding a boundary.

    What it looks like

    The algorithm has converged because it produced a candidate classifier.

    Why it fails

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

    Do this instead

    Check convergence against the whole training set.

  • Common mistake

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

    What it looks like

    A margin of 1/10 would give an update bound of 1/100.

    Why it fails

    The guarantee uses the reciprocal of the squared margin.

    Do this instead

    Compute the bound as 1 divided by γ².

  • Common mistake

    Separating the compression size from the update bound.

    What it looks like

    The update bound is 1/γ², but the compression size has a different bound.

    Why it fails

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

    Do this instead

    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.

Related concepts

More concepts starting with G