---
title: Optimal Transport for Fairness
url: https://www.emergentmind.com/topics/optimal-transport-for-fairness
type: topic
---

# Optimal Transport for Fairness

Optimal Transport for Fairness

Optimal transport (OT) for fairness refers to a family of mathematical and algorithmic frameworks that use OT theory to measure, diagnose, and enforce fairness properties in machine learning, decision-making, and resource allocation. By leveraging the geometry of probability distributions and their optimal coupling, OT offers a precise and flexible toolkit for both the diagnosis of bias and the quantifiable repair of unfairness in data, models, and algorithmic outcomes.

## 1. Mathematical Principles and Formalization

At its core, OT for fairness is grounded in the classical Kantorovich formulation: given two probability measures μ, ν on a space X (e.g., score distributions across groups), and a cost function c(x, y) (e.g., squared Euclidean distance), the optimal transport cost is
$$
W^p_c(\mu, \nu) = \min_{\pi \in \Pi(\mu, \nu)} \int_{X \times X} c(x, y) d\pi(x, y),
$$
where $\Pi(\mu, \nu)$ is the set of couplings with marginals μ, ν. In fairness contexts:
- μ, ν represent distributions of outcomes (e.g., scores) for disadvantaged and advantaged groups.
- c(x, y) encodes the "price" (e.g., monotonicity, Euclidean distance) of shifting individuals' outcomes.

For enforcing fairness, the approach determines an OT map or transport plan T that moves a group's original distribution μ towards a fair target (e.g., a barycenter ν) with minimal perturbation, according to fairness constraints.

Fairness objectives addressed include:
- **Group fairness (statistical parity):** Enforce that group-conditional distributions coincide: $\nu_1 = \nu_2 = \cdots = \nu_G$.
- **Individual fairness:** Ensure that “similar” individuals are treated similarly, often operationalized as Lipschitz or least-squares distortion bounds between original and mapped outcomes.
- **Intersectional fairness:** Simultaneous handling of multi-attribute sensitive groups via higher-dimensional group indices or group-specific parameters [1712.07924].

## 2. Methods: Barycentric Repair and Continuous Interpolation

A key contribution is the use of Wasserstein barycenters to define a “consensus” or fair target distribution. Given group-conditional laws $\mu_k$ and weights $w_k$, the barycenter $\nu^*$ solves:
$$
\nu^* = \arg \min_{\rho} \sum_{k=1}^G w_k W_2^2 (\mu_k, \rho)
$$
The optimal transport map $T_k^*$ from each group to the barycenter provides a monotonic, minimal-distortion correction.

To interpolate between "what you see is what you get" ($\theta=0$; preserve raw scores) and "we're all equal" ($\theta=1$; enforce perfect parity), displacement interpolation is used:
$$
T_k^\theta(x) = (1-\theta) x + \theta T_k^*(x)
$$
with $T_k^\theta$ defining a geodesic between unchanged and fully-repaired outcomes [1712.07924].

This formalism extends to settings with multiple sensitive attributes (intersectionality) via group-specific interpolation parameters and sequential or jointly-computed barycenters [2503.09866].

## 3. Extensions: Testing, Diagnostics, and Fairness Beyond Scores

OT-based fairness frameworks are deployed not only for post-processing of outcomes but also for auditing and recourse:
- **Statistical auditing:** Project the empirical data distribution onto the nearest fair set under OT to construct interpretable and statistically rigorous tests of group fairness (demographic parity, equalized odds, etc.), characterizing minimal covariate adjustments that would restore fairness [2106.01070].
- **Individual and structural bias quantification:** The OT map $T(x)$ directly measures per-individual displacement. Subgroup-level and group-level distances recover classical fairness metrics as special cases (e.g., Wasserstein distance zero if and only if demographic parity holds) [2102.10349].
- **Recourse:** The OT map suggests the minimal actionable shifts needed for individuals to achieve parity with reference distributions, with further projections onto feasible action sets as needed.

OT's geometry enables detection of subtle biases, such as distributional mismatches invisible to mean or quantile-based fairness criteria. OT-based explainability localizes bias-inducing features, as in image domains by mapping local transport corrections to saliency heatmaps [2308.11090].

## 4. Efficient Algorithms and Distributed Solvers

Computation of fair OT maps/barycenters is tractable:
- **Univariate distributions:** Quantile-to-quantile matching in $O(n\log n)$.
- **High dimensions:** Entropic-regularized Sinkhorn solvers and fixed-point barycenter iterations, with GPU acceleration and $O(n^2)$ per iteration scaling [1712.07924].
- **Auction and flow-based algorithms:** For discrete distributions, hybrid auction algorithms compute minimum-mean cycles, enabling efficient repair and interpolation rules (Extended Total Repair) with smooth input–output mappings for online or out-of-sample repair [2503.15119].
- **Distributed optimization:** For resource allocation and dynamic scenarios, distributed ADMM methods decompose OT with fairness penalties into parallelizable subproblems, with convergence guarantees under convexity [2103.16618].
- **Neural OT solvers:** Deep convex neural networks parameterize monotone transport maps, scaling to high-dimensional, continuous covariate spaces and enabling decorrelation or group-independence [2307.05187].

## 5. Empirical Evaluation and Applications Across Domains

Most OT-for-fairness approaches demonstrate consistently strong empirical performance:
- **Risk assessment and recidivism prediction:** OT repairing achieves near-perfect demographic parity and strong alignment on equalized odds with small (<2%) accuracy loss; Pareto improvements are observed, with protected group performance strictly improved or unchanged [2111.09211], [2102.10349].
- **Resource allocation and networks:** Fair-dynamic-OT achieves large reductions (>50%) in Gini coefficients of resource shares with efficiency losses under 10% [2103.16618].
- **Fairness in individualized treatment:** OT-based post-processing for fair individualized treatment rules provides strict demographic parity at controlled value loss, with tunable trade-offs and tight theoretical loss bounds [2507.23349].
- **Recourse and diagnostics:** Per-individual recourse suggestions and feature rankings via OT directly pinpoint the most actionable or impactful changes for meeting fairness requirements [2102.10349], [1906.09218].
- **Fairness explainability in vision:** OT post-processing both debiases predictions and, via OT-induced shift maps, identifies the visual features driving biased decisions [2308.11090].
- **Complex graph/relational data:** Fairness pre-processing for dyadic tasks such as link prediction achieves state-of-the-art improvement in dyadic disparate impact with moderate utility trade-off, using marginal-alignment OT [2202.04520].

## 6. Advanced Topics: Group Constraints, Partial Transport, and New Metrics

Recent advances extend OT fairness to more general and practical operational scenarios:
- **Exact group fairness in matching:** Linear constraints on OT couplings (e.g., specifying matching quotas between group pairs), with FairSinkhorn extending Sinkhorn iteration for equality-constrained blocks. Relaxed versions include convex penalty regularization and cost-learning via bilevel optimization, with statistical $O(n^{-1/2})$ generalization guarantees [2601.07144].
- **Partial, proportional, or region-specific fairness:** Alignment of only a prescribed quantile (top-λ) of the disadvantaged group's scores, tuning the degree of intervention and the impact on global or partial-AUC metrics. This enables fine-grained control of fairness-performance trade-offs [2508.03940].
- **Group-blind or label-free repair:** OT repair of marginal distributions without requiring individual group membership at repair time, producing projection maps that respect group parity in aggregate regardless of individual group-label availability [2310.11407].
- **Representation-bias tolerant repair:** Bayesian nonparametric stopping rules ensure that underrepresented subgroups receive sufficient modeling fidelity before OT-based repair, preventing bias propagation and enabling robust out-of-sample generalization [2410.02840].
- **Stochastic settings and mutual fairness:** OT is used to define run-to-run fair outreach in social influence diffusion, by penalizing the expected absolute difference in coverage across groups in the realized diffusion law [2406.17736].
- **Continuous OT and differentiable fairness constraints:** Dual OT formulations yield smooth fairness regularizers, enabling scalable stochastic-gradient-based optimization with strong theoretical guarantees [2101.02084], [2202.03814].

## 7. Regulatory and Policy Implications

The flexibility and mathematical guarantees of OT-based fairness interventions align with legal and regulatory standards:
- The continuous tuning of fairness parameters (e.g., θ in CFAθ) directly enables algorithmic compliance with regulatory thresholds such as the 80% rule in US disparate-impact doctrine [1712.07924].
- Intersectionality handling allows for targeted “corrections” for multiply-disadvantaged groups, as required in some human-rights and data protection frameworks.
- OT-based preprocessing fits within European proportionality tests for pre-ranking fairness adjustments and supports human-in-the-loop requirements (such as GDPR Art. 22).

## References

- "Matching Code and Law: Achieving Algorithmic Fairness with Optimal Transport" [1712.07924]
- "Everything is Relative: Understanding Fairness with Optimal Transport" [2102.10349]
- "Testing Group Fairness via Optimal Transport Projections" [2106.01070]
- "Fairness Explainability using Optimal Transport with Applications in Image Classification" [2308.11090]
- "Improving Fairness in Criminal Justice Algorithmic Risk Assessments Using Optimal Transport and Conformal Prediction Sets" [2111.09211]
- "Fair and Distributed Dynamic Optimal Transport for Resource Allocation over Networks" [2103.16618]
- "Overcoming Representation Bias in Fairness-Aware data Repair using Optimal Transport" [2410.02840]
- "EquiPy: Sequential Fairness using Optimal Transport in Python" [2503.09866]
- "Obtaining Dyadic Fairness by Optimal Transport" [2202.04520]
- "Optimal Transport under Group Fairness Constraints" [2601.07144]
- "Decorrelation using Optimal Transport" [2307.05187]
- "Group-blind optimal transport to group parity and its constrained variants" [2310.11407]
- "FairPOT: Balancing AUC Performance and Fairness with Proportional Optimal Transport" [2508.03940]
- "Fairness with Continuous Optimal Transport" [2101.02084]
- "FlipTest: Fairness Testing via Optimal Transport" [1906.09218]
- "Fairness in Social Influence Maximization via Optimal Transport" [2406.17736]
- "Optimal Transport of Classifiers to Fairness" [2202.03814]
- "Optimal Transport Learning: Balancing Value Optimization and Fairness in Individualized Treatment Rules" [2507.23349]
- "A proposal of smooth interpolation to optimal transport for restoring biased data for algorithmic fairness" [2503.15119]

Source: https://www.emergentmind.com/topics/optimal-transport-for-fairness