Gsunshine / Enjoy-Hamburger

[ICLR 2021 top 3%] Is Attention Better Than Matrix Decomposition?
GNU General Public License v3.0
322 stars 20 forks source link

About Fix point iteration #12

Open BraveDrXuTF opened 1 year ago

BraveDrXuTF commented 1 year ago

Thank you for your excellent work! I note the sample code in the blog said there should be a fixed point iteration before the one-step grident, so that it's guaranteed to be a contraction mapping right? I search the code with keyword "fix", "fixed", "iterations"and so on, but I cannot find fixed point iteration. So where is it?

BraveDrXuTF commented 1 year ago

Besides, I'm also curious about you say " It is obvious that F is a contraction mapping", how can you guarentee it is a contraction mapping.

Gsunshine commented 1 year ago

Hi @BraveDrXuTF ,

Thank you for your interest in this work! Regarding your questions,

  1. This codebase does not contain the naming of "fixed point." The discussion presented in blog series 2 is for generic cases. As for further analysis, check this paper on training more generalized fixed point systems/deep equilibrium models. In addition, you can find Hamburger's code here, which treats the optimization algorithm as fixed point iteration.
  2. This is the assumption for analysis in Section 2.3. Please take a look at the sentence below Figure 2: One-Step Gradient on page 5. People established toolkits leaner toward optimization to prove the convergence of optimization algorithms rather than Lipschitzness in fixed point analysis. See this paper for the convergence of MU, for example.

Please let me know if you have additional questions!

Thanks! Zhengyang

BraveDrXuTF commented 1 year ago

Thanks you for providing rich details and references. So there may be a certain guarentee of convergence in matrix decomposition. And If we do not use factorization method to replace the attention mechanism, for example, we use other common neural arch, like fc, conv, and rnn, without any additional constraint, we would not have the guarentee of the good property that iteration will converge, right? In WGAN and Lipschitzness-GAN, they tend to clip the weights (WGAN) or penalize the gradients (Lipschitzness-GAN) of the discriminator, and by doing so they have the Lipschitzness.