Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Step sizes in the right units
Suppose you’re tuning a model’s “temperature”. You could write it in kelvin or in log-kelvin. A plain gradient step behaves completely differently in the two, though the model is the same. That’s like walking a fixed number of map-centimetres regardless of the map’s scale.
The natural gradient measures each step by how much it changes the model’s predictions, not by how much the numbers change. It takes the same sensible step whatever coordinates you chose.
Natural-gradient ideas underlie TRPO and PPO in reinforcement learning (trust regions in distribution space), variational inference, and second-order optimizers like K-FAC and Shampoo that train large networks in fewer steps. Shampoo-style preconditioning has won recent optimizer benchmarks for large models.
- 1. Plain gradient descent depends on…
- 2. The natural gradient measures steps by…
- 3. The matrix that defines this distance is the…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.The Fisher information matrix
For a model :
It’s the local curvature of the KL divergence: .
Examples:
- Bernoulli(): in , and in the logit.
- : in .
Natural gradient descent (Amari, 1998)
It’s the steepest-descent direction when distance is measured by KL rather than Euclidean length. For exponential families with η = 1, it jumps straight to the maximum-likelihood estimate.
- 1. KL(p_θ ‖ p_θ+δ) ≈
- 2. Fisher information of Bernoulli(p) in p is…
- 3. The natural gradient update uses…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.Relation to Newton and Gauss–Newton
For log-likelihood losses with well-specified models, the Fisher equals the expected Hessian of the negative log-likelihood, and it’s always PSD. For Gaussian outputs, natural gradient = Gauss–Newton (A6.1-4). The “empirical Fisher” (squared per-sample gradients, as in Adam’s ) is a cruder proxy that can behave differently (Kunstner, Hennig and Balles, 2019).
K-FAC (Martens and Grosse, 2015)
For a layer , the Fisher block is , where . K-FAC approximates it by with and . Then
Two small inverses ( numbers) replace one of size .
Shampoo (Gupta, Koren and Singer, 2018)
Accumulate and for each weight matrix and update with . It’s a full-matrix AdaGrad that is affordable per layer. Distributed Shampoo has won the AlgoPerf training-speed benchmark (Dahl et al., 2023). SOAP and Muon (A6.4-6) are close relatives.
- 1. K-FAC approximates a layer's Fisher block as…
- 2. For Gaussian outputs, the natural gradient equals…
- 3. Shampoo preconditions the gradient G by…
Level 3: Advanced
★★★★☆ Advanced⏱ 45 minGraduate level, with full derivations and proofs.Fisher information of the Bernoulli
, so the score is . Its variance is . In the logit , the score is with variance . ∎
Invariance to reparameterization (first order)
Let with Jacobian . Then and . The natural step in is . It maps to , the natural step in . ∎ Plain gradient steps transform with and are not invariant.
The Kronecker identity
. For symmetric invertible , the inverse is therefore . ∎
Exercise 3.1: KL of a small mean shift
For : . This is exact for a Gaussian mean shift.
- 1. Under θ = h(φ), the Fisher transforms as…
- 2. Bernoulli Fisher in the logit parameterization is…
- 3. (A ⊗ G) vec(V) =
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.One K-FAC step vs two thousand GD steps
A linear layer maps 12 sensor inputs (scales spanning 1.5 decades) to 4 outputs, with Gaussian noise. Its Fisher is exactly , so the K-FAC step is the exact natural gradient, and Newton’s step. One step solves the least-squares problem to the damping level. GD with step still has a 5% weight error after 2000 steps, because the low-variance inputs barely move. Shampoo, with no model knowledge, also converges, using 160 preconditioner numbers instead of the full Fisher’s 2304.
Natural-gradient ideas in AI, robotics and aerospace
- Policy optimization: natural policy gradient (Kakade, 2001), TRPO’s KL trust region (Schulman et al., 2015) and PPO’s clipped surrogate are standard for robot learning.
- Variational inference: natural-gradient VI and Bayesian deep learning (Khan and Nielsen, 2018; Osawa et al., 2019).
- Large-model training: K-FAC (Martens and Grosse, 2015), Shampoo (Gupta, Koren and Singer, 2018; Anil et al., 2020) and SOAP (Vyas et al., 2024).
- Estimation theory: the Fisher metric is the Cramér–Rao bound’s matrix (A5.1-4), connecting optimization to sensor-fusion precision.
References
- S. Amari (1998). “Natural gradient works efficiently in learning.” Neural Computation, 10(2).
- J. Martens (2020). “New insights and perspectives on the natural gradient method.” JMLR, 21.
- J. Martens, R. Grosse (2015). “Optimizing neural networks with Kronecker-factored approximate curvature.” ICML.
- V. Gupta, T. Koren, Y. Singer (2018). “Shampoo: preconditioned stochastic tensor optimization.” ICML.
- R. Anil et al. (2020). “Scalable second order optimization for deep learning.” arXiv:2002.09018.
- G. Dahl et al. (2023). “Benchmarking neural network training algorithms.” arXiv:2306.07179 (AlgoPerf).
- F. Kunstner, P. Hennig, L. Balles (2019). “Limitations of the empirical Fisher approximation for natural gradient descent.” NeurIPS.
- S. Kakade (2001). “A natural policy gradient.” NeurIPS.
- J. Schulman et al. (2015). “Trust region policy optimization.” ICML.
- N. Vyas et al. (2024). “SOAP: improving and stabilizing Shampoo using Adam.” arXiv:2409.11321.