Neural networks
Perceptrons and the Geometry of Linear Separation
Connect the perceptron to hyperplanes, margins, linear separability, and the historical motivation for multilayer networks.
By the end you can
- Explain how a perceptron defines a decision boundary
- Distinguish linearly separable and non-separable datasets
- Describe what the classic perceptron update attempts to correct
- Use XOR to explain why hidden nonlinear layers change expressivity
Visual
A classification rule drawn as geometry
In two dimensions, the equation w·x+b=0 defines a line. In higher dimensions, the same equation defines a hyperplane.
- 01
Input space
Each example occupies a point whose coordinates are its feature values.
- 02
Decision surface
The zero pre-activation set divides the space into two sides.
- 03
Predicted class
The sign or threshold of the output assigns a label.
Distance from the boundary matters
Points near a linear boundary can flip class under a small input change, while points farther away have a larger geometric margin under the chosen scaling.
Distance from the boundary is not confidence. A perceptron does not automatically produce a calibrated uncertainty estimate, and the gap between a confident-looking score and a trustworthy probability has been measured rather than merely warned about. Guo and colleagues opened a 2017 paper with the finding itself: “We discover that modern neural networks, unlike those from a decade ago, are poorly calibrated.” Accuracy had risen. The correspondence between the score and the frequency of being right had fallen. The usual fix is to recalibrate afterwards, and a large-scale 2019 benchmark across classification tasks, from Ovadia and colleagues, tested what happens to that fix under dataset shift. It degrades. The repair does not survive the conditions that make you reach for it.
A raw margin is also not comparable between two networks. Rescaling the weights rescales the margin. No prediction changes. Bartlett, Foster and Telgarsky addressed exactly that in 2017. Their generalization bound “scales with their margin-normalized "spectral complexity": their Lipschitz constant, meaning the product of the spectral norms of the weight matrices, times a certain correction factor”. They tested it on “a standard AlexNet network trained with SGD on the MNIST and CIFAR10 datasets, with both original and random labels”. They found that “the bound, the Lipschitz constants, and the excess risks are all in direct correlation”. A margin starts carrying information once it is measured against a scale. That scale is the model that produced it.
A decision boundary answers “which side?”; it does not automatically answer “how certain?”
Comparison
Two datasets with different possibilities
The architecture can succeed only when its available boundaries match the data geometry. How far a single hyperplane gets you is a quantity you can compute before you fit anything.
Cover settled the count in 1965. For N points in general position in d-dimensional space, the number of homogeneously linearly separable dichotomies is exactly C(N,d) = 2·Σ_{k=0}^{d-1} binom(N-1,k). His abstract states the consequence: “It is shown that a family of surfaces having d degrees of freedom has a natural separating capacity of 2d pattern vectors, thus extending and unifying results of Winder and others on the pattern-separating capacity of hyperplanes.” Separating capacity is a budget, not a mood. It is 2d pattern vectors for d degrees of freedom, and the probability of separability collapses sharply once the number of patterns passes twice the number of dimensions. Gardner and Derrida reached the same critical capacity from statistical mechanics in 1988: α_c(0)=2, that is, 2N random patterns for N weights.
So the two cases below are not two temperaments a dataset might have. Below roughly 2d points a linear rule will very likely separate labels even when those labels are random, which is a warning about what separability proves. Above it, the rule runs out of room. No amount of training returns any.
Linearly separable
One hyperplane can place all positive examples on one side and negatives on the other.
- A single perceptron can represent the rule
- Many valid separating boundaries may exist
- Feature scaling changes geometric distances
- Example: two well-separated point clouds
Not linearly separable
No single hyperplane classifies every example correctly.
- A single perceptron cannot represent the rule
- More training cannot remove the structural limit
- Feature transformation may make the task separable
- Example: XOR in its original coordinates
Steps
What a perceptron update is trying to do
The classic algorithm reacts to a misclassified example rather than differentiating a smooth loss. On separable data the number of reactions is capped before training starts.
Novikoff's 1962 convergence theorem caps the updates on a linearly separable sequence at r²/ρ², the squared ratio of the data radius to the margin. That bound does not depend on the dimension of the inputs. Freund and Schapire restated it in 1999 and opened their paper with the guarantee: “Block (1962), Novikoff (1962) and Minsky and Papert (1969) have shown that if the data are linearly separable, then the perceptron algorithm will make a finite number of mistakes, and therefore, if repeatedly cycled through the training set, will converge to a vector which correctly classifies all of the examples.” Mohri and Rostamizadeh restate the same result in 2013.
Read r²/ρ² backwards and it says what the update buys and what it does not. Double the margin and the mistake budget falls by a factor of four. Add a thousand dimensions and the budget does not move at all. Remove separability and there is no guarantee left to weaken, because ρ no longer exists. XOR is not a slow case. It is a different kind of case.
1. Predict
Compute the sign of the current affine score.
2. Detect error
Compare the predicted sign with the target label.
3. Move weights
Shift the boundary toward classifying that example correctly.
4. Repeat
Cycle through examples until convergence or a stopping rule.
Example
XOR as a structural lesson
XOR assigns a positive label when two binary inputs differ, and its four points cannot be separated by one straight line. What repairs this is not depth in itself but the nonlinearity inside the hidden layer. That is an if-and-only-if, not a rule of thumb.
A hidden layer buys universality only because its activation is not a polynomial. Leshno and colleagues proved that in 1992: “We show that most of all the characterizations that were reported thus far in the literature are special cases of the following general result: a standard multilayer feedforward network with a locally bounded piecewise continuous activation function can approximate any continuous function to any degree of accuracy if and only if the network's activation function is not a polynomial.” Cybenko had proved one direction three years earlier, for continuous sigmoidal activations.
The "only if" is the half that matters here. A hidden layer with a linear activation is a polynomial one. It composes back down to a single affine map, and the four XOR points end up exactly where they started. Stacking such layers ten deep changes the parameter count and nothing else.
- Input (0,0) maps to class 0.
- Input (0,1) maps to class 1.
- Input (1,0) maps to class 1.
- Input (1,1) maps to class 0.
- A hidden layer whose activation is not a polynomial can transform the four points before a later linear boundary separates them.
Analogy
A single fence on uneven land
Red and blue tents must be separated by one perfectly straight fence. If the tents alternate around a square, every straight fence leaves at least one tent on the wrong side.
A hidden layer works differently. It does not bend one physical divider; it builds new coordinates in which a later boundary can become simple.
Hidden layers change the representation before the final separation.
Key idea
What the perceptron teaches today
The perceptron is not obsolete trivia. It exposes the geometry of linear decision rules, the difference between optimization failure and representational limits, and the reason nonlinear composition matters.
Modern networks often end with a linear head, and the size of what that head contributes has been measured directly. In 2020 Chen and colleagues froze a self-supervised representation and trained nothing on top of it but a linear classifier: “A linear classifier trained on self-supervised representations learned by SimCLR achieves 76.5% top-1 accuracy, which is a 7% relative improvement over previous state-of-the-art, matching the performance of a supervised ResNet-50.” DeepMind's Bootstrap Your Own Latent paper tabulates the same entry independently later that year: SimCLR with ResNet-50 (4×), 76.5 top-1 and 93.2 top-5 under linear evaluation on ImageNet.
The final decision rule in that system is the perceptron's rule — a side of a hyperplane. The 76.5% is not evidence about the hyperplane. It is evidence about the coordinates the hyperplane was handed.
A simple final boundary can work because earlier layers reshape the problem.
Case
Rosenblatt published in 1958 and the rebuttal was a book in 1969
Two publication dates hold this history in place. Rosenblatt’s perceptron paper ran in Psychological Review in 1958. The reply was a book, and MIT Press still describes it this way: “In 1969, ten years after the discovery of the perceptron—which showed that a machine could be taught to perform certain tasks using examples—Marvin Minsky and Seymour Papert published Perceptrons, their analysis of the computational capabilities of perceptrons for specific tasks.” Léon Bottou’s foreword to the 2017 reissue gives the verdict in one line: “Their rigorous work and brilliant technique does not make the perceptron look very good.”
Note what kind of document that was. It analyzed a class of functions. It did not report training runs that went badly.
When a linear baseline is the right test
Before training a deep model, fit a linear baseline on the same representation. Strong performance may reveal that the task is already simple, or that leakage has made it suspiciously easy.
Weak performance does not prove a neural network will succeed. It only establishes one thing. Under the current features, a single linear rule is insufficient.
Whether the deeper model then wins is an empirical question. On one large family of data the answer has stayed stubborn. In 2022 Grinsztajn and colleagues benchmarked standard and recent deep-learning methods against tree-based models such as XGBoost and Random Forests. The test bed was “a standard set of 45 datasets from varied domains with clear characteristics of tabular data”. Their finding: “tree-based models remain state-of-the-art on medium-sized data” — around ten thousand samples — “even without accounting for their superior speed”.
The same result arrives from a literature with no stake in the machine-learning argument. A 2019 systematic review in the Journal of Clinical Epidemiology screened 927 studies and read 71 of them. Across 145 comparisons of logistic regression against machine learning at low risk of bias, the difference in logit(AUC) was 0.00, with a 95% confidence interval running from −0.18 to 0.18. The conclusion is four words longer than it needs to be: “We found no evidence of superior performance of ML over LR.” The next year the same journal published a 6,762-person Asian cohort. Logistic regression was the best model for chronic kidney disease, at an AUC of 0.905, and for diabetes, at 0.768. Every difference from the five machine-learning models was under 1% and not statistically significant.
A simple baseline is not always a step on the way to the real model. Sometimes it is the result — an interval containing zero, twice, in two fields.
Key takeaways
- A perceptron classifies points according to the side of a learned hyperplane.
- Linear separability depends on labels and representation, and Cover's 1965 capacity result makes the limit countable: about 2d pattern vectors for d degrees of freedom.
- Optimization cannot overcome a function class that cannot express the required boundary; where it can, Novikoff's bound caps the mistakes at r²/ρ², independent of dimension.
- XOR shows why nonlinear hidden transformations expand representational power — Leshno and colleagues proved the gain arrives if and only if the activation is not a polynomial.
- A large margin is a geometric property, not an automatic probability: Guo and colleagues found modern networks poorly calibrated despite their accuracy.
- Linear baselines remain valuable diagnostics even when the final system uses deep networks; across 145 clinical comparisons the logit(AUC) difference against machine learning was 0.00.