Professional Documents
Culture Documents
Competitive Networks: Master Student: Jean Carlo Grandas F. Professor: Carlos Borrás P., PHD., MSC
Competitive Networks: Master Student: Jean Carlo Grandas F. Professor: Carlos Borrás P., PHD., MSC
November 4, 2020
The neurons on the output layer of the Hamming network compete with
each other to determine a winner. The winner indicates which pattern is
most representative of the input pattern.
Layer 1
In order to have multiple inputs to be classified, we need to have multiple
instar. Suppose that we want to recognize the following pattern.
p1 , p2 , ..., pQ
Then the weight matrix W1 , and the bias vector, b, will be:
T T
1w p1 R
2 w T p T R
2
W1 = . = .. ,b1 = .
.
. . ..
T
pQ T
Sw R
1
Each row of W represents a prototype vector which we want to recognize,
and each element of b1 is set equal to the number of elements in each
input vector (R).
Layer 2
Here, we want to decide which prototype vector is the closest to the input.
Instead of hardlim transfer function, we will use a competitive layer to
chose the closest prototype.
The neurons in this layers are initialized with the outputs of the
feedforward layer, which indicates the correlation between the prototype
pattern and input vector.
After competition, only one vector will have nonzero output.
a2 (0) = a1
a2 (t + 1) = poslin(W2 a2 (t))
The second layer weights W2 are set so that diagonal elements are 1, and
off-diagonal elements have a small negative value.
2 1, i = j
wij =
− i 6= j
This produces lateral inhibition, in which the output of each neuron has an
inhibitory effect on all of the other neurons.
X
ai2 (t + 1) = poslin ai2 (t) − aj2 (t)
j6=i
a = compet(n)
It works by finding the index i ∗ of the neuron with the largest net input,
and setting its output to 1.
As with the Hamming network, the prototype vectors are stored in rows of
W. The net input n calculates the distance between the input network p
and each prototype i w normalized to L. The angle between them is θi .
T 2
1w p L cosθ1
2 wT p L2 cosθ2
n = Wp = . = ..
.
. .
Sw
Tp L2 cosθS
We can now design the classifier by setting the rows of W to the desired
prototype vectors.
We would like a learning rule that could be used to train the weights in a
competitive network, without knowing the prototype vectors.
The row of the weight matrix that is closest to the input vector (or has the
largest inner product with the input vector) moves toward the input vector.
−0.1961 0.1961 0.9806
p1 = , p2 = , p3 =
0.9806 0.9806 0.1961
0.9806 −0.5812 −0.8137
p4 = ,p = ,p =
−0.1961 5 −0.8137 6 −0.5812
Our competitive network will have three neurons, and therefore it can
classify into three classes.
0.7071 0.7071 −1
1 w = , w = , w =
−0.7071 2 0.7071 3 0
0.7071 −0.7071 0
0.1961
a = compet(Wp2 ) = compet 0.7071 0.7071 = 1
0.9806
−1 0 0
First, the choice of learning rate force a trade-off between the speed of
learning and the stability of the final weight vectors.
Initial training can be done with a large learning rate for fast learning.
Then the learning rate can be decreased as training progresses, to achieve
stable prototype. However, this doesn’t work if the network needs to
continuously adapt to a new arrangement of input vectors.
The SOFM first determines the winning neuron i ∗ using the same
procedure as the competitive layer. Next, the weight vectors for all neuron
within a certain neighborhood of the winning neuron are updated with
Kohonen rule.
Each three element weight vector is represented in the left by a dot in the
sphere. The line connections are done to represent topology. To the right
we have a square region surface of a sphere, where we get the feature map
from.
Each time a vector is presented, the neuron with the closest weight vector
will win the competence. Then, the winning neuron move their weight
vectors closer to the input.
Weight vectors have two tendencies: first, they spread out over the input
space as more vectors are presented; second, they move toward the weight
vectors of neighboring neurons. Thus we rearrange to classify the input
space.
The input vectors were generate with equal probability from any point in
the input space. Therefore, the neurons classify roughly equal areas of the
input space.
Maps can also fail to properly fit topology. This usually occurs when two
pats of the net fit the topology of separate parts of the input space, but
the net forms a twist between them.
The learning rate can also be varied over time. An initial rate of 1 allows
neurons to quickly learn presented vectors. During training, the learning
rate decreases asymptotically toward 0 and it becomes stable.
In LVQ, each neuron in the first layer is assigned to one neuron in the
second layer. The number of networks in the first layer, S 1 , will therefore
be at least as large as the number of neurons in the second layers, S 2 , and
will usually be larger.
As with competitive network, each neuron in the first layer of the LVQ
network learns a prototype vector, which allows it to classify a region of the
input space.
ni0 = −
i w1 − p
In vector form,
1
1 w − p
1
2 w − p
n1 = − ..
1.
S w − p
Output is,
a1 = compet(n1 )