Neural Networks Explained
A middle-school guide to neural networks: neurons, weights, layers, activation, and how training with backpropagation lets deep learning recognise images and language.
Key takeaways
- A neural network is made of simple units (neurons) arranged in connected layers
- Each connection has a weight, a number that controls how strongly a signal passes through
- Training adjusts the weights to shrink the error between the network's output and the correct answer
- Networks with many layers are called deep learning and power image, voice and language AI
The building block: a neuron
A neural network is one of the most important ideas in modern AI. It powers face recognition, voice assistants, translation and the chatbots you have probably used. To understand it, start with a single unit.
An artificial neuron is surprisingly simple. It takes some numbers as input, multiplies each one by a weight, adds them all together, and then passes the result through a small function that decides the final output. That is it. A neuron is just weighted adding plus a decision step.
The word "neuron" comes from brain cells, which inspired the idea. But be honest with yourself: an artificial neuron is basic maths, not a tiny brain. The power comes from connecting many of them.
Weights are where the learning lives
A weight is a number that says how much an input matters.
Think about deciding whether to go outside. "Is it sunny?" might have a big positive weight. "Is there homework due?" might have a negative weight. The neuron adds up these weighted facts and produces a score.
In a network there are thousands or millions of weights. Learning a neural network means finding good values for all those weights. Nothing else really changes; the weights are the knowledge.
Stacking neurons into layers
One neuron can only do so much. So we arrange neurons in layers:
- An input layer receives the raw data, such as the pixels of an image.
- One or more hidden layers combine signals, building up from simple patterns to complex ones.
- An output layer gives the answer, such as "this is a cat" with 92% confidence.
In an image network, early layers might detect edges and corners. Middle layers combine edges into shapes like ears or eyes. Later layers combine shapes into whole objects. Each layer builds on the one before. Networks with many hidden layers are called deep learning.
How training actually works
When a network is brand new, its weights are random, so its answers are nonsense. Training fixes this in a loop:
- Forward pass. Feed in an example and let the signal flow through the layers to an output.
- Measure the error. Compare the output to the correct answer. The gap is the loss.
- Backpropagation. Work backwards through the network to calculate how each weight contributed to the error.
- Update. Nudge every weight a little in the direction that reduces the error.
Repeat this with millions of examples and the weights slowly settle into values that make good predictions. This whole idea of learning from labelled examples is covered in What Is Machine Learning?.
What neural networks can and cannot do
Neural networks are astonishingly good at pattern recognition: spotting a tumour in a scan, turning speech into text, or predicting the next word in a sentence. The large language models behind chatbots are giant neural networks. See how that scales up in How Chatbots Work.
But they have real limits. They need huge amounts of data and computing power. They can be confidently wrong. They can absorb bias from their training data. And they are hard to fully explain, even for the people who build them. A neural network finds patterns; it does not truly understand the world the way a person does. Knowing both the power and the limits is what makes you a smart user of AI.
Quick quiz
Test yourself and earn XP
What is an artificial neuron?
An artificial neuron takes inputs, multiplies them by weights, adds them up, and passes the result through an activation step to make an output.
What does a 'weight' control?
A weight is a number that scales an input. Large weights make an input matter more; small or negative weights make it matter less.
What happens to the weights at the start of training?
Weights usually start random, so the network's first outputs are wrong. Training gradually corrects them.
What is the job of backpropagation?
Backpropagation works backwards from the error to calculate how each weight should change to make the output more correct.
What is 'deep learning'?
Deep learning means neural networks with many layers, which can learn very complex patterns in images, sound and text.
FAQ
Only loosely. The idea of connected units was inspired by brain cells, but artificial neurons are simple maths, and a real brain is vastly more complex and works differently.
No. You can use trained networks through apps and tools without doing the maths. To build and train your own, you will eventually want algebra, some calculus and programming.
Keep exploring
More in AI