Skip to content

[WIP] Slicing UOT#765

Draft
clbonet wants to merge 31 commits intoPythonOT:masterfrom
clbonet:sliced_uot
Draft

[WIP] Slicing UOT#765
clbonet wants to merge 31 commits intoPythonOT:masterfrom
clbonet:sliced_uot

Conversation

@clbonet
Copy link
Contributor

@clbonet clbonet commented Oct 5, 2025

Types of changes

This PR aims at implementing the solver for 1D UOT with Frank-Wolfe (Faster Unbalanced Optimal Transport: Translation invariant Sinkhorn and 1-D Frank-Wolfe), as well as the Sliced Unbalanced OT and Unbalanced sliced OT distances (Slicing Unbalanced Optimal Transport).

Changes:

  • Added the ot.solver_1d.emd_1d_dual function to compute the dual potentials in 1D efficiently (still some bugs)
  • Added the ot.solver_1d.emd_1d_dual_backprop function, which computes the dual potentials in 1D by using backpropagation over the 1D wasserstein distance (in pytorch and jax).
  • Added ot.unbalanced._solver_1d.uot_1d to compute the 1D UOT problems with Frank-Wolfe
  • Added ot.unbalanced._sliced.sliced_unbalanced_ot to compute SUOT
  • Added ot.unbalanced._sliced.unbalanced_sliced_ot to compute USOT
  • Refactorize circle solvers in ot.lp.solver_circle.py

Motivation and context / Related issue

These functions allow to compute unbalanced OT problems efficiently.

How has this been tested (if it applies)

It still needs to be properly tested.

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.
  • I have added the PR and Issue fix to the RELEASES.md file.

@codecov
Copy link

codecov bot commented Feb 1, 2026

Codecov Report

❌ Patch coverage is 75.91837% with 236 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.53%. Comparing base (29276ad) to head (3c79233).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #765      +/-   ##
==========================================
- Coverage   84.97%   84.53%   -0.44%     
==========================================
  Files         107      113       +6     
  Lines       22249    22883     +634     
==========================================
+ Hits        18906    19345     +439     
- Misses       3343     3538     +195     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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