Professional Documents
Culture Documents
Fundamentals of Neural Networks: Artificial Intelligence
Fundamentals of Neural Networks: Artificial Intelligence
.in
rs
de
ea
yr
Fundamentals of Neural Networks : AI Course lecture 37 38, notes, slides
.m
w
w
www.myreaders.info/ , RC Chakraborty, e-mail rcchak@gmail.com , June 01, 2010
,w
ty
www.myreaders.info/html/artificial_intelligence.html
or
ab
www.myreaders.info
kr
ha
C
C
R
Return to Website
Artificial Intelligence
Neural network, topics : Introduction, biological neuron model,
artificial neuron model, notations, functions; Model of artificial
neuron - McCulloch-Pitts neuron equation; Artificial neuron basic
elements, activation functions, threshold function, piecewise linear
function, sigmoidal function; Neural network architectures - single
layer feed-forward network, multi layer feed-forward network,
recurrent networks; Learning Methods in Neural Networks -
classification of learning algorithms, supervised learning,
unsupervised learning, reinforced learning, Hebbian learning,
gradient descent learning, competitive learning, stochastic
learning. Single-Layer NN System - single layer perceptron ,
learning algorithm for training, linearly separable task, XOR
Problem, learning algorithm, ADAptive LINear Element (ADALINE)
architecture and training mechanism; Applications of neural
networks - clustering, classification, pattern recognition, function
approximation, prediction systems.
fo
.in
rs
de
ea
Fundamentals of Neural Networks
yr
.m
w
w
,w
Artificial Intelligence
ty
or
ab
kr
ha
Topics
C
C
Slides
1. Introduction 03-12
7. References : 38
02
fo
.in
rs
de
ea
yr
.m
w
w
Neural Networks
,w
ty
or
ab
ea
1. Introduction
yr
.m
w
w
Neural Computers mimic certain processing capabilities of the human brain.
,w
ty
or
ab
04
fo
.in
rs
de
AI-Neural Network Introduction
ea
1.1 Why Neural Network
yr
.m
w
w
The conventional computers are good for - fast arithmetic and does
,w
ty
or
05
fo
.in
rs
de
AI-Neural Network Introduction
ea
1.2 Research History
yr
.m
w
w
,w
The history is relevant because for nearly two decades the future of
ty
or
McCulloch and Pitts (1943) are generally recognized as the designers of the
C
R
first neural network. They combined many simple processing units together
that could lead to an overall increase in computational power. They
suggested many ideas like : a neuron has a threshold level and once that
level is reached the neuron fires. It is still the fundamental way in which
ANNs operate. The McCulloch and Pitts's network had a fixed set of weights.
Hebb (1949) developed the first learning rule, that is if two neurons are
active at the same time then the strength between them should be
increased.
In the 1950 and 60's, many researchers (Block, Minsky, Papert, and
Rosenblatt worked on perceptron. The neural network model could be
proved to converge to the correct weights, that will solve the problem. The
weight adjustment (learning algorithm) used in the perceptron was found
more powerful than the learning rules used by Hebb. The perceptron caused
great excitement. It was thought to produce programs that could think.
Minsky & Papert (1969) showed that perceptron could not learn those
functions which are not linearly separable.
The neural networks research declined throughout the 1970 and until mid
80's because the perceptron could not learn certain important functions.
06
fo
.in
rs
de
AI-Neural Network Introduction
ea
1.3 Biological Neuron Model
yr
.m
w
w
The human brain consists of a large number, more than a billion of
,w
ty
neural cells that process information. Each cell works like a simple
or
ab
kr
processor. The massive interaction between all cells and their parallel
ha
C
C
ea
Information flow in a Neural Cell
yr
.m
w
w
The input /output and the propagation of information are shown below.
,w
ty
or
ab
kr
ha
C
C
R
ea
1.4 Artificial Neuron Model
yr
.m
w An artificial neuron is a mathematical function conceived as a simple
w
,w
ty
Input1
Input 2
Output
Input n
In other words ,
- The input to a neuron arrives in the form of signals.
09
fo
.in
rs
de
AI-Neural Network Introduction
ea
1.5 Notations
yr
.m
w
w
Recaps : Scalar, Vectors, Matrices and Functions
,w
ty
or
ab
n
C
s = x 1 + x2 + x 3 + . . . . + x n = xi
C
R
i=1
Z = X + Y = (x1 + y1 , x2 + y2 , . . . . , xn + yn)
10
fo
.in
rs
de
AI-Neural Network Introduction
ea
Matrices : m x n matrix , row no = m , column no = n
yr
.m
w
w
w11 w11 . . . . w1n
,w
ty
or
W = . . . . . . .
ha
C
C
. . . . . . .
R
11
fo
.in
rs
de
AI-Neural Network Introduction
ea
1.6 Functions
yr
.m
w
w
The Function y= f(x) describes a relationship, an input-output mapping,
,w
ty
or
from x to y.
ab
kr
ha
C
Sign(x)
O/P
1
.8
1 if x 0 .6
sgn (x) =
.4
0 if x < 0
.2
0
-4 -3 -2 -1 0 1 2 3 4 I/P
Sign(x)
O/P
1
.8
1 .6
sigmoid (x) =
-x .4
1+e
.2
0
-4 -3 -2 -1 0 1 2 3 4 I/P
12
fo
.in
rs
de
AI-Neural Network Model of Neuron
ea
2. Model of Artificial Neuron
yr
.m
w
w
A very simplified model of real neurons is known as a Threshold Logic
,w
ty
or
- A processing unit sums the inputs, and then applies a non-linear activation
R
Input 1
Input 2
Output
Input n
- Non-linear summation,
- Smooth thresholding,
- Stochastic, and
13
fo
.in
rs
de
AI-Neural Network Model Neuron
ea
2.2 Artificial Neuron - Basic Elements
yr
.m
w
w
Neuron consists of three basic components - weights, thresholds, and a
,w
ty
or
x1
C
W1 Activation
C
R
Function
x2 W2
i=1
xn Wn
Threshold
Synaptic Weights
Weighting Factors w
Threshold
14
fo
.in
rs
de
AI-Neural Network Model of Neuron
ea
Threshold for a Neuron
yr
.m
w
w
In practice, neurons generally do not fire (produce an output) unless
,w
ty
or
The total input for each neuron is the sum of the weighted inputs
C
R
to the neuron minus its threshold value. This is then passed through
the sigmoid function. The equation for the transition in a neuron is :
a = 1/(1 + exp(- x)) where
x = ai wi - Q
i
Activation Function
15
fo
.in
rs
de
AI-Neural Network Model of Neuron
ea
2.2 Activation Functions f - Types
yr
.m
w
w
Over the years, researches tried several functions to convert the input into
,w
ty
or
- I/P
C
C
- O/P Vertical axis shows the value the function produces ie output.
R
Threshold Function
A threshold (hard-limiter) activation function is either a binary type or
a bipolar type as shown below.
16
fo
.in
rs
de
AI-Neural Network Model of Neuron
ea
Piecewise Linear Function
yr
.m
w
w
This activation function is also called saturating linear function and can
,w
ty
or
have either a binary or bipolar range for the saturation limits of the output.
ab
kr
below.
R
17
fo
.in
rs
de
AI-Neural Network Model of Neuron
ea
Sigmoidal Function (S-shape function)
yr
.m
w
w
The nonlinear curved S-shape function is called the sigmoid function.
,w
ty
or
increasing function.
R
18
fo
.in
rs
de
AI-Neural Network Model of Neuron
ea
Example :
yr
.m
w
w
The neuron shown consists of four inputs with the weights.
,w
ty
or
ab
kr
x1=1 +1
ha
Activation
C
Function
C
R
x2=2 I
+1
y
X3=5 -1
Summing
xn=8 Junction
+2 =0
Threshold
Synaptic
Weights
+1
+1
I = XT . W = 1 2 5 8 = 14
-1
+2
= (1 x 1) + (2 x 1) + (5 x -1) + (8 x 2) = 14
19
fo
.in
rs
de
AI-Neural Network Architecture
ea
3. Neural Network Architectures
yr
.m
w
w
An Artificial Neural Network (ANN) is a data processing system, consisting
,w
ty
or
- The edges may represent synaptic links labeled by the weights attached.
Example :
e5
V1 V3
V5
e2
e4
e5
V2 V4
e3
Vertices V = { v1 , v2 , v3 , v4, v5 }
Edges E = { e1 , e2 , e3 , e4, e5 }
20
fo
.in
rs
de
AI-Neural Network Architecture
ea
3.1 Single Layer Feed-forward Network
yr
.m
w
w
The Single Layer Feed-forward Network consists of a single layer of
,w
ty
or
weights , where the inputs are directly connected to the outputs, via a
ab
kr
series of weights. The synaptic links carrying weights connect every input
ha
C
C
to every output , but not other way. This way it is considered a network of
R
feed-forward type. The sum of the products of the weights and the inputs
is calculated in each neuron node, and if the value is above some threshold
(typically 0) the neuron fires and takes the activated value (typically 1);
otherwise it takes the deactivated value (typically -1).
w11 y1
x1
w21
w12
w22 y2
x2
w2m
w1m
wn1
wn2
xn wnm
ym
Single layer
Neurons
21
fo
.in
rs
de
AI-Neural Network Architecture
ea
3.2 Multi Layer Feed-forward Network
yr
.m
w
w
The name suggests, it consists of multiple layers. The architecture of
,w
ty
or
this class of network, besides having the input and the output layers,
ab
kr
also have one or more intermediary layers called hidden layers. The
ha
C
C
Input Output
hidden layer hidden layer
weights vij weights wjk y1
w11
x1 v11
w12
v21 y1 y2
x2 w11
v1m
v2m y3
vn1 w1m
V m
ym
Hidden Layer
x neurons yj
yn
Input Layer
neurons xi Output Layer
neurons zk
the first hidden layers, m2 neurons in the second hidden layers, and n
output neurons in the output layers is written as ( - m1 - m2 n ).
- Fig. above illustrates a multilayer feed-forward network with a
configuration ( - m n).
22
fo
.in
rs
de
AI-Neural Network Architecture
ea
3.3 Recurrent Networks
yr
.m
w The Recurrent Networks differ from feed-forward architecture.
w
,w
ty
Example :
kr
ha
y1
C
C
x1
R
y1 y2
Feedback
links
x2
Yn
ym
ea
4. Learning methods in Neural Networks
yr
.m
w
w
The learning methods in neural networks are classified into three basic types :
,w
ty
or
- Supervised Learning,
ab
kr
- Unsupervised Learning
ha
C
C
- Reinforced Learning
R
- Gradient descent,
- Competitive
- Stochastic learning.
24
fo
.in
rs
de
AI-Neural Network Learning methods
ea
Classification of Learning Algorithms
yr
.m
w
w
,w
Neural Network
Learning algorithms
25
fo
.in
rs
de
AI-Neural Network Learning methods
ea
Supervised Learning
yr
.m
w - A teacher is present during learning process and presents
w
,w
ty
expected output.
or
ab
Unsupervised Learning
- No teacher is present.
Reinforced Learning
- A teacher is present but does not present the expected or desired
- A reward is given for correct answer computed and a penalty for a wrong
answer.
Note : The Supervised and Unsupervised learning methods are most popular
forms of learning compared to Reinforced learning.
26
fo
.in
rs
de
AI-Neural Network Learning methods
ea
Hebbian Learning
yr
.m
w
w
Hebb proposed a rule based on correlative weight adjustment.
,w
ty
or
ab
In this rule, the input-output pattern pairs (Xi , Yi) are associated by
kr
ha
C
n
W= Xi YiT
i=1
T
where Yi is the transpose of the associated output vector Yi
27
fo
.in
rs
de
AI-Neural Network Learning methods
ea
Gradient Descent Learning
yr
.m
w
w
This is based on the minimization of errors E defined in terms of weights
,w
ty
or
- If Wij is the weight update of the link connecting the i th and the j th
Wij = ( E / Wij )
Note : The Hoffs Delta rule and Back-propagation learning rule are
the examples of Gradient descent learning.
28
fo
.in
rs
de
AI-Neural Network Learning methods
ea
Competitive Learning
yr
.m
w
w
- In this method, those neurons which respond strongly to the input
,w
ty
or
Stochastic learning
- In this method the weights are adjusted in a probabilistic fashion.
ea
5. Single-Layer NN Systems
yr
.m
w
w
Here, a simple Perceptron Model and an ADALINE Network Model is presented.
,w
ty
or
ab
w11 y1
x1
w21
w12
w22 y2
x2
w2m
w1m
wn1
wn2
xn wnm
ym
Single layer
Perceptron
1 if net j 0 n
y j = f (net j) = where net j = xi wij
i=1
0 if net j < 0
30
fo
.in
rs
de
AI-Neural Network Single Layer learning
ea
Learning Algorithm for Training Perceptron
yr
.m
w
w
The training of Perceptron is a supervised learning algorithm where
,w
ty
or
weights are adjusted to minimize error when ever the output does
ab
kr
If the output is 1 but should have been 0 then the weights are
decreased on the active input link
K+1 K
i.e. W = W . xi
ij ij
If the output is 0 but should have been 1 then the weights are
increased on the active input link
K+1 K
i.e. W = W + . xi
ij ij
Where
K+1 K
W is the new adjusted weight, W is the old weight
ij ij
31
fo
.in
rs
de
AI-Neural Network Single Layer learning
ea
Perceptron and Linearly Separable Task
yr
.m
w
w
,w
S1 S2 S1
S2
ea
XOR Problem : Exclusive OR operation
yr
.m
w
w
,w
(0, 1) (1, 1)
ab
0 0 0
Even parity
kr
1 1 0
ha
0 1 1
C
Odd parity
C
1 0 1
R
(0, 0) X1
(0, 1)
XOR truth table
Output of XOR
Even parity means even number of 1 bits in the input in X1 , x2 plane
Odd parity means odd number of 1 bits in the input
are on one side of the line and the dots on the other side.
33
fo
.in
rs
de
AI-Neural Network Single Layer learning
ea
Perceptron Learning Algorithm
yr
.m
w The algorithm is illustrated step-by-step.
w
,w
ty
Step 1 :
or
ab
Iterate through the input patterns Xj of the training set using the
n
weight set; ie compute the weighted sum of inputs net j = xi wi
i=1
for each input pattern j .
Step 4 :
ea
5.2 ADAptive LINear Element (ADALINE)
yr
.m
w
w
An ADALINE consists of a single neuron of the McCulloch-Pitts type,
,w
ty
or
square (LMS) training law. The LMS learning rule is also referred to as
ha
C
C
x1 W1
x2 W2
Output
Neuron
xn Wn
Error
+
Desired Output
ea
ADALINE Training Mechanism
yr
.m
w (Ref. Fig. in the previous slide - Architecture of a simple ADALINE)
w
,w
ty
or
Usage of ADLINE :
In practice, an ADALINE is used to
- Make binary decisions; the output is sent through a binary threshold.
36
fo
.in
rs
de
AI-Neural Network Applications
ea
6. Applications of Neural Network
yr
.m
w Neural Network Applications can be grouped in following categories:
w
,w
ty
or
Clustering:
ab
kr
Classification/Pattern recognition:
The task of pattern recognition is to assign an input pattern
(like handwritten symbol) to one of many classes. This category
includes algorithmic implementations such as associative memory.
Function approximation :
The tasks of function approximation is to find an estimate of the
unknown function subject to noise. Various engineering and scientific
disciplines require function approximation.
Prediction Systems:
The task is to forecast some future values of a time-sequenced
data. Prediction has a significant impact on decision support systems.
Prediction differs from function approximation by considering time factor.
System may be dynamic and may produce different results for the
same input data based on system state (time).
37
fo
.in
rs
de
AI-AI-Neural Network References
ea
7. References : Textbooks
yr
.m
w
w
1. "Neural Networks: A Comprehensive Foundation", by Simon S. Haykin, (1999),
,w
ty
and Sanjay Ranka, (1996), MIT Press, Chapter 1-7, page 1-339.
C
R
38