The first neural network that could learn β and the proof of what it could not.
π Where this lives: the perceptron's history is the most instructive episode in AI. Rosenblatt's 1958 machine learned from examples and was reported in the press as a step toward thinking machines; Minsky and Papert's 1969 book proved its limits precisely, and funding collapsed for a decade. Both the enthusiasm and the proof were correct β what was wrong was the inference that the limitation of a single layer was a limitation of the approach. Search "Rosenblatt perceptron Minsky Papert 1969 controversy".
The model and the learning rule
net = wβxβ + wβxβ + b, output = 1 if net > 0 With w1 = 1, w2 = 1, b = -1.5, x1 = 1, x2 = 1, net = 0.5.
With wβ = wβ = 1 and b = β1.5 this is an AND gate: it fires only when both inputs are 1. Set b = β0.5 and it becomes OR. The weights never changed β only the threshold the bias sets.
THE PERCEPTRON (Rosenblatt, 1958) adds two things to the
McCulloch-Pitts neuron:
REAL-VALUED, ADJUSTABLE WEIGHTS
A LEARNING RULE that sets them from examples
THE MODEL is otherwise the same:
net = Ξ£α΅’ wα΅’xα΅’ + b
y = 1 if net β₯ 0, else 0 (a step function)
THE PERCEPTRON LEARNING RULE β the whole of it:
for each training example (x, t):
compute the output y
compute the ERROR e = t β y
update every weight wα΅’ β wα΅’ + Ξ· Β· e Β· xα΅’
update the bias b β b + Ξ· Β· e
where t is the TARGET, y the actual output, and Ξ· the LEARNING
RATE.
READ WHAT THE RULE DOES, because the three cases explain it
entirely:
e = 0 the output was correct β NO CHANGE. The perceptron
only learns from mistakes.
e = +1 the target was 1 and the output 0 β the net input was
too small, so ADD xα΅’ to each weight, pushing net up
for this input.
e = β1 the target was 0 and the output 1 β SUBTRACT xα΅’,
pushing net down.
AND NOTE THE FACTOR xα΅’: a weight is changed only in proportion
to its input. A weight whose input was 0 is not changed at all,
which is correct β that input contributed nothing to the error.
THE ALGORITHM:
initialise the weights (small random values, or zero)
repeat:
for each training example:
apply the update rule
until no example produces an error (or a limit is reached)
ONE PASS THROUGH THE TRAINING SET IS AN EPOCH.
THE PERCEPTRON CONVERGENCE THEOREM (Rosenblatt / Novikoff):
IF the training data is LINEARLY SEPARABLE, the perceptron
learning rule is guaranteed to find a separating boundary in
a FINITE number of steps, for any positive learning rate.
THIS IS A GENUINELY STRONG GUARANTEE, and it is what made the
perceptron important. But note what it does NOT say:
Β· it says nothing if the data is not separable β and in that
case the algorithm never terminates, oscillating
indefinitely
Β· it does not find the BEST boundary, only SOME boundary. The
margin may be tiny, which is what support vector machines
later addressed.
Β· the number of steps depends on the margin, and can be
large for a narrow one
A full worked convergence
TRAINING A PERCEPTRON ON THE AND FUNCTION, with Ξ· = 0.5, all
weights and the bias starting at 0. This is the standard exam
question, worked to convergence.
Training set: (0,0)β0 (0,1)β0 (1,0)β0 (1,1)β1
Activation: y = 1 if net β₯ 0, else 0
EPOCH 1
x = (0,0), t = 0: net = 0.0 β y = 1. e = β1
w β (0.0, 0.0) [inputs are 0, so no weight change]
b β 0 + 0.5(β1) = β0.5
x = (0,1), t = 0: net = 0(0) + 0(1) β 0.5 = β0.5 β y = 0.
CORRECT, no change.
x = (1,0), t = 0: net = β0.5 β y = 0. CORRECT.
x = (1,1), t = 1: net = β0.5 β y = 0. e = +1
w β (0 + 0.5, 0 + 0.5) = (0.5, 0.5)
b β β0.5 + 0.5 = 0.0
EPOCH 2
x = (0,0), t = 0: net = 0.0 β y = 1. e = β1
b β β0.5
x = (0,1), t = 0: net = 0.5 β 0.5 = 0.0 β y = 1. e = β1
w β (0.5, 0.5 β 0.5) = (0.5, 0.0)
b β β1.0
x = (1,0), t = 0: net = 0.5 β 1.0 = β0.5 β y = 0. CORRECT.
x = (1,1), t = 1: net = 0.5 + 0 β 1.0 = β0.5 β y = 0. e = +1
w β (1.0, 0.5), b β β0.5
EPOCH 3
x = (0,0): net = β0.5 β 0. CORRECT.
x = (0,1), t = 0: net = 0.5 β 0.5 = 0.0 β y = 1. e = β1
w β (1.0, 0.0), b β β1.0
x = (1,0), t = 0: net = 1.0 β 1.0 = 0.0 β y = 1. e = β1
w β (0.5, 0.0), b β β1.5
x = (1,1), t = 1: net = 0.5 β 1.5 = β1.0 β y = 0. e = +1
w β (1.0, 0.5), b β β1.0
EPOCH 4
x = (1,0), t = 0: net = 1.0 β 1.0 = 0.0 β y = 1. e = β1
w β (0.5, 0.5), b β β1.5
x = (1,1), t = 1: net = 1.0 β 1.5 = β0.5 β y = 0. e = +1
w β (1.0, 1.0), b β β1.0
EPOCH 5
x = (0,1), t = 0: net = 1.0 β 1.0 = 0.0 β y = 1. e = β1
w β (1.0, 0.5), b β β1.5
EPOCH 6 β no errors. CONVERGED.
THE FINAL WEIGHTS: w = (1.0, 0.5), b = β1.5. VERIFY:
(0,0): net = β1.5 β 0 β
(0,1): net = 0.5 β 1.5 = β1.0 β 0 β
(1,0): net = 1.0 β 1.5 = β0.5 β 0 β
(1,1): net = 1.5 β 1.5 = 0.0 β 1 β
ALL FOUR CORRECT. The decision boundary is
xβ + 0.5xβ = 1.5.
TWO THINGS WORTH NOTICING IN THE TRACE:
1. IT TOOK SIX EPOCHS FOR FOUR EXAMPLES. Convergence is
guaranteed, not fast, and the path wanders β the weights
reached (1.0, 0.5) at epoch 3, moved away, and returned.
2. THE SOLUTION IS NOT UNIQUE. w = (1, 1), b = β1.5 also
works, as does w = (2, 2), b = β3. The perceptron finds
SOME separator determined by the order of the examples and
the initial weights, not the best one.
The limitation, and what followed
THE PERCEPTRON CAN ONLY LEARN LINEARLY SEPARABLE FUNCTIONS, for
the geometric reason established in the mathematical-model topic:
wα΅x + b = 0 is a hyperplane, and a single perceptron classifies
by which side of it a point lies on.
THE SEPARABLE CASES:
AND, OR, NAND, NOR, NOT β all learnable
THE NON-SEPARABLE CASE:
XOR β not learnable, by the four-inequality proof of the
McCulloch-Pitts topic
AND THE SCALE OF THE LIMITATION, which is the part usually
omitted: of the 16 possible boolean functions of two variables,
14 are linearly separable and 2 are not (XOR and its
complement XNOR). That sounds mild. BUT THE FRACTION COLLAPSES
WITH MORE INPUTS β of the 2^(2βΏ) boolean functions of n
variables, the separable proportion tends rapidly to zero. For
n = 4 there are 65,536 functions and only 1,882 are linearly
separable, under 3%.
MINSKY AND PAPERT'S 1969 ANALYSIS went further than XOR. They
proved that a perceptron with LOCAL receptive fields cannot
compute global predicates such as CONNECTEDNESS β whether a
figure is a single connected shape β no matter how many units it
has, unless the units see the whole image. THAT WAS THE DEEPER
RESULT, and it was about the limits of local feature detection
rather than about XOR specifically.
WHAT THE FIELD CONCLUDED, AND WHY IT WAS WRONG:
the CORRECT conclusion: a SINGLE-LAYER perceptron is limited
the INFERRED conclusion: neural networks are a dead end
THE MULTILAYER SOLUTION WAS ALREADY KNOWN β the XOR
construction from three units appears in the McCulloch-Pitts
topic and predates the criticism by twenty-six years. WHAT WAS
MISSING WAS A LEARNING RULE FOR HIDDEN LAYERS.
WHY THE PERCEPTRON RULE CANNOT TRAIN A HIDDEN LAYER β the
precise obstacle, and it is the credit assignment problem from
the reinforcement learning topic:
the rule needs the ERROR e = t β y at each unit
for an OUTPUT unit the target t is given by the training data
for a HIDDEN unit THERE IS NO TARGET β nobody says what a
hidden unit should have output
and the step function's derivative is 0, so gradient
information cannot be propagated either
TWO OBSTACLES, AND BOTH HAD TO BE REMOVED: replace the step
function with something differentiable (the Adaline and delta
rule topics), then derive how to assign blame backward
(backpropagation). Seventeen years passed between the criticism
and the solution being widely known.
THE PERCEPTRON'S PLACE IN THE PROGRESSION:
MP NEURON no learning
PERCEPTRON learns; step activation; single layer;
linearly separable only; CONVERGENCE
GUARANTEED when separable
ADALINE linear activation, so gradient descent on a
continuous error becomes possible; converges
even when NOT separable
MLP + BACKPROP hidden layers become trainable
A FINAL NOTE ON WHAT THE PERCEPTRON GOT RIGHT, since the
limitation is usually all that is remembered: IT ESTABLISHED
THAT A MACHINE COULD LEARN A CLASSIFICATION FROM LABELLED
EXAMPLES, with a convergence proof. That is the template every
supervised learning algorithm since has followed, and the
perceptron rule is still the simplest example of learning from
error that exists.
Two things the trace shows that a formula cannot: convergence took six epochs for four examples and the weights wandered β reaching (1.0, 0.5) at epoch 3, moving away, and returning. And the solution is not unique: (1,1) with b = β1.5 works equally well. The theorem promises some separator, not the best one and not quickly.
π Go further: the "finds some separator, not the best one" limitation is exactly what support vector machines fixed, and the fix is elegant. Instead of stopping at any boundary that separates, an SVM finds the one with the maximum margin β the largest distance to the nearest example of either class β which is provably the choice that generalises best among separating hyperplanes. Add the kernel trick and it handles non-separable data too, which made SVMs the dominant classifier through the 1990s and 2000s until deep learning overtook them. Search "support vector machine maximum margin kernel trick".
π‘ Exam angle: give the perceptron model and the learning rule wα΅’ β wα΅’ + Ξ·(t β y)xα΅’, explaining all three error cases and why the factor xα΅’ appears. The near-certain question is to train a perceptron by hand on AND, OR or NAND: tabulate epoch by epoch showing net, output, error and the updated weights, and verify the final boundary. State the convergence theorem β guaranteed in finite steps if the data is linearly separable β and its limits (no guarantee otherwise, and it finds some separator rather than the best). Explain why XOR cannot be learned, and identify the two obstacles to training a hidden layer: hidden units have no target, and the step function's derivative is zero.
Syllabus points
Perceptron model & learning rule (numerical)
Create a free account to tick topics off, take notes as you read, watch the video lessons and get a day-by-day study plan built around your exam date.