Open zdk123 opened 2 years ago
Hi thank you for this comment. Indeed I believe this is because the GW (and FGW) distance is a non-convex problem, so the optimisation may fall into some bad local minima (which is unavoidable ...) To investigate this you can try to set a different initialization for the GW distance (there is a G0 parameter that sets the init for the coupling) here:
https://github.com/tvayer/FGW/blob/1205827aa0496adccd7514352ae4b83c7d1f352b/lib/ot_distances.py#L122
It will change that:
https://github.com/tvayer/FGW/blob/1205827aa0496adccd7514352ae4b83c7d1f352b/lib/FGW.py#L285
So you can find a better init by trying identity matrix G0 -> the distance should be zero
You can also see if amijo = False is changing something.
Thank you for the contrib I will merge
Best, Titouan
Thanks for this excellent package, it's a very cool method.
However, I've noticed what may be a technical bug where on some graphs, where I have found a non-zero Gromov distance even when the underlying graphs are identical. I suspect there may some inherent structural basis behind the observation since some random graphs always seem to reach 0 and other structures never do.
Some code based on the graph_transport ipython notebook:
Output is:
I've found a few other examples on random graphs (e.g. trees) that don't seem to reach zero either.
I would appreciate and look forward to your thoughts on this.