Skip to content

[WIP] Linear Bures Wasserstein - #942

Open
MaheyG wants to merge 1 commit into
PythonOT:masterfrom
MaheyG:LinearBuresWasserstein
Open

MaheyG wants to merge 1 commit into
PythonOT:masterfrom
MaheyG:LinearBuresWasserstein

Conversation

@MaheyG

@MaheyG MaheyG commented Nov 30, 2026

Copy link
Copy Markdown

Add the linear version of Bures Wasserstein

I add some functions related to the linear Bures Wasserstein, when the space of Gaussian is seen as a Riemanian manifold.

Principally

  • linear_bures_wasserstein_mapping that provides a linear operator that map two gaussians distributions
  • linear_bures_distance that provides the linear Bures distance between covariates
  • linear_bures_wasserstein_distance that provide the linear Bures Wasserstein distance between Gaussians
  • linear_bures_wasserstein_barycenter that provides the barycenter between list of Gaussians distributions. Note that to the contrary of the standard Gaussians barycenter, the linear one has a closed form.

I also did a first draft of an example notebook called plot_linear_Bures_distance_and_barycenters.py and few unitary tests.

Motivation and context

Linear OT has a growing interest in the community, in particular for its ability to accelerate some calculations. It is particularly interesting in the gaussian setup as a closed form is available and as the distortions is never too big.

How has this been tested (if it applies)

I did some theoretical tests:

  • Linear BW is always an upper bound of BW and Linear BW is upper bounded by $\sqrt{2}$ whenever Omega=Id.
  • Linear BW between $\mu_1$ and $\mu_2$ is equal to BW when the origin of the tangent space is on the geodesic linking $\mu_1$ and $\mu_2$.
  • Similarly, the barycenters of Linear BW are closer to the ones of BW whenever Omega is chosen to be close to the inputs measures

I also did some implementations tests:

  • matrices of Linear BW distance are faster to compute compare to matrices of BW. This is particularly true as the size of matrices grows.
  • Similarly, the closed form Linear BW barycenter is faster to compute compare to the fix-point algorithm of the BW barycenter
  • define some generic tests in test_gaussian.py

What coming next

Before going further, I would like to know if the maintainers see any interest.

If so, I would like to:

  • explicit some bounds between linear BW and BW
  • link linear BW with the gmm.py module, since linear BW is particularly interesting when computing matrices of distances
  • Write the empirical version of the proposed function
  • Enrich the example

PR checklist

  • I have read the CONTRIBUTING document.
  • The documentation is up-to-date with the changes I made (check build artifacts).
  • All tests passed, and additional code has been covered with new tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant