Gradient descent for a single unit β and the fix for the perceptron's brittleness.
π Where this lives: the delta rule is the bridge between the perceptron and everything modern. Its contribution is not a better result on separable data β the perceptron already converged there β but that it keeps working when the data is not separable, which real data never is. It finds the best available approximation instead of oscillating forever, and it does so by gradient descent, which is the mechanism backpropagation generalises to hidden layers. Search "delta rule Widrow-Hoff LMS gradient descent".
Deriving the rule
THE PROBLEM WITH THE PERCEPTRON RULE: it uses the STEP output, so
it knows only whether the answer was right or wrong β not by how
much. And if the data is not linearly separable it never
terminates.
THE DELTA RULE (also the WIDROW-HOFF rule, or the LEAST MEAN
SQUARES rule) fixes both by working with a LINEAR output and
minimising a CONTINUOUS error.
THE SETUP:
output y = net = Ξ£α΅’ wα΅’xα΅’ + b (LINEAR β no
step function)
error for one E = Β½ (t β y)Β²
example
over the set E(w) = Β½ Ξ£β (tβ β yβ)Β²
THE DERIVATION, which is short and worth being able to reproduce:
βE/βwα΅’ = β/βwα΅’ [ Β½(t β y)Β² ]
= Β½ Β· 2(t β y) Β· β(t β y)/βwα΅’ chain rule
= (t β y) Β· (ββy/βwα΅’)
= β(t β y) Β· xα΅’ since y = Ξ£wβ±Όxβ±Ό,
βy/βwα΅’ = xα΅’
NOTE WHERE THE Β½ WENT: it cancelled against the 2 from
differentiating the square. That is its only purpose.
SUBSTITUTING INTO GRADIENT DESCENT wα΅’ β wα΅’ β Ξ· βE/βwα΅’:
wα΅’ β wα΅’ + Ξ· (t β y) xα΅’
THE DELTA RULE. Writing Ξ΄ = (t β y) for the error term gives
the form the name comes from:
Ξwα΅’ = Ξ· Β· Ξ΄ Β· xα΅’
COMPARE WITH THE PERCEPTRON RULE, which looks identical:
perceptron: Ξwα΅’ = Ξ· (t β y) xα΅’ with y from a STEP
delta rule: Ξwα΅’ = Ξ· (t β y) xα΅’ with y LINEAR
THE ALGEBRA IS THE SAME AND THE MEANING IS NOT. In the
perceptron y β {0,1}, so (t β y) β {β1, 0, +1} β three possible
corrections. In the delta rule y is a real number, so (t β y)
is PROPORTIONAL TO HOW WRONG THE ANSWER WAS. A nearly-correct
output produces a tiny update; a badly wrong one produces a
large one.
THAT IS THE ENTIRE DIFFERENCE, AND IT IS DECISIVE β it is what
makes the rule a gradient method rather than a
correct-the-mistake heuristic.
THE ERROR SURFACE for a linear unit with squared error is a
PARABOLOID: convex, with a SINGLE GLOBAL MINIMUM and no local
minima. So gradient descent on it CANNOT get stuck, and with a
suitably small Ξ· it converges to the best possible weights
whether or not the data is separable.
A worked convergence
TRAINING A SINGLE LINEAR UNIT to learn y = 2x, with Ξ· = 0.1 and
w starting at 0. (No bias, for clarity.)
Training set: (x, t) = (1, 2), (2, 4), (3, 6)
EPOCH 1, updating after each example (stochastic):
x = 1, t = 2: y = 0(1) = 0
Ξ΄ = 2 β 0 = 2
w β 0 + 0.1(2)(1) = 0.2
x = 2, t = 4: y = 0.2(2) = 0.4
Ξ΄ = 4 β 0.4 = 3.6
w β 0.2 + 0.1(3.6)(2) = 0.92
x = 3, t = 6: y = 0.92(3) = 2.76
Ξ΄ = 6 β 2.76 = 3.24
w β 0.92 + 0.1(3.24)(3) = 1.892
END OF EPOCH 1: w = 1.8920, SSE = 0.1633
SUBSEQUENT EPOCHS:
epoch 2: w = 1.9942, SSE = 0.000476
epoch 3: w = 1.9997, SSE = 0.000001
epoch 4: w = 2.0000, SSE = 0.000000
CONVERGED TO THE EXACT ANSWER IN FOUR EPOCHS, and note how the
error falls: 0.16 β 0.0005 β 0.000001. THE CONVERGENCE IS
GEOMETRIC, because each step reduces the remaining error by a
roughly constant factor β which is the behaviour of gradient
descent on a quadratic.
CONTRAST WITH THE PERCEPTRON TRACE of the previous topic, which
took six epochs on four examples and WANDERED β reaching a
good weight vector, moving away, and returning. THE DELTA RULE
APPROACHES MONOTONICALLY, because every step reduces a
continuous error rather than merely correcting a
classification.
THE TWO FORMS OF THE RULE, and the distinction is examinable:
BATCH (TRUE GRADIENT DESCENT)
accumulate Ξwα΅’ = Ξ· Ξ£β Ξ΄β xα΅’β over the whole training set,
then apply it once
β this is the TRUE gradient of E, so the descent direction is
exact
β converges to the global minimum for sufficiently small Ξ·
β one update per epoch
INCREMENTAL / STOCHASTIC (the LMS rule)
apply Ξwα΅’ = Ξ· Ξ΄ xα΅’ after each example
β many more updates per epoch, so much faster in practice
β the noise can help escape poor regions in nonlinear
networks
β it only APPROXIMATES gradient descent, and does not settle
exactly at the minimum β it hovers near it, in a region
whose size is proportional to Ξ·
β this is why the learning rate is often decayed toward the
end of training: the hovering shrinks with Ξ·.
THE WORKED EXAMPLE ABOVE USED THE INCREMENTAL FORM, which is
why it converged in four epochs rather than needing many more.
Comparison, and what the delta rule enabled
THE THREE LEARNING RULES SO FAR, side by side:
PERCEPTRON DELTA RULE
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
output step (0/1) LINEAR (real-valued)
error used classification the actual difference
right/wrong t β y
error function none explicit E = Β½Ξ£(t β y)Β²
method error GRADIENT DESCENT
correction
if separable converges to a converges to the
perfect minimum-error solution
separator
if NOT NEVER CONVERGES to the best
separable TERMINATES β linear approximation
oscillates
forever
guarantee finite steps asymptotic; global minimum
when separable (the surface is convex)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
THE PRACTICALLY IMPORTANT ROW IS "IF NOT SEPARABLE". Real data is
noisy and overlapping, so the perceptron's guarantee is
frequently void β and the algorithm's behaviour in that case is
to cycle indefinitely without any indication that it will never
finish. THE DELTA RULE DEGRADES GRACEFULLY, returning the best
available linear fit. THAT IS WHY IT IS THE PRACTICAL RULE.
A SUBTLETY WORTH KNOWING: when the data IS separable, the delta
rule may produce a boundary that MISCLASSIFIES an example the
perceptron would have got right β because it minimises SQUARED
ERROR rather than counting mistakes, and a distant correctly
classified point can pull the boundary. THE TWO RULES OPTIMISE
DIFFERENT THINGS, and neither dominates on every dataset.
WHAT THE DELTA RULE ENABLED β its real historical significance:
1. IT MADE LEARNING A GRADIENT-DESCENT PROBLEM. Once the error
is a differentiable function of the weights, the whole
machinery of optimisation applies β learning rates,
momentum, adaptive methods, all from the previous topic.
2. IT REQUIRED A DIFFERENTIABLE ACTIVATION, which is why the
step function had to go. That, in turn, is what made the
sigmoid the standard hidden activation for decades.
3. IT GENERALISES TO NONLINEAR UNITS. With a differentiable
activation f, the derivation gains one factor:
βE/βwα΅’ = β(t β y) Β· fβ²(net) Β· xα΅’
so Ξwα΅’ = Ξ· (t β y) fβ²(net) xα΅’
THAT EXTRA fβ²(net) IS THE ONLY CHANGE, and it is exactly the
term that appears in backpropagation's output layer. The
delta rule IS backpropagation for a single-layer network.
4. IT DOES NOT SOLVE THE HIDDEN-LAYER PROBLEM. The rule still
needs a target t, and a hidden unit has none. Supplying that
missing target β by propagating the output error backward
through the weights β is precisely what backpropagation
adds, and it is the subject of a later topic in this
section.
THE ONE-LINE SUMMARY: THE DELTA RULE IS GRADIENT DESCENT ON
SQUARED ERROR FOR ONE LAYER. Everything after it in this section
is that idea extended β to nonlinear units, then to many layers.
The delta rule and the perceptron rule are algebraically identical β Ξwα΅’ = Ξ·(t β y)xα΅’ in both β and mean entirely different things, because one takes y from a step function and the other from a linear unit. That single substitution turns a mistake-correction heuristic into gradient descent.
π Go further: the delta rule is still deployed under a different name. As the LMS (least mean squares) algorithm it is the standard adaptive filter in signal processing β echo cancellation on a telephone line, noise cancelling in headphones, channel equalisation in a modem. Widrow's original motivation was exactly this, and the reason it survives is the property this topic emphasises: it tracks a changing target continuously and degrades gracefully rather than failing, which is what a live signal requires. Search "LMS adaptive filter echo cancellation Widrow".
π‘ Exam angle: derive the delta rule from E = Β½(t β y)Β² by differentiating and substituting into gradient descent β showing where the Β½ cancels β to obtain Ξwα΅’ = Ξ·(t β y)xα΅’. Explain that the algebra matches the perceptron rule but the meaning differs because y is linear rather than a step, so the update is proportional to the size of the error. Be ready to trace training by hand for a few examples. Distinguish batch from incremental (LMS) forms. The key comparison question is perceptron versus delta rule: the perceptron converges to a perfect separator when the data is separable and never terminates otherwise, while the delta rule converges to the minimum-error solution either way because the error surface is convex. Note the extension Ξwα΅’ = Ξ·(t β y)fβ²(net)xα΅’ for a nonlinear unit.
Syllabus points
Delta (Widrow-Hoff) learning rule
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.