AI: What’s a Neural Network?
A computational model inspired by our brains
Artificial Intelligence (AI) has quickly become a part of modern life, from art and music to business and beyond. The pace of development is so fast that it’s difficult to keep up. In the next few articles, I’ll break down some of the fundamental concepts in AI that you need to know to make sense of all the news and developments that you read about. We will start with neural networks, which are the basis for most of the artificial intelligence software we are seeing.
Artificial Intelligence is a type of software system, that, like any other software takes an input and returns an output. Think of it as a calculator. In a calculator, you input some numbers and you get an output. It’s the same with artificial intelligence software, the difference is that the inputs and outputs are way more flexible. For example, when you use software like ChatGPT, you can ask a question in natural language, and it answers your question in very natural-sounding language. Both inputs and outputs are very flexible. So, how does AI software do it? It all happens using a technique called neural networks. This technique was pioneered decades ago, however, it has become so popular only now because of the advancement in technology and computing power.
These AI models can do a variety of things. For example, image classification, where they can identify entities in a photo. Another example is language translation, where they can instantly convert text from one language to another. Yet another example is speech recognition, where they can transcribe spoken words into text.
What is a Neural Network?
Our brains are made up of cells called neurons. All these neurons are interconnected with each other to form a network that stores information and performs various tasks. The brain takes an input, passes it through this complex network, and produces an output. This is the biological neural network of the brain.
A neural network in the digital world is a computational model which is inspired by the brain and is foundational to how artificial intelligence works.
Building Blocks of a Neural Network
At the heart of a neural network is a neuron (or a node) which is a simple processing unit. It takes inputs from other nodes, or from an external source, performs some computations on the inputs, and produces an output.
These neurons are organized in layers. The first layer is the input layer that receives inputs from outside, such as a dataset. Each neuron in the input layer is a feature in the dataset. After the input layer, we have one or more hidden layers that take the inputs and perform calculations on our data. Then we have the output layer in which we get the final prediction or the result from our given inputs.
Every neuron in a layer is connected to all neurons in the previous layer, forming a densely interconnected network. The neurons and the connections between them (represented as lines) have associated values, such as data inputs and weights. These values are essential for the computations carried out by the network.
Neural Network - Example
Let's take an example of a neural network that classifies an animal as a mammal, fish or bird. We provide it with a picture of an animal, and as an output, it classifies the picture as a mammal, fish or bird. Let’s look at what goes on in the three layers.
Input Layer
In the input layer, each neuron will represent a feature of the animal. Some example features are:
Body temperature: Either "warm-blooded" or "cold-blooded" - e.g., for a domestic cat: warm-blooded
Number of legs: e.g., for a domestic cat: 4
Has fur or hair: e.g., for a domestic cat: Yes (1)
Can fly: e.g., for a domestic cat: No (0)
Average lifespan: e.g., for a domestic cat: 15 years
Average adult weight: e.g., for a domestic cat: 4.5 kilograms
These are just some examples. There could be many more features.
Hidden Layer
Here the neural network could have one or more hidden layers, with different numbers of neurons, each taking in the weighted sum of inputs from the preceding layer. These neurons are designed to activate or respond based on the strength of these inputs. These neurons are designed to recognize different patterns and combinations of features. For example, some might prioritize traits common to mammals or birds, while others might emphasize the size and lifespan of the animal. Another neuron might consider all input features to comprehensively understand the animal's characteristics.
Output layer
The output layer in this neural network contains three neurons: one each for mammals, fish, and birds. Each neuron produces a value indicating the likelihood of the animal belonging to its respective category. For instance, the value from neuron 1 indicates the probability of the animal being a mammal, neuron 2's value represents the likelihood of it being a fish, and neuron 3's value pertains to the chance of it being a bird.
The highest value determines the network’s final classification. If we feed the picture of a domestic cat to this neural network, then ideally the neuron representing mammals in the output layer will have the highest value.
Neural Networks Can Learn
But how are neural networks able to perform this classification? They can do so because of their ability to learn patterns and relationships from data. They are continuously learning and improving themselves through a process called training. Training involves feeding the neural network a large dataset, such as pictures of animals, so it can learn and recognize patterns. During training, these weights are adjusted to improve the performance of the neural network. We will learn about the concept of model training in a separate article.
I hope you enjoyed this article. Now, you're one step closer to understanding the world of AI and neural networks.


