0% found this document useful (0 votes)
10 views10 pages

ML Lec12

The document discusses unsupervised learning in artificial neural networks, focusing on Hebbian learning and competitive learning. Hebbian learning allows networks to learn without a teacher by strengthening connections between neurons that activate together, while competitive learning involves neurons competing to be activated, with only the winning neuron updating its weights. The Kohonen network is highlighted as a model for self-organizing feature maps, demonstrating how input patterns can be mapped to output neurons based on competitive learning principles.

Uploaded by

luosuochao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views10 pages

ML Lec12

The document discusses unsupervised learning in artificial neural networks, focusing on Hebbian learning and competitive learning. Hebbian learning allows networks to learn without a teacher by strengthening connections between neurons that activate together, while competitive learning involves neurons competing to be activated, with only the winning neuron updating its weights. The Kohonen network is highlighted as a model for self-organizing feature maps, demonstrating how input patterns can be mapped to output neurons based on competitive learning principles.

Uploaded by

luosuochao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Lecture 12

Artificial neural networks: Unsupervised learning Introduction

◼ Introduction The main property of a neural network is an ability to


◼ Hebbian learning learn from its environment, and to improve its
◼ Generalized Hebbian learning algorithm performance through learning (over historical data). So
◼ Competitive learning far, we have considered supervised or active learning -
learning with an external “teacher” or a supervisor who
◼ Self-organizing computational map:
presents a training set to the network. The training set
Kohonen network contains inputs and desired outputs. But another type of
◼ Summary learning also exists: unsupervised learning.

◼ In contrast to supervised learning, unsupervised or self- Hebbian learning


organized learning does not require an external teacher.
During the training session, the neural network receives a In 1949, Donald Hebb proposed one of the key ideas in
number of different input patterns, discovers significant biological learning, commonly known as Hebb’s Law.
features in these patterns and learns how to classify input Hebb’s Law states that if neuron i is near enough to excite
data into appropriate categories. Unsupervised neuron j and repeatedly participates in its activation, the
learning tends to follow the neuro-biological organisation synaptic connection between these two neurons is
of the brain. strengthened and neuron j becomes more sensitive to
◼ Unsupervised learning algorithms aim to learn rapidly stimuli from neuron i.
and can be used in real-time.
Hebbian learning in a neural network
Hebb’s Law can be represented in the form of two rules:
1. If two neurons on either side of a connection are
activated synchronously, then the weight of that
connection is increased.
2. If two neurons on either side of a connection are
activated asynchronously, then the weight of that
connection is decreased.
Hebb’s Law provides the basis for learning without a
teacher. Learning here is a local phenomenon
occurring without feedback from the environment.

◼ Using Hebb’s Law we can express the adjustment ◼ Hebbian learning implies that weights can only
applied to the weight wij at iteration p in the following increase. To resolve this problem, we might impose a
form: limit on the growth of synaptic weights. It can be done
by introducing a non-linear forgetting factor into
Hebb’s Law:
◼ As a special case, we can represent Hebb’s Law as
follows:
where is the forgetting factor.
Forgetting factor usually falls in the interval between 0
where a is the learning rate parameter. This equation is
and 1, typically between 0.01 and 0.1, to allow only a
referred to as the activity product rule.
little “forgetting” while limiting the weight growth.
Hebbian learning algorithm
Step 3: Learning.
Step 1: Initialization.
Set initial synaptic weights and thresholds to small Update the weights in the network:
random values, say in an interval [0, 1 ]. wij ( p + 1) = wij ( p) + wij ( p)
Step 2: Activation. where Δwij(p) is the weight correction at iteration p.
Compute the neuron output at iteration p
The weight correction is determined by the generalized
step n
y j ( p) =  xi ( p) wij ( p) −  j activity product rule:
i =1 wij ( p) =  y j ( p)[  xi ( p) − wij ( p)]
where n is the number of neuron inputs, and θj is the Step 4: Iteration.
threshold value of neuron j.
Increase iteration p by one, go back to Step 2.

Hebbian learning example Initial and final states of the network


To illustrate Hebbian learning, consider a fully connected x1
1
1 1
1 y1 x
1
1 1
0 y1
feedforward network with a single layer of five computation
neurons. Each neuron is represented by a McCulloch and x2
0 2 2 0 y2 x
0 2 2 1 y2
Pitts model with the step activation function. The network is
trained on the following set of input vectors: x3 0 3 3
0 y3 x 0 3 3
0 y3

0 0 0 0 0 0 0 0 0


0 1 0 0 1 x4 4 4 y4 x 4 4 y4
         
X1 = 0 X 2 = 0 X 3 = 0 X 4 = 1 X 5 = 0 1 1 1 1
          x5 5 5 y5 x 5 5 y5
0 0 1 0 0 Input layer Output layer Input layer Output layer
0 1 0 0 1
◼ A test input
When this probe is presented to the network,
vector, or
Initial and final weight matrices probe, is
we obtain:
defined as
0 0 0 0 0  1 0.4940  0
1       
O u t pu t l a yer O u t pu t l a yer 0 0 2.0204 0 0 2.0204 0 0.2661  1
   
1 2 3 4 5 1 2 3 4 5
X = 0
= h 0
Y step 0 1.0200 0 0  0 − 0.0907  = 0
  0      
1 1 0 0 0 0 1 0 0 0 00 
0  0 0 0.9996 0  0 0.9478  0
0  
2 1 0 0 0 2
0 2.0204 0 0 2.0204 1 0 2.0204 0 0 2.0204 1 0.0737  1
 
3 0 0 1 0 0 3 0 0 1.0200 0 0 
    • Sure enough, the network has associated input x5 with outputs y2 and y5
4
0 0 0 1 0 4 0 0 00 .9996 0  because inputs x2 and x5 were coupled during training. But the network
5 0 0 0 0 1 5 0 2.0204 0 0 2.0204 cannot associate input x1 with output y1 anymore because unity input x1
did not appear during training and our network has lost the ability to
recognize it.
• Thus, a neural network really can learn to associate stimuli commonly
presented together, and most important, the network can learn without a
‘teacher’.

Competitive learning
◼ In competitive learning, neurons compete among ◼ The basic idea of competitive learning was introduced in
themselves to be activated. the early 1970s.

◼ While in Hebbian learning, several output neurons can ◼ In the late 1980s, Teuvo Kohonen introduced a special
be activated simultaneously, in competitive learning, only class of artificial neural networks called
a single output neuron is active at any time. self-organizing feature maps.
◼ The output neuron that wins the “competition” is called These maps are based on competitive learning.
the winner-takes-all neuron.
Feature-mapping Kohonen model
Kohonen layer Kohonen layer
What is a self-organizing feature map?
Our brain is dominated by the cerebral cortex, a very
complex structure of billions of neurons and hundreds
of billions of synapses. The cortex includes areas that
are responsible for different human activities (motor,
visual, auditory, somatosensory, etc.), and associated
with different sensory inputs. We can say that each
sensory input is mapped into a corresponding area of Input layer Input layer
the cerebral cortex. The cortex is a self-organizing
computational map in the human brain. 1 0 0 1
(a) (b)

The Kohonen network Architecture of the Kohonen Network

◼ The Kohonen model provides a topological mapping. It y1


places a fixed number of input patterns from the input x1
layer into a higher- dimensional output or Kohonen layer.
y2
◼ Training in the Kohonen network begins with the x2
winner’s neighborhood of a fairly large size. Then, as
training proceeds, the neighborhood size gradually y3
decreases.
Input Output
layer layer
The Mexican hat function of lateral connection
◼ The lateral connections are used to create a competition
between neurons. The neuron with the largest activation
Connection
level among all neurons in the output layer becomes the
1 strength
winner. This neuron is the only neuron that produces an
output signal. The activity of all other neurons is Excitatory
effect
suppressed in the competition.
◼ The lateral feedback connections produce excitatory or
inhibitory effects, depending on the distance from the 0 Distance
winning neuron. This is achieved using a Mexican hat
function which describes synaptic weights between Inhibitory Inhibitory
effect effect
neurons in the Kohonen layer.

◼ In the Kohonen network, a neuron learns by shifting its


weights from inactive connections to active ones. Only ◼ The overall effect of the competitive learning rule resides
the winning neuron and its neighborhood are allowed to in moving the synaptic weight vector Wj of the winning
learn. The extreme case is that only winning neuron can neuron j towards the input pattern X. The matching
learn and update its weights. criterion is equivalent to the minimum Euclidean
◼ The competitive learning rule defines the change Dwij distance between vectors.
applied to synaptic weight wij as ◼ The Euclidean distance between a pair of n-by-1 vectors
X and Wj is defined by
  ( xi − wij ), if neuron j wins the competition
 wij =  n 
1/ 2
 0, if neuron j loses the competition d = X − W j =  ( xi − wij ) 2 
 i =1 
where xi is the input signal and a is the learning rate
parameter. where xi and wij are the ith elements of the vectors X
and Wj, respectively.
◼ Suppose, for instance, that the 2-dimensional input vector
X is presented to the three-neuron Kohonen network,

◼ To identify the winning neuron, jX, that best matches the 0.52
input vector X, we may apply the following condition: X= 
0.12
j X = min X − W j , j = 1, 2, . . ., m
j ◼ The initial weight vectors, Wj, are given by

where m is the number of neurons in the Kohonen


0.27 0.42 0.43
layer. W1 =   W2 =   W3 =  
0.81 0.70 0.21

◼ We find the winning (best-matching) neuron jX


using the minimum-distance Euclidean criterion:
◼ The updated weight vector W3 at iteration (p + 1) is
d1 = ( x1 − w11) 2 + ( x2 − w21) 2 = (0.52 − 0.27) 2 + (0.12 − 0.81) 2 = 0.73 determined as:
d2 = ( x1 − w12) 2 + ( x2 − w22) 2 = (0.52 − 0.42) 2 + (0.12 − 0.70) 2 = 0.59
0.43  0.01 0.44
d3 = ( x1 − w13) 2 + ( x2 − w23) 2 = (0.52 − 0.43) 2 + (0.12 − 0.21) 2 = 0.13 W3( p + 1) = W3 ( p) + W3 ( p) =  + = 
0.21 − 0.01 0.20
◼ Neuron 3 is the winner and its weight vector W3 is
updated according to the competitive learning rule. ◼ The weight vector W3 of the wining neuron 3 becomes
w13 = ( x1 − w13) = 0.1 (0.52 − 0.43) = 0.01 closer to the input vector X with each iteration.

w23 = ( x2 − w23) = 0.1(0.12 − 0.21) = − 0.01


Step 2: Activation and Similarity Matching.
Competitive Learning Algorithm Activate the Kohonen network by applying the
input vector X, and find the winner-takes-all (best
Step 1: Initialization.
matching) neuron jX at iteration p, using the
Set initial synaptic weights to small random minimum-distance Euclidean criterion
values, say in an interval [0, 1], and assign a small 1/ 2
 n 
positive value to the learning rate parameter a. j X ( p) = min X − W j ( p) = [ xi − wij ( p)] 2  ,
j  i =1 
j = 1, 2, . . ., m
where n is the number of neurons in the input
layer, and m is the number of neurons in the
Kohonen layer.

Step 3: Learning.
Update the synaptic weights
Step 4: Iteration.
wij ( p + 1) = wij ( p) + wij ( p)
Increase iteration p by one, go back to Step 2 and
where Dwij(p) is the weight correction at iteration p. continue until the minimum-distance Euclidean
The weight correction is determined by the criterion is satisfied, or no noticeable changes
competitive learning rule: occur in the feature map.
 [ xi − wij ( p)] , j   j ( p)
wij ( p) = 
 0, j   j ( p)
where a is the learning rate parameter, and Lj(p) is
the neighbourhood function centred around the
winner-takes-all neuron jX at iteration p.
Initial random weights
Competitive learning in the Kohonen network
1

◼ To illustrate competitive learning, consider the Kohonen network 0.8

with 100 neurons arranged in the form of a two-dimensional 0.6

lattice with 10 rows and 10 columns. The network is required to 0.4


classify two-dimensional input vectors - each neuron in the 0.2
network should respond only to the input vectors occurring in its

W(2,j)
0
region. -0.2

◼ The network is trained with 1000 two-dimensional input vectors -0.4


generated randomly in a square region in the interval between –1 -0.6
and +1. The learning rate parameter a is equal to 0.1. -0.8

-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
W(1,j)

Network after 100 iterations Network after 1000 iterations


1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
W(2,j)

0 W(2,j)
0
-0.2
-0.2
-0.4
-0.4
-0.6
-0.6
-0.8
-0.8
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 -1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
W(1,j) W(1,j)
Network after 10,000 iterations
1

0.8

0.6

0.4

0.2
W(2,j)

-0.2

-0.4

-0.6

-0.8

-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
W(1,j)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy