What is a Neural Network?

Posted in

What is a Neural Network?

Ramya Shankar
Last updated on November 14, 2022

    Many people have confusion between a neural network (artificial neural network) 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 net 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), a Simulated Neural Network (SNN), or a neural net, is a computing system composed of several interconnected processing components that utilize mathematical models to process information.

    An artificial neural network (ANN) is the heart of deep learning and is also a subset of machine learning . Its structure is inspired by the human brain. Artificial neural networks imitate the way biological neurons transmit information or signals to one another.

    A neural net 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 forms a network and hence, the name neural network.

    How Does an Artificial Neural Network Work?

    An artificial 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, namely an input layer, one or more hidden layers, and an output layer. Each one of them is 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.

    An Example of an Artificial Neural Network

    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 net 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.

    1. Are the waves good? (Yes: 1, No: 0)
    2. Has there been any recent shark attack? (Yes: 0, No: 1)
    3. 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.
    • W2 = 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 Artificial Neural Networks

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

    1. Perceptron

    Perceptron, also known as a single-layer artificial 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 up 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.

    2. Feed-forward Neural Network

    It is one of the simplest types of neural nets 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 net, 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

    • Being unidirectional, it can’t be used for deep learning.

    3. 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 net 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 can be trained 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.

    4. 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 Google 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.

    5. Convolution Neural Network

    The convolution neural network (CNN) consists of neurons arranged in three dimensions. Image recognition is the primary application of CNN. Because of this fact, it is one of the widely used neural nets. 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 a convolutional neural net 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.

    6. 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, an 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 Artificial 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 net 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 nets 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 net offers a solution to a problem. But it does not state why and how it produces a specific output, primarily 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. Trial and error and experience are the only ways to determine the structure of a neural net.
    • 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.

    Like humans, they are able to learn more over time and provide better outputs with more data utilization. With different types of neural networks being available, there are so many options for an AI developer to choose from. Each type has its own specific purpose, though.

    This article covers some of the most typical neural networks with their advantages and concerns. We hope that this article helped you in understanding neural networks and their working a little better.

    People are also reading:

    FAQs


    The different types of artificial neural networks are: 1. Perceptron 2. Feed-forward neural network 3. Radial-basis function (RBF) neural network 4. Convolutional neural network (CNN) 5. Recurrent neural network (RNN) 6. Modular neural network.

    The primary purpose of neural networks is to simulate human the behavior of the human brain and let computer programs determine the hidden patterns and solve problems in the field of AI, ML, and deep learning.

    The three components of an artificial neural network are: 1. Input layer 2, Hidden layer 3. Output layer.

    No, there is no difference between an artificial neural network and a neural network. An artificial neural network is just the other name for a neural network.

    Leave a Comment on this Post

    0 Comments