Information Geometry
Twelve ideas from information geometry, from divergences and dual coordinates to the EM algorithm, natural gradient learning and ICA. Drag distributions around the probability simplex and the Gaussian half-plane, run small learning algorithms, work through an example one step at a time, then check yourself.
Follows the chapter order of S. Amari, Information Geometry and Its Applications, Applied Mathematical Sciences 194 (Springer, 2016). Chapters 1β9 and 11β13 each get a module; Chapter 10 (linear systems and time series) is not covered. Chapter numbers refer to that book; the questions and examples here are written for this page.
Divergences and Legendre duality
A divergence measures how different two points are without having to be symmetric. Any strictly convex function produces one, and its Legendre transform produces a second coordinate system in which the same divergence reappears with its arguments swapped. This pair of coordinates is the backbone of the whole subject.
The idea
So a convex function gives two coordinate systems,
Explore
Worked example
Take
What are
and ? , so and . ThenWrite
in terms of .This is the KL divergence from the Poisson distribution with mean
to the one with mean . ( is the log-partition function of the Poisson family, which is why the explorer labels it that way.)Check the duality formula using
.which simplifies to
, the same expression.Evaluate both orders for
. and . The two orders differ. Choose in the explorer: it starts at , , and shows both gaps.
Check your understanding
For
A divergence behaves like half a squared distance near the diagonal, not like a distance. Expand the definition. That can be negative, and a divergence never is.
Which property does a Bregman divergence fail to have in general?
That always holds: a convex function lies above each of its tangent planes.- Convexity in the first argument
As a function of it is minus an affine function, so it is convex. - Symmetry,
Test it on : , while has . is a supremum of affine functions of , so it is convex too.
Practice
The Bernoulli potentialA Legendre pair and a KL divergence
Let
Hint
Solution
which rearranges to
The three-point identityWhere the Pythagorean theorem comes from
Writing
When does the last term vanish?
Solution
Expand all three divergences with the definition. The
Exponential and mixture families
There are two natural ways to interpolate between distributions: mix them, or mix their logarithms. These are the two kinds of straight line in information geometry, the m-geodesic and the e-geodesic. When one meets the other at a right angle, KL divergences add like squared lengths.
The idea
The maximum entropy principle is the special case where
Explore
Worked example
Find the distribution on
Before computing: what form must the answer have, and why?
The distributions with mean
form an m-flat set (a linear constraint). Maximizing entropy over is e-projecting the uniform distribution onto , so the answer lies on an e-geodesic from that meets orthogonally. The e-geodesics through are , and orthogonality to every direction inside (changes with and ) forces to be affine in . So , that is, with .Solve for
.The mean is
, so , that is , with positive root . Hence .Compute
. , so nats (against for the uniform distribution).Take
, which also has mean . Show .Since
is affine in , depends on only through its mean, so it equals . Therefore , andNumerically
, so . The step "depends only through the mean" is exactly the orthogonality in the theorem.
Check your understanding
That is the m-midpoint, the average of the probabilities. An e-geodesic between distributions with full support never reaches the boundary.
, with equality only if The order matters. The e-projection minimizes , with the point of first. Minimizing is a different projection. KL is not symmetric, even between points of a flat set.
Which of these sets of distributions on three outcomes is both e-flat and m-flat?
It is linear in , so m-flat. But the e-midpoint of and has . In logarithms it reads , which is linear in , so it is e-flat. Is the m-midpoint of and in it?
Practice
The Bernoulli familyNatural and expectation coordinates
Write the Bernoulli distribution
Solution
Mutual information as a projectionProjecting onto independent distributions
Let
Hint
Split
Solution
Invariance and the Fisher metric
How should we measure the difference between two distributions? Ask only that merging outcomes can never make them easier to tell apart, and that a merge which loses no information changes nothing. Those two demands single out the f-divergences, and they force the metric to be the Fisher metric, up to a constant factor.
The idea
Every f-divergence with
Explore
Worked example
Let
Compute
. .Compute
for , . . Smaller, as monotonicity demands.Where exactly is the loss? Use the ratios
.On the merged block the ratios are
and . They differ, so the merged block mixes evidence that pointed in different directions. The loss is times a KL divergence of the within-block conditionals: , and indeed .Keep
and choose so the merge is sufficient. What is now?We need
with , so . Then , equal to the merged value. The "Make the merge sufficient" button does this to Q.
Check your understanding
Which of these is not an f-divergence on the simplex?
Take : . Take .
The ratios on the merged block are and : the merge throws away the difference between them. Ratios and on the merged block. Not sufficient.
All f-divergences with
- Third order in the distance between them
- Second order, comparable to the divergences themselvesBoth orders have the same second-order term
, so it cancels in the difference. - Exactly zeroThe cubic terms differ. Drag Q close to P and watch the two KL readings: they agree to more and more digits, but not exactly.
Practice
Every f-divergence gives the Fisher metricA Taylor expansion
Show that
Hint
Write
Solution
Fisher distance through the sphereA closed form
Show that
Solution
Ξ±-divergences and Ξ±-geodesics
The m-geodesic averages probabilities; the e-geodesic averages their logarithms. Average their powers instead and you get a whole family of curves, means and divergences indexed by one number
The idea
The same exponents give the Ξ±-mean of positive numbers,
Explore
Worked example
Compute the Ξ±-mean of
Write
explicitly for .With
, the constant cancels and : a power mean with exponent .Evaluate it for
. ( ): . ( ): . (the limit ): . ( ): .What happens as
and ? : the power mean tends to . : it tends to . So slides the mean continuously and monotonically from optimistic (max) to pessimistic (min).Connect this to the explorer.
Before rescaling, the Ξ±-geodesic midpoint of
and is their Ξ±-mean taken coordinate by coordinate. For large each coordinate is pulled toward the smaller of , so after rescaling the midpoint gives more weight to outcomes on which and agree. For very negative the larger value wins and the midpoint spreads toward both of their favourite outcomes. Put and near different corners and move Ξ± from β3 to 3.
Check your understanding
For which
, which is not symmetric.- Every
Use the duality : symmetry needs .
For which
- Only
- Only
At the correction factor is largest: the simplex is a piece of a sphere for that geometry. - Every
That is true for positive measures, which are Ξ±-flat for every . The simplex is a curved slice of them.
As
- decreases from 2.5 to 2
- increases from 2 to 2.5
is the arithmetic mean, the larger one. - stays at 2.5Only when
do all the means agree.
Practice
Ξ± = 0 is a function of the Fisher distanceHellinger and the sphere
Show that on the simplex
Solution
For probability vectors the first two terms of
A divergence for covariance matricesInvariance under change of basis
On positive-definite
Hint
The gradient of
Solution
The Fisher metric on Gaussians
The normal distributions
The idea
So geodesics are the hyperbolic ones: vertical lines, and half-circles centred on
Explore
Worked example
Derive the Fisher metric of
Compute the two score functions.
. With , and .Take expectations of their products.
is standard normal: , , . So , , .Find the length of the horizontal path
from to , and the geodesic distance.Along
, , so the length is 2. The formula gives . The horizontal path is not a geodesic.Which distributions does the geodesic pass through?
In
the endpoints are , so the circle is centred at with radius . The geodesic rises to halfway: it is cheaper to widen the distribution, shift it, and narrow it again than to slide a narrow one sideways. Put A and B at these points above.
Check your understanding
In the Fisher metric, which is farther from
, because changes by 1 rather than 0.5The metric is along vertical lines: what counts is the ratio of the 's, not their difference. , because narrow distributions are far apartNarrowness matters, but here both changes are by the same factor of 2.- They are equally far
The geodesic between
- wider distributions than the endpoints
- only distributions with the same
Drag A and B to equal heights: the straight segment is longer than the geodesic. - narrower distributions than the endpointsDistances grow like
as shrinks, so dipping down is expensive.
We switch coordinates from
- Nothing; only the formula for
changes - It changes, since
The components change, but so do the coordinate differentials, and is the same quadratic form. - It is multiplied by 2Lengths of curves are defined without reference to coordinates.
Practice
The curvature is β1/2Scaling a metric
Assuming the PoincarΓ© metric
Solution
Multiplying a metric by a constant
A one-dimensional familyDistance in the exponential family of rates
For the exponential distributions
Solution
Dual connections
A statistical manifold carries more than a metric: it carries two notions of "straight", the e- and m-connections, and they are dual with respect to the Fisher metric. On the Gaussian half-plane you can see all three geodesics at once and test the Pythagorean theorem with a protractor.
The idea
For
Explore
Worked example
Write the normal family in natural parameters, find its potential
Put
in the form . . So , , , and in terms ofDifferentiate
. and . These are and , as they must be.Compute
. , and . So , minus the entropy of , with .Why are the e- and m-geodesics between
and so different?Both endpoints have
, so the e-geodesic keeps and hence fixed: it is the horizontal segment. Both have , so the m-geodesic keeps : it is an arc of the circle of radius , reaching at . The Levi-Civita geodesic lies between, peaking at .
Check your understanding
What is the average
- The Levi-Civita connection of the Fisher metric
- The flat connection of the
coordinatesThat is the e-connection itself, one of the two being averaged. - It is not a connectionAn average of two connections (weights summing to 1) is again a connection.
- The e-geodesic
- The m-geodesicThe m-geodesic averages
. In the middle is smaller, so must be larger. - The Levi-Civita geodesicThat one bends upward (Module 5).
The m-geodesic from
That version needs the roles swapped: an m-geodesic from to orthogonal to an e-geodesic from to .- The Fisher distances satisfy
The half-plane is curved ( ), so the Riemannian Pythagoras is only approximate, for small triangles.
Practice
Dual transport keeps inner productsBiorthogonal bases
In a dually flat manifold, let
Hint
Compute
Solution
Mixed coordinates for two binary variablesMarginals and interaction
For
Solution
Efficient estimation
Data from an exponential family land on a point of its expectation space. A model is a curve in that space, and an estimator is a rule for sliding the observed point back onto the curve. Whether the estimator wastes information is decided by one angle: the one at which it slides.
The idea
Higher-order terms (bias, and the
Explore
Worked example
For
Write the average log-likelihood in terms of
and .Only
enters: it is sufficient.Solve the likelihood equation.
gives , so . For fixed the solutions form the line through : the MLE's ancillary family is a family of straight lines, as the theory says (m-flat).Compute the Fisher information
.Use the normal-family metric
from Module 5 along : . So the best possible asymptotic variance is .What is the efficiency of
? , so its efficiency is . It ignores the information about carried by the spread of the data. Its ancillary lines are vertical, at a Fisher angle of about to the model instead of , and .
Check your understanding
An estimator's ancillary line
- Each
passes through the model point - Each
is orthogonal to the modelThat is efficiency. A consistent estimator can cross at any angle. - The lines
are straightStraightness (m-flatness) matters for higher-order properties, not for consistency.
In a full exponential family (not curved), what is the MLE of the expectation parameter
itself, which attains the CramΓ©rβRao bound for every- It has to be found numericallyMaximizing
gives directly. , but it is biased .
- 900
- 711That inverts the ratio. A less efficient estimator needs more data.
- 800Both are consistent, but their variances differ by a constant factor at every large
.
Practice
Efficiency from the angleA Fisher inner product
At
Solution
The log-odds of a coinEfficiency in another parametrization
With
Solution
The EM algorithm
When some variables are hidden, maximum likelihood gets hard, but two easy projections remain. EM alternates them: an e-projection fills in the hidden part as best it can, an m-projection refits the model, and the likelihood of the observed data can never go down.
The idea
The animation fits a mixture
Watch
- The data, and a first guess
for the two means. - E-step: give each point its posterior probability of coming from each component (e-projection onto
). - M-step: move each mean to the posterior-weighted average of the data (m-projection onto
). - Repeat. The path climbs the likelihood surface; every step goes uphill.
- It settles at a stationary point of the likelihood. Try other starts, including one on the diagonal
.
Worked example
Data
Find the posterior
as a function of . . With , , so .Evaluate the posteriors.
for . The middle point is split evenly; the others are almost certain.M-step: compute the new means.
Check that the log-likelihood went up.
is about at and at . The guarantee comes from the geometry: the E-step made the divergence equal to minus the log-likelihood, and the M-step could only lower it.
Check your understanding
The data manifold
- m-flat
- e-flatFixing a marginal is a linear condition on
, not on . The normalized geometric mean of two members can have a different marginal. - neitherMix two members:
still has marginal .
You start EM exactly on the diagonal,
- It stays on the diagonal and converges to
, a saddle point - It leaves the diagonal at once, because the likelihood is higher elsewhereEM is deterministic, and with
every posterior is exactly . Nothing breaks the symmetry. - It fails, because the M-step divides by zeroEach component gets total weight
, so the weighted averages are defined.
Which quantity is guaranteed never to decrease from one EM iteration to the next?
- The log-likelihood of the observed data
- The log-likelihood computed with the true hidden labelsEM never sees the true labels; nothing controls that quantity.
- The closeness of
to the true parameterEM can climb to a local maximum or saddle far from the truth.
Practice
The E-step is a projectionThe chain rule for KL
Show that
Solution
Write
Unknown mixing weightExtending the M-step
Let the model be
Solution
The expected complete-data log-likelihood contains
Nuisance parameters
If every new observation brings its own new unknown, maximum likelihood can converge confidently to the wrong answer. An estimating function that is blind to the nuisance directions repairs it.
The idea
Explore
Worked example
Derive the MLE of
Maximize the log-likelihood over
with fixed. . Each appears in one term, minimized at , where .Now maximize over
.The profile log-likelihood is
. Setting the derivative to zero, .Find the limit as
. whatever is, so , and by the law of large numbers .Why did the usual consistency theorem fail?
It assumes a fixed, finite number of parameters. Here the number of parameters,
, grows with the data, so the never settle down, and their errors bias by the same factor at every . The estimating function avoids entirely.
Check your understanding
In the explorer, switch the nuisance means to "all equal to 0". The MLE still estimates a separate
- Still to
- To
, since there is no variation in the means to confuse itThe estimator only sees , whose distribution does not depend on the at all. - To 0
.
Suppose each
The MLE divides the within-group sum of squares by ; that sum has expectation . More observations per nuisance parameter reduce the bias but do not remove it.
What makes
- Its expectation is zero for every value of the nuisance
- It is the score function for
The score is , which involves the unknown . - Its expectation is zero when
That would not be enough: we need unbiasedness whatever the are, since we never learn them.
Practice
Four pairsThe two estimates side by side
The differences
Solution
Conditioning away the nuisanceA likelihood that works
Show that
Solution
Clustering with divergences
k-means works for any Bregman divergence, not only squared distance. Surprisingly, the centre of a cluster is still its plain average and the boundaries between clusters are still straight lines. What the divergence changes is where those lines go.
The idea
The chapter applies the same geometry to support vector machines, belief propagation, boosting and Bayesian learning; this module takes clustering. Below are positive 2-D data with multiplicative noise, so a divergence that measures relative error behaves very differently from squared distance. Per coordinate: squared distance
Explore
Worked example
Two numbers, 1 and 4. Find both centroids for squared distance, generalized KL and ItakuraβSaito.
Prove the centroid identity in the box above.
Expand:
. The last sum is 0 and , leaving .What are the "data first" centroids of 1 and 4?
All three are
, the arithmetic mean.What are the "centre first" centroids?
Squared distance:
, so again . Generalized KL, : , so the centroid is . ItakuraβSaito, : , so the centroid is .Which side does the explorer use, and what difference does the divergence make there?
Data first, so every centre update is a plain average. The divergence enters only through the assignment: ItakuraβSaito depends only on the ratio
, so it hands a big outlying point to a big centre that is far away in absolute terms, while squared distance hands it to the nearest one.
Check your understanding
Under the generalized KL divergence
- The arithmetic mean of the
- The geometric meanThat minimizes
, with the centre first. - The coordinatewise medianThe median minimizes absolute deviations, which are not a Bregman divergence.
With ItakuraβSaito and data in the first slot, the boundary between two clusters isβ¦
- a straight line
- a curve that bends around the smaller centreWrite out
: the terms cancel and what is left is affine in . - a circleEven for squared distance the boundary between two centres is a line, the perpendicular bisector.
Why can each step of Bregman k-means only lower the objective
- Assignment picks the smallest divergence for each point, and the update picks the minimizing centre (the mean) for each cluster
- Because Bregman divergences are symmetricThey are not (Module 1), and no symmetry is used.
- Because the objective is convex in the centres and the assignments togetherIt is not jointly convex: k-means can stop at different local solutions from different starts. Try "New random start".
Practice
The other-sided centroidUsing the dual divergence
Prove that
Hint
Module 1:
Solution
In dual coordinates the problem is
The KL boundaryAn explicit line
For the generalized KL divergence in two dimensions, find the boundary between centres
Solution
Natural gradient
Ordinary gradient descent depends on how you happen to parametrize a model. The natural gradient asks a different question: which small change of the distribution, measured by the Fisher metric, lowers the loss fastest? Its path does not depend on the parametrization.
The idea
Below, a normal model
Explore
Worked example
Fit a Bernoulli model in its natural parameter
Compute
and the Fisher information . with , and .Take one plain and one natural gradient step from
.At
: , , . Plain: , so . Natural: , so .Take a second natural gradient step. How close is it to the answer
?At
: , , , so , with . The error went from 0.186 to 0.009: quadratic convergence.Explain the speed.
For an exponential family in natural parameters,
: the Fisher information is the Hessian of the loss. So the natural gradient step with is exactly Newton's method here.
Check your understanding
From the same start, with a very small step, plain gradient descent on
- different paths of distributions, while the natural gradient traces the same path in both
- the same path, since it is the same functionThe gradient's components change:
, and a step in moves by times as much again. The -velocity is multiplied by . - the same path, but at different speedsOnly the
component is rescaled, so the direction changes too.
Why does plain gradient descent in
- The loss curvature in
is about , so a stable step must be of order - The loss is not differentiable at small
It is smooth for every . - The gradient vanishes thereThe opposite: it is huge, like
and .
What causes the long plateaus in gradient training of multilayer perceptrons?
- Singular regions, where hidden units coincide or vanish and the Fisher metric degenerates
- Local minimaA plateau is not a minimum: learning does eventually escape it, after a long slow phase.
- A step size that is too smallLarger steps do not remove the plateau; the slow direction comes from the geometry near the singular set.
Practice
A Gaussian meanThe natural gradient forgets Ο
For
Solution
Why it is invariantThe transformation rule
Let
Solution
Independent component analysis
Two independent signals are mixed by an unknown matrix, and we see only the mixtures. ICA searches the group of invertible matrices for one that makes the outputs independent again. The natural gradient on that group makes the learning dynamics independent of how badly the signals were mixed.
The idea
The chapter also treats PCA, non-negative matrix factorization, sparse signal processing, convex programming and game-theoretic scores; this module takes ICA. Below: 400 samples of two uniform sources (sub-Gaussian, so
Explore
Worked example
Derive the equivariance property, and find where the algorithm settles for uniform sources.
Turn the plain gradient into the natural gradient.
For this invariant metric the natural gradient is
. So , using .Multiply on the right by
. What do you get? , and . Everything is in terms of and : the trajectory of depends only on where it starts.Where does it stop? Take
with diagonal and uniform with unit variance.Off the diagonal,
by independence. On the diagonal we need : . For uniform on , , so . Look at the diagonal of in the explorer after a run (the sample of 400 moves it slightly).And the plain gradient?
. Same fixed points, but the step is preconditioned by . A badly conditioned makes it slow in one direction and unstable in another, which is what the "severe" setting shows.
Check your understanding
Even with perfect data, ICA can recover the sources only up toβ¦
- their order and their scales (including sign)
- a rotationA rotation of independent non-Gaussian sources makes them dependent again, and ICA can detect that.
- nothing: they are recovered exactly
for any permutation and diagonal : the data cannot tell these apart.
Why can ICA not separate two Gaussian sources?
- A rotation of independent standard Gaussians is again a pair of independent standard Gaussians
- Gaussian signals have no fourth momentThey have every moment; the fourth is
. - The natural gradient is undefined for GaussiansThe algorithm runs; the problem is that the answer is not unique.
Equivariance of the natural-gradient rule says that the trajectory of
- depends only on its starting value and the sources, not on
- depends on
only through its condition numberThat describes the plain gradient, whose dynamics carry the factor . - does not depend on the sourcesThe update averages
over , so the sources matter.
Practice
The gradient of the log-determinantWhere W^(βT) comes from
Show that
Solution
Super-Gaussian sourcesChoosing the nonlinearity
For Laplace sources, density