Schrödinger Bridge Problem

The Schrödinger Bridge problem finds the most likely stochastic evolution connecting two observed probability distributions. In the urban context, it answers: given census snapshots of population density at two different times, what is the most probable migration pattern that connects them?

1. Problem Statement

Let \(Q\) be a reference stochastic process (e.g., Brownian motion) on \([0, T]\). We observe the marginal distributions at the endpoints:

$$\rho_0(x) = P(x, 0), \qquad \rho_T(x) = P(x, T)$$

The Schrödinger Bridge seeks the path measure \(P^*\) that:

$$P^* = \arg\min_{P} \; \text{KL}(P \| Q) \quad \text{subject to} \quad P(x, 0) = \rho_0, \;\; P(x, T) = \rho_T$$

where the Kullback-Leibler divergence between path measures is:

$$\text{KL}(P \| Q) = \int \log\frac{dP}{dQ} \, dP$$

Intuitively, \(P^*\) is the stochastic evolution that is closest to the reference process \(Q\) while exactly matching the observed marginals. It represents the most likely transport from \(\rho_0\) to \(\rho_T\).

2. The Schrödinger System

When the reference process \(Q\) is Brownian motion with diffusion \(\epsilon/2\), the optimal \(P^*\) can be characterised by two functions \(\varphi(x, t)\) and \(\hat{\varphi}(x, t)\) satisfying coupled PDEs:

$$\frac{\partial \varphi}{\partial t} = -\frac{\epsilon}{2}\Delta \varphi + V\varphi \qquad (\text{backward heat equation})$$

$$\frac{\partial \hat{\varphi}}{\partial t} = \frac{\epsilon}{2}\Delta \hat{\varphi} - V\hat{\varphi} \qquad (\text{forward heat equation})$$

The density at any intermediate time is given by the product:

$$\rho(x, t) = \varphi(x, t) \cdot \hat{\varphi}(x, t)$$

For the free case (\(V = 0\)), the system simplifies. The heat kernel is:

$$K_\epsilon(x, y; t) = \frac{1}{\sqrt{2\pi\epsilon t}} \exp\!\left(-\frac{(x-y)^2}{2\epsilon t}\right)$$

and the Schrödinger system becomes:\(\; \varphi(x, 0) \cdot \hat{\varphi}(x, 0) = \rho_0(x)\) and\(\varphi(x, T) \cdot \hat{\varphi}(x, T) = \rho_T(x)\), with \(\hat{\varphi}(x, t) = \int K_\epsilon(x, y; t) \, \varphi(y, 0) \, dy\).

3. Sinkhorn Algorithm

In the discrete setting with \(N\) spatial points, the heat kernel becomes a matrix \(\mathbf{K}\) with entries \(K_{ij} = K_\epsilon(x_i, x_j; T)\). The Schrödinger Bridge reduces to finding vectors \(\boldsymbol{\varphi}\) and \(\hat{\boldsymbol{\varphi}}\) such that:

$$\boldsymbol{\varphi} \odot (\mathbf{K} \hat{\boldsymbol{\varphi}}) = \boldsymbol{\rho}_0, \qquad \hat{\boldsymbol{\varphi}} \odot (\mathbf{K}^T \boldsymbol{\varphi}) = \boldsymbol{\rho}_T$$

The Sinkhorn algorithm solves this by alternating projections:

Algorithm: Sinkhorn Iterations

Initialise \(\hat{\boldsymbol{\varphi}}^{(0)} = \mathbf{1}\). Then iterate:

$$\boldsymbol{\varphi}^{(k+1)} = \frac{\boldsymbol{\rho}_0}{\mathbf{K} \hat{\boldsymbol{\varphi}}^{(k)}}$$

$$\hat{\boldsymbol{\varphi}}^{(k+1)} = \frac{\boldsymbol{\rho}_T}{\mathbf{K}^T \boldsymbol{\varphi}^{(k+1)}}$$

This converges linearly with rate determined by the second-largest eigenvalue of \(\mathbf{K}\). Convergence is guaranteed when \(\mathbf{K}\) has strictly positive entries.

The resulting optimal transport plan (coupling) is:

$$\pi^*_{ij} = \varphi_i \, K_{ij} \, \hat{\varphi}_j$$

This is the entropic regularisation of optimal transport, with \(\epsilon\) controlling the regularisation strength. As \(\epsilon \to 0\), the solution approaches the Monge-Kantorovich optimal transport plan.

4. Connection to Quantum Mechanics

The Schrödinger Bridge has a deep connection to quantum mechanics via Nelson's stochastic mechanics. In Nelson's framework, the Schrödinger equation:

$$i\hbar \frac{\partial \psi}{\partial t} = -\frac{\hbar^2}{2m}\Delta\psi + V\psi$$

can be rewritten via \(\psi = e^{R + iS/\hbar}\) into two real equations. Under the substitution \(t \to it\) (Wick rotation), the quantum system becomes exactly the Schrödinger Bridge system with \(\epsilon = \hbar/m\).

The analogy is precise:

Quantum MechanicsSchrödinger Bridge
Wave function \(\psi\)Forward potential \(\varphi\)
Born rule \(|\psi|^2\)Density \(\varphi \hat{\varphi}\)
Planck constant \(\hbar\)Diffusion \(\epsilon\)
PropagatorHeat kernel \(K_\epsilon\)

5. Python: Sinkhorn for Urban Density Transport

We transport a bimodal urban density (two population centres) to a unimodal one (merged city), finding the optimal Schrödinger Bridge connecting them.

Sinkhorn Algorithm for 1D Urban Density Transport

Python
script.py149 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server

6. Properties and Urban Applications

Key properties of the Schrödinger Bridge:

  • Entropic regularisation: As \(\epsilon \to 0\), the bridge approaches the deterministic optimal transport (Monge-Kantorovich) solution. Larger \(\epsilon\) gives more diffuse transport.
  • Uniqueness: The Schrödinger Bridge is unique when \(\rho_0, \rho_T > 0\) everywhere.
  • Time symmetry: The bridge from \(\rho_0\) to \(\rho_T\) is the time-reversal of the bridge from \(\rho_T\) to \(\rho_0\).
  • Urban interpretation: The Schrödinger Bridge gives the most likely population flow between two census snapshots, accounting for random individual mobility decisions. The parameter \(\epsilon\) encodes the "temperature" of mobility decisions.

Connection to Wasserstein Distance

The cost of the Schrödinger Bridge is related to the Wasserstein-2 distance:

$$\epsilon \cdot \text{KL}(P^* \| Q) = \frac{1}{2}W_2^2(\rho_0, \rho_T) + \mathcal{O}(\epsilon)$$

This establishes the Schrödinger Bridge as a regularised version of optimal transport, computationally tractable via the Sinkhorn algorithm with \(O(N^2)\) per iteration.