Essay · August 22, 2026

Backpropagation and Gradient Descent

High-school math at planetary scale.

By KW Norton.

The same chain rule taught in high-school calculus sits at the root of every large language model now rewriting how we write, search, code, and reason. No new branch of mathematics was required. Electronic systems applied that elementary rule at planetary scale, with enough data, compute, and careful engineering, and the world began to change.

This essay strips away the mystique. It explains backpropagation and gradient descent as mechanisms, not magic. The goal is clarity: what happens inside the training loop, why the chain rule is enough, and where the real engineering difficulty lies.

1. The chain rule is the whole trick

A neural network is a composition of functions. Input x passes through layer f₁, then layer f₂, and so on, until the final layer produces an output ŷ. In the simplest case:

ŷ = fₙ(fₙ₋₁(…f₂(f₁(x))…))

Training means adjusting every internal parameter so that ŷ moves closer to the desired target y. To adjust intelligently, we need to know how a small change in each parameter changes the final loss L(y, ŷ).

The chain rule gives exactly that. If z = g(h(x)), then:

dz/dx = dz/dh · dh/dx

In a deep network the chain rule is applied repeatedly, layer by layer, from the output back toward the input. Each link in the chain is a local derivative; multiplied together, they yield the global derivative of the loss with respect to every weight. That is backpropagation: the chain rule executed backward through the computation graph.

2. The forward and backward passes

Training a network proceeds in two alternating stages:

Forward pass. A batch of inputs is propagated through the network. Every layer computes its weighted sum, applies an activation function, and passes the result to the next layer. At the end, the loss function compares the network output ŷ to the target y and returns a scalar error.

Backward pass. The loss gradient with respect to the output is computed first. Then the chain rule is applied in reverse: gradients flow backward through each layer, giving the derivative of the loss with respect to every weight and bias. These derivatives point in the direction that would increase the loss; the update step subtracts a fraction of them to decrease the loss.

The computational cost is roughly twice the forward pass: one forward evaluation and one backward evaluation. Modern automatic-differentiation frameworks (Autograd, JAX, PyTorch, TensorFlow) build the computation graph implicitly and apply the chain rule automatically. The user writes the forward model; the system derives the backward pass.

3. Gradient descent: walking downhill in high dimensions

A neural network may have billions of parameters. The loss function defines a surface over this high-dimensional space. Training means finding a point on that surface where the loss is low.

Gradient descent is the simplest algorithm for this. At each step:

θnew = θold − η · ∇θL

Here θ represents all trainable parameters, θL is the gradient computed by backpropagation, and η is the learning rate: a positive scalar controlling step size. The gradient points uphill; subtracting a fraction of it moves downhill.

Pure gradient descent uses the entire dataset for each update. That is stable but slow. In practice, variants dominate:

  • Stochastic Gradient Descent (SGD): each update uses one training example or a small mini-batch. The gradient is noisier, but each step is fast, and the noise can help escape shallow local minima.
  • Momentum: accumulates a velocity vector in the direction of recent gradients, so updates continue moving along consistent directions and dampen oscillations in directions where the gradient flips sign.
  • Adam (Adaptive Moment Estimation): maintains per-parameter estimates of the first moment (mean gradient) and second moment (uncentered variance of gradients), then scales each parameter update by an adaptive learning rate. It is the default optimizer for many modern training runs.
  • Learning-rate scheduling: the step size η is typically decayed over time. Too large and training diverges; too small and it stalls. Schedules such as cosine annealing or warm-up followed by decay are common.

None of these variants changes the underlying idea. They are engineering refinements on the same two operations: compute the gradient with the chain rule, then move parameters in the direction that reduces loss.

4. What makes it hard

The mathematics is elementary; the practice is not. Several engineering problems dominate:

  • Non-convexity. The loss surface of a deep network is not a simple bowl. It contains saddle points, flat regions, and many local minima of varying quality. Gradient-based methods can get stuck or converge slowly.
  • Vanishing and exploding gradients. In very deep networks, repeated multiplication of small or large derivatives can cause gradients to shrink toward zero or explode toward infinity. Residual connections, normalization layers, and careful initialization mitigate this.
  • Generalization. Minimizing training loss is easy; minimizing test loss is the goal. The network can memorize training data. Regularization, dropout, early stopping, and large, diverse datasets are the standard defenses.
  • Scale. Modern models are trained on trillions of tokens across thousands of accelerators. The algorithmic core is small; the systems engineering — distributed gradients, memory management, numerical stability, data pipelines — is enormous.

5. Exponential thinking: successive squaring

The user offered a clean exercise for feeling the scale. Start with 2 and square the result at each step:

  • 2 × 2 = 4
  • 4 × 4 = 16
  • 16 × 16 = 256
  • 256 × 256 = 65,536
  • 65,536 × 65,536 = 4,294,967,296
  • 4,294,967,296 × 4,294,967,296 = 18,446,744,073,709,551,616

Six steps take the number from 2 to a 20-digit value. That is the sharper illustration of explosive growth: each iteration squares the entire previous result, so the exponentiation compounds on itself. Ordinary exponential growth — repeated multiplication by a constant — already outruns linear intuition; successive squaring outruns ordinary exponential intuition.

Backpropagation and gradient descent do not themselves produce successive squaring, but they enable systems whose scale and effect can grow faster than linearly. Each doubling of compute, data, or model size can produce not a marginal improvement but a qualitative shift. The high-school arithmetic is simple; the compounding is not.

6. Why this matters for HAIIE

The chain-rule insight has two implications for Human-AI Interface Engineering.

First, it is a falsifier for the claim that something fundamentally new was required. The mathematics was available in undergraduate calculus. The breakthrough was the recognition that the chain rule could be applied at scale, combined with data, hardware, and careful engineering. Foundational ideas often look obvious in retrospect; the work is in making them run.

Second, the training loop is a proxy-optimization process. The loss function is a stand-in for what humans actually want. Gradient descent does not care about truth, kindness, or long-term consequences unless those are encoded in the loss or the data. It optimizes the proxy with mechanical precision. That is why reward-hacking, sycophancy, and misalignment are not accidents; they are predictable consequences of optimizing a measurable stand-in for an unmeasurable purpose.

The interface question is therefore not how to make the math more exotic. It is how to keep the purpose visible while the proxy is being optimized. See The Proxy That Ate the Purpose for the longer argument.

Status labels

  • Established: Backpropagation is the chain rule applied to a computation graph; it is the standard method for computing gradients in neural networks.
  • Established: Gradient descent and its variants (SGD, momentum, Adam) are the dominant optimization algorithms in deep learning.
  • Established: Modern LLMs are trained by gradient-based optimization over very large datasets and model parameter counts.
  • Practical claim: The difficulty in training large models lies more in systems engineering, data curation, and stability than in the core calculus.
  • Interface claim: Gradient descent optimizes whatever loss function is provided; alignment failures arise when the loss is a poor proxy for human intent.

Falsifiers

  • A scalable training method for deep networks that does not rely on gradients would weaken the "chain rule is the whole trick" framing.
  • Evidence that modern LLMs could not be trained without a genuinely new mathematical object, rather than scale and engineering, would revise the "high-school math" claim.
  • A demonstration that gradient descent reliably finds globally optimal solutions in deep networks would overturn the standard non-convexity concern.

Return to the field log — or continue to The Proxy That Ate the Purpose and the Twelve Theoretical Minimums.