1. Home
  2. 3Blue1Brown

Oct 4, 2017

The 13,000 numbers that let computers read handwriting

18 min → 2:04

Overview

The host of 3Blue1Brown explains the structure of a simple neural network and how this mathematical model processes pixel data through layers of neurons to recognize handwritten digits.

3 things to know

Neural Network Structure

The network is composed of layers of interconnected "neurons." This episode details a network with an input layer, two hidden layers, and an output layer.

▶ Watch at 12:31

Neurons as Number Holders

In this context, a neuron is simplified to be a container that holds a number between 0 and 1, known as its "activation." A higher activation means the neuron is more "active" or "lit up."

▶ Watch at 2:53

Layers of Abstraction

The first layer takes raw pixel data, the hidden layers are intended to recognize intermediate patterns like edges and loops, and the final output layer identifies the complete digit.

More

The network is designed to build understanding hierarchically.

▶ Watch at 0:50

Also in this episode

Weights and Biases

The connections between neurons are governed by "weights" (which determine the influence of one neuron on another) and "biases" (which determine how high a neuron's weighted input needs to be before it becomes meaningfully active).

More

These are the 13,000+ adjustable parameters that define the network's behavior.

Activation Function (Sigmoid)

A mathematical function is used to take the weighted sum of inputs for a neuron and "squish" the result into a value between 0 and 1, which then becomes that neuron's activation level.

Quotes

“When I say 'neuron', all I want you to think about is a thing that holds a number. Specifically, a number between 0 and 1. It's really not more than that.”

▶ Watch at 2:53

“When we talk about 'learning', what that's referring to is getting the computer to find a valid setting for all of these many, many numbers, so that it'll actually solve the problem at hand.”

▶ Watch at 12:31

“Hey, sit down and write for me a program that takes in a grid of 28x28 pixels like this and outputs a single number...telling you what it thinks the digit is. Well, the task goes from comically trivial to dauntingly difficult.”

▶ Watch at 0:50

Full summary

Episode Overview

  • The episode introduces the complex problem of handwritten digit recognition, highlighting how the human brain effortlessly identifies digits despite variations in writing style, while programming a computer to do so is dauntingly difficult.
  • It presents a neural network as a mathematical model, inspired by the brain, designed to solve this problem by processing pixel data through a series of layers.
  • The video breaks down the concept of a neural network into two main parts: its structure (the arrangement of neurons and layers) and the process of learning (adjusting parameters to recognize patterns).
  • This episode focuses exclusively on explaining the structure of a simple, "plain vanilla" neural network, setting the stage for a future video on how the network "learns."

Key Concepts

  • Neural Network Structure: The network is composed of layers of interconnected "neurons." This episode details a network with an input layer, two hidden layers, and an output layer.
  • Neurons as Number Holders: In this context, a neuron is simplified to be a container that holds a number between 0 and 1, known as its "activation." A higher activation means the neuron is more "active" or "lit up."
  • Layers of Abstraction: The network is designed to build understanding hierarchically. The first layer takes raw pixel data, the hidden layers are intended to recognize intermediate patterns like edges and loops, and the final output layer identifies the complete digit.
  • Weights and Biases: The connections between neurons are governed by "weights" (which determine the influence of one neuron on another) and "biases" (which determine how high a neuron's weighted input needs to be before it becomes meaningfully active). These are the 13,000+ adjustable parameters that define the network's behavior.
  • Activation Function (Sigmoid): A mathematical function is used to take the weighted sum of inputs for a neuron and "squish" the result into a value between 0 and 1, which then becomes that neuron's activation level.

Quotes

  • At 00:50 - "Hey, sit down and write for me a program that takes in a grid of 28x28 pixels like this and outputs a single number...telling you what it thinks the digit is. Well, the task goes from comically trivial to dauntingly difficult." - This quote effectively frames the core challenge of image recognition that neural networks are designed to solve.
  • At 02:53 - "When I say 'neuron', all I want you to think about is a thing that holds a number. Specifically, a number between 0 and 1. It's really not more than that." - This is the video's central simplification, demystifying the concept of a neuron and making the entire network more understandable.
  • At 12:31 - "When we talk about 'learning', what that's referring to is getting the computer to find a valid setting for all of these many, many numbers, so that it'll actually solve the problem at hand." - This provides a clear, concise definition of what "learning" means in the context of a neural network: finding the right values for its weights and biases.

Takeaways

  • A neural network can be understood as a complex but organized mathematical function that transforms a set of input numbers (pixels) into a set of output numbers (digit probabilities).
  • The network's power comes from its layered structure, which allows it to build up recognition from simple features (like edges) to complex concepts (like the shape of a "9").
  • The behavior of the entire network is controlled by thousands of simple parameters—weights and biases—which are adjusted during the "learning" process.
  • Each neuron's output (its "activation") is calculated by taking a weighted sum of all the activations from the previous layer, adding a bias, and then applying an activation function like the Sigmoid.

Watch the full episode 18 min

Read along with the audio summary

Your brain effortlessly identifies handwritten digits despite wild variations in writing style, yet programming a computer to take in a grid of twenty eight by twenty eight pixels and output what digit it sees is dauntingly difficult. This episode, which came out on October 4, 2017, breaks down the mathematical model designed to solve that exact problem. By the end, you will understand the complete structure of a plain vanilla neural network and how it turns raw pixels into recognizable numbers.

How a brain inspired mathematical model is built to recognize patterns. Instead of one giant step, the network processes pixel data through a series of interconnected layers. Specifically, the network detailed here is arranged into an input layer, two middle layers known as hidden layers, and a final output layer. Each of these layers is packed with interconnected units called neurons that pass information forward.

To understand what those neurons actually do, you can strip away the complicated biology and think of a neuron as a simple number container. It is really not more than a thing that holds a single number between zero and one. In a neural network, that stored number is called the neuron's activation. You can picture it like a tiny lightbulb, where a higher number closer to one means the neuron is more active or lit up.

Those lit up containers work together by building understanding in a hierarchy from simple to complex. A computer cannot just glance at a sloppy number nine and know what it is, so it has to break the image down into smaller pieces. The initial layer takes in the raw pixel data from that twenty eight by twenty eight grid. From there, the two hidden layers are intended to recognize intermediate patterns like little edges and loops, which the final output layer then combines to identify the complete digit.

How more than thirteen thousand adjustable knobs control the entire network's behavior. Every single connection between those layered neurons is governed by two kinds of parameters called weights and biases. Weights determine how much influence one neuron has on another, while biases act like a threshold, determining how high a neuron's weighted input needs to be before it becomes meaningfully active. When people talk about a computer learning, they are referring to getting the machine to find a valid setting for all of these many numbers so it actually solves the problem at hand.

How the network keeps all of those weighted calculations cleanly between zero and one. When a neuron takes in the weighted sum of inputs from the previous layer and adds its bias, the resulting total could be almost any number. To make sure the result fits back into our zero to one container, the network uses a mathematical tool called an activation function, such as the Sigmoid function. This function takes the entire weighted sum and squishes the result into a clean value between zero and one, which then becomes that neuron's new activation level.

A neural network is an organized mathematical function that transforms input numbers from pixels into output numbers representing digit probabilities. Its power comes from its layered structure, controlled by over thirteen thousand weights and biases, building recognition from simple edges to the complete shape of a nine.

More from 3Blue1Brown

Related Episodes