∇ Information Geometry Notes
A visual research tutorial · 5 computational experiments

Learning Through
Information Forces

How Gaussian kernels turn entropy, divergence, and mutual information into potential landscapes, interacting particles, and practical learning algorithms.

Information-Theoretic LearningRényi entropy & Gaussian kernelsReproducible NumPy / PyTorch experiments
Introduction

What if distributions could learn by interacting?

A Gaussian kernel creates a field around each observation. Differentiate that field, and you obtain a force. Combine those forces, and entire probability distributions can be shaped by optimization.

Conventional learning objectives commonly penalize individual errors, such as squared loss. Information-Theoretic Learning (ITL) instead optimizes descriptors of entire probability distributions: Rényi entropy, statistical divergence, and mutual information. Principe’s central computational insight is that these quantities admit tractable, nonparametric kernel estimators.

TL;DR

Five reproducible experiments show Gaussian potential landscapes, analytically verified information forces, attraction and repulsion under entropy optimization, distribution matching via quadratic divergence, and class-informative feature learning via quadratic mutual information (QMI).

Distribution matching
0.4269 → 0.0304
Squared Euclidean density divergence ↓
Feature learning
0.0074 → 0.1183
Estimated quadratic MI ↑
Learned direction
24.1° → 91.1°
Projection turns toward class-informative vertical axis

These are actual outputs from the supplied Colab experiment, re-executed for this page. They are illustrative synthetic-data results, not general performance claims.

The foundation

From a kernel to an information objective

Begin with an isotropic Gaussian kernel in \(d\) dimensions:

\[G_h(\mathbf z)=(2\pi h^2)^{-d/2}\exp\!\left(-\frac{\|\mathbf z\|^2}{2h^2}\right).\]

From observations \(\mathbf x_1,\dots,\mathbf x_N\), the local information field is the average of the kernels centered on the observations:

\[\Phi(\mathbf x)=\frac{1}{N}\sum_{i=1}^{N}G_h(\mathbf x-\mathbf x_i).\]

The global quadratic information potential averages this field at the sample locations:

\[\widehat V_2=\frac{1}{N^2}\sum_{i,j=1}^{N}G_h(\mathbf x_i-\mathbf x_j),\qquad \widehat H_2=-\log\widehat V_2.\]

Here \(h=\sqrt{2}\sigma\) when \(\sigma\) is the Gaussian KDE bandwidth, because integrating a product of Gaussian kernels doubles their variance.

1 Observations
2 Kernel field
3 Information potential
4 Gradient force
5 Adaptive learning
Experiments

Five visual experiments

We use normalized Gaussian kernels, fixed pseudorandom seeds, NumPy for analytic fields and gradients, and PyTorch automatic differentiation for optimization. Each figure below was generated from the supplied notebook; all source is included in the downloadable repository.

Experiment 01

Gaussian kernels as potential landscapes

Each observation is a center of a localized potential. A small bandwidth produces sharply localized peaks; a larger bandwidth spreads the influence of each particle and smooths out the landscape.

Three 1D Gaussian kernel potential fields at different bandwidths
Figure 1 · Superposition of five 1D Gaussian kernels at three bandwidths (\(h=0.25, 0.65, 1.4\)).
Three colored 2D Gaussian kernel potential contour plots
Figure 2 · Two-dimensional kernel potential surfaces. Red markers locate the observations.

Try it: change the bandwidth

Interactive
0.65

Same five 1D particle positions as in the notebook. This canvas uses normalized Gaussian kernels.

What to notice: The field \(\Phi(x)\) is a function over position; the scalar \(\widehat V_2\) summarizes pairwise interactions over the entire particle configuration. They should not be conflated.
Experiment 02

Information forces are gradients of the field

In the ITL field-gradient convention, the information force points uphill in the potential landscape. It is distinct from the negative gradient convention for mechanical potential energy.

\[\mathbf F(\mathbf x)=\nabla_{\mathbf x}\Phi(\mathbf x)=\frac{1}{Nh^2}\sum_iG_h(\mathbf x-\mathbf x_i)(\mathbf x_i-\mathbf x).\]
Information force quiver vector field over a Gaussian potential landscape
Figure 3 · White vectors show analytic information forces superimposed on the Gaussian potential surface. Red points are fixed kernel centers.

The notebook verifies these derivatives by finite differences. At the point \((0.45,-0.28)\), both analytic and numerical derivatives give \((-0.00832751,\,0.02821155)\), with maximum absolute error \(8.02\times10^{-13}\).

Normalizing the force by the local field yields the score, which connects directly to mean shift:

\[\nabla\log\Phi(\mathbf x)=\frac{\mathbf F(\mathbf x)}{\Phi(\mathbf x)},\qquad\mathbf m(\mathbf x)-\mathbf x=h^2\nabla\log\Phi(\mathbf x).\]

The mean-shift displacement computed in the notebook, \((-0.15986633,\,0.24185833)\), matches \(h^2\) times the score to printed precision.

Experiment 03

Why entropy gives attraction and repulsion

When sample positions themselves are optimized, maximizing \(V_2\) produces attraction (equivalently minimizing Rényi entropy), while minimizing \(V_2\) produces repulsion (maximizing entropy).

\[\nabla_{\mathbf x_k}\widehat V_2=\frac{2}{N^2h^2}\sum_jG_h(\mathbf x_k-\mathbf x_j)(\mathbf x_j-\mathbf x_k).\]
Particle configurations at four steps for attraction and repulsion
Figure 4 · Seventeen particles evolve under positive or negative gradients of global quadratic information potential, at steps 0, 20, 60, and 130.
Information potential increases for attraction and decreases for repulsion
Figure 5 · The quadratic information potential rises under attraction and falls under repulsion.

The global particle derivative differs from the local force by a factor of \(2/N\). The notebook checks the global derivative numerically: the analytic result is 0.0030670206689313293, versus the finite difference 0.0030670206693783615.

These are optimization trajectories, not simulated physical time. In the absence of constraints, entropy maximization may keep spreading particles indefinitely.

Experiment 04

Match one distribution to another

Let \(p\) be a fixed reference density and \(q\) an adaptive density. The squared Euclidean density divergence decomposes into three information potentials:

\[D_{\mathrm{ED}}(p,q)=\underbrace{\int p^2}_{V_p}+\underbrace{\int q^2}_{V_q}-2\underbrace{\int pq}_{V_c}.\]

The \(V_q\) term produces repulsion among adaptive particles under gradient descent; the cross term \(-2V_c\) attracts them toward the reference sample set. Their combination produces distribution matching rather than arbitrary collapse.

Kernel density plots showing the adaptive distribution moving toward a bimodal target over optimization
Figure 6 · An initially displaced source distribution (orange) gradually matches a bimodal target distribution (blue) over 300 Adam updates.
Squared Euclidean density divergence declining with optimization steps
Figure 7 · The optimized Euclidean divergence declines throughout training.
Euclidean · initial
0.4269
Before optimization
Euclidean · final
0.0304
After 300 updates
Cauchy–Schwarz
3.173 → 0.113
Measured at start and end

We also compare two closed-form divergences for unit-variance Gaussian densities separated by \(\Delta\):

\[D_{\mathrm{ED}}=\frac{1}{\sqrt\pi s}\left(1-e^{-\Delta^2/(4s^2)}\right),\qquad D_{\mathrm{CS}}=\frac{\Delta^2}{2s^2}.\]
Analytical plots of Euclidean versus Cauchy Schwarz divergence against Gaussian mean separation
Figure 8 · Euclidean divergence saturates as equal-width Gaussian densities separate; Cauchy–Schwarz divergence grows quadratically. For \(s=1,\Delta=2\), values are 0.3566 and 2.

For matching Gaussian KDEs, this squared density \(L^2\) discrepancy has the form of a squared Gaussian-kernel MMD at interaction width \(h\). Not all ITL divergences are MMD.

Experiment 05

Discover informative features with quadratic mutual information

Suppose the input has two coordinates, but only one carries class information. Can an information-theoretic criterion learn which direction matters?

We optimize a one-dimensional projection \(Z=\mathbf w^\top\mathbf X\), with \(\|\mathbf w\|=1\), using Euclidean quadratic mutual information between the feature \(Z\) and a binary class variable \(C\).

\[I_{\mathrm{ED}}(Z;C)=\sum_c\int\left[p_{ZC}(z,c)-p_Z(z)p_C(c)\right]^2\,dz=V_J-2V_C+V_M.\]

The projected real-valued features use a Gaussian kernel. Categorical class labels use the Kronecker-delta kernel, \(k_C(c_i,c_j)=\mathbf1\{c_i=c_j\}\); they are not treated as continuous Gaussian observations.

Synthetic two-class data scatter plot with vertical class separation
Figure 9 · Raw data: horizontal variation is a shared nuisance; vertical coordinates distinguish the two classes.
Quadratic mutual information versus feature projection angle, peaking near 90 degrees
Figure 10 · QMI across candidate projection angles, peaking near the informative vertical direction.
\[\mathbf w(\theta)=\begin{bmatrix}\cos\theta\\\sin\theta\end{bmatrix},\qquad\theta\leftarrow\theta+\eta\frac{\partial\widehat I_{\mathrm{ED}}}{\partial\theta}.\]
Before and after class projection histograms, QMI optimization trajectory, and learned angle trajectory
Figure 11 · The learned projection separates the classes. Bottom panels show estimated QMI rising and the projection angle converging close to 90°.
QMI · initial
0.00738
Projection at 24.06°
QMI · final
0.11835
Projection at 91.12°
CS-based QMI
0.073 → 0.685
Evaluated on initial and learned projections

The automatic derivative of QMI with respect to angle is independently verified: PyTorch gives 0.0828095998302168, versus 0.08280959982870373 by finite differences.

Interpretation: QMI measures distributional dependence between the learned representation and the label. Maximizing it selects features that better preserve class information, even when a high-variance input feature is uninformative.
Putting the pieces together

Three derivatives—not one

For reasoning about ITL algorithms, it is essential to distinguish a local force, the gradient of global potential, and the gradient of an objective with respect to learnable parameters.

ObjectDerivativeMeaning
Local field\(\mathbf F(x)=\nabla_x\Phi(x)\)How the field changes at a query location
Global potential\(\nabla_{x_k}V_2=\tfrac2N\mathbf F(x_k)\)How total interactions change when a particle moves
Entropy\(\nabla_{x_k}H_2=-\nabla_{x_k}V_2/V_2\)Direction of change in Rényi entropy
Model parameters\(\nabla_wJ=\sum_i(\partial y_i/\partial w)^\top\nabla_{y_i}J\)How information gradients train a model

The book's broader idea is that global information objectives become tractable through local pairwise kernel interactions, and their gradients can be passed through linear models, adaptive filters, or neural networks.

Reproducibility

Run the experiments yourself

The accompanying executed notebook includes all five experiments, analytic and numerical gradient checks, the exact synthetic-data seeds, and the scripts that generated every figure above.

Download the executed notebook   Open Google Colab ↗

For a local run, install numpy, matplotlib, torch, and jupyter. The page itself is static HTML/CSS/JavaScript and works on GitHub Pages without a build step or server.

Reference and attribution

José C. Principe. Information Theoretic Learning: Rényi's Entropy and Kernel Perspectives. Springer, 2010. DOI: 10.1007/978-1-4419-1570-2.

Relevant material: Chapter 2 §§2.3, 2.6, 2.8–2.10; Chapter 6 §6.6; Chapter 7 §7.6. The derivations are based on the book's framework. The synthetic examples, implementation details, numerical outputs, and figures are notebook-generated demonstrations, not figures copied from the book.

Design inspiration: Rikiya Takehi et al., “Sparks of Weight-Space Programming”. This page uses an original layout and styling.