Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Semi-relaxed (fused) gromov-wasserstein divergence and improvements of gromov-wasserstein solvers #431

Merged
merged 39 commits into from Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
574b003
maj gw/ srgw/ generic cg solver
cedricvincentcuaz Sep 22, 2022
ff1e28d
correct pep8 on current state
cedricvincentcuaz Sep 22, 2022
6d879fe
fix bug previous tests
cedricvincentcuaz Sep 22, 2022
f80671a
fix pep8
cedricvincentcuaz Sep 22, 2022
ee330c0
fix bug srGW constC in loss and gradient
cedricvincentcuaz Sep 23, 2022
9670fc9
Merge branch 'master' into semirelaxed_gromov
rflamary Sep 27, 2022
adaae47
fix doc html
cedricvincentcuaz Sep 27, 2022
8d9827e
Merge branch 'semirelaxed_gromov' of https://github.com/cedricvincent…
cedricvincentcuaz Sep 27, 2022
7c758e3
fix doc html
cedricvincentcuaz Sep 27, 2022
98a880e
Merge branch 'master' into semirelaxed_gromov
rflamary Jan 4, 2023
c384f45
update generic_cg and dependencies
cedricvincentcuaz Feb 2, 2023
e6f0bb1
start updating test_optim.py
cedricvincentcuaz Feb 2, 2023
efbba2e
update tests gromov and optim - plus fix gromov dependencies
cedricvincentcuaz Feb 6, 2023
71be9d0
add symmetry feature to entropic gw
cedricvincentcuaz Feb 6, 2023
90fcd48
add symmetry feature to entropic gw
cedricvincentcuaz Feb 6, 2023
6ab9514
add exemple for sr(F)GW matchings
cedricvincentcuaz Feb 9, 2023
dc53fe1
Merge branch 'master' into semirelaxed_gromov
rflamary Feb 23, 2023
43bc857
Merge branch 'master' into semirelaxed_gromov
rflamary Feb 23, 2023
a9cbe08
factor linesearch dependencies /transpose + srgw to backend unfinished
cedricvincentcuaz Feb 27, 2023
6202290
merge releases.md
cedricvincentcuaz Feb 27, 2023
f7fa3ee
small stuff
cedricvincentcuaz Feb 27, 2023
54f0ba1
remove (reg,M) from line-search/ complete srgw tests with backend
cedricvincentcuaz Feb 28, 2023
a875a12
remove backend repetitions / rename fG to costG/ fix innerlog to True
cedricvincentcuaz Feb 28, 2023
92c69d4
fix pep8
cedricvincentcuaz Feb 28, 2023
be55ea2
Merge branch 'master' into semirelaxed_gromov
rflamary Feb 28, 2023
6069b0a
take comments into account / new nx parameters still to test
cedricvincentcuaz Mar 1, 2023
e50a750
Merge branch 'semirelaxed_gromov' of https://github.com/cedricvincent…
cedricvincentcuaz Mar 1, 2023
746bc1d
factor (f)gw2 + test new backend parameters in ot.gromov + harmonize …
cedricvincentcuaz Mar 3, 2023
b028b36
split gromov.py in ot/gromov/ + update test_gromov with helper_backen…
cedricvincentcuaz Mar 3, 2023
49fdbeb
manual documentaion gromov
rflamary Mar 9, 2023
95f2033
remove circular autosummary
rflamary Mar 9, 2023
5882cd1
Merge branch 'master' into semirelaxed_gromov
rflamary Mar 9, 2023
2409983
trying stuff
rflamary Mar 9, 2023
a1f1172
Merge branch 'semirelaxed_gromov' of https://github.com/cedricvincent…
rflamary Mar 9, 2023
dc1ac92
debug documentation
rflamary Mar 9, 2023
97c1e6b
alphabetic ordering of module
rflamary Mar 9, 2023
2d03ba6
merge into branch
cedricvincentcuaz Mar 9, 2023
679b74f
Merge branch 'semirelaxed_gromov' of https://github.com/cedricvincent…
cedricvincentcuaz Mar 9, 2023
fb86e46
add note in entropic gw solvers
cedricvincentcuaz Mar 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Expand Up @@ -36,7 +36,7 @@ The contributors to this library are:
* [Tanguy Kerdoncuff](https://hv0nnus.github.io/) (Sampled Gromov Wasserstein)
* [Minhui Huang](https://mhhuang95.github.io) (Projection Robust Wasserstein Distance)
* [Nathan Cassereau](https://github.com/ncassereau-idris) (Backends)
* [Cédric Vincent-Cuaz](https://github.com/cedricvincentcuaz) (Graph Dictionary Learning)
* [Cédric Vincent-Cuaz](https://github.com/cedricvincentcuaz) (Graph Dictionary Learning, semi-relaxed FGW)
* [Eloi Tanguy](https://github.com/eloitanguy) (Generalized Wasserstein Barycenters)
* [Camille Le Coz](https://www.linkedin.com/in/camille-le-coz-8593b91a1/) (EMD2 debug)
* [Eduardo Fernandes Montesuma](https://eddardd.github.io/my-personal-blog/) (Free support sinkhorn barycenter)
Expand Down
7 changes: 6 additions & 1 deletion README.md
Expand Up @@ -42,6 +42,7 @@ POT provides the following generic OT solvers (links to examples):
* [Wasserstein distance on the circle](https://pythonot.github.io/auto_examples/plot_compute_wasserstein_circle.html) [44, 45]
* [Spherical Sliced Wasserstein](https://pythonot.github.io/auto_examples/sliced-wasserstein/plot_variance_ssw.html) [46]
* [Graph Dictionary Learning solvers](https://pythonot.github.io/auto_examples/gromov/plot_gromov_wasserstein_dictionary_learning.html) [38].
* [Semi-relaxed (Fused) Gromov-Wasserstein divergences](https://pythonot.github.io/auto_examples/gromov/plot_semirelaxed_fgw.html) [48].
* [Several backends](https://pythonot.github.io/quickstart.html#solving-ot-with-multiple-backends) for easy use of POT with [Pytorch](https://pytorch.org/)/[jax](https://github.com/google/jax)/[Numpy](https://numpy.org/)/[Cupy](https://cupy.dev/)/[Tensorflow](https://www.tensorflow.org/) arrays.

POT provides the following Machine Learning related solvers:
Expand Down Expand Up @@ -300,4 +301,8 @@ Dictionary Learning](https://arxiv.org/pdf/2102.06555.pdf), International Confer

[45] Hundrieser, Shayan, Marcel Klatt, and Axel Munk. [The statistics of circular optimal transport.](https://arxiv.org/abs/2103.15426) Directional Statistics for Innovative Applications: A Bicentennial Tribute to Florence Nightingale. Singapore: Springer Nature Singapore, 2022. 57-82.

[46] Bonet, C., Berg, P., Courty, N., Septier, F., Drumetz, L., & Pham, M. T. (2023). [Spherical Sliced-Wasserstein](https://openreview.net/forum?id=jXQ0ipgMdU). International Conference on Learning Representations.
[46] Bonet, C., Berg, P., Courty, N., Septier, F., Drumetz, L., & Pham, M. T. (2023). [Spherical Sliced-Wasserstein](https://openreview.net/forum?id=jXQ0ipgMdU). International Conference on Learning Representations.

[47] Chowdhury, S., & Mémoli, F. (2019). [The gromov–wasserstein distance between networks and stable network invariants](https://academic.oup.com/imaiai/article/8/4/757/5627736). Information and Inference: A Journal of the IMA, 8(4), 757-787.

[48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty (2022). [Semi-relaxed Gromov-Wasserstein divergence and applications on graphs](https://openreview.net/pdf?id=RShaMexjc-x). International Conference on Learning Representations (ICLR), 2022.
4 changes: 3 additions & 1 deletion RELEASES.md
Expand Up @@ -3,7 +3,9 @@
## 0.8.3dev

#### New features

- Added feature to (Fused) Gromov-Wasserstein solvers herited from `ot.optim` to support relative and absolute loss variations as stopping criterions (PR #431)
- Added feature to (Fused) Gromov-Wasserstein solvers to handle asymmetric matrices (PR #431)
- Added semi-relaxed (Fused) Gromov-Wasserstein solvers in `ot.gromov` + examples (PR #431)
- Added the spherical sliced-Wasserstein discrepancy in `ot.sliced.sliced_wasserstein_sphere` and `ot.sliced.sliced_wasserstein_sphere_unif` + examples (PR #434)
- Added the Wasserstein distance on the circle in ``ot.lp.solver_1d.wasserstein_circle`` (PR #434)
- Added the Wasserstein distance on the circle (for p>=1) in `ot.lp.solver_1d.binary_search_circle` + examples (PR #434)
Expand Down
1 change: 0 additions & 1 deletion docs/cache_nbrun

This file was deleted.

2 changes: 2 additions & 0 deletions docs/source/_templates/module.rst
Expand Up @@ -2,6 +2,7 @@
{{ underline }}

.. automodule:: {{ fullname }}
:members:

{% block functions %}
{% if functions %}
Expand All @@ -12,6 +13,7 @@
{% for item in functions %}

.. autofunction:: {{ item }}


.. include:: backreferences/{{fullname}}.{{item}}.examples

Expand Down
32 changes: 18 additions & 14 deletions docs/source/all.rst
Expand Up @@ -13,29 +13,33 @@ API and modules
:toctree: gen_modules/
:template: module.rst

lp

backend
bregman
smooth
gromov
optim
da
dr
utils
datasets
dr
factored
gaussian
gromov
lp
optim
partial
plot
stochastic
unbalanced
regpath
partial
sliced
smooth
stochastic
unbalanced
utils
weak
factored
gaussian


.. autosummary::
:toctree: ../modules/generated/
:template: module.rst
Main :py:mod:`ot` functions
--------------

.. automodule:: ot
:members:



5 changes: 4 additions & 1 deletion docs/source/conf.py
Expand Up @@ -119,7 +119,7 @@ def __getattr__(cls, name):
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down Expand Up @@ -341,6 +341,9 @@ def __getattr__(cls, name):
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False

autodoc_default_options = {'autosummary': True,
'autosummary_imported_members': True}


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
Expand Down
1 change: 0 additions & 1 deletion examples/gromov/plot_gromov.py
Expand Up @@ -3,7 +3,6 @@
==========================
Gromov-Wasserstein example
==========================

This example is designed to show how to use the Gromov-Wassertsein distance
computation in POT.
"""
Expand Down