Chapter 1 Neurophysiology and Learning Algorithms
Chapter 1 Neurophysiology and Learning Algorithms
Learning Algorithms
Dr. Gaur Sanjay B.C.
Introduction
• The human brain consists of an estimated 1011 (100 billion)
nerve cells or neurons, an example of which is shown in
Figure 1.1.
x1 x2 Output
0 0 0
0 1 1
1 0 1
1 1 1
Decision Line
x1+x2=θ=1
x1 x2 Output
0 0 0
0 1 0
1 0 0
1 1 1
AND GATE…
Decision Line
x1+x2=θ=2
1. v = 1 0 + 1 0 = 0
2. v = 1 0 + 11 = 1
3. v = 11 + 1 0 = 1 Figure 1.11 : Decision line for OR gate
4. v = 11 + 11 = 2
x1 x2 Output
0 0 1
0 1 1
1 0 1
1 1 1
Tautology …
Decision Line
x1+x2=θ=2
1. v = 1 0 + 1 0 = 0
2. v = 1 0 + 11 = 1
3. v = 11 + 1 0 = 1 Figure : Decision line for OR gate
4. v = 11 + 11 = 2
w1 = 1, w2 = 1
1. v = 1 0 + 1 0 = 0
2. v = 1 0 + 1 1 = 1 Figure : Decision line for XOR gate
3. v = 1 1 + 1 0 = 1
4. v = 1 1 + 1 1 = 2
To make XOR gate like decision, activation function should
be θ=0.5 and 1.5, it is not possible to solve it by single layer
perception.
• There is no way to arrange the position of a line x1+x2=θ so
that the correct two points lies on either side of the line. (try
it).
• The simple linear threshold unit cannot correctly perform the
XOR problem.
Solution of XOR problem
• The graph suggests that we could partition the space correctly
if we had three regions.
• One region belong to one output class, and the other two
belong to the other second output class.
• The fig. below show a network of linear threshold that
performs the proper partitioning.
Line2
x1+x2=θ=1.5
Line1
x1+x2=θ=0.5
• The addition of two hidden layer, or middle layer unit, give the
network, flexibility to solve the problem.
• In fact, the existence of this hidden layer gives us ability to
construct networks that can solve complex problem.
Approach for XOR (S.N. Deepa)
Example: Realize the XOR function using McCulloch Pitt Neuron.
We know that one layer neuron alone is not able to predict the
value of threshold for the neuron to fire, hence, another layer is
introduced.
• First part
x1 x2 Output Output
z1 z2
0 0 0 0
0 1 0 1
1 0 1 0
1 1 0 0
Output Output
z1 z2
0 0
0 1
1 0
0 0
v = w1 z1 + w2 z 2
1. z1 = 0, z 2 = 0, w1 = 1, w2 = 1
v = 1 0 + 1 0 = 0
2. z1 = 0, z 2 = 1, w1 = 1, w2 = 1
v = 1 0 + 1 1 = 1
3. z1 = 1, z 2 = 0, w1 = 1, w2 = 1
v = 1 1 + 1 0 = 1
What we get through above What is expected Output y (OR)
calculations v
z1 z2 Output v z1 z2 Output y
0 0 0 0 0 0
0 1 1 0 1 1
1 0 1 1 0 1
0 0 0 0 0 0
1 if v 1
y=
0 if v 1
Threshold to be used to
convert v into z2
Example: Consider the NN (McCulloch-Pitt) as shown in figure.
Each neurons (other than the input Neurons N1 and N2) has a
threshold of 2.
a) Define the response of Neuron N5 at time t in terms of activation
function input Neurons, N1 and N2 at the appropriate time.
b) Show that the activation of each Neuron that results from an
input signal of N1=1 and N2=0 at t=0.
Finally,
N 5 = N1 AND N 2
At time, t
N 5 (t ) = N1 (t − 2 ) AND N 2 (t − 2 )
b). Show that the activation of each Neuron that results from an input signal of
N1=1 and N2=0 at t=0.
Step-I:
Step-II:
N1 N2 N3_in N3
0 0 0 0
0 1 1 0
1 0 1 0
1 1 2 1
Step-III:
N1 N2 N4_in N4
0 0 0 0
0 1 1 0
1 0 1 0
1 1 2 1
N3 N4 N5_in N5
Hence, N5=N3+N4
=0+0=0 0 0 0 0
1 1 4 1
What are the Learning Rules in Neural Network?
For a given input vector xi, compare the output vector y with the
correct answer (= t).
Then, the difference (t-y) is zero, it means no learning takes place;
otherwise, adjusts its weights to reduce this difference.
Correlation Learning Rule
• The correlation learning rule based on a similar principle as
the Hebbian learning rule.
• It assumes that weights between responding neurons (with
same reaction) should be more positive, and weights between
neurons with opposite reaction should be more negative.
• Differing to the Hebbian rule, the correlation rule is the
supervised learning. Instead of the response, yj, the desired
response, dj, uses for the weight-change calculation.
• In Mathematical form the correlation learning rule is as
follows: w = x d
ij i j
Competitive Learning Rule
• The competitive learning rule is unsupervised in nature and as
the name says, is based on the principle of competition
amongst the nodes. That is why it is also known as the
‘Winner takes it all’ rule.
• In this rule, all the output nodes represent the input pattern and
the best one, meaning, the one having the most number of
outputs is the winner. This winner node is then assigned the
value 1 and the others that lose, remain at 0. Naturally, only
one neuron remains active at once.
•∆wij is the changes in weight between the ith input neuron
Δ𝑤𝑖𝑗 = 𝜂(𝑥𝑖 −𝑤𝑖𝑗 )
and jth output neuron
•η is the learning rate, xi is the input vector
•wij is the weight between the ith input neuron and jth
output neuron
Boltzmann Learning
• The learning is stochastic learning (having a random
probability distribution or pattern).
• This learning is useful for Recurrent structure and they work
in binary form.
• This learning is characterized by an energy function, E, as
−1
E= wij xi x j ( for i j )
2 i j
i ≠ j, means no neuron has self feedback. Feedback is
taken from randomly selected neurons.
• The neurons of this learning are divided into two groups:
Visible and Hidden
Visible and Hidden Neurons