Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The convergence theorem

In the book: Chapter 1, §"Why the Perceptron Works" — "the perceptron convergence theorem states that the algorithm finds a separating boundary after a finite number of updates." This page states and proves that theorem. Builds on: The learning rule · Background: dot-product identities · Background: the Cauchy–Schwarz inequality.

The book demonstrates that each update improves the score of the example that triggered it, and warns that an update "may worsen the margin on other examples." So why does this tug-of-war end? The answer is Novikoff's theorem (1962): if the data is linearly separable, the total number of updates the perceptron can ever make is bounded by a constant that depends only on the geometry of the data — not on the number of examples, not on the dimension, and not on the order in which examples are visited.

Setup

We are given a dataset with and labels , and we run the perceptron rule from Chapter 1: predict with , and on a misclassified example update

Absorbing the bias. The pair is awkward to carry through the analysis, and there is a standard trick to make it disappear: append a constant feature to every input. Define

Then , so predictions are unchanged, and the two-part update above becomes the single update : the bias update is exactly the update of the last coordinate. From here on we work in and drop the tildes: inputs are , the parameter is a single vector , and the update is . We start, as the book's code does, from .

The two geometric quantities. The bound is stated in terms of:

  • the radius of the data, — how far any example sits from the origin;
  • the margin of the best separator: linear separability means there exists some unit vector () and some with

In words: some hyperplane not only separates the classes but clears every point by at least . (Requiring is what makes a genuine distance rather than an artifact of scaling — made precise in Margin, formally, in the planned Maximum-Margin Separation section.)

Statement

Theorem (Novikoff, 1962). Run the perceptron algorithm, starting from , on any sequence of examples drawn from the dataset (in any order, with any repetitions). If the data is linearly separable with margin and radius , then the algorithm makes at most

updates. In particular, after finitely many mistakes the weight vector separates the data perfectly and never changes again.

Proof

Let denote the weight vector after the -th update. The proof tracks one quantity from two sides: the alignment between the learned weights and the perfect separator. Each mistake forces this alignment up by a fixed amount, while the length of can only grow slowly. Since alignment cannot outrun length (Cauchy–Schwarz), mistakes must stop.

Step 1 — each update gains of alignment. Suppose the -th update is triggered by the example , so . By linearity of the dot product,

where the inequality is exactly the margin condition . Starting from and applying this times,

Step 2 — each update grows the length by at most . For the same update, expand the squared norm (Background: norms):

Now use the one fact that makes the whole proof work: the update only happens because the example was misclassified, which means . The middle term is not just bounded — it helps us. Together with and ,

and therefore, again starting from ,

Step 3 — the two bounds collide. By the Cauchy–Schwarz inequality and ,

Chaining (1), this, and (2):

Reading off the ends, , and dividing by (positive for any ) gives

So the number of updates can never exceed . Once the algorithm completes a full pass with no mistake — which must happen, since passes containing a mistake are limited — the weights separate every example and no future pass changes them. ∎

Remarks

Where each hypothesis was used. Separability with margin powered Step 1; misclassification-only updates powered Step 2 (it is the reason the cross term is ); made both accumulations start at zero. Drop any one and the proof — and the theorem — fails.

What the theorem does not say. It does not say the perceptron finds the best boundary, only a separating one; the book's "tug-of-war" ends, but possibly at a line that barely clears some points. It also says nothing when the data is not separable — the XOR case — where the algorithm cycles forever. Both gaps are picked up in Reading the bound and resolved properly in Maximum-Margin Separation (planned).

The bound is dimension-free. Neither nor appears. This is worth pausing on: a million points in a million dimensions cost no more updates than four points in the plane, so long as the geometry () is the same. This is the first appearance of a theme that returns with kernels in Kernels and Feature Spaces (planned).

Going further

  • A. Novikoff, On convergence proofs for perceptrons, Symposium on the Mathematical Theory of Automata, 1962 — the original.
  • M. Minsky & S. Papert, Perceptrons, MIT Press, 1969 — the book-length study of what perceptrons can and cannot represent.
  • Freund & Schapire, Large margin classification using the perceptron algorithm, Machine Learning 37, 1999 — what can still be said when the data is not separable.