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

Inaccurate gradient estimation for Gumbel-Sinkhorn #120

Open
adamoyoung opened this issue Dec 28, 2021 · 1 comment
Open

Inaccurate gradient estimation for Gumbel-Sinkhorn #120

adamoyoung opened this issue Dec 28, 2021 · 1 comment

Comments

@adamoyoung
Copy link

I implemented a Gumbel-Sinkhorn layer as a CVXPY layer, and compared it with a baseline implementation using the Sinkhorn algorithm. While the forward passes of both layers seem similar, the backward passes differ. Specifically, it seems like the CVXPY layer is not able to provide accurate gradient esimates. I am looking for advice as to why it is not working properly.

I have detailed my experiments in this Google colab gist. Any feedback would be appreciated. Thanks!

@AxelBreuer
Copy link

AxelBreuer commented May 9, 2023

Hi @adamoyoung ,
I am not familiar with Gumbel-Sinkhorn layers, but I quickly went through your Google colab and realized that this layer uses cp.log_sum_exp(x) and cp.exp(x).
I have recently fixed a bug in exponential cones (cvxgrp/diffcp#59); hence it could be woth to update to the lastest diffcp and relaunch you tests.
With a bit of luck, your code will work now.

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

No branches or pull requests

2 participants