---
title: Optimal Transport Barycenter Problem
url: https://www.emergentmind.com/topics/optimal-transport-barycenter-problem
type: topic
---

# Optimal Transport Barycenter Problem

The optimal transport barycenter problem is a variational framework for averaging probability distributions under the geometry defined by the 2‐Wasserstein (optimal transport) distance. It aims to find a probability measure—the barycenter—that minimizes the sum of squared Wasserstein distances to a finite set (or family) of input measures, serving as a metric-space analog of the Fréchet mean. Barycenter computation sits at the intersection of analysis, computational geometry, probability, and high-dimensional numerical optimization, with applications ranging from statistics and computer vision to generative modeling.

## 1. Mathematical Formulation and Theoretical Foundations

Given a metric space $(X,d)$ (commonly $X \subset \mathbb{R}^D$) and $N$ probability measures $\mu_1, \dots, \mu_N$ with finite second moments, the 2-Wasserstein barycenter $\bar{\mu}$ is defined as the minimizer
\[
\bar{\mu} = \arg\min_{\nu \in \mathcal{P}_2(X)} \frac{1}{N}\sum_{j=1}^N W_2^2(\nu, \mu_j),
\]
where $W_2^2(\mu,\nu) = \inf_{\gamma \in \Gamma(\mu, \nu)} \int_{X \times X} d(x,y)^2\,d\gamma(x,y)$, with $\Gamma(\mu,\nu)$ denoting couplings with marginals $\mu, \nu$ [1802.05757].

The barycenter generalizes the concept of means to metric measure spaces equipped with the Wasserstein metric. Under strict regularity (e.g., absolute continuity), existence and uniqueness often follow from the strict convexity of the cost functional.

In discrete settings, where each $\mu_i$ has finite support, an analogous LP can be posed over a finite set $S$ of weighted centroids, reducing the infinite-dimensional problem to a tractable finite-dimensional one [1507.07218]. The support of the discrete barycenter lies in the set of centroids $S = \{\frac{1}{N} (x_{1,k_1} + \cdots + x_{N,k_N})\}$, with provable sparsity and non-mass-splitting properties.

## 2. Dual Formulation and Semi-Discrete Structure

For semi-discrete problems—those in which the barycenter is restricted to a measure supported on $m$ points—the dual formulation plays a crucial role. Given $\Sigma = \{x^1, \ldots, x^m\} \subset X$, define $\nu_\Sigma = \frac{1}{m}\sum_{i=1}^m \delta_{x^i}$. Then, for each $\mu_j$:
\[
F_{\mathrm{OT}}[\phi, \Sigma; \mu_j] = \frac{1}{m}\sum_{i=1}^m \phi^i + \int_X \bar{\phi}(y) d\mu_j(y),
\]
where $\bar{\phi}(y) = \min_i \{\|y - x^i\|^2 - \phi^i\}$ is the $c$-transform. The optimal weights $\phi$ induce a weighted Voronoi tessellation (power diagram).

Gradients with respect to site locations and dual variables are given by:
\[
\frac{\partial F}{\partial x^i} = \frac{1}{N} \sum_{j=1}^N a^i_j (x^i - b^i_j), \qquad \frac{\partial F}{\partial \phi^i_j} = \frac{1}{N}\left(\frac{1}{m} - a^i_j\right),
\]
where $a^i_j$ and $b^i_j$ are cell masses and barycenters for $\mu_j$ [1802.05757].

Extension to the fully continuous setting

Source: https://www.emergentmind.com/topics/optimal-transport-barycenter-problem