Architecture and Learning process in neural network - GeeksforGeeks
Architecture and Learning process in neural network - GeeksforGeeks
There may be just two layers of neuron in the network – the input and output layer.
There can be one or more intermediate ‘hidden’ layers of a neuron.
The neurons may be connected with all neurons in the next layer and so on …..
It is the simplest and most basic architecture of ANN’s. It consists of only two layers- the
input layer and the output layer. The input layer consists of ‘m’ input neurons connected to
each of the ‘n’ output neurons. The connections carry weights w11 and so on. The input
layer of the neurons doesn’t conduct any processing – they pass the i/p signals to the o/p
neurons. The computations are performed in the output layer. So, though it has 2 layers of
neurons, only one layer is performing the computation. This is the reason why the network
is known as SINGLE layer. Also, the signals always flow from the input layer to the output
layer. Hence, the network is known as FEED FORWARD.
for the kth hidden layer neuron. The net signal input to the neuron in the output layer is
given by:
C. Competitive Network:
Competitive Network
According to the diagram, it is clear that few of the output neurons are interconnected to
each other. For a given input, the output neurons compete against themselves to represent
the input. It represents a form of an unsupervised learning algorithm in ANN that is suitable
to find the clusters in a data set.
D. Recurrent Network:
Recurrent Network
In feed-forward networks, the signal always flows from the input layer towards the output
layer (in one direction only). In the case of recurrent neural networks, there is a feedback
loop (from the neurons in the output layer to the input layer neurons). There can be self-
loops too.
Learning Process In ANN:
Learning process in ANN mainly depends on four factors, they are:
So, we can summarize the learning process in ANN as the combination of – deciding the
number of hidden layers, the number of nodes in each of the hidden layers, the direction
of signal flow, deciding the connection weight.
Multi-layer feed network is a commonly used architecture. It has been observed that a
neural network with even one hidden layer can be used to reasonably approximate any
continuous function. The learning methodology adopted to train a multi-layer feed-forward
network is Backpropagation.
Backpropagation:
In the above section, we get to know that the most critical activities of training an ANN are
to assign the inter-neuron connection weights. In 1986, an efficient way of training an ANN
was introduced. In this method, the difference in output values of the output layer and
the expected values, are propagated back from the output layer to the preceding layers.
Hence, the algorithm implementing this method is known as BACK PROPAGATION i.e.
propagating the errors back to the preceding layers.
Forward Phase: Signal flow from neurons in the input layer to the neurons in the output
layer through the hidden layers. The weights of the interconnections and activation
functions are used during the flow. In the output layer, the output signals are generated.
Backward Phase: Signal is compared with the expected value. The computed errors are
propagated backwards from the output to the preceding layer. The error propagated
back are used to adjust the interconnection weights between the layers.
BACKPROPAGATION
The above diagram depicts a reasonably simplified version of the back propagation
algorithm.
One main part of the algorithm is adjusting the interconnection weights. This is done using
a technique termed as Gradient Descent. In simple words, the algorithm calculates the
partial derivative of the activation function by each interconnection weight to identify the
‘gradient’ or extent of change of the weight required to minimize the cost function.
In order to understand the back propagation algorithm in detail, let us consider the Multi-
layer Feed Forward Network.
The net signal input to the hidden layer neurons is given by:
The net signal input to the output layer neurons is given by:
BACKPROPAGATION NET
Note that the signals and are assumed to be 1. If is the activation function of the
hidden layer, then
If is the target of the k-th output neuron, then the cost function defined as the squared
error of the output layer is given by:
According to the descent algorithm, partial derivative of cost function E has to be taken
with respect to interconnection weights. Mathematically it can be represented as:
{Above expression is for the interconnection weights between the j-th neuron in the
hidden layer and the k-th neuron in the output layer.} This expression can be reduced to
where, or
On the basis of this, the weights and bias need to be updated as follows:
For weights:
Hence,
For bias:
Hence,
In the above expressions, alpha is the learning rate of the neural network. Learning rate is a
user parameter which decreases or increases the speed with which the interconnection
weights of a neural network is to be adjusted. If the learning rate is too high, the
adjustment done as a part of the gradient descent process may diverge the data set rather
than converging it. On the other hand, if the learning rate is too low, the optimization may
consume more time because of the small steps towards the minima.
{All the above calculations are for the interconnection weight between neurons in the
hidden layer and neurons in the output layer}
Like the above expressions, we can deduce the expressions for “Interconnection weights
between the input and hidden layers:
For weights:
Hence,
For bias:
Hence,
AI ML DS Data Science Data Analysis Data Visualization Machine Learning Deep Learning NLP Computer Vision Artific
So, in this way, we can use the Backpropagation algorithm to solve various Artificial Neural
Networks.