Scaled dot-product attention (SDPA) computes its Attention by computing the similarity-scores of all image-tokens with all query tokens which results in O(N²·d) complexity. SSOG (Sum Of Separable Gaussians) instead learns a few Gaussian atoms for each head and only geometrically steers them based on the query token. Since the atoms can be factorized into a separable sum of Gaussians this leads to a reduced complexity of O(N·√N·d).
Experiments show that SSOG clearly beats SDPA on small data (cifar100), and delivers equivalent performance and much faster convergence on bigger datasets like IN1k. All that while beeing much faster and memory efficient with increasing scale.
Have a look at the blog-post to see kore results and ablations and let me know what you think. Repo for playing with it in the comments.
Have a look at the blog-post to see kore results and ablations and let me know what you think. Repo for playing with it in the comments.
https://github.com/4rtemi5/ssog