What is a Neural Network?

By | November 24, 2021
What is Neural Networks

Many people have confusion between neural networks and deep learning. While neural networks are composed of multiple layers, ‘deep’ in deep learning refers to the depth of these layers.

If layers in a neural network are two or three, then it is simply called a neural network. On the other hand, if there are more than three layers, it is considered a deep learning algorithm.

Neural networks have come a long way since their inception. They have the ability to provide solutions to many complex issues in real-life. They learn the data provided and map relationships between non-linear and complex input and output to reveal hidden patterns and help businesses improve their decision-making process.

In this article, we shall discuss what exactly a neural network is and how it works. Also, you will get familiar with the significant applications of neural networks along with their pros and cons.

What is a Neural Network?

A neural network, also known as an Artificial Neural Network (ANN) or Simulated Neural Network (SNN), is a computing system composed of several interconnected processing components that utilize mathematical models to process information.

Vamware

An ANN is the heart of deep learning and is also a subset of machine learning. Its structure is inspired by the human brain. ANNs imitate the way the biological neurons transmit information or signals to one another.

A neural network is a connection of nodes or units called neurons or artificial neurons that are analogous to synapses of biological neurons in the human brain. The connections between the artificial neurons are known as edges. Moreover, the collection of nodes or neurons form a network and hence, the name neural network.

Vamware

How Does an Artificial Neural Network Work?

A neural network starts functioning when we feed data to it. Neurons are responsible for receiving and processing the data we feed and producing the desired output. There are three different layers in artificial neural networks – an input layer, one or more hidden layers, and an output layer, each composed of neurons.

The input layer accepts the input data from the outside world, represented in a numeric value, and redirects it to the hidden layer for performing computations. Finally, the output layer predicts the output and makes it available for the outside world.

Each artificial neuron in a network has five components: weight, threshold, input, activation function, and output. After a neuron in the input layer receives the input data, a weight is assigned to each input value. A neuron then multiplies all input values with their corresponding weights and sums all the resulting outputs.

The activation function takes the sum value or output and decides whether to activate a neuron or not. If a neuron produces the output above its corresponding threshold value, it gets activated and transmits the data to a network’s next layer. Therefore, an output of one node or neuron acts as the input for another neuron in a network.

Example

Consider that you are planning to go surfing but are unable to decide whether to go or not. Let us now see how a neural network works for this example.

Say that a single node in a neural network takes binary values, 0 and 1, to predict the output in the form of ‘Yes: 1 or No: 0’.

We shall consider three factors that can affect the decision of whether to go or not to go surfing.

  • Are the waves good? (Yes: 1, No: 0)
  • Has there been any recent shark attack? (Yes: 0, No: 1)
  • Is the line-up empty? (Yes: 1, No: 0)

Now, assume that we are giving the input data to the node. As we have considered three factors, we shall provide three input values, as follows:

  • X1 = 1, indicating that the waves are good.
  • X2 = 0, indicating that there has not been any shark attack recently.
  • X3 = 1, indicating that crowds are out.

The next step is to assign a weight to each input value. Assigning higher weights to an input value indicates that it is of greater importance to making decisions. Let W1, W2, and W3 be the weights of X1, X2, and X3, respectively.

  • W1 = 5, as there are no large swells often.
  • W = 2, as you are used to the crowds.
  • W3 =4, you fear sharks a lot.

Now, it is time to assign a threshold value. Let us assign a threshold value of 3.

The predicted outcome or Y-hat = (1*5) + (0*2) + (1*4) > 3

= (1*5) + (0*2) + (1*4) -3 > 0

= 6 > 0

Therefore, the decision would be Yes: 1.

Types of Neural Networks

There are different types of neural networks that are suitable for different purposes. Here, we have listed some of the most typical types of neural networks.

  1. Perceptron

Perceptron, also known as a single-layer neural network, is among the oldest neural networks consisting of only a single neuron. Also, it only has two node layers: the input layer and the output layer.

In the input layer, a neuron sums the multiplication of all input values and their specific weights. Later, the activation function takes the sum, compares it with the threshold value, and then sends it to the output layer to produce the output.

Pros

  • Perceptron is capable of implementing logic gates, like NAND, AND, and OR.

Cons

  • It is not suitable for non-linear problems, like boolean XOR.
  1. Feed-forward Neural Network

It is one of the simplest neural network types and is also known as multi-layer perceptron (MLP). Though it is called a multi-layer perceptron, it consists of sigmoid neurons. In this type of neural network, the input data moves in a single direction, i.e., it enters through the input layer and leaves the network via the output layer.

A feed-forward neural network consists of three layers: an input layer, one or more hidden layers, and an output layer. The working and the example we discussed earlier is a feed-forward neural network. This type of neural network is widely used in speech recognition and facial recognition.

Pros

  • It is easy to implement and maintain, and it is also less complex.
  • As it does not support backpropagation, it is fast.
  • It can handle noisy data effectively and quickly.

Cons

  • The feed-forward neural network being unidirectional, it can’t be used for deep learning.
  1. Radial Basis Functions (RBF) Neural Network

The RBF neural network also consists of three layers: an input vector, a layer of RBF neurons, and an output layer. It uses a radial basis function as an activation function. The common application of the RBF neural network is power restoration.

This neural network performs classification by computing the input’s similarity to the data points present in the training set. Each neuron in RBF stores a ‘prototype’, one of the data points from the training set.

When you need to classify any new vector, each neuron in RBF computes the Euclidean distance between its prototype and the input. If there are two classes, let’s say A and B, and an input resembles class B closely, RBF will classify it as class B.

Each RBF neuron, when comparing the input with its prototype, produces a response in the form of 0 and 1, which are the measures of similarity. If a neuron produces 1, the input and its prototype are equal. Otherwise, the response exponentially falls to 0.

Pros

  • An RBF neural network trains faster than a multi-layer perceptron (MLP).
  • A hidden layer in RBF is easier to interpret than in MLP.

Cons

  • Though RBF trains faster than MLP, it works slower than MLP once the training is finished.
  1. Recurrent Neural Network

Recurrent Neural Network processes sequential or time-series data. It has applications in speech recognition, image captioning, language translation, and natural language processing (NLP). In addition, some popular applications, like Siri, Google Translate, and voice search, use RNN.

The feed-forward neural network does not support backpropagation, and hence, it does not remember data in the previous inputs. But in RNN, the input for the current step is the output of the previous step. As the output of each step is saved in RNN, it helps in making better decisions.

Pros

  • We can provide any length of input to RNN for processing.
  • Even if the input size increases, the mode size remains the same.
  • RNN can process the arbitrary series of inputs by using its internal memory.

Cons

  • The computation speed of RNN is relatively slower than other neural networks, as it is recurrent in nature.
  • It is highly prone to gradient vanishing and exploding.
  1. Convolution Neural Network

The convolution neural network (CNN) consists of neurons arranged in three dimensions. Image recognition is the primary application of CNN.

In the first layer, called the convolutional layer, a neuron takes only a tiny portion of the visual field, i.e., an image, and processes it. Also, it takes input features in batches. After that, the pooling stage reduces each feature’s dimensions to sustain valuable data. The final step analyzes probabilities and decides the class of an image.

Image processing in CNN involves the conversion from RGB to grey-scale. CNN has its application primarily in signal and image processing.

Pros

  • CNN does not involve human intervention to identify the significant features of the given input data.

Cons

  • As compared to the above types, CNN is relatively more complex to design and maintain.
  • It is comparatively slow, and its speed depends upon the number of hidden layers.
  1. Modular Neural Network

The modular neural network consists of multiple independently functioning networks monitored by some intermediary. Each network serves as a module and operates on a unique set of inputs.

Large and complex processes are split into multiple independent components, and each component is assigned to a single network or module. Therefore, MNN increases the computation speed.

The intermediary takes the output from all modules, processes them, and produces the output as a whole.

Pros

  • It is comparatively faster than other neural networks.
  • MNN is robust and efficient, as each network in it functions independently.

Cons

  • It is essential to have a control system that enables modules in a network to function together.

Pros and Cons of Neural Networks

Below are some of the significant advantages and disadvantages of neural networks.

Pros

  • The improper functioning of a few neurons in a neural network does not prevent it from producing the output. Therefore, artificial neural networks (ANNs) are fault-tolerant.
  • Neural networks can produce output even with incomplete information.
  • The parallel processing ability of neural networks enables them to perform multiple tasks at the same time.
  • Any problem in a neural network does not lead to immediate corruption, but it makes a network slow over time.

Cons

  • We know that a neural network offers a solution to a problem. But it does not state why and how it produced a specific output due to the complexity of a network. Therefore, neural networks are black boxes.
  • Determining the appropriate structure of a neural network is challenging as there are no specific rules for that. Experience and trial and error are the only ways to determine a neural network’s structure.
  • ANNs require or are dependent on processors with high processing capacity.

Conclusion

Neural networks are changing the way people and organizations make decisions, solve problems, and interact with systems. They mimic the behavior of the human brain and provide solutions to problems in the domain of artificial intelligence, deep learning, and machine learning.

In addition, neural networks have the ability to identify the hidden patterns in clusters and unstructured data and classify them. They are expected to learn more and provide better outputs with more data utilization.

With different types of neural networks being available, each type has its own specific purpose. This article covers some of the most typical neural networks with their pros and cons. We hope that this article helped you in understanding neural networks and their working.

People are also reading:

Leave a Reply

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