Linear threshold units and the decision boundary
A single perceptron takes an input vector , computes an inner product with a weight vector w, adds a scalar bias b, and applies a step function (Heaviside step):
The decision boundary is the affine hyperplane . The weight vector w is the normal vector perpendicular to the boundary, determining its orientation, while the bias b determines the perpendicular offset from the origin:
The perceptron learning rule and Novikoff's convergence bound
For binary classification with labels and learning rate , when the perceptron predicts on sample x, parameters update as:
If but (false negative), the rule adds to w, rotating the normal vector towards x so that increases. If but (false positive), it subtracts .
Novikoff's Theorem (1962)
If a training dataset is linearly separable by an optimal hyperplane with margin (where and ), and all inputs lie within a bounding sphere of radius , then the total number of mistake updates M made by the perceptron is strictly bounded:
The perceptron is guaranteed to converge in a finite number of steps if the data is separable. However, if the data is not linearly separable, does not exist, and the learning rule oscillates indefinitely without converging.
Enable JavaScript to use this local playground. The explanation and sources below work without it.
Algebraic impossibility proof: why a single neuron cannot solve XOR
In 1969, Minsky and Papert highlighted that a single perceptron cannot learn the XOR (exclusive OR) parity function. Here is the formal algebraic proof using system inequalities:
| Input | Target y | Condition on | Inequality |
|---|---|---|---|
| (0, 0) | 0 | (1) | |
| (0, 1) | 1 | (2) | |
| (1, 0) | 1 | (3) | |
| (1, 1) | 0 | (4) |
Summing inequalities (2) and (3):
Subtracting inequality (4) from this result:
This directly contradicts inequality (1) (). No real numbers can satisfy this system of inequalities simultaneously. A single linear threshold unit is fundamentally incapable of separating XOR.
The two-layer resolution: coordinate transformation
XOR can be factored algebraically into elementary boolean operators: . A two-layer network uses two hidden units to map the input space into a new coordinate representation :
Input Space (x1, x2): Hidden Feature Space (h1, h2):
x2 h2 (NAND)
▲ ▲
1 │ ● (0,1) ○ (1,1) 1 │ ○ (0,0) ● (0,1) & (1,0)
│ │ [both land at (1,1)]
0 │ ○ (0,0) ● (1,0) 0 │ ○ (1,1)
└───────────────────▶ x1 └───────────────────▶ h1 (OR)
0 1 0 1
Linearly inseparable! Linearly separable by h1 + h2 - 1.5 = 0
The hidden layer transforms the geometry: both positive points (0, 1) and (1, 0) map to the exact same hidden point (1, 1), while the negative points map to (0, 1) and (1, 0). In hidden space, a single linear threshold boundary separates the two classes cleanly.
Sources and further reading
- McCulloch & Pitts (1943), A Logical Calculus of the Ideas Immanent in Nervous Activity
- Rosenblatt (1958), The Perceptron: A Probabilistic Model for Information Storage and Organization in the Brain
- Novikoff (1962), On convergence proofs on perceptrons
- Minsky & Papert (1969), Perceptrons: An Introduction to Computational Geometry