# Backpropagation

> Canonical: https://skillalmanac.com/glossary/backpropagation | Last verified: 2026-11-24 | Index status: index-eligible

Backpropagation computes derivatives through a neural network by applying the chain rule backward through its operations. An optimizer can use those gradients to update weights. Computing a gradient and applying an update are separate steps.

Also called: back propagation, backprop, backpropagation algorithm, back-propagation.

## In plain language

Backpropagation works out how a small change to a network's internal values would affect a chosen output or loss. It applies the chain rule backward through the calculation. The result is a set of gradients, which an optimizer can use during training. A gradient measures local sensitivity; it is not a percentage share of blame or a complete explanation of a decision.

## Technical definition

Backpropagation applies the chain rule in reverse through a differentiable computation to obtain requested derivatives. In neural-network training, a forward computation produces a loss and a backward computation obtains parameter gradients. An optimizer may then use those gradients in a separate update. Gradients can also support sensitivity calculations without changing parameters.

## How it shows up when you use agents

A fixed-weight [inference](/glossary/inference) request need not compute gradients or update parameters. An agent can nevertheless run training or gradient-based analysis code. Backpropagation is a calculation used in those workflows, not a guarantee that learning or an update occurred.

Where the idea does reach you:

- **Typing into a session is not training.** In a fixed-weight request, corrections change the input context without updating parameters. If a model keeps repeating a mistake, change the prompt, the instruction file or the model, not the "training".
- **Changing the weights is a separate job.** Adjusting a model to your data is called [fine-tuning](/glossary/fine-tuning), and gradient-based methods are common. The training procedure and cost depend on the model and method.
- **Training write-ups mention gradients.** A gradient-based training report should distinguish differentiation from the optimizer update.

If you came here from an agent error, the next action is to look at the prompt and the tool results, which are what you control. See [Deep learning](/glossary/deep-learning) for where training sits in the larger picture.

## Worked example (illustrative)

Take the toy loss L(w)=(2w−1)² at w=1. Applying the chain rule gives dL/dw=4(2w−1)=4. Computing that derivative leaves w equal to 1. A separate gradient step with learning rate 0.1 gives w_new=0.6. The chosen step lowers this toy loss from 1 to 0.04; this does not guarantee that every finite gradient step improves a general objective.

## Common confusions

- **Backpropagation versus gradient descent.** Backpropagation computes local derivatives of the selected objective. Gradient descent, or another optimiser, uses them to move the weights. The learning rate and optimization setup matter: a finite update need not reduce the loss, and a computed gradient does not itself update a weight. See [Gradient descent](/glossary/gradient-descent).
- **Backpropagation versus the forward pass.** The forward pass turns input into a prediction. A backward pass computes derivatives of a selected quantity. This can support training or other analyses; a forward-only request need not compute those derivatives.
- **Backpropagation versus a model learning from your chat.** Adding text to a fixed-weight model request changes context, not parameters. Any later training or adaptation is a separate operation.
- **Backpropagation versus a loss function.** The loss function measures how wrong the output is. Backpropagation turns that measurement into a gradient for each weight. See [Loss function](/glossary/loss-function).

## Worked examples in this catalogue

### [What Is an LLM? The Facts Agent Users Need](https://skillalmanac.com/learn/what-is-an-llm-for-agent-users)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The guide explains what a language model can and cannot do from the point of view of someone running a coding agent, including that it answers from its training and from whatever the request contains.

Why it exercises the concept: Backpropagation supports gradient-based training and other derivative calculations. The linked guide provides inference background; it does not demonstrate differentiation.

### [local-model-sizing](https://skillalmanac.com/skills/skill-almanac/local-model-sizing)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Works out whether an open-weight language model will run on a given GPU, Mac or PC, with a script that computes weight, KV-cache and overhead memory per quantization.

Why it exercises the concept: The linked skill estimates weight-memory requirements. It does not compute gradients or perform training; differentiation and optimizer updates are separate operations.

### [Claude Code](https://skillalmanac.com/tools/claude-code)

```
/model
```

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Claude Code opens a picker and switches the model for the rest of the session; later answers in the same session come from the model you picked.

Why it exercises the concept: An agent can write code that computes derivatives. Supplying ordinary context to a fixed-weight model request does not itself update its parameters.

## Related terms

- [Neural network](https://skillalmanac.com/glossary/neural-network.md)
- [Deep learning](https://skillalmanac.com/glossary/deep-learning.md)
- [Machine learning (ML)](https://skillalmanac.com/glossary/machine-learning.md)
- [Loss function](https://skillalmanac.com/glossary/loss-function.md)
- [Gradient descent](https://skillalmanac.com/glossary/gradient-descent.md)
- [AI model](https://skillalmanac.com/glossary/ai-model.md)
- [Vanishing gradient problem](https://skillalmanac.com/glossary/vanishing-gradient.md)

## Sources

- [What is backpropagation?](https://www.ibm.com/think/topics/backpropagation), IBM (accessed 2026-11-24)
- [Neural networks: Backpropagation](https://developers.google.com/machine-learning/crash-course/neural-networks/backpropagation), Google for Developers (accessed 2026-11-24)
- [Introduction to gradients and automatic differentiation](https://www.tensorflow.org/guide/autodiff), TensorFlow (accessed 2026-11-24)
- [Automatic differentiation: gradient computation and computational graphs](https://docs.pytorch.org/tutorials/beginner/basics/autogradqs_tutorial.html), PyTorch (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-24. [Glossary index](https://skillalmanac.com/glossary.md).
