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

scale invariance for the extra losses #45

Open
pmelchior opened this issue Aug 31, 2023 · 0 comments
Open

scale invariance for the extra losses #45

pmelchior opened this issue Aug 31, 2023 · 0 comments

Comments

@pmelchior
Copy link
Owner

The similarity and consistency losses (as written in Liang+2023) assume that the latents have typically amplitudes of order 1. This is not guaranteed by the fidelity training, but if that's not the case it will screw up the extended training procedure by pushing the sigmoids into the flat regime.

This can be fixed by adding rescaling terms that are computed from the typical latent space amplitude:
Screenshot 2023-08-31 at 17 33 26
The first RHS terms should have a prefactor $1/(\sigma_s^2 S)$ instead of $1/S$, in the same way as
Screenshot 2023-08-31 at 17 33 38

This ensures that these terms are all of order 1 and thus remain in the active parts of the sigmoids.

In Liang+23, we set $\sigma_s=0.1$, to set a target size of the consistency loss. It's better to make both of these rescaling terms dynamic, i.e. measure the typical value of $\lVert s\rVert$ across the data set, and update it during the training to account for any shrinking or expansion.

This also has the advantage of

  • preventing the latent distribution collapse from the consistency term because overall shrinkage does not improve $L_c$
  • making it easier for the autoencoder to achieve redshift invariance by removing the latent shrinking from the consistency term.
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

1 participant