VARIN ANAND — Published On January 31, 2022 and Last Modified On March 15th, 2022
Beginner Deep Learning

This article was published as a part of the Data Science Blogathon.

Neural Networks

Table of Contents

  1. What is Neural Network
  2. Types of Neural Networks
  3. Types of Learnings
  4. How does a Neural Network work
  5. Endnotes

What are Neural Networks?

Neural networks are used to mimic the basic functioning of the human brain and are inspired by how the human brain interprets information. It is used to solve various real-time tasks because of its ability to perform computations quickly and its fast responses.

Neural Networks

Image Source:

An Artificial Neural Network model contains various components that are inspired by the biological nervous system.

Artificial Neural Network has a huge number of interconnected processing elements, also known as Nodes. These nodes are connected with other nodes using a connection link. The connection link contains weights, these weights contain the information about the input signal. Each iteration and input in turn leads to updation of these weights. After inputting all the data instances from the training data set, the final weights of the Neural Network along with its architecture is known as the Trained Neural Network. This process is called Training of Neural Networks. This trained neural network is used to solve specific problems as defined in the problem statement.

Types of tasks that can be solved using an artificial neural network include Classification problems, Pattern Matching, Data Clustering, etc.

We use artificial neural networks because they learn very efficiently and adaptively. They have the capability to learn “how” to solve a specific problem from the training data it receives. After learning, it can be used to solve that specific problem very quickly and efficiently with high accuracy.

Some real-life applications of neural networks include Air Traffic Control, Optical Character Recognition as used by some scanning apps like Google Lens, Voice Recognition, etc.

Types of Neural Networks

(i) ANN– It is also known as an artificial neural network. It is a feed-forward neural network because the inputs are sent in the forward direction. It can also contain hidden layers which can make the model even denser. They have a fixed length as specified by the programmer. It is used for Textual Data or Tabular Data. A widely used real-life application is Facial Recognition. It is comparatively less powerful than CNN and RNN.

(ii) CNN– It is also known as Convolutional Neural Networks. It is mainly used for Image Data. It is used for Computer Vision. Some of the real-life applications are object detection in autonomous vehicles. It contains a combination of convolutional layers and neurons. It is more powerful than both ANN and RNN.

(iii) RNN–

It is also known as Recurrent Neural Networks. It is used to process and interpret time series data. In this type of model, the output from a processing node is fed back into nodes in the same or previous layers. The most known types of RNN are LSTM (Long Short Term Memory) Networks

Now that we know the basics about Neural Networks, We know that Neural Networks’ learning capability is what makes it interesting. There are 3 types of learnings in Neural networks, namely

  1. Supervised Learning

  2. Unsupervised Learning

  3. Reinforcement Learning

Supervised Learning: As the name suggests, it is a type of learning that is looked after by a supervisor. It is like learning with a teacher. There are input training pairs that contain a set of input and the desired output. Here the output from the model is compared with the desired output and an error is calculated, this error signal is sent back into the network for adjusting the weights. This adjustment is done till no more adjustments can be made and the output of the model matches the desired output. In this, there is feedback from the environment to the model.

Supervised Learning

Image Source:

Unsupervised Learning: Unlike supervised learning, there is no supervisor or a teacher here. In this type of learning, there is no feedback from the environment, there is no desired output and the model learns on its own. During the training phase, the inputs are formed into classes that define the similarity of the members. Each class contains similar input patterns. On inputting a new pattern, it can predict to which class that input belongs based on similarity with other patterns. If there is no such class, a new class is formed.

Unsupervised Learning in ML

Image Source:

Reinforcement Learning: It gets the best of both worlds, that is, the best of both Supervised learning and Unsupervised learning. It is like learning with a critique. Here there is no exact feedback from the environment, rather there is critique feedback. The critique tells how close our solution is. Hence the model learns on its own based on the critique information. It is similar to supervised learning in that it receives feedback from the environment, but it is different in that it does not receive the desired output information, rather it receives critique information.

Reinforcement learning

Image Source:

How does a Neural Network work?

According to Arthur Samuel, one of the early American pioneers in the field of computer gaming and artificial intelligence, he defined machine learning as:

Suppose we arrange for some automatic means of testing the effectiveness of any current weight assignment in terms of actual performance and provide a mechanism for altering the weight assignment so as to maximize the performance. We need not go into the details of such a procedure to see that it could be made entirely automatic and to see that a machine so programmed would “learn” from its experience.

Let’s see what we can take out of this quote:

Neural Networks

Image source: Author

An artificial neuron can be thought of as a simple or multiple linear regression model with an activation function at the end. A neuron from layer i will take the output of all the neurons from the later i-1 as inputs calculate the weighted sum and add bias to it. After this is sent to an activation function as we saw in the previous diagram.

Neural Networks

Image source:

The first neuron from the first layer is connected to all the inputs from the previous layer, Similarly, the second neuron from the first hidden layer will also be connected to all the inputs from the previous layer and so on for all the neurons in the first hidden layer.

For neurons in the second hidden layer (outputs of the previously hidden layer) are considered as inputs and each of these neurons are connected to previous neurons, likewise. This whole process is called Forward propagation.

After this, there is an interesting thing that happens. Once we have predicted the output it is then compared to the actual output. We then calculate the loss and try to minimize it. But how can we minimize this loss? For this, there comes another concept which is known as Back Propagation. We will understand more about this in another article. I will tell you how it works. First, the loss is calculated then weights and biases are adjusted in such a way that they try to minimize the loss. Weights and biases are updated with the help of another algorithm called gradient descent. We will understand more about gradient descent in a later section. We basically move in the direction opposite to the gradient. This concept is derived from the Taylor series.


Congrats on completing the first article of this series!

We started by introducing you to what actually Neural networks is and what their various types are to help you give an overview and a look and feel to Neural networks so that you can familiarize yourself with the concept.

Now that you have your foundations established, in the next article, We will read about a few other important concepts like various types of activation functions, when to use them, their graphs, and code snippets so that you can implement them yourselves too.

Did you find this article helpful? Please share your opinions/thoughts in the comments section below.

Read more articles on Neural Networks here.

About the Authors

This article has been written by 2 authors named Varin Anand and Anshul Saini.

Varin is an undergraduate student currently majoring in Information Technology. (BTech in IT). He is interested in the field of Software Development and Data Science.

Anshul is an undergraduate student currently in his last year majoring in Statistics (Bachelors of Statistics) and has a strong interest in the field of data science, machine learning, and artificial intelligence. We are constantly learning and motivated to try new things.

We are open to work collaborations.

The media shown in this article is not owned by Analytics Vidhya and are used at the Author’s discretion. 

About the Author


Our Top Authors

Download Analytics Vidhya App for the Latest blog/Article

Leave a Reply Your email address will not be published. Required fields are marked *