רֵאשִׁית חָכְמָה קְנֵה חָכְמָה

“The beginning of wisdom: get wisdom.” Mishlei 4:7

An exhibit for curious children of every age

A Beginner's Attempt to Understand Artificial Intelligence

How a living brain sees a number, how a computer learns to do the same, and what a marching band at halftime can teach us about both.

Plate I

The Living Brain: Helpers Passing Notes

אוֹדְךָ עַל כִּי נוֹרָאוֹת נִפְלֵיתִי“I will praise Thee, for I am fearfully and wonderfully made.” Tehillim 139:14

Inside your head live about 86 billion tiny cells called neurons. Think of each one as a little helper. A helper listens to its neighbors, and when enough of them call out at once, it gets excited and passes a message along to the next helpers.

The message travels as a small electric spark down a long wire called the axon. At the end of the wire is a tiny gap, the synapse. The spark cannot jump the gap, so the helper sends chemical messengers across instead. The next helper catches them on its branches, the dendrites, and decides whether to pass the message on.

Each helper can be linked to thousands of others. When you practice something, the links you use most grow stronger. That is what learning looks like inside a brain.

Two neurons connected at a synapse Dendriteslisten Cell body Axonthe spark travels Synapsechemical note Next helper signal →

Up the chain: how your eyes recognize a “7”

  1. The eye. Light-catching cells at the back of your eye each notice one tiny spot: bright or dark.
  2. First stop in the brain. Helpers at the back of your head notice short edges: a little slant here, a flat line there.
  3. Next stops. Higher helpers combine edges into shapes: corners, curves, loops.
  4. Higher still. Helpers that know whole things put the shapes together: “a flat line on top and a slant going down.”
  5. Recognition. “That's a seven!” You know it, and you can say it out loud.

Scientists understand much of this chain of seeing. How it all becomes your own awareness, your consciousness, is still one of the great mysteries.

Plate II

The Halftime Show: An Artificial Brain on the Football Field (Understanding this means understanding the Great 2033 Race)

Picture halftime. The marching band fills the field in rank after rank: drums, trombones, trumpets, sousaphones. Suddenly the scoreboard lights up a number. The whole band stops and looks. Each band member is a helper, one artificial neuron. The drummers nearest the scoreboard read its lights and pass the word to the trombones, who pass it to the trumpets, who pass it to the sousaphones. At the far end stand ten sousaphone players, one for each digit 0 through 9. Whoever plays loudest is the band's answer.

Scoreboard

DrumsInput layer. Each drummer reads one row of scoreboard lights.
TrombonesFirst hidden layer. They notice little strokes and edges.
TrumpetsSecond hidden layer. They notice bigger pieces: loops and long lines.
SousaphonesOutput layer. Ten players, one for each digit 0–9.

This band is a small picture of the idea. The real network in the 3Blue1Brown videos reads a 28 × 28 picture, so its first rank has 784 helpers, followed by two ranks of 16 and a final rank of 10.

Plate III

Rehearsal: Why the Band Needs Thousands and Thousands of Sevens

A brand-new band does not know any numbers. Every player's listening knobs start out set at random, so the first time the scoreboard shows a 7, the band might shout “3!” Before it can perform, the band has to rehearse, and rehearse, and rehearse.

At rehearsal we show the band picture after picture of handwritten numbers. Each picture comes with the right answer attached, like an answer key. No two sevens look alike. Some lean, some have a line through the middle, some are sloppy.

777777̶7

If the band sees enough different sevens, it slowly learns what all sevens have in common: a line across the top and a slant coming down. Eventually, whenever any 7 appears, the sousaphone player for 7 plays loudest.

And when the band gets it wrong, there is a way to work backward from the last row to make it right. Start at the sousaphones, measure how wrong the answer was, and walk back rank by rank, telling every player how to adjust their listening. This is called backpropagation. Taking those small corrections one step at a time is called gradient descent. Doing it over and over, picture after picture, is called training.

One rehearsal, repeated many thousands of times

  1. Step 1Show a pictureA handwritten 7, with the answer key that says “seven.”
  2. Step 2The band guessesThe message passes up the ranks. The band answers “3.”
  3. Step 3Score the mistakeHow wrong was it? That number is the cost.
  4. Step 4Work backwardBackpropagation walks back from the sousaphones, and every knob turns a tiny bit.

Then the next picture, and the next, and the next…

How much practice?

60,000practice pictures in the famous handwritten-digit collection used in the 3Blue1Brown videos, about 6,000 of each digit.
10,000more pictures kept hidden until the end, as a final test. They show whether the band truly learned sevens or only memorized the practice pictures.
Trillionsof words read by large language models like GPT. The bigger the band, the more rehearsal it needs.

The band does not see each picture only once. It goes through the whole stack again and again, getting a little better each time.

Training data
All the practice examples the network learns from.
Label
The right answer attached to each example, like an answer key.
Training
Showing examples, scoring mistakes, and turning the knobs, over and over.
Epoch
One full trip through all the practice examples.
Test set
Examples kept hidden during practice, used at the end to check what was really learned.

Plate IV

Side by Side

Living brainArtificial brainThe marching band
One helperA neuronAn artificial neuron (a number)One band member
How excited it isHow often it fires sparksIts activation, from 0 to 1How loudly they play
Who it listens toSynapse strengthWeightsHow closely they listen to each player behind them
Groups of helpersAreas of the visual cortexLayersRanks across the field
How it learnsUsed links grow strongerGradient descent and backpropagationThe band director corrects each rank after a wrong answer
SizeAbout 86 billion neuronsThousands to billions of parametersA field full of players

The artificial version borrows the brain's idea of many small helpers passing messages. It is a simplified picture, far simpler than the real thing.

Plate V

Seven Chapters, One Example

These seven titles are the chapters of 3Blue1Brown's YouTube series on neural networks. Here's the whole story told with one example: teaching a computer to read handwritten numbers 0 through 9.

1

Chapter One

What is a neural network?

Imagine a big team of tiny helpers standing in rows. The first row looks at the picture of a number, one helper per little square (pixel), and each says how dark its square is. They pass notes to the next row, which spots small pieces like a line or a loop. The next row puts the pieces together (“a loop on top plus a line down... that looks like a 9!”). The last row has 10 helpers, one for each digit, and whoever shouts loudest is the guess.

On the field: the drums read the scoreboard, the trombones and trumpets find the pieces, and the loudest sousaphone gives the answer.

Neuron
One tiny helper holding a number that says how excited it is.
Layer
One row of helpers.
Weight
How much one helper listens to another. Turning these knobs is what changes the network's thinking.
2

Chapter Two

Gradient descent: how it learns

At first the knobs are set randomly, so the network guesses badly. We show it a “7,” it says “3,” and we give it a score for how wrong it was. Learning means turning the knobs a little at a time so the wrongness gets smaller, like walking downhill in fog by feeling which way the ground slopes.

On the field: at the first rehearsal the band is a mess. After every mistake, each player adjusts a little, and rehearsal by rehearsal the music gets right.

Cost (or loss)
The “how wrong were you” score.
Gradient
The arrow pointing which way is downhill.
Gradient descent
Taking many small steps downhill until mistakes are tiny.
3

Chapter Three

What is backpropagation doing?

When the network gets an answer wrong, it has to figure out who to blame. Backpropagation starts at the answer and walks backward through the rows, telling each helper, “You pushed us the wrong way; next time listen a bit less to that friend and a bit more to this one.”

On the field: the band director starts at the sousaphones and walks back toward the drums, giving each rank its correction.

Backpropagation
Passing the blame (or credit) backward so every knob knows how to change.
4

Chapter Four

Backpropagation calculus

This is the math version of the blame game. Each knob affects the next helper, which affects the next, all the way to the final score. Calculus measures how much a tiny nudge to one knob changes the final wrongness, and multiplies those small effects together along the chain.

On the field: if one drummer plays a little louder, how much louder does the trombone get, then the trumpet, then the final sousaphone? Multiply those steps together and you know.

Derivative
How much one thing changes when you nudge another.
Chain rule
Multiplying those changes step by step, like dominoes.
5

Chapter Five

Transformers: the tech behind GPT

Now swap pictures of numbers for words. A GPT reads a sentence and guesses the next word, again and again, so it can write whole paragraphs. It's the same idea of helpers and knobs, just enormous and built from special parts.

On the field: instead of reading a number on the scoreboard, the band reads a line of words and plays the note that should come next.

Token
A word or piece of a word.
Embedding
Turning each word into a list of numbers that captures its meaning.
GPT
Generative (writes new text), Pre-trained (learned from huge amounts of reading), Transformer (the design it uses).
6

Chapter Six

Attention, step by step

Words change meaning depending on their neighbors: “bank” by a river versus “bank” with money. Attention lets each word look around the sentence and ask, “Which other words matter to me?” Then it borrows meaning from them.

On the field: each player glances along the line to see which neighbors to follow before playing.

Query
What a word is looking for.
Key
What each word offers.
Value
The information that actually gets shared when there's a match.
7

Chapter Seven

How might LLMs store facts?

After attention, each word passes through more rows of helpers. Researchers think some of these act like little “if this, then that” switches. For example, “if I see Michael Jordan, then add basketball.” Millions of these switches, spread across the knobs, work together like a giant hidden notebook of facts.

On the field: the band has memorized thousands of songs, not on sheet music, but spread across how every player listens to every other.

MLP (multilayer perceptron)
The fact-storing rows of helpers between attention steps.
Parameters
All the knobs together, often billions of them.

Plate VI

Reading Table

The series is free to watch and read. Start with Chapter One and follow along with the marching band in mind.

youtube.com/@3blue1brown

The video series. Search “3Blue1Brown neural networks” to find the playlist.

3blue1brown.com/topics/neural-networks

The matching text version of each chapter, with the same animations.