---
title: Measure-Preserving Martingale Sinkhorn Algorithm
url: https://www.emergentmind.com/topics/measure-preserving-martingale-sinkhorn-mpms-algorithm
type: topic
---

# Measure-Preserving Martingale Sinkhorn Algorithm

The Measure-Preserving Martingale Sinkhorn (MPMS) algorithm is an entropic iterative method for solving martingale optimal transport (MOT) and related constrained transport problems. MPMS generalizes the classical Sinkhorn algorithm—widely used for entropic optimal transport—by incorporating the martingale constraint, which enforces conditional mean preservation at every source location. The algorithm thus yields plans that simultaneously match prescribed marginals and preserve the martingale property, with guarantees of exponential convergence under broad conditions. MPMS has become a central computational tool in several domains, including stochastic volatility model calibration and robust finance.

## 1. The Entropic Martingale Optimal Transport Problem

The primary setting is the entropic martingale optimal transport (EMOT) problem. Given probability measures $\mu,\nu \in \mathcal P(\mathbb{R})$ with finite first moment and cost function $c(x,y,z)$, the objective is to find a martingale coupling $\pi$ on $\mathbb{R}^3$ (with prescribed marginals and mean-preserving constraint) that minimizes the relative entropy to a reference law $Q$ with density
$$
\frac{dQ}{d(\mu \otimes \nu \otimes \rho)} = \exp(-c(x,y,z)).
$$
The admissible set is
$$
\mathcal{M}(\mu,\nu) = \left\{ \pi \in \mathcal{P}(\mathbb{R}^3) : \pi_x = \mu,\, \pi_y = \nu,\, \mathbb{E}^{\pi}[Y-X \mid X] = 0 \;\text{a.s.} \right\}.
$$
The EMOT problem is
$$
\inf_{\pi \in \mathcal{M}(\mu,\nu)} H(\pi \mid Q) = \inf_{\pi \in \mathcal{M}(\mu,\nu)} \int \log \left( \frac{d\pi}{dQ} \right) \, d\pi,
$$
equivalently,
$$
\inf_{\pi \in \mathcal{M}(\mu,\nu)} H(\pi\mid \mu\otimes\nu\otimes\rho) + \int c\,d\pi,
$$
where $H(\pi\mid \cdot)$ denotes relative entropy.

Entropic regularization via $H(\pi\mid \mu\otimes\nu\otimes\rho)$ induces strict convexity and smoothness, rendering the problem well-posed and numerically tractable. In the zero-temperature limit, the formulation recovers the classical (non-entropic) MOT problem [2407.14186].

## 2. Duality and Variational Structure

The dual formulation introduces potentials $f \in L^\infty(\mu)$, $g \in L^\infty(\nu)$, and $h \in L^\infty(\mu)$, yielding the Lagrangian
$$
\mathcal{L}(\pi; f,g,h) = H(\pi \mid Q) + \int f(d\pi_x - d\mu) + \int g(d\pi_y - d\nu) + \int h(x) \mathbb{E}^\pi[Y-X\mid X=x]\,d\mu(x).
$$
The dual problem is
$$
\sup_{f,g,h} \mathcal{G}(f,g,h)
$$
with
$$
\mathcal{G}(f,g,h) = -Z(f,g,h) - \int f\,d\mu - \int g\,d\nu,
$$
where
$$
Z(f,g,h) = \int \exp\big(-c(x,y,z) - f(x) - g(y) - h(x)(y-x)\big)\,d(\mu\otimes\nu\otimes\rho).
$$
Under compactness and Lipschitz continuity of the cost, there is strong duality and no primal-dual gap [2407.14186, 2502.20264].

## 3. Algorithmic Structure: Iterative Bregman Projections

MPMS alternates Bregman (KL-divergence) projections onto affine constraint sets, exactly generalizing the Sinkhorn iterative proportional fitting procedure (IPFP). At each iteration, updates enforce the three constraint families:

1. **Row-mass fit:** Enforce $\sum_j \pi_{ij} = \mu_i$ (source marginal).
2. **Martingale fit:** Enforce $\sum_j (y_j - x_i)\pi_{ij} = 0$ (conditional mean preservation).
3. **Column-mass fit:** Enforce $\sum_i \pi_{ij} = \nu_j$ (target marginal).

The steps are:
- Update exponentials or dual variables (row/col scaling factors and martingale multipliers).
- For the martingale projection, solve small-dimensional nonlinear equations per row (typically by Newton or bisection).
- Repeat until convergence in all constraints.

In the most general setting (with cost $C_{ij} = c(x_i, y_j)$), one has [2606.26739]:
$$
\pi_{ij} = u_i K_{ij}(\lambda) v_j,\quad K_{ij}(\lambda) = \exp\big(-\tfrac{1}{\varepsilon}(C_{ij} - (y_j - x_i)\cdot \lambda_i)\big),
$$
where $u_i$ and $v_j$ are scaling vectors, and $\lambda_i$ handles the martingale constraint.

The discrete MPMS pseudocode aligns with the above structure (see [2407.14186, 2606.26739, 2508.17641]):

| Step            | Constraint        | Update Structure             |
|-----------------|------------------|------------------------------|
| Row-mass        | $\sum_j \pi_{ij}$ | $u_i \gets \mu_i/\sum_j K_{ij} v_j$ |
| Martingale      | $\sum_j (y_j-x_i)\pi_{ij}$ | Solve $h_i$ or $\lambda_i$ nonlinearly         |
| Column-mass     | $\sum_i \pi_{ij}$ | $v_j \gets \nu_j/\sum_i u_i K_{ij}$  |

Each projection is exact in the KL geometry [2606.26739].

## 4. Convergence and Theoretical Guarantees

The central convergence result asserts exponential (linear) convergence in dual value and L² error under mild and checkable conditions:
- Compact support of $\mu, \nu$
- Bounded, Lipschitz cost
- Existence of an interior admissible coupling

Quantitatively,
$$
\mathcal{G}^* - \mathcal{G}(f^n,g^n,h^n) \leq e^{-n\rho_s}\left(\mathcal{G}^* - \mathcal{G}(f^0,g^0,h^0)\right),
$$
for some $\rho_s>0$.

In the abstract setting, the contraction rate is governed by the sum of linear subspaces (for marginal and martingale constraints) and their respective Friedrichs angles. Specifically, the explicit MPMS contraction rate is [2502.20264]:
$$
\rho = 1 - \frac{1}{3} \left(\frac{\sigma_R}{L_R}\right)^2 \frac{1 - \alpha}{1 + \alpha},
$$
where $\alpha$ is the cosine of the Friedrichs angle between marginal and martingale constraint spaces, and $\sigma_R$, $L_R$ are strong convexity and Lipschitz constants of the dual functional. Convergence remains exponential except in the degenerate limit where the angle vanishes.

For practical finite-dimensional problems, 200–500 cycles suffice for high-precision results ($10^{-8}$ accuracy) [2606.26739].

## 5. Variant Algorithms and Newton Acceleration

Several variations have been developed for computational acceleration and broader structural constraints:
- In [2508.17641], MPMS is paired with sparse-Newton acceleration: after warm-starting with standard Sinkhorn cycles, a second-order local step exploits approximate sparsity in the Hessian for rapid convergence. The Hessian is thresholded to maintain computational feasibility.
- MPMS generalizes to supermartingale constraints (by imposing row-wise inequalities).
- For one-step martingale Benamou–Brenier problems (Bass martingale computation), a continuous variant of MPMS solves backward and forward heat equations with alternating pushforwards to match marginals, remaining well-posed in higher dimensions via $d$-dimensional parabolic equations [2310.13797].

Key elements for stable implementation include log-domain storage of scaling vectors, root-finding for martingale multipliers, and (optionally) Anderson or Aitken acceleration [2606.26739].

## 6. Applications: Stochastic Volatility Model Calibration and Quantitative Finance

MPMS provides the computational backbone for several robust calibration tasks:
- In multi-period stochastic volatility calibration, known marginals at option maturities and a prior model (e.g., Heston) yield a chain of EMOT subproblems. MPMS ensures preservation of calibration and arbitrage-free, no-loss-of-martingale structure at each link in the chain [2407.14186].
- One-step (mBB) and multi-step discrete martingale problems for statistical or financial applications are now tractable at scale.
- Numerical experiments in [2310.13797] confirm high-precision convergence across synthetic and real market data, with typical mean-squared CDF error orders $10^{-8}$–$10^{-10}$ in tens of cycles.

## 7. Geometric and Analytical Insights

The convergence rate and stability of MPMS are governed by the geometry of the affine constraint subspaces. The key determinant is the Friedrichs angle between the aggregated marginal constraints and the martingale constraint space. The closer (less orthogonal) these spaces, the slower the rate. Under strong convexity and closed-sum hypotheses—typically met for reasonable marginals and costs—MPMS enjoys robust, linear convergence even in high dimensions [2502.20264].

The alternating projection structure, strong convexity, and explicit characterization of the dual functional guarantee both practical effectiveness and theoretical transparency. This structure unifies IPFP-type algorithms across optimal transport, adapted/martingale constraints, and multi-marginal extensions.

Source: https://www.emergentmind.com/topics/measure-preserving-martingale-sinkhorn-mpms-algorithm