Foundations to Frontier
Tests
A. Mathematical Foundations › A12 Geometry for ML

Information Geometry

A family of probability distributions is itself a curved space, and its natural ruler is the Fisher information. This topic introduces statistical manifolds, the Fisher information metric and its link to KL divergence, the Fisher–Rao distance, the Cramér–Rao bound, and the geometry of exponential families (where the Fisher matrix is the Hessian of the log-partition function). It then covers the natural gradient: steepest descent measured in KL instead of parameter units, and invariant to how you parametrize the model. In the research exercise you fit a precise sensor's noise model and show that the natural gradient converges in a few dozen steps where tuned plain gradient descent needs hundreds to thousands, and that its path does not depend on the coordinates.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Distances between beliefs

Two weather forecasts say “10% chance of rain” and “11%”. Two others say “50%” and “51%”. Both pairs differ by one percentage point, but the first pair is far more different in practice: rare events are where small changes matter most. Measuring distance between distributions rather than between their parameter numbers gives a curved geometry. That is information geometry.

The ruler is the Fisher information: how much one observation tells you about a parameter. The more informative a change is, the “longer” it counts.

The geometry of Gaussians, and a natural-gradient race
mean μ →σ ↑
plain gradient: 266 steps · natural gradient (step 0.5): 17 steps
Each blue loop holds every Gaussian within KL divergence 0.1 of its centre. Near σ = 0 a tiny move in μ already makes a very different distribution, so the loops shrink: the parameter plane is curved (it's a hyperbolic plane under the Fisher metric). Plain gradient descent ignores this: a step small enough for the narrow target is painfully slow far away, and a larger one blows up. The natural gradient, F⁻¹∇L, measures steps in KL instead, and reaches a narrow target in a few dozen steps whatever its width.
Why engineers care

Every probabilistic model, from Kalman filters and Bayesian sensor fusion to neural networks trained with cross-entropy, lives on a statistical manifold. Its geometry tells you how precisely parameters can be estimated (the Cramér–Rao bound, used in tracking and navigation design), and how to optimize well: natural gradient, K-FAC and trust-region policy optimization (TRPO) in reinforcement learning all measure steps in KL.

📝 Quick check (Level 0)
0/3 answered
  1. 1. Which change is statistically larger?
  2. 2. The ruler of information geometry is…
  3. 3. Natural gradient measures step size in…

Level 1: Beginner

★★☆☆☆ Basic⏱ 25 minSecondary-school mathematics: arithmetic and elementary algebra.

Fisher information

For a model p(x∣θ)p(x\mid\theta), the score is s(θ)=∇θlog⁡p(x∣θ)s(\theta) = \nabla_\theta\log p(x\mid\theta). It has mean zero, and its covariance is the Fisher information:

F(θ)=E[s s⊤]=−E[∇θ2log⁡p(x∣θ)].F(\theta) = \mathbb E\big[s\,s^\top\big] = -\mathbb E\big[\nabla^2_\theta\log p(x\mid\theta)\big].
  • Bernoulli(p): F=1/(p(1−p))F = 1/(p(1 - p)). It is large near 0 and 1.
  • Gaussian N(μ,σ2)N(\mu, \sigma^2) in (μ,σ)(\mu, \sigma): F=diag⁡(1/σ2,2/σ2)F = \operatorname{diag}(1/\sigma^2, 2/\sigma^2).
  • Poisson(λ): F=1/λF = 1/\lambda.

Cramér–Rao bound

Any unbiased estimator from n i.i.d. samples has Var⁡(θ^)⪰(nF)−1\operatorname{Var}(\hat\theta)\succeq(nF)^{-1}. The MLE attains it asymptotically. For a coin, Var⁡≥p(1−p)/n\operatorname{Var}\ge p(1 - p)/n.

📝 Quick check (Level 1)
0/3 answered
  1. 1. Fisher information of Bernoulli(0.5):
  2. 2. The score has expectation…
  3. 3. The Cramér–Rao bound for n samples is…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.

The Fisher metric

Rao (1945) observed that F is a Riemannian metric on parameter space (a12-2). It is the local form of KL:

KL(pθ ∥ pθ+δ)=12δ⊤F(θ)δ+O(∥δ∥3).\mathrm{KL}\big(p_\theta\,\|\,p_{\theta + \delta}\big) = \tfrac12\delta^\top F(\theta)\delta + O(\|\delta\|^3).

Lengths measured with F (the Fisher–Rao distance) don’t depend on the parametrization. They are a property of the distributions themselves.

  • Bernoulli: the map p↦2(p,1−p)p\mapsto2(\sqrt p, \sqrt{1 - p}) is an isometry onto a quarter circle of radius 2, so d(p,q)=2arccos⁡(pq+(1−p)(1−q))d(p, q) = 2\arccos(\sqrt{pq} + \sqrt{(1 - p)(1 - q)}).
  • Gaussians (μ,σ)(\mu, \sigma): the metric (dμ2+2dσ2)/σ2(d\mu^2 + 2d\sigma^2)/\sigma^2 is a hyperbolic plane with curvature −1/2. Narrow Gaussians are far apart even when their means are close.

The natural gradient

Steepest descent depends on how you measure step length. Measure it in KL, minimizing L(θ+δ)L(\theta + \delta) subject to 12δ⊤Fδ=ϵ\tfrac12\delta^\top F\delta = \epsilon, and the solution is the natural gradient (Amari, 1998):

∇~L=F(θ)−1∇L.\tilde\nabla L = F(\theta)^{-1}\nabla L.

It is invariant to reparametrization, to first order in the step size. For exponential families it is Fisher scoring, and for Gaussian likelihoods it is Gauss–Newton. Practical approximations include K-FAC (Martens and Grosse, 2015), Adam’s diagonal preconditioning (loosely related), and TRPO and PPO’s KL trust regions (Schulman et al., 2015).

🐍 Exercise 1: Fisher information and the Fisher–Rao distance
Estimate the Fisher information of a Gaussian from the score's covariance. Check KL ≈ ½ F δ², compute the Bernoulli Fisher–Rao distance in closed form and by integrating the metric in two parametrizations, and verify the Cramér–Rao bound by simulation.
📝 Quick check (Level 2)
0/3 answered
  1. 1. For small δ, KL(p_θ ‖ p_(θ+δ)) ≈
  2. 2. The natural gradient is…
  3. 3. The Fisher–Rao distance between two Bernoulli distributions depends on…

Level 3: Advanced

★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.

Two forms of the Fisher matrix

Differentiate ∫p dx=1\int p\,dx = 1 twice. The first derivative gives E[s]=0\mathbb E[s] = 0. The second gives E[∇2log⁡p]+E[ss⊤]=0\mathbb E[\nabla^2\log p] + \mathbb E[ss^\top] = 0, because ∇2p/p=∇2log⁡p+ss⊤\nabla^2p/p = \nabla^2\log p + ss^\top. ∎

KL is locally the Fisher metric

Expand KL(θ∥θ+δ)=−Eθ[log⁡pθ+δ−log⁡pθ]\mathrm{KL}(\theta\|\theta + \delta) = -\mathbb E_\theta[\log p_{\theta + \delta} - \log p_\theta] to second order. The linear term vanishes since E[s]=0\mathbb E[s] = 0. The quadratic term is −12δ⊤E[∇2log⁡p]δ=12δ⊤Fδ-\tfrac12\delta^\top\mathbb E[\nabla^2\log p]\delta = \tfrac12\delta^\top F\delta. ∎

Invariance of the natural gradient

Let θ=θ(η)\theta = \theta(\eta) with Jacobian J. Then ∇ηL=J⊤∇θL\nabla_\eta L = J^\top\nabla_\theta L and Fη=J⊤FθJF_\eta = J^\top F_\theta J. So Fη−1∇ηL=J−1Fθ−1∇θLF_\eta^{-1}\nabla_\eta L = J^{-1}F_\theta^{-1}\nabla_\theta L, and the update Δη\Delta\eta maps to JΔη=ΔθJ\Delta\eta = \Delta\theta. The same infinitesimal move results in either coordinates. ∎ Finite steps agree only to first order: Euler steps of the same flow.

Exponential families

For p(x∣θ)=h(x)exp⁡(θ⊤T(x)−A(θ))p(x\mid\theta) = h(x)\exp(\theta^\top T(x) - A(\theta)), the Fisher matrix is F=∇2A(θ)=Cov⁡[T]F = \nabla^2A(\theta) = \operatorname{Cov}[T]. The dual coordinates η=∇A=E[T]\eta = \nabla A = \mathbb E[T] are linked by a Legendre transform: Amari’s dually flat geometry.

Exercise 3.1: Fisher information of a Poisson distribution

log⁡p=xlog⁡λ−λ−log⁡x!\log p = x\log\lambda - \lambda - \log x!, so s=x/λ−1s = x/\lambda - 1 and F=Var⁡(x)/λ2=1/λF = \operatorname{Var}(x)/\lambda^2 = 1/\lambda. For λ = 4 this is 0.25.

📝 Quick check (Level 3)
0/3 answered
  1. 1. For an exponential family, the Fisher matrix equals…
  2. 2. Under θ = θ(η) with Jacobian J, the Fisher matrix transforms as…
  3. 3. Fisher information of Poisson(λ):

Level 4: Expert

★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.

Fitting a precise sensor’s noise model

1000 readings from a sensor with true mean 3 and noise σ = 0.05. We fit N(μ, σ²) by maximum likelihood from μ = 0, σ = 1, to 0.1% accuracy.

Method Steps to converge
Plain GD in (μ, σ), best of a grid of learning rates (5.6e−3) 1364
Plain GD in (μ, log σ), best learning rate (3.2e−2) 334
Natural gradient in (μ, σ), step 0.5 25
Natural gradient in (μ, log σ), step 0.5 31

The loss curvature along μ is 1/σ21/\sigma^2. That changes 400-fold between the start and the answer, so no single plain step size suits both. The natural gradient rescales by exactly that curvature.

Invariance check, at flow time 0.4: the natural-gradient paths in the two coordinate systems differ by 0.0068, 0.0032 and 0.0016 for step sizes 0.02, 0.01 and 0.005. They converge to the same path. The plain-gradient flows differ by 0.14 however small the step: they are different algorithms.

🐍 Exercise 2 (research): natural gradient vs plain gradient
Fit N(μ, σ²) to precise sensor data by plain and natural gradient in two parametrizations. Grid-search the best plain learning rate, compare steps to convergence, and test which method's path is independent of the coordinates.

Information geometry in AI, robotics and aerospace

  • Optimization: natural gradient, K-FAC and Shampoo (a6-3-6); mirror descent as natural gradient in dual coordinates.
  • Reinforcement learning: the natural policy gradient (Kakade, 2001), TRPO and PPO with KL trust regions.
  • Estimation: Cramér–Rao bounds for tracking, GNSS and attitude sensors; the posterior Cramér–Rao bound for filter design; the Fisher information matrix for optimal experiment and trajectory design.
  • Variational inference: natural-gradient VI (Khan and Nielsen, 2018); geometry of exponential families.

References

  1. C. R. Rao (1945). “Information and the accuracy attainable in the estimation of statistical parameters.” Bull. Calcutta Math. Soc., 37.
  2. S. Amari (1998). “Natural gradient works efficiently in learning.” Neural Computation, 10.
  3. S. Amari (2016). Information Geometry and Its Applications. Springer.
  4. J. Martens (2020). “New insights and perspectives on the natural gradient method.” JMLR, 21.
  5. J. Martens, R. Grosse (2015). “Optimizing neural networks with Kronecker-factored approximate curvature.” ICML.
  6. S. Kakade (2001). “A natural policy gradient.” NeurIPS.
  7. J. Schulman, S. Levine, P. Abbeel, M. Jordan, P. Moritz (2015). “Trust region policy optimization.” ICML.
  8. F. Nielsen (2020). “An elementary introduction to information geometry.” Entropy, 22.