Abstract
Comparing high-dimensional datasets is a fundamental task in machine learning, often addressed through Optimal Transport (OT) or Gromov-Wasserstein (GW) alignment. While powerful, these methods are computationally intensive. This work provides a comprehensive treatment of these frameworks for Gaussian measures, offering closed-form solutions for uncentered "inner product" GW (IGW) and a highly efficient algorithm for multimarginal OT. By leveraging low-rank properties and Riemannian optimization, the proposed methods overcome traditional scaling limitations, providing a principled approach for comparing complex distributions like language model embeddings.
Introduction
High-dimensional data comparison is central to tasks like domain adaptation, model evaluation, and dataset alignment. Two primary frameworks dominate this field: Optimal Transport (OT), which minimizes the cost of moving mass between distributions in a shared space, and Gromov-Wasserstein (GW), which aligns distributions by preserving internal relational structures (e.g., distances and angles) across potentially different spaces.
While theoretically robust, these methods are computationally demanding—standard OT scales at $O(n^3 \log n)$, and GW is generally NP-hard. To make these tools practical for large-scale machine learning, researchers often assume data follows a Gaussian distribution, which can lead to efficient "closed-form" solutions. However, two major gaps remained: the lack of closed-form solutions for uncentered distributions in GW alignment and the poor scalability of multimarginal OT as the number of distributions grows.
Theoretical Framework: OT vs. GW
The distinction between OT and GW is crucial for choosing the right tool for a given dataset. OT is concerned with the absolute spatial location of mass, whereas GW focuses on the relative geometry within each dataset.
Computational Innovations
The authors address the existing gaps with two primary mathematical strategies:
1. Uncentered IGW Alignment
Previous solutions for "inner product" GW (IGW) required Gaussians to be centered at zero. Since IGW is not translation-invariant, this was a significant limitation. The authors reduce the problem of comparing uncentered Gaussians to a quadratic optimization over unitary operators (rotations and reflections). They provide tight analytic upper and lower bounds and demonstrate that if at least one distribution is centered, the solution simplifies to a fully closed-form expression.
2. Scalable Multimarginal OT
Comparing many distributions simultaneously (multimarginal OT) typically leads to a variable explosion. The authors reformulate this as a Semidefinite Program (SDP) and prove that the optimal coupling is low-rank (specifically, rank $d$, the dimension of the space). By applying the Burer-Monteiro factorization, they re-parameterize the problem to reduce complexity from $O(d^2 p^2)$ to $O(d^2 p)$, where $p$ is the number of distributions. This allows for the use of fast Riemannian trust-region methods.
Key Insights: The Geometry of Transport
A key insight from this work is the geometric behavior of IGW compared to standard OT ($W_2$). As illustrated in displacement interpolations, IGW prefers to rotate distributions to align them with the origin and each other, whereas standard OT transports mass in straight lines. This makes IGW a more natural fit for comparing "internal geometries" rather than just spatial coordinates.
Furthermore, the authors propose IGW as a principled alternative to Centered Kernel Alignment (CKA). Unlike CKA, IGW is a true metric and can naturally handle distributions in different dimensions, making it ideal for comparing neural network representations across different architectures.
Empirical Results
The proposed methods were validated across several benchmarks, including LLM embeddings (BERT), text classification datasets, and synthetic scaling tests:
- Efficiency: The Burer-Monteiro approach for multimarginal OT was nearly 3x faster and significantly more memory-efficient than standard interior-point solvers for 100 measures.
- Accuracy: The analytic bounds for uncentered IGW were tight enough to accurately compare LLM distillations, with optimization taking less than a second on standard hardware.
- Clustering: In user clustering tasks, IGW successfully recovered ground-truth clusters by utilizing covariance information, outperforming methods that only consider mean-pooled data.
Limitations and Future Work
While Riemannian Gradient Descent (RGD) consistently found global minima in experiments, a formal proof of global convergence for the non-convex IGW problem remains an open theoretical challenge. Additionally, while the Gaussian assumption holds well for many text embeddings, the performance of these methods on highly multi-modal or non-Gaussian data requires further investigation. Future research may also explore the intrinsic Riemannian geometry induced by these distances on the space of covariance operators.
Summary updated