Piyushi-0 / Sparse-UOT

Code for our ICML '24 paper, "Submodular framework for structured-sparse optimal transport".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sparse-UOT

Code for our ICML '24 paper, "Submodular framework for structured-sparse optimal transport".

To install the 'sparse_ot' package, please clone this repository & run pip install .. The list of packages specific to the experiments has been shared separately in their respective folders (under examples/).

Notations:

  • $\gamma$: Optimal Transport plan
  • $K$: Cardinality constraint.

Implementation of Algorithms

  1. GenSparse UOT, general sparsity constraint:

Note

While our experiments use a sparse vectorial representation of $\gamma$, we also provide implementation with $\gamma$ as a matrix: (i) code when $K$ unspecified, (ii) code when $K$ specified.

  1. ColSparse UOT, column-wise sparsity constraint: Implementation.

Tip

'ws' in the function names signifies warm start, where we use the previous outer iteration's $\gamma$. We found that a warm start results in faster optimization.

Toy example with Gaussians:

Codes for the experiments are under 'examples/'.

If you find this useful, consider giving ato this repository.

About

Code for our ICML '24 paper, "Submodular framework for structured-sparse optimal transport".

License:MIT License


Languages

Language:Python 100.0%