1.5 — The perceptron algorithm and Novikoff's convergence theorem
Goal: State the perceptron learning rule and prove it converges in at most R²/γ² updates on a linearly separable dataset.
1. Why this session exists
The perceptron (Rosenblatt, 1958)[1] is the first training algorithm for a linear classifier, predating gradient descent on smooth losses. It is also the first algorithm in this course we can prove a clean convergence theorem about. The proof — due to Novikoff (1962)[2] — is a one-page induction using the geometric quantities from 1.4. After we have it, every later statement about neural-network training will be measured against this baseline.
2. The model
Use labels: . The classifier:
To simplify notation, absorb the bias into the weight vector by augmenting every input with a constant feature:
Then , and everything works in terms of . For the rest of this session we drop the tildes and pretend the bias is just another weight on a constant-1 feature.
3. The learning rule
Initialise . Iterate over the data (round-robin or arbitrary order). At each step, given the current and a chosen example :
- Correct case (): leave unchanged.
- Mistake case (): update
The update pushes in the direction that improves the score for the example that was just misclassified:
Each mistake increases that example's score by .
4. Novikoff's theorem
Setup. Suppose the dataset is linearly separable with geometric margin , i.e. there exists a unit vector (with ) such that
Suppose all inputs are bounded in norm: for all .
Claim. Starting from and running the perceptron rule of §3, the total number of mistakes (and hence updates) is at most
In particular, the algorithm terminates in finitely many steps.
Proof. Let be the weight vector after the -th mistake. We track two quantities.
Bound 1 — alignment with grows linearly. Take the inner product of the update with :
By induction, since ,
By the Cauchy–Schwarz inequality, , hence
Bound 2 — squared norm grows at most linearly. Expand the squared norm of :
Because the update was applied only when , the cross term is . And . So
By induction from ,
Combining. From , . From , . So
This holds at every at which a mistake occurs. Hence the total number of mistakes is .
5. What the bound says and does not say
- Margin matters. Halving the margin quadruples the worst-case update count. Wider margins → faster convergence.
- Scale matters only through . Rescaling all by the same constant scales both and by , leaving unchanged.
- No assumption on data order. Adversarial orderings can hit the bound; favourable orderings finish faster. The total mistake count is invariant under reorderings.
- Non-separable data. The theorem fails — there is no with the required property. The perceptron will oscillate forever. The pocket variant (keep the best seen so far) is the classical workaround; in modern practice we use logistic regression with regularisation, which always has a unique solution.
6. A worked toy example
Two points in : with , with . Augment with the constant feature: , .
and achieves for both points, so . Novikoff bound: .
Start . Both examples score , so both trigger mistakes. Suppose we hit first:
Now check : the signed score is , still a mistake. Update:
Both examples now score . Done. Two mistakes total, exactly hitting the Novikoff bound.
7. Takeaways
- Perceptron rule: on mistakes, no-op on correct examples.
- Novikoff: updates on a linearly separable dataset.
- Proof: two inductive inequalities and one Cauchy–Schwarz application.
- Margin is the central quantity; the same theme recurs in SVMs and in PAC-style generalisation bounds.
(a) Run the perceptron on the dataset , , with labels (augment with a bias feature). Show every update, and verify the bound is respected.
(b) Convince yourself the choice is not essential: redo the inductive step with and adjust the bound.
(c) What goes wrong on a non-separable dataset? Run the perceptron on , labelled , plus , labelled (this is XOR). Describe the long-run behaviour.
(d) Modify the rule to weight updates by a learning rate : . Does Novikoff's bound still hold? Does appear in the final answer?
References
- [1]
Rosenblatt, F. (1958). "The perceptron: A probabilistic model for information storage and organization in the brain". Psychological Review, 65, 386–408. — Perceptron model (1.5).
↩ - [2]
Novikoff, A. B. J. (1962). "On convergence proofs on perceptrons". Symposium on the Mathematical Theory of Automata, 12, 615–622. — Mistake bound for the perceptron (1.5).
↩