Learning the Ground Metric in Optimal Transport

22 concepts20 papers1 proposal

Optimal Transport (OT) provides a powerful mathematical framework for comparing probability distributions by calculating the minimum cost required to transform one distribution into another. Imagine moving a pile of earth into a new configuration: the total effort depends not just on how much mass you move, but on the distance you travel.

In machine learning, this "distance between individual points" is defined by a ground metric or cost function, typically denoted as $c(x, y)$. While OT algorithms have advanced significantly in scalability and efficiency, their success fundamentally hinges on this choice of ground metric. If the cost function does not accurately reflect the underlying geometry of the data, the resulting transport plan and distance metrics become unreliable.

Why Standard Metrics Fail in High Dimensions

In vanilla applications of Optimal Transport, researchers frequently default to standard geometric distances, such as the Euclidean or cosine distance. However, as highlighted by Huynh et al., generic distance measures fail to capture meaningful relationships when dealing with structured or high-dimensional data like text, graphs, or complex images.

Consider an image generation task. A pixel-wise Euclidean distance implies that shifting an entire image by a single pixel incurs a massive transport cost, even though the semantic content remains virtually identical. As Seguy et al. and Xie et al. observe, identifying a cost function that respects the true, low-dimensional manifold of high-dimensional data remains a central challenge. When the ground metric is misspecified, the optimal transport plan aligns unrelated features, degrading performance in downstream tasks like domain adaptation or representation learning.

The Theoretical and Practical Stakes

The choice of the ground metric is not merely an empirical tuning parameter; it dictates the structural and theoretical properties of the entire transport space.

Generalization and Alignment

In domain adaptation, OT is used to align source and target distributions. Redko et al. demonstrated that the tightness of generalization bounds in these settings is explicitly bound to how well the cost function captures the underlying data geometry. Similarly, Rodríguez Gálvez et al. showed that the generalization error bounds of deep neural networks derived via Wasserstein distances are highly sensitive to the underlying metric of the hypothesis space. If the metric lacks specificity, the theoretical guarantees loosen, offering little predictive value about a model's performance on unseen data.

Regularization and Uncertainty

The ground metric also governs how optimization frameworks behave under uncertainty. Blanchet et al. showed that swapping a standard Euclidean cost for a Mahalanobis distance fundamentally alters the regularization properties of distributionally robust optimization (DRO) models, shifting outcomes toward structural properties like group-wise robustness or sparsity.

Furthermore, when quantifying multidimensional uncertainty, Goloburda et al. note that standard squared Euclidean distances fail to capture the non-linear relationships between distinct uncertainty signals (such as epistemic and aleatoric risk). The cost function acts as a weighting mechanism; if it is poorly specified, it distorts how different risks are prioritized.

[Data Space] ---> Default Metric (Euclidean) ---> Distorted Geometry ---> Poor Transport Plan
[Data Space] ---> Learned Ground Metric     ---> True Manifold     ---> Semantic Alignment

Strategies for Learning the Ground Metric

To move away from hand-crafted metrics, recent research focuses on data-driven methods to learn or adapt the cost function directly from data.

Weakly Supervised Learning via Group Correspondence

When point-to-point pairings are unavailable, we can leverage coarser supervision. Liu et al. introduced a framework (OT-SI) that learns the optimal cost function using "subset correspondences"—group-level labels indicating that a collection of samples in one domain relates to a collection in another (e.g., matching cell types across different single-cell sequencing batches). By optimizing the cost function to minimize the transport distance between corresponding subsets while maximizing it for non-corresponding ones, the framework automatically discovers a task-specific metric without requiring granular, expensive annotations.

Unsupervised Fixed-Point Iteration

In purely unsupervised settings, learning the ground metric presents a chicken-and-egg problem: to find the true distance between samples, you need to know the distances between their underlying features; but to understand the relationships between features, you need to observe how they behave across samples.

The authors of Unsupervised Ground Metric Learning Using Wasserstein Singular Vectors resolved this by framing ground metric selection as a mutually reinforcing fixed-point problem. Their approach jointly optimizes sample-level transport plans and feature-level distance matrices, allowing the true geometric structure of the data to emerge organically without any external labels.

Adversarial and Minimax Robustness

If a metric cannot be cleanly learned, an alternative is to make the transport plan robust against the worst-case metric choice. Dhouib et al. proposed a minimax framework for optimal transport. Instead of relying on a single static cost, their algorithm searches for a transport plan that remains stable and accurate across an entire family of plausible cost functions, effectively insulating the system against noise and metric misspecification.

Open Horizons

As the field shifts from static to learned ground metrics, new computational and mathematical challenges arise.

  1. Dynamic Conditioning: Most amortized transport models assume a fixed distance metric. Amos et al. emphasize the need for meta-optimal transport models that can be conditioned on dynamically changing cost matrices, allowing systems to adapt to evolving environments without requiring full retraining.
  2. Non-Quadratic Validation: Evaluating the quality of a learned transport map is notoriously difficult without ground-truth alignments. While validation frameworks exist for standard quadratic costs, Vacher et al. point out that developing rigorous model-selection and validation criteria for non-quadratic or highly generalized cost functions remains an open and vital area of research.

Key Foundational Work

Theoretical Analysis of Domain Adaptation with Optimal Transport (2017) — contributed 1 concept elements to this direction.
Large Scale Optimal Transport and Mapping Estimation (2018) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_ground_metric_selection_f218ad20,
  title = {ground metric selection},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/ground-metric-selection/rdr_f218ad20a14a4e8fbfd18e4e41162584},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-20},
}

This exact version (version 1, frozen text):

@misc{lacuna_ground_metric_selection_f218ad20_v1,
  title = {ground metric selection},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/ground-metric-selection/rdr_f218ad20a14a4e8fbfd18e4e41162584/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-20},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake