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
Oct 4, 2017
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.
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:31In 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:53The 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.
The network is designed to build understanding hierarchically.
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.
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.
“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.”
“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.”
“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.”
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.
3Blue1Brown
3Blue1Brown
3Blue1Brown
3Blue1Brown
3Blue1Brown
3Blue1Brown
3Blue1Brown
3Blue1Brown
Anil Ananthaswamy
Sean Carroll's Mindscape: Science, Society, Philosophy, Culture, Arts, and Ideas
The AI Daily Brief: Artificial Intelligence News and Analysis
Eye on AI
Eye on AI
Dwarkesh Podcast
Machine Learning Street Talk
Machine Learning Street Talk
Grant Sanderson