Supervised learning in artificial neural networks

SupreethGowda24 74 views 120 slides Mar 22, 2024
Slide 1
Slide 1 of 120
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86
Slide 87
87
Slide 88
88
Slide 89
89
Slide 90
90
Slide 91
91
Slide 92
92
Slide 93
93
Slide 94
94
Slide 95
95
Slide 96
96
Slide 97
97
Slide 98
98
Slide 99
99
Slide 100
100
Slide 101
101
Slide 102
102
Slide 103
103
Slide 104
104
Slide 105
105
Slide 106
106
Slide 107
107
Slide 108
108
Slide 109
109
Slide 110
110
Slide 111
111
Slide 112
112
Slide 113
113
Slide 114
114
Slide 115
115
Slide 116
116
Slide 117
117
Slide 118
118
Slide 119
119
Slide 120
120

About This Presentation

Supervised learning in artificial neural networks, perceptrons and LMS


Slide Content

1/120
Supervised Learning I:
Perceptrons and LMS
Instructor: Tai-Yue (Jason) Wang
Department of Industrial and Information Management
Institute of Information Management

2/120
Two Fundamental Learning
Paradigms
Non-associative
an organism acquires the properties of a single
repetitive stimulus.
Associative
an organism acquires knowledge about the
relationship of either one stimulus to another, or one
stimulus to the organism’s own behavioral response to
that stimulus.

3/120
Examples of Associative
Learning(1/2)
Classical conditioning
Association of an unconditioned stimulus(US) with a
conditioned stimulus(CS).
CS’s such as a flash of light or a sound tone produce
weak responses.
US’s such as food or a shock to the leg produce a
strong response.
Repeated presentation of the CS followed by the US,
the CS begins to evoke the response of the US.
Example: If a flash of light is always followed by
serving of meat to a dog, after a number of learning
trials the light itself begins to produce salivation.

4/120
Examples of Associative
Learning(2/2)
Operant conditioning
Formation of a predictive relationship between a
stimulus and a response.
Example:
Place a hungry rat in a cage which has a lever on
one of its walls. Measure the spontaneous rate at
which the rat presses the lever by virtue of its
random movements around the cage. If the rat is
promptly presented with food when the lever is
pressed, the spontaneous rate of lever pressing
increases!

5/120
Reflexive and Declarative Learning
Reflexive learning
repetitive learning is involved and recall does not
involve any awareness or conscious evaluation.
Declarative learning
established by a single trial or experience and
involves conscious reflection and evaluation for its
recall.
Constant repitition of declarative knowledge
often manifest itself in reflexive form.

6/120
Two distinct stages:
short-term memory (STM)
long-term memory(LTM)
Inputs to the brain are
processed into STMs
which last at the most for a
few minutes.
Important Aspects of Human
Memory(1/4)
Recall process of these memories
is distinct from the memories
themselves.
Memory
recalled
SHORT TERM MEMORY
(STM)
LONG TERM MEMORY
(LTM)
Download
Input
stimulus
Recall
Process

7/120
Information is
downloaded into
LTMs for more
permanent storage:
days, months, and
years.
Capacity of LTMs is
very large.
Important Aspects of Human
Memory(2/4)
Recall process of these memories
is distinct from the memories
themselves.
Memory
recalled
SHORT TERM MEMORY
(STM)
LONG TERM MEMORY
(LTM)
Download
Input
stimulus
Recall
Process

8/120
Important Aspects of Human
Memory(3/4)
Recall of recent memories is more easily
disrupted than that of older memories.
Memories are dynamic and undergo
continual change and with time all
memories fade.
STM results in
physical changes in sensory receptors.
simultaneous and cohesive reverberation of
neuron circuits.

9/120
Important Aspects of Human
Memory(4/4)
Long-term memory involves
plastic changes in the brain which take the form of
strengthening or weakening of existing synapses
the formation of new synapses.
Learning mechanism distributes the memory
over different areas
Makes robust to damage
Permits the brain to work easily from partially
corrupted information.
Reflexive and declarative memories may
actually involve different neuronal circuits.

10/120
Learning Algorithms(1/2)
Define an architecture-dependent procedure to
encode pattern informationinto weights
Learning proceeds by modifying connection
strengths.
Learning is data driven:
A set of input–output patterns derived from a
(possibly unknown) probability distribution.
Output pattern might specify a desired system response for
a given input pattern
Learning involves approximating the unknown function as
described by the given data.

11/120
Learning Algorithms(2/2)
Learning is data driven:
Alternatively, the data might comprise patterns that
naturally cluster into some number of unknown
classes
Learning problem involves generating a suitable
classification of the samples.

12/120
Supervised Learning(1/2)
Data comprises a set
of discrete samples
drawn from the
pattern space where
each sample relates
an input vector X
k ∈
R
n
to an output vector
D
k ∈R
p
.-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
-20
-15
-10
-5
0
5
10
15
20
x
f(x)
3 x
5
-1.2 x
4
-12.27 x
3
+3.288 x
2
+7.182 x   
Q
kkkDXT
1
,


An example function described
by a set of noisy data points

13/120
Supervised Learning(2/2)
The set of samples
describe the behavior
of an unknown
function f : R
n
→ R
p
which is to be
characterized. -2 -1.5 -1 -0.5 0 0.5 1 1.5 2
-20
-15
-10
-5
0
5
10
15
20
x
f(x)
3 x
5
-1.2 x
4
-12.27 x
3
+3.288 x
2
+7.182 x
An example function described
by a set of noisy data points

14/120
The Supervised Learning Procedure
We want the system to generate an output D
kin
response to an input X
k, and we say that the system has
learnt the underlying map if a stimulus X
k’close to X
k
elicits a response S
k’which is sufficiently close to D
k.
The result is a continuous function estimate.
Error information fed back for network adaptation
ErrorS
k
Neural Network
D
x
X
k

15/120
Unsupervised Learning(1/2)
Unsupervised learning provides the system with
an input X
k, and allow it to self-organizeits
weights to generate internal prototypes of sample
vectors. Note: There is no teaching input involved
here.
The system attempts to represent the entire data
set by employing a small number of prototypical
vectors—enough to allow the system to retain a
desired level of discrimination between samples.

16/120
Unsupervised Learning(2/2)
As new samples continuously buffer the system,
the prototypes will be in a state of constant flux.
This kind of learning is often called adaptive
vector quantization

17/120
Clustering and Classification(1/3)
Given a set of data
samples {X
i}, X
i ∈R
n
,
is it possible to identify
well defined “clusters”,
where each cluster
defines a class of
vectors which are
similar in some broad
sense?-1.5-1-0.50 0.51 1.52 2.5
-0.5
0
0.5
1
1.5
2
2.5
Cluster centroids
Cluster 1
Cluster 2

18/120
Clustering and Classification(2/3)
Clusters help establish a
classification structure
within a data set that has
no categories defined in
advance.
Classes are derived from
clusters by appropriate
labeling.-1.5-1-0.50 0.51 1.52 2.5
-0.5
0
0.5
1
1.5
2
2.5
Cluster centroids
Cluster 1
Cluster 2

19/120
Clustering and Classification(3/3)
The goal of pattern
classification is to
assign an input pattern
to one of a finite
number of classes.
Quantization vectors
are called codebook
vectors.-1.5-1-0.50 0.51 1.52 2.5
-0.5
0
0.5
1
1.5
2
2.5
Cluster centroids
Cluster 1
Cluster 2

20/120
Characteristics of Supervised and
Unsupervised Learning

21/120
General Philosophy of Learning:
Principle of Minimal Disturbance
Adapt to reduce the output error for the
current training pattern, with minimal
disturbance to responses already learned.

22/120
Error Correction and Gradient
Descent Rules
Error correction rulesalter the weights of a
network using a linear error measureto reduce
the error in the output generated in response to
the present input pattern.
Gradient rulesalter the weights of a network
during each pattern presentation by employing
gradient informationwith the objective of
reducing the mean squared error (usually
averaged over all training patterns).

23/120
Learning Objective for TLNs(1/4)
Augmented Input and
Weight vectors
Objective: To design the
weights of a TLN to
correctly classify a given
set of patterns.
S
+1
W
OX
1
X
2
X
n
W
1
W
2
W
n

 
 
1
10
1
10
,,,
,,,




n
k
T
k
n
kk
k
n
k
T
k
n
k
k
RWwwwW
RXxxxX

24/120
Learning Objective for TLNs(2/4)
Assumption: A training
set of following form is
given
Each pattern X
kis tagged
to one of two classes C
0
or C
1denoted by the
desired output d
k being 0
or 1 respectively.
S
+1
W
OX
1
X
2
X
n
W
1
W
2
W
n

   1,0 , ,
1
1


 k
n
K
Q
kkk dRXDXT

25/120
Learning Objective for TLNs(3/4)
Two classes identified by two possible signal
states of the TLN
C
0by a signal S(y
k) = 0,C
1by a signal S(y
k) = 1.
Given two sets of vectors X
0andX
1
belonging to classes C
0and C
1respectively
the learning procedure searches a solution
weight vector W
Sthat correctly classifies the
vectors into their respective classes.

26/120
Learning Objective for TLNs(4/4)
Context: TLNs
Find a weight vectorW
Ssuch that for all X
k∈X
1,
S(y
k) = 1; and for all X
k∈X
0, S(y
k) = 0.
Positive inner products translate to a +1 signal
and negative inner products to a 0 signal
Translates to saying that for all X
k∈X
1, X
k
T
W
S
> 0; and for all X
k∈X
0, X
k
T
W
S< 0.

27/120
Pattern Space(1/2)
Points that satisfy X
T
W
S
= 0define a separating
hyperplane in pattern
space.
Two dimensional case:
Pattern space points on
one side of this
hyperplane (with an
orientation indicated by
the arrow) yield positive
inner products with W
S
and thus generate a +1
neuron signal.
Activation

28/120
Pattern Space(2/2)
Two dimensional case:
Pattern space points on
the other side of the
hyperplane generate a
negative inner product
with W
Sand consequently
a neuron signal equal to 0.
Points in C
0andC
1are
thus correctly classified
by such a placement of
the hyperplane.
Activation

29/120
A Different View: Weight Space
(1/2)
Weight vector is a variable
vector.
W
T
X
k = 0represents a
hyperplane in weight space
Always passes through the
origin sinceW = 0is a
trivial solution ofW
T
X
k=
0.

30/120
A Different View: Weight Space
(2/2)
Called the pattern
hyperplane of pattern
X
k.
Locus of all pointsW
such thatW
T
X
k= 0.
Divides the weight
space into two parts:
one which generates a
positive inner product
W
T
X
k > 0, and the
other a negative inner
product W
T
X
k<0.

31/120
Identifying a Solution Region from
Orientated Pattern Hyperplanes(1/2)
For each pattern X
kin
pattern space there is a
corresponding
hyperplane in weight
space.
For every point in
weight space there is a
corresponding
hyperplane in pattern
space.
W
2
X
3 X
2
X
1
X
4
W
1
Solution region

32/120
Identifying a Solution Region from
Orientated Pattern Hyperplanes(2/2)
A solution region in
weight space with
four pattern
hyperplanes

1= {X
1,X
2}

0= {X
3,X
4}
W
2
X
3 X
2
X
1
X
4
W
1
Solution region

33/120
Requirements of the Learning
Procedure
Linear separability guarantees the existence of a
solution region.
Points to be kept in mind in the design of an
automated weight update procedure :
It must consider each pattern in turn to assess the correctness of
the present classification.
It must subsequently adjust the weight vector to eliminate a
classification error, if any.
Since the set of all solution vectors forms a convex cone, the
weight update procedure should terminate as soon as it penetrates
the boundary of this cone (solution region).

34/120
Design in Weight Space(1/3)
Assume: X
k ∈X
1and
W
k
T
X
kas erroneously
non-positive.
For correct
classification, shift the
weight vector to some
position W
k+1where
the inner product is
positive.
W
k+1
W
k
W
k
T
X
k>0
W
T
X
k<0
X
k

35/120
Design in Weight Space(2/3)
The smallest
perturbation in W
k
that produces the
desired change is, the
perpendicular distance
from W
konto the
pattern hyperplane.
W
k+1
W
k
W
k
T
X
k>0
W
T
X
k<0
X
k

36/120
Design in Weight Space(3/3)
In weight space, the
direction
perpendicular to the
pattern hyperplane is
none other than that
of X
kitself.
W
k+1
W
k
W
k
T
X
k>0
W
T
X
k<0
X
k

37/120
Simple Weight Change Rule:
Perceptron Learning Law
If X
k ∈X
1and W
k
T
X
k< 0add a fraction of the
pattern to the weight W
kif one wishes the inner
product W
k
T
X
kto increase.
Alternatively, if X
k ∈X
0, and W
k
T
X
kis erroneously
non-negative we will subtract a fraction of the
pattern from the weight W
kin order to reduce this
inner product.

38/120
Weight Space Trajectory
The weight space
trajectory
corresponding to the
sequential presentation
of four patterns with
pattern hyperplanes as
indicated:

1= {X
1,X
2}and

0= {X
3,X
4}
X
3 X
2
X
1
X
4
W
1
Solution region
W
2

39/120
Linear Containment
Consider the set X
0’in which each element X
0is
negated.
Given a weight vectorW
k, for any X
k∈X
1∪X
0’,
X
k
T
W
k > 0implies correct classification and
X
k
T
W
k < 0implies incorrect classification.
X‘ = X
1∪X
0’is called the adjusted training set.
Assumption of linear separability guarantees the
existence of a solution weight vector W
S, such
that X
k
T
W
S> 0 ∀X
k∈X
We say X’is a linearly contained set.

40/120
Recast of Perceptron Learning with
Linearly Contained Data
Since X
k∈X’, a misclassification of X
kwill add

kX
kto W
k.
ForX
k∈X
0‘, X
kactually represents the negative of
the original vector.
Therefore addition of 
kX
kto W
kactually
amounts to subtraction of the original vector from
W
k.

41/120
Perceptron Algorithm:
Operational Summary

42/120
Perceptron Convergence
Theorem
Given: A linearly contained training set X’and
any initial weight vectorW
1.
Let S
Wbe the weight vector sequence generated
in response to presentation of a training
sequence S
Xupon application of Perceptron
learning law. Then for some finite index k
0we
have: W
k0= W
k0+1 = W
k0+2 = ・・・= W
S
as a solution vector.
See the text for detailed proofs.

43/120
Hand-worked Example
S
+1
W
O
W
1
W
2
X
1
X
2
Binary threshold neuron

44/120
Classroom Exercise(1/2)

45/120
Classroom Exercise(2/2)

46/120
MATLAB Simulation-0.2 0 0.2 0.4 0.6 0.8 1 1.2
-0.5
0
0.5
1
1.5
2
2.5
3
x
1
x
2
(0,0) (1,0)
(0,1) (1,1)
R
2
(a) Hyperplane movement depicted during Perceptron Learning
k=5
k=15
k=25
k=35
-4
-3
-2
-1
0
0
0.5
1
1.5
2
2.5
3
0
1
2
3
w
0
(b) Weight space trajectories: W
0
= (0,0,0), W
S
=(-4 3 2)
w
1
w
2

47/120
Perceptron Learning and Non-
separable Sets
Theorem:
Given a finite set of training patterns X, there
exists a number Msuch that if we run the
Perceptron learning algorithm beginning with
any initial set of weights,W
1, then any weight
vector W
kproduced in the course of the
algorithm will satisfyW
k≤ W
1+M

48/120
Two Corollaries(1/2)
If, in a finite set of training patterns X, each
pattern X
khas integer (or rational) components
x
i
k
, then the Perceptron learning algorithm will
visit a finite set of distinct weight vectors W
k.

49/120
Two Corollaries(2/2)
For a finite set of training patterns X, with
individual patterns X
khaving integer (or
rational) components x
i
k
the Perceptron learning
algorithm will, in finite time, produce a weight
vector that correctly classifies all training
patterns iff Xis linearly separable, or leave and
re-visit a specific weight vector iff X is linearly
non-separable.

50/120
Handling Linearly Non-separable
Sets: The Pocket Algorithm(1/2)
Philosophy: Incorporate positive reinforcement in
a way to reward weights that yield a low error
solution.
Pocket algorithm works by remembering the
weight vector that yields the largest number of
correct classifications on a consecutive run.

51/120
Handling Linearly Non-separable
Sets: The Pocket Algorithm(2/2)
This weight vector is kept in the “pocket”, and
we denote it as W
pocket.
While updating the weights in accordance with
Perceptron learning, if a weight vector is
discovered that has a longer run of consecutively
correct classifications than the one in the pocket,
it replaces the weight vector in the pocket.

52/120
Pocket Algorithm:
Operational Summary(1/2)

53/120
Pocket Algorithm:
Operational Summary(2/2)

54/120
Pocket Convergence Theorem
Given a finite set of training examples, X,
and a probabilityp< 1, there exists an
integer k
0such that after any k > k
0
iterations of the pocket algorithm, the
probability that the pocket weight
vectorW
pocketis optimal exceeds p.

55/120
Linear Neurons and Linear Error
Consider a training set of the form T = {X
k,
d
k}, X
k ∈R
n+1
, d
k∈R.
To allow the desired output to vary smoothly or
continuously over some interval consider a
linear signal function: s
k= y
k= X
k
T
W
k
The linear error e
kdue to a presented training
pair (X
k, d
k), is the difference between the
desired output d
kandthe neuronal signal s
k:
e
k= d
k− s
k= d
k − X
k
T
W
k

56/120
Operational Details of –LMS
–LMS error correction is
proportional to the error
itself
Each iteration reduces the
error by a factor of η.
ηcontrols the stability and
speed of convergence.
Stability ensured
if 0 < η < 2.
S
k=X
k
T
W
k
+1
W
O
W
1
k
W
2
k
W
n
k
X
1
k
X
2
k
X
n
k

57/120
–LMS Works with Normalized
Training Patterns
x
3
x
k
W
k+1
W
k
W
k
x
1
x
2

58/120
–LMS: Operational Summary

59/120
MATLAB Simulation Example
Synthetic data set
shown in the figure is
generated by artificially
scattering points around
a straight line: y = 0.5x
+ 0.333and generate a
scatter of 200 points in
a ±0.1 interval in the y
direction.-2 -1 0 1 2
-20
-15
-10
-5
0
5
10
x
f = 3x(x-1)(x-1.9)(x+0.7)(x+1.8)

60/120
MATLAB Simulation Example
This is achieved by first
generating a random
scatter in the interval
[0,1].
Then stretching it to the
interval [−1, 1], and
finally scaling it to ±0.1-2 -1 0 1 2
-20
-15
-10
-5
0
5
10
x
f = 3x(x-1)(x-1.9)(x+0.7)(x+1.8)

61/120
Computer Simulation of -LMS
Algorithm0.20.40.60.8 1 1.21.41.61.8 2
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
x
y
Iteration 1
Iteration 10
Iteration 50 (MSE = 0.04)

62/120
A Stochastic Setting
Assumption that the training set Tis well defined
in advance is incorrect when the setting is
stochastic.
In such a situation, instead of deterministic
patterns, we have a sequence of samples {(X
k,
d
k)}assumed to be drawn from a statistically
stationarypopulation or process.
For adjustment of the neuron weights in response
to some pattern-dependent error measure, the
error computation has to be based on the
expectation of the error over the ensemble.

63/120
Definition of Mean Squared Error
(MSE)(1/2)
We introduce the square error on a pattern X
kas
Assumption: The weights are held fixed at W
k
while computing the expectation. 
  (2) 2
2
1

(1)
2
1
2
1
2
2
2
k
T
kk
T
kk
T
kkk
kk
T
kkk
WXXWWXdd
eWXd



64/120
Definition of Mean Squared Error
(MSE)(2/2)
The mean-squared error can now be computed by
taking the expectation on both sides of (2):     (3)
2
1
2
1
2
k
T
kk
T
kk
T
kkkk WXXEWWXdEdEE 

65/120
To find optimal weight vector that
minimizes the mean-square error.
Our problem…

66/120
Cross Correlations(1/2)
For convenience of expression we define the
pattern vector P as the cross-correlation between
the desired scalar output, d
k, and the input vector,
X
k
and the input correlation matrix, R, as    (4) ,,,dE
1k
k
nk
k
kk
T
k
T
xdxddEXP    (5)



1
E
1
1111
1
k















k
n
k
n
kk
n
k
n
k
n
kkkk
k
n
k
T
k
xxxxx
xxxxx
xx
EXXR


67/120
Cross Correlations (2/2)
Using Eqns. (4)-(5), we rewrite the MSE
expression of Eqn. (3) succinctly as
Note that since the MSE is a quadratic
function of the weights it represents a bowl
shaped surface in the (n+1) x 1weight—
MSE cross space.  (6)
2
1
2
1
2
k
T
kk
T
kk RWWWPdEE 

68/120
First compute the gradient by straightforward
differentiation which is a linear function of
weights
To find the optimal set of weights, , simply set
which yields
Finding the Minimum Error(1/2) (7) ,,
0
RWP
ww
T
n















  W
ˆ 0 (8)
ˆ
PWR

69/120
This system of equations (8) is called the Weiner-
Hopf systemand its solution is the Weiner solution
or theWeiner filter
is the point in weight space that represents the
minimum mean-square error
Finding the Minimum Error (2/2)(9)
ˆ
1
PRW

 min

70/120
Computing the Optimal Filter(1/2)
First compute and . Substituting from Eqn.
(9) into Eqn. (6) yields:1
R P 

 (12)
ˆ
2
1
2
1

(11)
2
1
2
1

(10)
ˆˆˆ
2
1
2
1
2
1112
2
min
WPdE
PRPPRRPRdE
WPWRWdE
T
k
T
T
k
TT
k





71/120
Computing the Optimal Filter(2/2)
For the treatment of weight update procedures we
reformulate the expression for mean-square error
in terms of the deviation , of the weight
vector from the Weiner solution.WWV
ˆ


72/120
Substituting into Eqn. (6)
Computing R(1/2)WVW
ˆ
    

    (16)
ˆˆˆ
2
1

(15)
2
1

(14)
ˆˆˆˆˆ
2
1

(13)
ˆˆˆ
2
1
min
min
22
ˆ
2
2
2
1
WWRWWRWW
RVV
WPVPWRWRVWWRVRVVdE
WVPWVRWVdE
TT
T
TTT
VPRVRPRVW
TTT
k
T
T
k
TTT




















73/120
Note that since the mean-square error is
non-negative, we must have . This
implies that Ris positive semi-definite.
Usually however, Ris positive definite.
Computing R(2/2) 0RVV
T

74/120
Assume that Rhas distinct eigenvalues . Then we
can construct a matrix Qwhose columns are
corresponding eigenvectors of R.
R can be diagonalized using an orthogonal similarity
transformation as follows. Having constructed Q, and
knowing that:i i   (17)
n10 Q   (18)
0

0 0
0 0

n
1
0
n10























RQ
We have  (19) ,,,,
210
1
ndiagDRQQ  

Diagonalization of R

75/120
It is usual to choose the eigenvectors of Rto be
orthonormal and .
Then
From Eqn. (15) we know that the shape of is a
bowl-shaped paraboloid with a minimum at the
Weiner solution (V=0, the origin of V-space).
Slices of parallel to the W space yield elliptic
constant error contours which define the weights in
weight space that the specific value of the square-error
(say ) at which the slice is made: IQQ
T
 T
QQ
1 1
 QDQQDQR
T   c (20) constant
2
1
min εεRVV
c
T

Some Observations

76/120
Also note from Eqn. (15) that we can compute
the MSE gradient in V-space as,
which defines a family of vectors in V-space.
Exactly n+1of these pass through the origin of
V-space and these are the principal axes of the
ellipse.
Eigenvectors of R(1/2)(21) RV ,
'
V

77/120
However, vectors passing through the origin
must take the . Therefore, for the principal
axes
Clearly, is an eigenvector of R.
Eigenvectors of R(2/2)V ,
'
V (22)
''
VRV '
V

78/120
Steepest Descent Search with Exact
Gradient Information
Steepest descent search
uses exact gradient
information available
from the mean-square
error surface to direct
the search in weight
space.
The figure shows a
projection of the
square-error function on
the plane.k
iw

79/120
Steepest Descent Procedure
Summary(1/2)
Provide an appropriate weight incrementto to
push the error towards the minimum which
occurs at .
Perturb the weight in a directionthat depends on
which side of the optimal weightthe current
weight value lies.
If the weight component lies to the left of ,
say at , where the error gradient is negative (as
indicated by the tangent) we need to increase . k
iw iwˆ iwˆ k
iw
1 k
iw k
iw iwˆ k
iw

80/120
Steepest Descent Procedure
Summary(2/2)
If is on the right of , say at where the error
gradient is positive, we need to decrease .
This rule is summarized in the following
statement:iwˆ k
iw k
iw k
iw
2  
 
k
ii
k
ik
i
k
ii
k
ik
i
w increase , ww0,
w
ε
If
w decrease , ww0,
w
ε
If
ˆ
ˆ





81/120
It follows logically therefore, that the weight
component should be updated in proportion
with the negativeof the gradient:27 n,,0,1i
1













k
i
k
i
k
i
w
ww


Weight Update Procedure(1/3)

82/120
Vectorially we may write
where we now re-introduced the iteration time
dependence into the weight components: (28)
1 
 kkWW (29) ,,
0
T
k
n
k
ww














 
Weight Update Procedure(2/3)

83/120
Equation (28) is the steepest descent update
procedure. Note that steepest descent uses
exact gradient information at each step to
decide weight changes.
Weight Update Procedure(3/3)

84/120
Convergence of Steepest Descent –
1(1/2)
Question:What can one say about the
stability of the algorithm? Does it converge
for all values of ?
To answer this question consider the
following series of subtitutions and
transformations. From Eqns. (28) and (21) 
 
  (33)
ˆ
1
(32)
ˆ

(31)
(30)
1
WRWR
WWRW
RVW
WW
k
kk
kk
kk









85/120
Convergence of Steepest Descent –
1(2/2)
Transforming Eqn. (33) into V-space (the
principal coordinate system) by substitution
of for yields: WV
k
ˆ
 kW   (34)
1 kk VRIV 

86/120
Rotation to the principal axes of the elliptic
contours can be effected by using :
Steepest Descent Convergence –
2(1/2)'
QVV   (35)
''
1 kk QVRIQV 

or 
  (37)
(36)
'
'1'
1
k
kk
VDI
QVRIQV





87/120
where Dis the diagonal eigenvalue matrix.
Recursive application of
Eqn. (37) yields:
It follows from this that for stability and
convergence of the algorithm:
Steepest Descent Convergence –
2(2/2)
or  (38)
'
0
'
VDIV
k
k   (39) 0lim 

k
k
DI

88/120
This requires that
being the largest eigenvalue of R.  (40) 01lim
max

k
k

or(41)
2
0
max
 max
Steepest Descent Convergence –
3(1/2)

89/120
If this condition is satisfied then we have
Steepest descent is guaranteed to converge to
the Weiner solution as long as the learning rate
is maintained within the limits defined by Eqn.
(41). 
(43)
ˆ
lim
(42) 0
ˆ
limlim
k
1'
WW
WWQV
k
k
k
k
k





or
Steepest Descent Convergence –
3(2/2)

90/120
This simulation example employs the fifth
order function data scatter with the data
shifted in the y direction by 0.5.
Consequently, the values of R,Pand the
Weiner solution are respectively:
Computer Simulation
Example(1/2)(45)
3834.1
5303.1
ˆ
(44)
4625.1
8386.0
,
1.61 0.500
0.500 1





























W
PR

91/120
Exact gradient information is available
since the correlation matrix Rand the cross-
correlation matrix Pare known.
The weights are updated using the equation:
Computer Simulation
Example(2/2)  (46)
ˆ
2
1 kkk WWRWW 
 

92/120
eta = .01; %Set learning rate
R=zeros(2,2); %Initialize correlation matrix
X = [ones(1,max_points);x]; %Augment input vectors
P = (sum([d.*X(1,:); d.*X(2,:)],2))/max_points; % Cross-correlations
D = (sum(d.^2))/max_points; %squares; % target expectations
for k =1:max_points
R = R + X(:,k)*X(:,k)'; % Compute R
end
R = R/max_points;
weiner=inv(R)*P; % Compute the Weiner solution
errormin = D -P'*inv(R)*P; % Find the minimum error
MATLAB Simulation
Example(1/3)

93/120
shift1 = linspace(-12,12, 21); % Generate a weight space matrix
shift2 = linspace(-9,9, 21);
for i = 1:21 % Compute a weight matrix about
shiftwts(1,i) = weiner(1)+shift1(i); % Weiner solution
shiftwts(2,i) = weiner(2)+shift2(i);
end
for i=1:21 % Compute the error matrix
for j = 1:21 % to plot the error contours
error(i,j) = sum((d -(shiftwts(1,i) + x.*shiftwts(2,j))).^2);
end
end
error = error/max_points;
figure; hold on; % Plot the error contours
plot(weiner(1),weiner(2),'*k') % Labelling statements no shown
MATLAB Simulation Example(2/3)

94/120
w = 10*(2*rand(2,1)-1); % Randomize weights
w0 = w; % Remember the initial weights
for loop = 1:500 % Perform descent for 500 iters
w = w + eta*(-2*(R*w-P));
wts1(loop)=w(1); wts2(loop)=w(2);
End
% Set up weights for plotting
wts1=[w0(1) wts1]; wts2=[w0(2) wts2];
plot(wts1,wts2,'r') % Plot the weight trajectory
MATLAB Simulation Example (3/3)

95/120
Smooth Trajectory towards the
Weiner Solution
Steepest descent
uses exact
gradient
information to
search the
Weiner solution
in weight space.-10 -5 0 5 10
-10
-8
-6
-4
-2
0
2
4
6
8
55.3
90.1
125
160
160
160
160
194
194
229
229
264
264
299
333
368
w
0
w
1
Weiner solution
(1.53, -1.38)
W
0
= (-3.9, 6.27)
T

96/120
-LMS: Approximate Gradient
Descent(1/2)
The problem with steepest descent is that
true gradient information is only available
in situations where the data set is
completely specified in advance.
It is then possible to compute Rand P
exactly, and thus the true gradient at
iterationPRWk
k
:

97/120
-LMS: Approximate Gradient
Descent(2/2)
However, when the data set comprises a
random stream of patterns (drawn from a
stationary distribution), R and P cannot be
computed accurately. To find a correct
approximation one might have to examine
the data stream for a reasonably large period
of time and keep averaging out.
How long should we examine the stream to
get reliable estimates of R and P ?

98/120
Definition
The μ-LMS algorithm is convergent in the
meanif the average of the weight vector W
k
approaches the optimal solution W
optas the
number of iterations k, approaches infinity:
E[W
k] → W
optas k → ∞

99/120
The gradient computation modifies to:
where , and since we
are dealing with linear neurons. Note
therefore that the recursive update equation
then becomes
-LMS employs 
k for 
k(1/2)(47) ,,,
~
00
kk
T
k
n
k
k
k
k
T
k
n
k
k
k
k
Xe
w
e
w
e
e
ww


























 

  
kkk sde  k
T
kk WXs  
(49)
(48) )
~
(
1
kkk
kkkkkkk
XeW
XsdWWW





100/120
What value does the long term average of
converge to? Taking the Expectation of both
sides of Eqn. (47):
-LMS employs 
k for 
k(2/2)k
~   
(52)
(51)
(50)
~





PRW
WXXXdEXeEE
T
kkkkkkk

101/120
Since the long term average of
approaches , we can safely use as an
unbiased estimate. That’s what makes -
LMS work!
Since approaches in the long run,
one could keep collecting for a
sufficiently large number of iterations
(while keeping the weights fixed), and then
make a weight change collectively for all
those iterations together.k
~  k
~ k
~  k
~  kX
Observations(1/8)

102/120
If the data set is finite (deterministic), then
one can compute accurately by first
collecting the different gradients over all
training patterns for the same set of
weights. This accurate measure of the
gradient could then be used to change the
weights. In this situation-LMS is identical
to the steepest descent algorithm.k
~  kX
Observations(2/8)

103/120
Even if the data set is deterministic, we still use
to update the weights. After all if the data set
becomes large, collection of all the gradients
becomes expensive in terms of storage. Much
easier to just go ahead and use
Be clear about the approximation made: we are
estimating the true gradient (which should be
computed from ) by a gradient computed
from the instantaneous sample error .
Although this may seem to be a rather drastic
approximation, it works.k
~ 
kE k
Observations(3/8)

104/120
In the deterministic case we can justify this
as follows: if the learning rate , is kept
small, the weight change in each iteration
will be small and consequently the weight
vector W will remain “somewhat constant”
over Qiterations where Q is the number of
patterns in the training set. 
Observations(4/8)

105/120
Of course this is provided that Qis a small
number! To see this, observe the total weight
change , over Q iterations from the
iteration:W th
k (56)
(55)
1

(54)
1

(53)
1
0
1
0
1
0
k
Q
i
ik
k
Q
i k
ik
Q
i ik
ik
W
Q
QW
Q
WQ
Q
W
W






































 





Observations(5/8)

106/120
Where denotes the mean-square error. Thus
the weight updates follow the true gradient on
average. 
Observations(6/8)

107/120
Observe that steepest descent search is
guaranteed to search the Weiner solution
provided the learning rate condition (41) is
satisfied.
Now since is an unbiased estimate of
one can expect that -LMS too will search out
the Weiner solution. Indeed it does—but not
smoothly. This is to be expected since we are
only using an estimate of the true gradient for
immediate use.k
~ 
Observations(7/8)

108/120
Although -LMS and -LMS are similar
algorithms, -LMS works on the normalizing
training set. What this simply means is that -
LMS also uses gradient information, and will
eventually search out the Weiner solution-of the
normalized training set. However, in one case
the two algorithms are identical: the case when
input vectors are bipolar. (Why?)
Observations(8/8)

109/120
Definition 0.1 The -LMS algorithm is convergent in
the meanif the average of the weight vector
approaches the optimal solution as the number of
iterations k, approaches infinity:
Definition 0.2The -LMS algorithm is convergent in
the mean squareif the average of the squared error
approaches a constant as the Number of iterations, k,
approaches infinity:
-LMS Algorithm:
Convergence in the Mean (1)(1/2) kW W
ˆ  (57) kas
ˆ
WWE
k  k  (58) asconstant  kE
k

110/120
Convergence in the mean square is a
stronger criterion than convergence in the
mean. In this section we discuss
convergence in the mean and merely state
the result for convergence in the mean
square.
-LMS Algorithm:
Convergence in the Mean (1)(2/2)

111/120
Consider the -LMS weight update equation:
-LMS Algorithm:
Convergence in the Mean (2)(1/2) 
 
  (63) -I
(62) -
(61)
(60)
(59)
1
kkk
T
kk
kkk
T
kkk
kk
T
kkkk
kk
T
kkk
kkkkk
XdWXX
XdWXXW
XWXXdW
XWXdW
XsdWW











112/120
Taking the expectation of both sides of Eqn. (63)
yields,
where PandRare as already defined
-LMS Algorithm:
Convergence in the Mean (2)(2/2)   
  (65)
(64)
1
PWERI
XdEWEXXEIWE
k
kkk
T
kkk





113/120
Appropriate substitution yields:
Pre-multiplication throughout by results in:
-LMS Algorithm:
Convergence in the Mean (3)(1/2) 
 
  WQDQWEQDIQ
WQDQWEQDQQQ
WQDQWEQDQIWE
T
k
T
T
k
TT
T
k
T
k
ˆ

(66)
ˆ

ˆ
1






 T
Q   (67)
ˆ
1 WDQWEQDIWEQ
T
k
T
k
T
 

114/120
And subtraction of from both sides
gives:
We will re-write Eqn. (69) in familiar terms:
-LMS Algorithm:
Convergence in the Mean (3)(2/2)WQ
Tˆ    
   (69)
ˆ

(68)
ˆˆ
1
WWEQDI
WQDIWEQDIWWEQ
k
T
T
k
T
k
T




   (70)
~~
1 k
T
k
T
VQDIVQ 

115/120
And
where and . Eqn. (71)
represents a set of n+1Decoupled difference
equations:
-LMS Algorithm:
Convergence in the Mean (4)(1/2)  (71)
~

~ ''
1 kk VDIV 
 WWEV
kk
ˆ
~
 k
T
k VQV
~~'
   (72) n.,0,1,i
~
1
~ '
1
'

 k
i
i
k
i vv 

116/120
Recursive application of Eqn. (72) yields,
To ensure convergence in the mean, as
since this condition requires that the
deviation of from should tend to 0.
-LMS Algorithm:
Convergence in the Mean (4)(2/2)  (73) n ,0,1,i
~
1
~
0
''
 i
k
i
k
i vv  0
~'

k
iv k 
kWE W
ˆ

117/120
Therefore from Eqn. (73):
If this condition is satisfied for the largest
eigenvalue then it will be satisfied for all
other eigenvalues. We therefore conclude that if
then the -LMS algorithm is convergent in the
mean.
-LMS Algorithm:
Convergence in the Mean (5)(1/2)(74) n.,0,1,i 1 |1| 
i max (75)
2
0
max


118/120
Further, since tr= (where tr
is the trace of R) convergence is assured if
-LMS Algorithm:
Convergence in the Mean (5)(2/2)R max
0


n
i
i R 
(76)
2
0
Rtr


119/120
Random Walk towards the Weiner
Solution
Assume the
familiar fifth
order function
-LMS uses a
local estimate of
gradient to search
the Weiner
solution in weight
space.-10 -5 0 5 10
-10
-8
-6
-4
-2
0
2
4
6
44.96975
44.96975
44.96975
69.19828
69.19828
69.19828
69.19828
69.19828
93.42682
93.42682
93.42682
93.42682
93.42682
93.42682
117.6554
117.6554
117.6554
117.6554
117.6554
117.6554
141.8839
141.8839
141.8839
141.8839
141.8839
141.8839
166.1124
166.1124
166.1124
166.1124
190.341
190.341
190.341
190.341
214.5695
214.5695
Weiner solution
(0.339, -1.881)
 LMS solution
(0.5373, -2.3311)
w
0

w
1

120/120
Adaptive Noise Cancellation
Tags