Skip to content
DARC
■ Change #552 · wiki.edited

Reverse-mode automatic differentiation: Normalize Markdown to canonical form

by DARC wiki2026-10-25 20:24:23 UTCOpen the page →
body
## What it is
− A program is a composition of primitive operations. Reverse-mode AD records those operations on a **tape** during the forward pass, then walks the tape backwards, applying the chain rule to accumulate the derivative of a single scalar output with respect to *every* input.
+ A program is a composition of primitive operations. Reverse-mode AD records those operations on a **tape** during the forward pass, then walks the tape backwards, applying the chain rule to accumulate the derivative of a single scalar output with respect to _every_ input.
## Why it matters
For a function $f: \mathbb{R}^n \to \mathbb{R}$ the full gradient costs a small constant multiple of evaluating $f$, independent of $n$. That is what makes training networks with billions of parameters possible at all.
## How it works
1. **Forward pass**: evaluate the program and store intermediate values.
2. **Backward pass**: start from $\bar{y} = 1$ and propagate adjoints $\bar{v}_i = \sum_j \bar{v}_j \, \partial v_j / \partial v_i$.
− The trade-off is memory: intermediates must be kept (or recomputed, via *checkpointing*).
+ The trade-off is memory: intermediates must be kept (or recomputed, via _checkpointing_).
## Open problems
- Memory-optimal checkpointing schedules for arbitrary graphs
- Differentiating through discrete control flow and non-smooth operations
- Higher-order derivatives without blow-up
hash 104699dba5220be093adb7267d1d126298b25cb0fc52bd8fa9a7922a46b966ad
previous 63a52a7d6ac48c3bde8ac1dda799b2ba5b6dbdba88cf393526a957fce750c1a8