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

Reverse-mode automatic differentiation: Normalize Markdown to canonical form

by DARC wiki2026-10-23 01:09: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 f3d9e864f1f2ef7bec7dc053a4d33ad9e37abc3b9c0dc5656364c9cd4c55e8c3
previous 74e515d1a7b82a1665ab20fdecabbf9c3d840976eb36a159d0aaa11576149f55