How AI works

What is a neural network, in plain English?

Strip away the brain metaphors and a neural network is arithmetic: multiply, add, bend, pass it on. Here's a small one worked through by hand, including the moment it learns.

By the Toorova team · Published November 4, 2026 · 11 min read · How we write these

Short answer

A neural network is a math function built from many small units called neurons. Each neuron multiplies its inputs by numbers called weights, adds them up along with a bias, and passes the total through a simple bend, such as "replace negatives with zero". Neurons are stacked in layers, each feeding the next. Learning means adjusting the weights a little at a time so the network's outputs get closer to the right answers on example data.

What a neural network is, in plain English

A neural network is a way of turning numbers in into numbers out, using a big pile of adjustable settings that get tuned on examples. Feed it the pixels of a photo and it gives back a score for "cat". Feed it a sentence and it gives back scores for the next word. In between there's no hidden rulebook. There's arithmetic, done by lots of small, identical units.

Those units are called neurons (or nodes). Each neuron does three things:

  1. It multiplies each input by its own number, called a weight. A big weight means "this input matters a lot". A negative weight means "this input counts against".
  2. It adds the results together, plus one extra number called the bias, which shifts the total up or down no matter what the inputs are.
  3. It passes that total through an activation function, a simple fixed bend, and sends the result on.

Google's Machine Learning Crash Course says the first two steps compute a node's value the same way as the output of a linear model: multiply each input by its weight, add them up, add the bias. The weights and biases together are the network's parameters. They're the only part that changes when a network learns.

Neurons are arranged in layers. The input layer holds the raw numbers. The output layer gives the answer. Any layers in between are called hidden layers, because you never see their values directly; you only see what comes out the end. In the simplest kind of network, every neuron in one layer feeds every neuron in the next, which is why diagrams of networks look like a web of lines.

The name comes from a loose resemblance to brain cells, which also collect signals from many neighbors and either fire or stay quiet. Don't push the comparison far. Stanford's CS231n course notes, right after describing the biological version, stress that the artificial model is very coarse. A real neuron is a living cell with chemistry and timing that a weighted sum ignores, and the same notes put the human nervous system at about 86 billion neurons joined by 1014 to 1015 connections. An artificial neural network has more in common with a spreadsheet than with a brain.

One artificial neuron, worked out by hand

Here's a single neuron doing a small job: guessing whether a student will pass tomorrow's exam from two inputs, hours studied and hours slept. The weights below are picked by hand for the example. In a real network they'd be learned, which is what the later sections show.

InputValueWeightValue × weight
Hours studied30.82.4
Hours slept70.32.1
Bias−3.0
Weighted sum1.5

The weighted sum is 2.4 + 2.1 − 3.0 = 1.5. Read the weights as opinions: hour for hour, this neuron thinks studying counts more than sleep (0.8 against 0.3). The bias of −3 sets the bar. With no study and no sleep, the total starts at −3, well on the "fail" side, and the inputs have to earn their way up.

Now the activation. For a yes-or-no question a common choice is the sigmoid, which Google's course defines as 1 / (1 + e−x) and which squashes any number into a value between 0 and 1. Big positive totals land near 1, big negative ones near 0, and a total of exactly 0 lands on 0.5. For this student:

sigmoid(1.5) = 1 / (1 + e−1.5) = 1 / (1 + 0.223) = 0.818

The neuron's answer is 0.818, which you can read as "about an 82% chance of passing". Change an input and you can feel what the weights do. Cut sleep to 4 hours and the total drops by 3 × 0.3 = 0.9, to 0.6, so the output falls to 0.646. Keep the sleep and add one more hour of study instead, and the total rises by 0.8, to 2.3, giving 0.909.

That's one neuron: a weighted vote with a threshold, where the weights decide whose vote counts. It's also roughly where the field started. In 1958 Frank Rosenblatt's perceptron, a single layer of units much like this one, ran on an IBM 704, and Cornell's account says that after 50 trials, the computer taught itself to distinguish cards marked on the left from cards marked on the right.

Why neural networks need layers, and why each layer needs a bend

A single neuron can only split its inputs with one straight boundary: the weighted sum is above the threshold on one side and below it on the other. That handles "more study, better odds". It can't handle anything with a twist, like "some caffeine helps and too much hurts". Rosenblatt's perceptron had one layer, and the Cornell piece notes he didn't know how to train networks with multiple layers. Marvin Minsky argued its functions were too simple, and the same article says a 1969 book by Minsky and Seymour Papert criticizing the work essentially sealed the perceptron's fate.

Stacking layers fixes the limit, with one catch. If every neuron only did the weighted sum, stacking would buy you nothing. A weighted sum of weighted sums is just another weighted sum, so ten such layers collapse into one. Google's course says it in a line: linear operations performed on linear operations are still linear. CS231n makes the same point: leave out the bend and the layers' weights could be collapsed to a single matrix.

That's what the activation function is for. It's a deliberate kink that stops the layers from collapsing into one. A popular choice for hidden layers is the ReLU (rectified linear unit), defined as max(0, x): negative totals become 0, positive totals pass through unchanged. It looks too simple to matter. But each ReLU neuron contributes a line with a bend in it, and adding up many bent lines with different weights lets a network trace curves, steps and bumps.

How far does that go? CS231n states that networks with at least one hidden layer are universal approximators: with enough hidden neurons, they can approximate any continuous function as closely as you like. The same notes add the honest caveat that this fact says little about why networks work so well in practice. It promises that good weights exist. It doesn't promise training will find them.

Counting a network's parameters

Every connection carries one weight and every neuron after the input layer carries one bias. Google's course counts this out for a network with 3 inputs, 4 hidden neurons and 1 output, noting that the total number of parameters includes both the weight parameters and the bias parameters: each hidden neuron has 3 weights plus a bias, the output has 4 weights plus a bias, so 16 + 5 = 21. The tiny network in the next section has 9. GPT-3, a 2020 language model from OpenAI, had 175 billion parameters. Same kind of numbers, unimaginably more of them.

A tiny neural network, run by hand

Here's a whole network small enough to compute on paper. It takes the same two inputs (3 hours studied, 7 hours slept), runs them through one hidden layer of two ReLU neurons, and finishes with one sigmoid output neuron. The starting weights are made up for the example. Running the numbers from input to output is called a forward pass.

A tiny neural network with two inputs, a hidden layer of two neurons and one output neuron. The inputs are 3 hours studied and 7 hours slept. Lines from the inputs to the hidden neurons carry weights 0.5, 0.2, 0.6 and minus 0.5. Hidden neuron 1 outputs 1.9 and hidden neuron 2 outputs 0. Lines to the output carry weights 1.2 and 0.8, and the output is 0.69, a 69 percent chance of passing.inputshidden layeroutput0.50.60.2−0.51.20.8371.900.69studiedsleptbias −1bias +1bias −1.5
The tiny network from the worked example. Numbers inside the circles are the values for one student; numbers beside the lines are weights. Hidden neuron 2 outputs 0, so its dashed line carries nothing this time.

Hidden neuron 1 has weights 0.5 (study) and 0.2 (sleep), and a bias of −1:

0.5 × 3 + 0.2 × 7 − 1 = 1.5 + 1.4 − 1 = 1.9, and ReLU(1.9) = 1.9

Hidden neuron 2 has weights 0.6 and −0.5, and a bias of +1. It likes study but is put off by a lot of sleep:

0.6 × 3 − 0.5 × 7 + 1 = 1.8 − 3.5 + 1 = −0.7, and ReLU(−0.7) = 0

The output neuron treats the two hidden values as its inputs, with weights 1.2 and 0.8 and a bias of −1.5:

1.2 × 1.9 + 0.8 × 0 − 1.5 = 0.78, and sigmoid(0.78) = 0.686

The network says about a 69% chance of passing. Two things are worth seeing here.

First, the hidden neurons are inventing their own in-between measurements. Nobody told neuron 1 what to stand for. Its weights make it respond to a particular mix of study and sleep, and the output neuron treats that mix as evidence. In a trained network, a hidden neuron ends up measuring whatever helped lower the error during training. Sometimes that's something a person would recognize. Often it isn't.

Second, neuron 2 is switched off for this student. ReLU turned its −0.7 into 0, so whatever it might have noticed adds nothing to the answer. For a student who slept 4 hours, its total would be 1.8 − 2 + 1 = 0.8 and it would switch on. Different inputs light up different parts of the network, and that's a big part of how a network with fixed weights can treat different cases differently.

What learning changes in a neural network: the weights

So far every weight was picked by hand. Learning is how a network picks them itself, from examples where the right answer is known. Nothing else about the network changes during training. The number of layers stays the same, the activation functions stay the same, the arithmetic stays the same. Only the weights and biases move.

Say this student did pass, so the right answer is 1 and the network said 0.686. To measure how wrong that is, training uses a loss: a single number that's 0 for a perfect answer and grows as the answer gets worse. For a yes-or-no output the standard loss is −ln(the probability the network gave to the right answer). Here that's −ln(0.686) = 0.377.

The loss depends on all 9 parameters. Change any weight and the output shifts, so the loss shifts. For each weight, training asks: if I nudge this up a tiny bit, does the loss go up or down, and how quickly? That rate is the weight's gradient. Then comes gradient descent, which Google's course describes as a mathematical technique that iteratively finds the weights and bias by repeating four steps: compute the loss, work out which direction to move the weights to reduce it, move them a small amount that way, and go again.

Working out every weight's gradient efficiently, layer after layer, is the job of backpropagation. It starts at the output, where the error is plain to see, and works backward through the layers using the chain rule from calculus, handing each weight its share of the blame. Google's course calls it the most common training algorithm for neural networks. The classic reference is the 1986 Nature paper by David Rumelhart, Geoffrey Hinton and Ronald Williams, Learning representations by back-propagating errors.

One learning step, with real numbers

Here's one step of backpropagation plus gradient descent on the tiny network, with a step size (called the learning rate) of 0.01. One convenient fact makes the start easy: with a sigmoid output and this loss, the gradient at the output neuron's total is just prediction minus answer, 0.686 − 1 = −0.3143. Negative means "push the output up". Backpropagation passes that −0.3143 backward, multiplying by whatever sits along each path:

ParameterBeforeGradientAfter
Output weight from neuron 11.2−0.3143 × 1.9 = −0.601.206
Output bias−1.5−0.31−1.497
Neuron 1, study weight0.5−0.3143 × 1.2 × 3 = −1.130.511
Neuron 1, sleep weight0.2−0.3143 × 1.2 × 7 = −2.640.226
Neuron 1 bias−1−0.3143 × 1.2 = −0.38−0.996
Output weight from neuron 20.8−0.3143 × 0 = 00.8
Neuron 2's weights and bias0.6, −0.5, 10unchanged

Each new value is the old value minus 0.01 times its gradient, so a negative gradient nudges the weight up. Now run the forward pass again. Hidden neuron 1 gives 0.511 × 3 + 0.226 × 7 − 0.996 = 2.12. The output total becomes 1.206 × 2.12 − 1.497 = 1.06, and sigmoid(1.06) = 0.743. One step moved the prediction from 0.686 to 0.743 and cut the loss from 0.377 to 0.297.

Look at what moved and what didn't. Weights attached to bigger inputs got bigger nudges: the sleep weight moved most because 7 is the largest input. Neuron 2 learned nothing at all from this example, because ReLU had switched it off and no blame could flow back through a 0. Google's course warns that a ReLU neuron can get stuck like that for good, since once the weighted sum for a ReLU unit falls below 0, the ReLU unit can get stuck. And a step that helps one student only fits that one student a bit better. Real training repeats this over thousands or millions of examples, many times over, so the weights settle where they're right on average.

Where beginners go wrong about neural networks

  • "It's a digital brain." The resemblance stops at "many inputs, one output". What you've just computed by hand is the whole mechanism: multiply, add, bend. There's no chemistry, no timing and nothing that experiences anything.
  • "It stores the training examples, or a list of rules." After training, all that's left is the parameters. The tiny network above knows nothing about students except nine numbers. Whatever a big network has picked up is spread across millions or billions of weights, which is why nobody can open one and read off its reasoning.
  • "It keeps learning while I use it." Learning happens during training. When you use a finished network, it only runs forward passes with frozen weights. A chatbot that seems to remember you is the app around it saving notes and feeding them back in, which our explainer on how large language models work covers.
  • "The weights mean something you can read." In the hand-built example they did, because they were chosen to. Learned weights rarely line up with tidy human ideas. Hidden neurons settle on whatever in-between measurements happen to lower the loss.
  • "More layers is always better." Deeper networks can represent more, but they're harder to train. During backpropagation the gradients reaching early layers can shrink toward zero, and Google's course notes that layers with vanishing gradients train very slowly, or not at all. The same page suggests ReLU as one way to help, since its slope stays at 1 for any positive total instead of fading out.

What "deep learning" means

Deep learning is training neural networks with many hidden layers. The word "deep" refers to the number of layers, not to any depth of understanding. The mechanism is exactly what you worked through above: weighted sums, activations, a loss, and backpropagation nudging every weight downhill. The networks behind image recognition and chatbots add specialized layer designs on top, but each one still runs on the same multiply, add and bend.

Common questions

What's the difference between AI, machine learning and neural networks?

AI is the broad goal of getting machines to do tasks that seem to need intelligence. Machine learning is one way to get there, by learning from examples instead of following hand-written rules. Neural networks are one family of machine learning models.

What is deep learning?

Deep learning means training neural networks with many hidden layers. The mechanism is the same as in a tiny network: weighted sums, activation functions and backpropagation, stacked much deeper and trained on far more data.

How big is a neural network?

Anything from one neuron to billions of parameters. The worked example here has 3 neurons and 9 parameters. Size is usually quoted in parameters, and GPT-3 had 175 billion.

Do I need calculus to understand neural networks?

Not to understand what they do. A forward pass is multiplication and addition. Backpropagation uses the chain rule from calculus, but software libraries compute it for you, and "nudge each weight in the direction that lowers the error" is enough to get started.

Why is it called a neural network?

Its units were loosely inspired by brain cells, which collect signals from many neighbors and either fire or stay quiet. The artificial version keeps only that outline: weighted inputs, a sum and a simple activation.

Learn it properly

This article built one small network by hand. Machine Learning, Demystified takes it from there in short lessons with exercises: how machines learn from examples, deep learning and backpropagation, tensors and how models train, convolutional networks for images, and why models overfit.

See Machine Learning, Demystified in the Toorova catalog →

Sources

  1. Neural networks: Nodes and hidden layers · Google Machine Learning Crash Course
  2. Neural networks: Activation functions · Google Machine Learning Crash Course
  3. Linear regression: Gradient descent · Google Machine Learning Crash Course
  4. Neural networks: Training using backpropagation · Google Machine Learning Crash Course
  5. CS231n: Neural Networks Part 1, Setting up the Architecture · Stanford University
  6. Professor's perceptron paved the way for AI, 60 years too soon · Cornell Chronicle, 2019
  7. Geoffrey E. Hinton's publications: Backpropagation learning · University of Toronto
  8. Language Models are Few-Shot Learners (GPT-3) · Brown et al., arXiv, 2020

Read next