Skip to content

Conversation

cedricvincentcuaz
Copy link
Collaborator

@cedricvincentcuaz cedricvincentcuaz commented Sep 22, 2022

Types of changes

  • Integration of the semi-relaxed (fused) gromov-wasserstein solvers using conditional gradients --- Related new functions in gromov.py: init_matrix_semirelaxed / semirelaxed_gromov_wasserstein / semirelaxed_gromov_wasserstein2 / semirelaxed_fused_gromov_wasserstein/ semirelaxed_fused_gromov_wasserstein2/ --- Related new functions in optim.py: solve_semirelaxed_gromov_linesearch.

  • Factorization of the conditional gradient solvers in optim.py to take as entry any kind of linear program solver for the conditional gradient direction, and any kind of line search solver for the optimal line search step. --- Related new functions in optim.py: generic_cg / Might replace functions in optim.py: cg, gcg (an instance of how to replace cgc is given in a potentially temporary function named new_gcg)

  • New factoring for the (fused) gromov-wasserstein functions to fit the new function generic_cg, and support asymmetric matrices as started in another pull request [PR: Gromov-Wasserstein with asymmetric cost matrices [WIP] Gromov-Wasserstein with asymmetric cost matrices #399] --- Related modified functions in gromov.py: gromov_wasserstein / gromov_wasserstein2 / fused_gromov_wasserstein / fused_gromov_wasserstein2 / gromov_barycenters / fgw_barycenters --- Related new functions in optim.py: solve_gromov_linesearch (generalizing the line seach coded in solve_linesearch, plus speeding up the function).

  • Updates of the (fused) gromov-wasserstein dictionary learning functions to leverage the new (fused) gromov-wasserstein solvers to also support asymmetric matrices.

[ TO DO]

  • update test_gromov.py
  • update related examples
  • update dependencies with cg and gcg if necessary.
  • add semi-relaxed (fused) gromov-wasserstein barycenters ?

Motivation and context / Related issue

  • The current conditional gradient solver (optim.py/cg) does not allow an easy integration of new lp solver, not new line search methods. The upgrade to the function generic_cg allows a such flexiblity.

  • The integration of the semi-relaxed fgw (srfgw) requires new lp solver and line-search solver, hence fits well with the function generic_cg. Moreover the implementation srfgw supports symmetric and asymmetric matrices, so fgw solvers have been updated to support asymmetric matrices for the sake of consistency.

  • The implementation of the (fused) gromov-wasserstein dictionary learning was also restrained to symmetric matrices. Actually wrong if asymmetric matrices were provided or if the dictionary atoms were not projected onto the set of symmetric matrices.

How has this been tested (if it applies)

  • Test to come.

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 Sep 27, 2022

Codecov Report

Merging #401 (98a880e) into master (058d275) will decrease coverage by 4.62%.
The diff coverage is 32.70%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #401      +/-   ##
==========================================
- Coverage   94.26%   89.64%   -4.62%     
==========================================
  Files          23       23              
  Lines        6204     6647     +443     
==========================================
+ Hits         5848     5959     +111     
- Misses        356      688     +332     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant