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

Issue with the lambda parameter #2

Open
amasotti opened this issue Mar 18, 2021 · 0 comments
Open

Issue with the lambda parameter #2

amasotti opened this issue Mar 18, 2021 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed low-priority Not crucial but desired

Comments

@amasotti
Copy link
Owner

While training, the GSC tries to balance quantization and optimization. This is done by balancing the two processes through lambda-diffusion:
In pseudo-code the dynamics D at any given training step t is equal to:

D(t) = lambda_t * Optimization + (1-lambda_t) * Quantization

lambda progressively decreases from 1 to 0, starting with pure Optimization and landing at pure Quantization. The important issue here is how we calculate and update lambda.

The original code by Goldrick et al. uses this matlab function:

eigMin = min(real(eig(net.Wc)));                 % Find min eigenvalue of c-space weight matrix.
lambda = 1/(1+4*abs(eigMin-domain.q));

which I translated in Python as follows:

import numpy as np

min_eigenvalue = np.min(np.real(np.linalg.eigvals(self.Wc)))
l = 1 / (1 + 4*np.abs(min_eigenvalue - self.domain.q))

where self.Wc is the weight matrix and self.domain.q is the bowl-parameter q.

The authors state that this formula

THIS LOGIC MAY NOT BE CORRECT SINCE THE DRIFT TERM OF THE DIFFUSION PROCESS IS NOT EQUAL TO THE PARTIAL DERIVATIVES IN C-SPACE.

I've left the formula as in the original lacking a better idea, but I would be glad if anyone could help to improve this.

@amasotti amasotti added bug Something isn't working help wanted Extra attention is needed low-priority Not crucial but desired labels Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed low-priority Not crucial but desired
Projects
None yet
Development

No branches or pull requests

1 participant