Professional Documents
Culture Documents
Introduction To Neural Network
Introduction To Neural Network
11/4/2023 1
Outlines
11/4/2023 2
Basic Concept
– Neural networks are information processing systems, which are constructed and
implemented to model the human brain.
– The main objective of the neural network research is to develop a computational
device for modeling the brain to perform various computational tasks at a faster rate
than the traditional systems.
– Artificial neural perform various tasks such as optimization function, approximation,
vector quantization, and data clustering.
11/4/2023 3
Basic Concept Cont’d
– These tasks are very difficult for traditional computers, which are in algorithmic and
computational tasks and precise arithmetic operations.
– Therefore, for implementing artificial neural networks, high speed digital computers
are used, which makes the simulation of neural processes feasible.
11/4/2023 4
Artificial Neural Network
– ANNs are computational models which mimic the brain's learning processes.
– Resembles the characteristic of biological neural network.
– Posses large number of interconnected processing elements called nodes or units of
neurons.
– Neuron is connected to other by a connection link. Each connection link is
associated with weight which has information about the input signal.
11/4/2023 5
Artificial Neural Network Cont’d
– ANN processing elements are called as neurons or artificial neurons, since they
have the capability to model networks of original neurons as found in brain.
– Internal state of neuron is called activation or activity level of neuron, which is
the function of the inputs the neurons receives.
– Neuron can send only one signal at a time.
11/4/2023 6
Artificial Neural Network Cont’d
11/4/2023 7
Artificial Neural Network Cont’d
Where 𝑥1 and 𝑥2 are the activations of the input neurons X1 and X2 ,i.e. the output
of input signals. The output 𝑦 of the output neuron Y can be obtained by applying
activations over the net input, i.e. the function of the net input :
𝑦 = 𝑓(𝑦𝑖𝑛 )
Output = Function(net input calculated)
– The function to be applied over the net input is called activation function.
– Weight involved in ANN is equal to the slope of linear straight line (y=mx).
11/4/2023 8
Biological Neural Network
11/4/2023 9
Biological Neural Network Cont’d
– Electric impulse is passed between synapse and dendrites. Axon split into strands and
strands terminates into small bulb like organs called as synapse.
– It is a chemical process which results in increase /decrease in the electric potential
inside the body of the receiving cell.
– If the electric potential reaches a threshold value, receiving cell fires & pulse / action
potential of fixed strength and duration is send through the axon to synaptic junction
of the cell. After that, cell has to wait for a period called refractory period before it
can fire again.
11/4/2023 10
Mathematical model of artificial neuron
The above figure shows mathematical representation of the chemical processing taking place
in artificial neuron.
In this model net input is calculated by:
𝑦𝑖𝑛 = 𝑥1 𝑤1 + 𝑥2 𝑤2 + ⋯… … .. + 𝑥𝑛 𝑤𝑛
𝑛
= 𝑥𝑖 𝑤𝑖
𝑖=1
11/4/2023 11
Terminology Relation Between Biological And Artificial Neuron
11/4/2023 12
Comparison between Biological neuron and Artificial Neuron
11/4/2023 13
Evolution of Neural Networks
1958, 1959, 1962, 1988, Perceptron Frank Rosenblatt, Block, Minsky Weights are adjusted to reduce
1960 Adaline and Papert Widrow and Hoff the difference between the net
input to the output unit and the
desired output
11/4/2023 14
Evolution of Neural Networks Cont’d
1982, 1984, 1985, Hopfield network John Hopfield and Tank Based on fixed weights.
1986, 1987 Can act as associative memory
nets
11/4/2023 15
Evolution of Neural Networks Cont’d
1987-1990 Adaptive resonance Carpenter and Grossberg Designed for binary and
Theory(ART) analog inputs.
11/4/2023 16
McCulloch-Pitts neuron
11/4/2023 17
McCulloch-Pitts neuron Cont’d
– Threshold plays major role here. There is a fixed threshold for each neuron and if
the net input to the neuron is greater than the threshold then the neuron fires.
– They are widely used in logic functions.
– A simple M-P neuron is shown in the figure. It is excitatory with weight (w>0) /
inhibitory with weight –p (p<0).
– In the Fig., inputs from x1 to xn possess excitatory weighted connection and xn+1 to
xn+m has inhibitory weighted interconnections.
– Since the firing of neuron is based on threshold, activation function is defined as
11/4/2023 19
McCulloch-Pitts neuron Cont’d
– For inhibition to be absolute, the threshold with the activation function should
satisfy the following condition:
θ >nw –p
– Output will fire if it receives “k” or more excitatory inputs but no inhibitory inputs
where
kw≥θ>(k-1) w
– The M-P neuron has no particular training algorithm.
– An analysis is performed to determine the weights and the threshold.
– It is used as a building block where any function or phenomenon is modeled based
on a logic function.
11/4/2023 20
Learning
i) Supervised learning
ii) Unsupervised learning
Iii) Reinforcement learning
11/4/2023 21
Supervised Learning
– Learning with the help of a teacher.
– Example : learning process of a small child.
• Child doesn’t know read/write.
• Their each & every action is supervised by a teacher
– In ANN, each input vector requires a corresponding target vector, which represents
the desired output.
Supervised Learning
11/4/2023 22
Supervised Learning Cont’d
– The input vector along with target vector is called training pair.
– The input vector results in output vector.
– The actual output vector is compared with desired output vector.
– If there is a difference means an error signal is generated by the network, it is used
for adjustment of weights until actual output matches desired output.
11/4/2023 23
Unsupervised Learning
Unsupervised Learning
11/4/2023 24
Unsupervised Learning Cont’d
11/4/2023 25
Reinforcement learning
11/4/2023 26
Reinforcement learning Cont’d
– The external reinforcement signals are processed in the critic signal generator, and
the obtained critic signals are sent to the ANN for adjustment of weights properly to
get critic feedback in future.
11/4/2023 27
Activation Functions
– To make work more efficient and for exact output, some force or activation is given.
– Like that, activation function is applied over the net input to calculate the output of an
ANN.
– An Activation Function decides whether a neuron should be activated or not.
– Information processing of processing element has two major parts: input and output.
– An integration function (f) is associated with input of processing element.
11/4/2023 28
Activation Functions Cont’d
11/4/2023 29
Activation Functions Cont’d
11/4/2023 30
Activation Functions Cont’d
Two types:
a) Binary sigmoid function
logistic sigmoid function or unipolar sigmoid function.
- it is defined as:
11/4/2023 31
Activation Functions Cont’d
– Where λ- steepness parameter and the sigmoid range is between -1 and +1.
– It is closely related to hyperbolic tangent function, which is written as
11/4/2023 32
Activation Functions Cont’d
5. Ramp function
– The graphical representation of all these function is given in the upcoming Figure
11/4/2023 33
11/4/2023 34
Basic models of ANN
11/4/2023 35
Feed Forward Networks
– If no neuron in the output layer is an input to a node in the same layer / proceeding
layer – feed forward network.
– Since the input signals are fed into the input layer, then, after being processed, they
are forwarded to the next layer.
– Feed forward networks can be: Single layer Feed- Forward Network or Multi-layer
Feed- Forward Network
11/4/2023 36
Feed Forward Networks Cont’d
– Inputs are connected to the processing nodes with various weights, resulting in series
of outputs one per node.
11/4/2023 37
Feed Forward Networks Cont’d
11/4/2023 38
Feed Forward Networks Cont’d
11/4/2023 39
Feedback Network
– If outputs are directed back as input to the processing elements in the same
layer/proceeding layer is feedback network.
– When the neural network has some kind of internal recurrence, meaning that the
signals are fed back to a neuron or layer that has already received and processed that
signal, the network is of the type feedback.
11/4/2023 40
Feedback Network Cont’d
Hidden Feedback
Input Layer
Output
Feedback
Feedback Network
11/4/2023 41
Important Terminologies
Weight
– The weight contain information about the input signal.
– It is used by the net to solve the problem.
– It is represented in terms of matrix & called as connection matrix.
– If weight matrix W contains all the elements of an ANN, then the set of all W
matrices will determine the set of all possible information processing configuration.
11/4/2023 42
Important Terminologies Cont’d
• Bias
– Bias has an impact in calculating net input.
– Bias is included by adding x0 to the input vector x.
– The net output is calculated by
11/4/2023 43
Important Terminologies Cont’d
11/4/2023 44
Important Terminologies Cont’d
Threshold
– It is a set value based upon which the final output is calculated.
– Calculated net input and threshold is compared to get the network output.
– The activation function of threshold is defined as
• where θ is the fixed threshold value
11/4/2023 45
Important Terminologies Cont’d
• Learning rate
– Denoted by α.
– Control the amount of weight adjustment at each step of training.
– The learning rate range from 0 to 1.
– Determine the rate of learning at each step
• Momentum Factor
– Convergence is made faster if a momentum factor is added to the weight updating process.
– Done in back propagation network.
• Vigilance parameter
– Denoted by ρ.
– Used in Adaptive Resonance Theory (ART) network.
– Used to control the degree of similarity.
– Ranges from 0.7 to 1 to perform useful work in controlling the number of clusters.
11/4/2023 46
Learning Rules
11/4/2023 47
Learning Rules Cont’d
11/4/2023 48
Learning Rules Cont’d
– The learning signal is the difference between the desired and actual response of
the neuron. The perceptron learning rule is explained as:
– Consider a finite “n” number of input training vectors, with their associated
(desired) values x(n) and t(n), where “n” N. The target is either +1 or -1. The
output “y” is obtained on the basis of the net input calculated and activation
function being applied over the net input.
11/4/2023 49
Learning Rules Cont’d
1 𝑖𝑓𝑦𝑖𝑛 > 𝜃
𝑦 = 𝑓(𝑦𝑖𝑛 ) 0 𝑖𝑓 − 𝜃 ≤ 𝑦𝑖𝑛 ≤ 𝜃
−1 𝑖𝑓𝑦𝑖𝑛 < 𝜃
Else we have
𝑤 𝑛𝑒𝑤 = 𝑤 𝑜𝑙𝑑
11/4/2023 50
Learning Rules Cont’d
– The perceptron rule convergence theorem states that “if there is a weight vector W, such
that 𝑓(𝑥(𝑛)𝑊) = 𝑡(𝑛), for all 𝑛, then for any starting vector 𝑤1 , the perceptron
learning rule will converge to a weight vector that gives the correct response for all
training patterns, and this learning takes place within a finite number of steps provided
that the solution exists.
11/4/2023 51
Learning Rules Cont’d
– It updates the connection weights with the difference between the target and the
output value. It is the least mean square learning algorithm falling under the
category of the supervised learning algorithm.
11/4/2023 52
Learning Rules Cont’d
– The motive of the delta learning rule is to minimize the error between the output and
the target vector.
– The delta rule for adjusting the weights of the ith pattern (𝑖 = 1 𝑡𝑜 𝑛) is :
∆𝑤 = 𝛼 𝑡 − 𝑦𝑖𝑛 𝑥𝑖 ,
𝑤ℎ𝑒𝑟𝑒 𝛼 𝑖𝑠 𝑡ℎ𝑒 𝑙𝑒𝑎𝑟𝑛𝑖𝑛𝑔 𝑟𝑎𝑡𝑒, 𝑥𝑖 = 𝑖𝑛𝑝𝑢𝑡 𝑣𝑎𝑙𝑢𝑒𝑠 𝑎𝑛𝑑 𝑦𝑖𝑛 = 𝑜𝑢𝑡𝑝𝑢𝑡, 𝑡
= 𝑡𝑎𝑟𝑔𝑒𝑡 𝑣𝑎𝑙𝑢𝑒
– Least mean square error = (t- yin)2, Adaptive linear neuron converges when the least
mean square error is reached.
11/4/2023 53
Learning Rules Cont’d
– Winner-take-all networks are based on the competitive learning rule and will use the
strategy where it chooses the neuron with the greatest total inputs as a winner.
– The connections between the output neurons show the competition between them and
one of them would be ‘ON’ which means it would be the winner and others would be
‘OFF’
11/4/2023 54
Summary
– In this chapter we have discussed the basics of an ANN in comparison with biological
neuron and the evolution.
– Various activation functions and different models of ANN (feed forward and feedback
network) are clarified.
11/4/2023 55