Backpropagation › Backpropagation

Michael BrenndoerferMay 6, 20254 min read
Language AI HandbookAll chapters
Part 10 of 67Neural Network Foundations
Chapter 65Backpropagation › Backpropagation
Reading section 1 of 20 · Backpropagation · 4 minSection 1 of 20 · 4 min

Book contents

Section 1 of 20 · 4 min read

Backpropagation › BackpropagationOne section · Sections in this chapter1 / 20 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

How does a neural network learn? In the previous chapters, we built multilayer perceptrons that transform inputs through layers of weights and activations, and we defined loss functions that measure prediction quality. But we haven't answered the fundamental question: how do we update the millions of parameters in a neural network to reduce the loss?

The answer is backpropagation, short for "backward propagation of errors." This algorithm computes the gradient of the loss function with respect to every weight in the network, telling us exactly how to adjust each parameter to improve predictions. Backpropagation is the most important algorithm in deep learning. Without it, training neural networks would be computationally intractable.

This chapter builds backpropagation from the ground up. We start with computational graphs that visualize how operations compose, then derive the chain rule that makes gradient computation tractable. You'll trace through forward and backward passes step by step, understand gradient flow through activation functions, examine Jacobian matrices for vector operations, and implement backpropagation from scratch. We'll also cover numerical gradient checking to verify implementations, common backprop bugs, and how PyTorch autograd works internally. By the end, you'll see exactly how modern deep learning frameworks compute gradients automatically.