Backpropagation
The central algorithm for training neural networks.
More
It efficiently calculates the gradient of the cost function, which indicates how to adjust each weight and bias to reduce the network's error.
Nov 2, 2017
The 3Blue1Brown host explains backpropagation intuitively, walking through how neural networks use cost functions, gradient descent, and mini-batches of data to adjust weights and biases backward from the output layer.
The central algorithm for training neural networks.
It efficiently calculates the gradient of the cost function, which indicates how to adjust each weight and bias to reduce the network's error.
The video explains that for a single training example, backpropagation determines how each neuron in the preceding layer should change its activation to correct the output error.
This chain of desired changes is propagated backward through the entire network.
The desired adjustments to weights and biases are proportional to their impact.
For example, weights connected to highly active neurons have a greater influence and will be adjusted more significantly, which is analogous to the Hebbian theory principle: "neurons that fire together, wire together."
A computationally efficient method for training.
Instead of calculating the gradient over the entire dataset for each step, SGD uses small, random subsets of data called "mini-batches" to approximate the gradient and update the network more frequently.
An optimization algorithm that minimizes the cost function by repeatedly adjusting the network's parameters (weights and biases) in the direction opposite to the gradient.
A measure of the network's error.
It is calculated by taking the sum of the squared differences between the network's output and the desired output, averaged over all training examples.
“It's a little more like a drunk man stumbling aimlessly down a hill, but taking quick steps, rather than a carefully calculating man determining the exact downhill direction of each step.”
“The magnitude of each component here is telling you how sensitive the cost function is to each weight and bias.”
“'Neurons that fire together wire together.'”
How does a neural network learn from data by working backward through its own mistakes? That is the core question explored in this video episode, which came out on November 2, 2017.
Backpropagation is the central algorithm that trains neural networks to reduce errors. The size of each component in a mathematical vector called the gradient tells you how sensitive the network's overall error is to each individual weight and bias.
Those adjustments rely on gradient descent, an optimization algorithm that shrinks error by going in the opposite direction. Gradient descent resolves this by repeatedly nudging the network's weights and biases in the direction opposite to the gradient to minimize error.
Measuring that error requires a cost function. The cost function calculates this by taking the sum of the squared differences between the network's actual output and the desired output, averaged over all training examples.
An intuitive walkthrough shows how a single training example creates a wish list of changes. Backpropagation determines how each neuron in the preceding layer should change its activation to fix the output error, sending a chain of desired changes backward through the entire network.
These backward changes lead to proportional adjustments where the most active neurons get the biggest updates. Weights connected to highly active neurons have a greater influence and get adjusted more significantly, much like the Hebbian theory principle from neuroscience that neurons that fire together, wire together.
Stochastic gradient descent speeds up training by learning from small, random batches of data. Instead, stochastic gradient descent uses small, random subsets of data called mini batches to approximate the gradient and update the network more frequently.
Training a neural network means propagating output errors backward to nudge weights and biases down the negative gradient, giving the biggest adjustments to the most active connections. With stochastic gradient descent, it is a little more like a drunk man stumbling aimlessly down a hill, but taking quick steps, rather than a carefully calculating man determining the exact downhill direction of each step.
3Blue1Brown
3Blue1Brown
3Blue1Brown
3Blue1Brown
3Blue1Brown
3Blue1Brown
3Blue1Brown
3Blue1Brown
Eye on AI
Eye on AI
The AI Daily Brief: Artificial Intelligence News and Analysis
Grant Sanderson
Machine Learning Street Talk
The Gradient
Eye on AI
Anil Ananthaswamy
Sean Carroll's Mindscape: Science, Society, Philosophy, Culture, Arts, and Ideas