Module 3 Ppt
Module 3 Ppt
ARTIFICIAL NEURAL
NETWORKS
CONTENT
• Introduction
• Neural Network Representation
• Appropriate Problems for Neural Network Learning
• Perceptrons
• Multilayer Networks and BACKPROPAGATION Algorithms
• Remarks on the BACKPROPAGATION Algorithms
INTRODUCTIO
N
Artificial neural networks (ANNs) provide a general, practical method
for learning real-valued, discrete-valued, and vector-valued
target functions from examples.
Biological Motivation
• The study of artificial neural networks (ANNs) has been inspired by the
observation that biological learning systems are built of very complex webs of
interconnected Neurons
• Human information processing system consists of brain neuron: basic
building block cell that communicates information to and from various parts of
body
• Simplest model of a neuron: considered as a threshold unit –a processing
element (PE)
• Collects inputs & produces output if the sum of the input exceeds an
internal threshold value
synap axo
se n
nucleus
cell body
dendrites
10
Facts of Human Neurobiology
Examples:
1. Speech phoneme recognition
2. Image classification
3. Financial perdition
Neuron
Neuron
Neuron
Neuron
NEURAL NETWORK
REPRESENTATIONS
• A prototypical example of ANN learning is provided by Pomerleau's
(1993) system ALVINN, which uses a learned ANN to steer an
autonomous vehicle driving at normal speeds on public highways.
• The input to the neural network is a 30x32 grid of pixel intensities obtained from
a forward-pointed camera mounted on the vehicle.
20
• Figure illustrates the neural network representation.
• The network is shown on the left side of the figure, with the input camera image
depicted below it.
• Each node (i.e., circle) in the network diagram corresponds to the output
of a
single network unit, and the lines entering the node from below are its inputs.
• There are four units that receive inputs directly from all of the 30 x 32 pixels in
the image. These are called "hidden" units because their output is available only
within the network and is not available as part of the global network output. Each
of these four hidden units computes a single real-valued output based on a
weighted combination of its 960 inputs
• These hidden unit outputs are then used as inputs to a second layer of 30 "output"
units.
• Each output unit corresponds to a particular steering direction, and the
output values of these units determine which steering direction is
recommended most strongly.
• The diagrams on the right side of the figure depict the learned weight values
associated with one of the four hidden units in this ANN.
• The large matrix of black and white boxes on the lower right depicts the
weights from the 30 x 32 pixel inputs into the hidden unit. Here, a white box
indicates a positive weight, a black box a negative weight, and the size of the
box indicates the weight magnitude.
• The smaller rectangular diagram directly above the large matrix shows the
weights from this hidden unit to each of the 30 output units.
APPROPRIATE PROBLEMS
FOR
NEURAL NETWORK
ANN is appropriate for problems with the following characteristics :
LEARNING
•Instances are represented by many attribute-value pairs.
•The target function output may be discrete-valued, real-valued, or a vector of
several real- or discrete-valued attributes.
•The training examples may contain errors.
•Long training times are acceptable.
•Fast evaluation of the learned target function may be required
•The ability of humans to understand the learned target function is not important
Architectures of Artificial Neural
An Networks
artificial neural network can be divided into three parts (layers), which are
known as:
•Input layer: This layer is responsible for receiving information (data),
signals, features, or measurements from the external environment. These inputs are
usually normalized within the limit values produced by activation functions
•Hidden, intermediate, or invisible layers: These layers are composed of neurons
which are responsible for extracting patterns associated with the process or system
being analysed. These layers perform most of the internal processing from a
network.
•Output layer : This layer is also composed of neurons, and thus is responsible for
producing and presenting the final network outputs, which result from the
processing performed by the neurons in the previous layers.
Architectures of Artificial Neural
TheNetworks
main architectures of artificial neural networks, considering the
neuron disposition, how they are interconnected and how its layers are composed,
can be divided as follows:
The learning problem is to determine a weight vector that causes the perceptron to
produce the correct + 1 or - 1 output for each of the given training examples.
• If the training examples are not linearly separable, the delta rule converges toward
a best-fit approximation to the target concept.
• The key idea behind the delta rule is to use gradient descent to search the
hypothesis space of possible weight vectors to find the weights that best fit
the training examples.
To understand the delta training rule, consider the task of training an unthresholded
perceptron. That is, a linear unit for which the output O is given by
To derive a weight learning rule for linear units, specify a measure for the training
error of a hypothesis (weight vector), relative to the training examples.
Where,
•D is the set of training examples,
•td is the target output for training example d,
•od is the output of the linear unit for training example d
•E [ w ] is simply half the squared difference between the target output td and the linear unit
output od, summed over all training examples.
40
Visualizing the Hypothesis Space
How to calculate the direction of steepest descent along the error surface?
to each component of the vector w . This vector derivative is called the gradient of
The direction of steepest can be found by computing the derivative of E with respect
• Here η is a positive constant called the learning rate, which determines the
step
size in the gradient descent search.
• The negative sign is present because we want to move the weight vector in the
direction that decreases E
• This training rule can also be written in its component form
𝜕
Calculate the gradient at each step. The vector 𝐸
𝜕𝑤
derivatives that form the gradient can be obtained
of
differentiating E from Equation (2), 𝑖 by
as
GRADIENT DESCENT algorithm for training a linear unit
50
To summarize, the gradient descent algorithm for training linear units is as
follows:
•Pick an initial random weight vector.
•Apply the linear unit to all training examples, then compute Δwi for each weight
according to Equation (7).
•Update each weight wi by adding Δwi, then repeat this process
Features of Gradient Descent Algorithm
where t, o, and xi are the target value, unit output, and ith input for the training
example in question
One way to view this stochastic gradient descent is to consider a distinct
Where, td and od are the target value and the unit output value for training example
d.
•Stochastic gradient descent iterates over the training
•The sequence of these weight updates, when iterated over all training examples,
•By making the value of η sufficiently small, stochastic gradient descent can be
made to approximate true gradient descent arbitrarily closely
The key differences between standard gradient descent and stochastic gradient
descent are
•In standard gradient descent, the error is summed over all examples before
updating weights, whereas in stochastic gradient descent weights are updated upon
examining each training example.
•Summing over multiple examples in standard gradient descent requires more
computation per weight update step. On the other hand, because it uses the true
gradient, standard gradient descent is often used with a larger step size per weight
update than stochastic gradient descent.
•In cases where there are multiple local minima with respect to stochastic gradient
• Sigmoid unit-a unit very much like a perceptron, but based on a smoothed,
differentiable threshold function.
• The sigmoid unit first computes a linear combination of its inputs, then applies a
threshold to the result. In the case of the sigmoid unit, however, the
threshold output is a continuous function of its input.
• More precisely, the sigmoid unit computes its output O as
60
The BACKPROPAGATION Algorithm
• The BACKPROPAGATION Algorithm learns the weights for a multilayer network, given
a network with a fixed set of units and interconnections. It employs gradient descent to attempt to
minimize the squared error between the network output values and the target values for
these outputs.
• In BACKPROPAGATION algorithm, we consider networks with multiple output units rather than
single units as before, so we redefine E to sum the errors over all of the network output units.
where,
•outputs - is the set of output units in the network
•tkd and Okd - the target and output values associated with the k th output unit
•d - training example
Derivation of the BACKPROPAGATION Rule
• Deriving the stochastic gradient descent rule: Stochastic gradient descent involves
iterating through the training examples one at a time, for each training example d
descending the gradient of the error Ed with respect to this single example
• For each training example d every weight wji is updated by adding to it Δ wji
Here outputs is the set of output units in the network, tk is the target value of unit k for
training example d, and ok is the output of unit k given training example d.
The derivation of the stochastic gradient descent rule is conceptually
straightforward, but requires keeping track of a number of subscripts and
variables
70
REMARKS ON THE
BACKPROPAGATION
ALGORITHM
1. Convergence and Local Minima
•The BACKPROPAGATION multilayer networks is only guaranteed to converge
toward some local minimum in E and not necessarily to the global minimum error.
•Despite the lack of assured convergence to the global minimum error,
BACKPROPAGATION is a highly effective function approximation method in
practice.
•Local minima can be gained by considering the manner in which network weights
evolve as the number of training iterations increases.
Common heuristics to attempt to alleviate the problem of local minima include:
1.Add a momentum term to the weight-update rule. Momentum can sometimes
carry the gradient descent procedure through narrow local minima
2.Use stochastic gradient descent rather than true gradient descent
3.Train multiple networks using the same data, but initializing each network with
different random weights
2. Representational Power of Feedforward Networks
What set of functions can be represented by feed-forward networks?
The answer depends on the width and depth of the networks. There are three quite
general results are known about which function classes can be described by which
types of Networks