Professional Documents
Culture Documents
Neural Network
Outline
What is Neural network? Backpropagation algorithm
Nonlinear Regression
Why Neural Network?
Two-Class Discrimination
Understanding the Brain
Multiclass Discrimination
Neural networks as a paradigm Multiple Hidden Layers
for parallel processing
The Perceptron
Training procedures
Training a Perceptron Improving convergence
Artificial neural network (ANN) Overtraining
Multilayer Perceptron Structuring the network
Tuning the network size
A case study in neural network
What is a Neural Network (NN)?
A neural network is a method in artificial intelligence that teaches computers to process data
in a way that is inspired by the human brain.
It is a type of ML process, called deep learning, that uses interconnected nodes or neurons in a
layered structure that resembles the human brain.
NN-it creates an adaptive system that computers use to learn from their mistakes and improve
continuously.
NN represents a type of deep learning technology that's classified under the broader field of
AI.
Why Neural Networks?
Problem Before Neural Networks:
Unless the specific steps that the computer needs to follow are known, the computer
cannot solve a problem.
i.e. The computer follows a set of instructions to solve a problem.
In living organisms, the brain is the control unit of the neural network, and it has different subunits
that take care of vision, senses, movement, and hearing.
The brain is connected with a dense network of nerves to the rest of the body’s sensors and actors.
There are approximately 10¹¹ neurons in the brain, and these are the building blocks of the
complete central nervous system of the living body.
In biological systems, a neuron is a cell just like any other cell of the body, which has a DNA
code and is generated in the same way as the other cells.
So, an artificial neuron works much the same way the biological one does.
Motivation Behind Neural Networks…
A neuron comprises three major parts: the cell body (also called Soma), the dendrites,
and the axon.
Neuron
Understanding the Brain
Once input exceeds a critical level, the neuron discharges a spike ‐ an electrical pulse that travels
from the body, down the axon, to the next neuron(s)
The axon endings almost touch the dendrites or cell body of the next neuron.
Transmission of an electrical signal from one neuron to the next is affected by neurotransmitters.
Neurotransmitters are chemicals that are released from the first neuron and which bind to the
Second.
This link is called a synapse.
The strength of the signal that reaches the next neuron depends on factors such as the amount of
neurotransmitter available.
Why Understand Biological Neural Networks?
ANNs can be used to replicate and simulate components of the human (or animal) brain, thereby giving
us insight into natural information processing.
For creating mathematical models for ANNS, theoretical analysis of biological neural networks is
essential as they have a very close relationship.
This understanding of the brain’s neural networks has opened horizons for the development of artificial
neural network systems and adaptive systems designed to learn and adapt to situations and inputs.
Perceptron is a single layer neural network, or we can say a neural network is a multi-
layer perceptron.
A function that can decide whether or not an input which is represented by a vector of
number belongs to some specific class is known as binary classifiers.
Note: Neural Network is based on the Perceptron, so if we want to know the working of the
neural network, learn how perceptron work.
The Perceptron works on three simple steps which are as
follows:
A. In the first step, all the input x are multiplied with their weights denoted as K. This step
is essential because the output of this step will be input for the next step.
Step 2:
b) add all the multiplied value from K1 to Kn. It is known as the weighted sum.
This weighted sum will be treated as an input for the next step.
Step 3:
c) In the next step, the weighted sum, which is calculated from the previous step, is
applied to the correct activation function.
For example: A unit step activation function
Note 1:
Weight shows the strength of the particular node.
A bias value allows you to shift the activation
function curve up or down.
The activation functions are used to map the input
between the required value like (0, 1) or (-1, 1)
Perceptron is usually used to classify the data into
two parts. Therefore, it is also known as a Linear
Binary Classifier.
Artificial Neural Network (ANN)
What is Artificial Neural Network (ANN)?
The term "Artificial Neural Network" is derived from Biological neural networks that
develop the structure of a human brain.
ANNs are computing systems inspired by the biological neural networks that constitute
human (animal) brains.
Such systems learn (progressively improve performance) to do tasks by considering
examples, generally without task-specific programming
Similar to the human brain which has neurons interconnected to one another,
Dendrites from Biological Neural Network represent inputs in ANN , cell nucleus represents
Nodes, synapse represents Weights, and Axon represents Output.
Relationship between Biological neural network and ANN
Dendrites Inputs
Synapse Weights
Axon Output
Artificial Neural Network (ANN)
An ANN in the field of Artificial intelligence where it attempts to mimic the network
of neurons makes up a human brain so that computers will have an option to
understand things and make decisions in a human-like manner.
Consider an example of a digital logic gate that takes an input and gives an output.
"OR" gate, which takes two inputs.
If one or both the inputs are "On," then we get "On" in output. If both the inputs are
"Off," then we get "Off" in output.
The outputs-inputs relationship keeps changing because of the neurons in our brain, which
are "learning."
Artificial Neural Network (ANN)
The “building blocks” of neural networks are the neurons.
• In technical systems, we also refer to them as units or nodes.
Hidden Layer:
presents in-between input and output layers.
It performs all the calculations to find hidden features and patterns.
Output Layer:
The input goes through a series of transformations using the hidden layer, which
finally results in output that is conveyed using this layer.
The ANN takes input and computes the weighted sum of the inputs and includes a
bias.
This computation is represented in the form of a transfer function.
The three layers of ANN-Function
Artificial Neuron
Biological neuron
How do ANNs work?
Input
Processing
Output
How do ANNs work?
Not all inputs are equal
Input
Processing
Output Y=
How do ANNs work?
The signal is not passed down to the next neuron verbatim
Input
weights
Processing
Output
The output is a function of the input, that is affected by the weights, and the transfer functions.
Multilayer Perceptron-ANNs
Single-Layer Perceptron – This is the simplest feedforward neural network and does not
contain any hidden layer.
As you know our brain is made up of millions of neurons, so a Neural network is just a
composition of perception, connected in different ways and operating on different activations.
MLP is a neural network similar to perceptron, but with more than one layer of neurons in
direct power.
ANN- Example
Let’s see an example where an Artificial neural network is used for image recognition.
Training A Neural Network
The most common deep learning algorithm for supervised training of the multi-layer
perceptions is known as backpropagation.
In it, after the weighted sum of inputs and passing through the activation function we
propagate backward and update the weights to reduce the error(desired output-model
output).
What is Backpropagation?
Is an algorithm which is created to test errors that will travel back from input
nodes to output nodes.
What is Backpropagation in Neural network?
Backpropagation is the essence of neural network training.
It is the method of fine-tuning the weights of a neural network based on the error rate
Proper tuning of the weights allows you to reduce error rates and make the model
Backpropagation is
It is a flexible method as it does not require prior knowledge about the network
It does not need any special mention of the features of the function to be learned.
Backpropagation algorithms are a set of methods used to efficiently train ANN following a
gradient descent approach which exploits the chain rule.
Example of Backpropagation
The main features of Backpropagation are the iterative, recursive and efficient method
through which it calculates the updated weight to improve the network until it is not able
to perform the task for which it is being trained.
Derivatives of the activation function to be known at network design time are required for
Backpropagation.
Now, how error function is used in Backpropagation, and how does Backpropagation
work?
Let’s start with an example and do it mathematically to understand how exactly updates
the weight using Backpropagation.
Example of Backpropagation… Given
Input values
X1=0.05
X2=0.10
Initial weight
W1=0.15 w5=0.40
W2=0.20 w6=0.45
W3=0.25 w7=0.50
W4=0.30 w8=0.55
Bias Values
b1=0.35 b2=0.60
Target Values
T1=0.01
T2=0.99
Step1: Calculate the values of H1 and H2 by a forward pass.
Forward Pass
• To find the value of H1 we first multiply the input We will calculate the value of H2 in the
value from the weights as: same way as H1
• H1=x1×w1+x2×w2+b1 H2=x1×w3+x2×w4+b1
• H1=0.05×0.15+0.10×0.20+0.35 H2=0.05×0.25+0.10×0.30+0.35
• H1=0.3775 H2=0.3925
• To calculate the final result of H1, we performed the To calculate the final result of H1, we
sigmoid function as: performed the sigmoid function as
Step 2: Calculate the values of y1 and y2 in the same way as we calculate H1 and
H2.
Now, we will backpropagate this error to update the weights using a backward pass.
Step 4: Backward pass at the output layer
To update the weight, we calculate the error correspond to each weight with the help of a
total error.
From equation two, it is clear that we cannot partially differentiate it with respect to w5
because there is no any w5.
We split equation one into multiple terms so that we can easily differentiate it with respect
to w5 as
Now, we calculate each term one by one to differentiate
Step 4: Cont’d Etotal with respect to w5 as.
So, we put the values of Backpropagation Process in Deep Neural Network in equation no
(3) to find the final result.
Step 6: calculate the updated weight
Now, we will calculate the updated weight w5 new with the help of the following formula
In the same way, we calculate w6new,w7new, and w8new and this will give us the following
values.
w5new=0.35891648
w6new=408666186
w7new=0.511301270
w8new=0.561370121
Backpropagation Key Points
Simplifies the network structure by elements weighted links that have the least effect on the
trained network
You need to study a group of input and activation values to develop the relationship between
the input and hidden unit layers.
It helps to assess the impact that a given input variable has on a network output.
Backpropagation is especially useful for deep neural networks working on error-prone projects,
such as image or speech recognition.
Backpropagation takes advantage of the chain and power rules allows backpropagation to
function with any number of outputs.
What are neural networks used for?
Neural networks have several use cases across many industries, such as the following:
Medical diagnosis by medical image classification
speech-to-text transcription
weather prediction
Facial recognition.
Applications of NNs
Computer vision
Computer vision is the ability of computers to extract information and insights from images
and videos.
With neural networks, computers can distinguish and recognize images similar to humans.
Visual recognition in self-driving cars so they can recognize road signs and other road users
Content moderation to automatically remove unsafe or inappropriate content from image and
video archives
Facial recognition to identify faces and recognize attributes like open eyes, glasses, and facial
hair
Image labeling to identify brand logos, clothing, safety gear, and other image details.
Applications of NNs
Speech recognition
Neural networks can analyze human speech despite varying speech patterns, pitch,
tone, language, and accent.
Virtual assistants like Amazon Alexa and automatic transcription software use
speech recognition to do tasks like these:
Assist call center agents and automatically classify calls
Accurately subtitle videos and meeting recordings for wider content reach
Applications of NNs…
Natural language processing (NLP)
NLP is the ability to process natural, human-created text.
Neural networks help computers gather insights and meaning from text data and documents.
Indexing of key phrases that indicate sentiment, like positive and negative comments on social
media
Document summarization and article generation for a given topic
Applications of NNs
Recommendation engines
Neural networks can track user activity to develop personalized recommendations.
They can also analyze all user behavior and discover new products or services that interest a
specific user.
For example, Curalate, a Philadelphia-based startup, helps brands convert social media posts into
sales.
Brands use Curalate’s intelligent product tagging (IPT) service to automate the collection and
curation of user-generated social content.
IPT uses neural networks to automatically find and recommend products relevant to the user’s
social media activity.
Consumers don't have to hunt through online catalogs to find a specific product from a social
media image.
Instead, they can use Curalate’s auto product tagging to purchase the product with ease.
Advantages of Artificial Neural Network (ANN)
Frequently Asked Questions (FAQs)
1. What is the need of biological neural network?
• Neural network, a network of simple processors (neurons) is found everywhere in the organism: in human brain, in
every animal brain and in our heart, pancreas or lungs. It's a very efficient mechanism, whose functioning principle
is based on the learning process, that makes these systems very adaptive. The study of biological neural networks is
important to understand and simulate the functioning of our own brain, the best known and most complex biological
neural network in the world. This can lead to the development of bio-inspired artificial neural networks.
• A biological neural network is a network of neurons that are connected together by axons and dendrites. The
connections between neurons are made by synapses. The axons transport chemicals that cause neurotransmitters to
be released onto dendrites, where the neurotransmitters are then able to excite or inhibit an adjacent neuron. The
neural network is able to learn and remember information, allowing it to solve problems or make decisions.
Frequently Asked Questions (FAQs)
3. What are the limitations of deep learning?
The limitations of deep learning are similar to the limitations of all machine learning
techniques. The common problem for all techniques is that they only give you the answers to
the questions you ask them. They can't answer questions that you didn't think of before. Deep
learning is heavily dependent on the data you give them. If your data isn't complete, there are
gaps in it, or the data itself is suspect then your deep learning model won't be very good. As a
result you will get poor performance.
• Backpropagation Process in Deep Neural Network - javatpoint