Course contents · Lesson 3 of 15

What Is a Neural Network? Explained Without Math

How AI Learns · Lesson 3 of 15 · 8 min Foundations

Point a plant-identifying app at a leaf and, within a second, it tells you "monstera". Nobody wrote a rule describing every plant's leaves. Behind that answer is almost certainly a neural network, the kind of model that powers deep learning. So what is a neural network? It is a program built from many tiny, simple calculators connected in layers, which together learn to turn an input such as a photo into an answer. This lesson explains how, without any maths beyond adding up.

Meet the team of tiny voters

Each tiny voter is called a neuron, and the whole team is the network. Neurons are arranged in layers. The input layer receives the raw data, for a photo that means numbers for the brightness of each pixel. The output layer gives the answer, such as "how likely is this a cat". The layers in between are called hidden layers, because you never see their votes directly.

Every neuron in one layer is usually connected to every neuron in the next. Each connection has a weight: a number that says how much the receiving neuron trusts that particular voice. A big positive weight means "when this one speaks up, I agree"; a negative weight means "when this one speaks up, I lean the other way".

A neural network with four input circles, two hidden layers of five neurons each and one output circle labelled cat. Lines connect every neuron to every neuron in the next layer, with thicker lines for stronger weights and two colours for votes for and against
All of the network's knowledge lives in the lines: each one is a single weight, and this small network has 50 of them.

Count the lines in the diagram: 4 × 5 between the inputs and the first hidden layer, 5 × 5 between the hidden layers, and 5 into the output. That is 50 weights. The neurons themselves are simple and identical in kind; what makes one network recognise cats and another recognise speech is the values of its weights.

What one voter does

A single neuron does three small things. First, it multiplies each incoming number by the weight on that connection. Second, it adds all the results together, plus one extra number of its own called a bias, which sets how easily that neuron speaks up. Third, it passes the total through a simple rule called an activation function.

The activation function decides how loudly the neuron speaks. A common one squashes any total into a range from 0 to 1: big totals come out close to 1, very negative totals close to 0. Another popular one simply turns negative totals into 0 and leaves positive ones alone. Without this step, stacking layers would add nothing, because the whole network would collapse into one big multiply-and-add.

Three inputs, pointy ears 0.9, whiskers 0.7 and dog-like snout 0.1, are multiplied by weights 0.8, 0.6 and minus 0.9, added to 1.05, a bias of minus 0.5 gives 0.55, and an S-shaped squashing step turns it into an output of 0.63
One neuron is just multiply, add and squash; the negative weight lets the dog-like snout vote against "cat".

Follow the numbers in the diagram. Strong "pointy ears" and "whiskers" clues push the total up, while the snout clue, with its negative weight, pulls it down a little. The squash turns 0.55 into 0.63, and that number becomes one input for the neurons in the next layer. The named clues are only for illustration: in a real network the inputs are pixel values or other neurons' outputs, and nobody gives them names.

Layers: from clues to an answer

A single neuron can only draw a simple dividing line between "yes" and "no". The power comes from layers. Each layer works with what the layer before it found, so the network can build complicated ideas out of simple ones.

Five panels: pixel brightness values, short edges, simple shapes like triangles and circles, cat face parts like ears, eyes and whiskers, and an answer panel showing cat 92 percent, dog 6 percent and other 2 percent
Simple clues are combined into bigger ones layer by layer, until the last layer only has to weigh up face parts.

When researchers looked inside trained image networks, they found this kind of build-up. Neurons in early layers tend to respond to edges and colour changes, middle layers to textures and simple shapes, and later layers to whole parts such as eyes or ears. Nobody programmed those steps. They emerged because they helped the network get the training examples right.

This is where the word "deep" comes from: a deep network simply has many layers, from a handful to more than a hundred. Modern networks are also wide, with thousands of neurons per layer, so the weights add up fast. The largest language models have hundreds of billions of weights, compared with 50 in the diagram above.

How the team learns

A new network starts with random weights, so its first answers are guesses. Training uses the same loop you met in how machine learning works: show an example, compare the output with the label, and measure the error. The new question is which of the many weights to blame for the mistake.

A method called backpropagation answers it. Starting from the error at the output, it works backwards through the layers and calculates, for every weight, whether nudging it up or down would have made the answer less wrong. Then every weight moves a tiny step in its helpful direction. After millions of examples, the weights settle into values that give right answers far more often.

What a neural network is not

Neurons are named after brain cells, but the likeness is loose. A real brain cell is a complex living cell; an artificial neuron is one multiply, one add and one squash. A neural network is not a copy of a brain.

It also does not understand cats the way you do. It has found number patterns that separate cat photos from other photos in its training data. That is why a network can be confidently wrong on a picture unlike anything it was trained on, or fooled by tiny changes to an image that a person would not even notice.

Check yourself

Where is a trained network's knowledge actually stored?

In its weights, the numbers on the connections, because the neurons themselves all do the same simple multiply, add and squash.

What does a negative weight mean for a neuron?

When that input gets bigger, it pulls the neuron's total down, so the input votes against what the neuron detects.

Why does adding hidden layers help in the spiral exercise?

Without hidden layers the network can only draw a straight dividing line; each extra layer lets it combine simple boundaries into curved, complicated ones.