Giter VIP home page Giter VIP logo

Comments (10)

PeterL1n avatar PeterL1n commented on May 3, 2024 1

The paper only proved that L2 attention with tied qk is Lipschitz for self attention. It must be tied to be Lipschitz!. Also it is not Lipschitz for cross attention, that is why in GigaGAN's discriminator, only self-attention is used. However, they used self & cross in generator, knowing that generator can't be Lipschitz, there is no point in using L2 attention in the generator, so I believe they used regular dot product attention for the generator.

You are correct that in the case of tied qk, token's self distance is always zero, thus always the most similar. So self value is always included in the attention. Other position can have close L2 distance to take away the proportion to self token.

This is my understanding.

from gigagan-pytorch.

lucidrains avatar lucidrains commented on May 3, 2024 1

@PeterL1n i will get back to wiring up the training code soon later this month

from gigagan-pytorch.

lucidrains avatar lucidrains commented on May 3, 2024

@PeterL1n thanks Peter! will get this all resolved this weekend

did they end up using tied qk for their final model?

from gigagan-pytorch.

lucidrains avatar lucidrains commented on May 3, 2024

@PeterL1n this is news to me that they are using the squared of the euclidean distance; i will reread the original paper, thank you!

from gigagan-pytorch.

lucidrains avatar lucidrains commented on May 3, 2024

@PeterL1n if the token attends to itself, wouldn't it always have a distance of 0 and attend to itself the most? maybe it works out for their Lipschitz proof, but how does this make sense in the tied scenario?

from gigagan-pytorch.

lucidrains avatar lucidrains commented on May 3, 2024

Let's roll with that! Thank you Peter for the review 🙏

from gigagan-pytorch.

lucidrains avatar lucidrains commented on May 3, 2024

it would be euclidean distance squared, so it would have to be quite close. that is strange. just thinking out loud

from gigagan-pytorch.

lucidrains avatar lucidrains commented on May 3, 2024

@PeterL1n do you want to see if 0.0.18 unblocks you for your research / startup?

from gigagan-pytorch.

lucidrains avatar lucidrains commented on May 3, 2024

@PeterL1n reviewed the old deepmind paper and indeed it is squared distance! thanks for catching this and correcting my misunderstanding

from gigagan-pytorch.

lucidrains avatar lucidrains commented on May 3, 2024

closing as it should be resolved, feel free to reopen if you note any further issues

from gigagan-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.