Earlier quoted context omitted.
Referenced in this paper: "Overall, while approaches such as FNet, Performer, and sparse transformers demonstrate that either fixed or approximate token mixing can reduce computational overhead, our adaptive spectral filtering strategy uniquely merges the efficiency of the FFT with a learnable, input-dependent spectral filter. This provides a compelling combination of scalability and adaptability, which is crucial fo…
Except that the paper is written as if they discovered that you can use an fft for attention. They even have a "proof". It's in the title. Then you discover everyone already knew this and all they do is as some extra learnable parameters. Pretty lame.
The FFT Strikes Back: An Efficient Alternative to Self-Attention
131–140 of 175 posts
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#132Google introduced this idea in 2022 with "FNet: Mixing Tokens with Fourier Transforms" [0]. Later they found out that, performance of their TPU(s) for matrix multiplication was faster than FFT in the most scenarios. [0]: https://arxiv.org/abs/2105.03824
GPU saw a 10% improvement over the TPU >The TPU is so inefficient at FTs that the researchers did not use the FFT algorithm on sequences > on an Nvidia Quadro P6000 GPU, the FT was responsible for up to 30% of the inference time on the FNet architecture [0] This company [0] claimed in 2021 they could squash inference time by 40% if google would use their light chips on TPU. Perhaps more if FFTNet does more heavy lift…
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#133Earlier quoted context omitted.
this is a great way to put it, that said, it was not obvious to me that the attention space (how it is structured in LLMs) is a frequency domain
A cartoon: To form a coherent idea you need to coordinate a lot of tokens. In other words, ideas are long-distance correlations between tokens. Ideas are the long-wavelength features of streams of tokens. Is it exactly right? No. But as a cartoon it can motivate exploring an idea like this.
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#134Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#135Basically leverages convolution theorem[0]: expensive convolutions in direct space becomes simple multiplications in reciprocal space, and vice versa. Whereever you have a convolution operation on your data, transform them to the conjugate domain to turn it into multiplication. In other words, work in the domain that is natural to your data. [0] https://en.wikipedia.org/wiki/Convolution_theorem
> In other words, work in the domain that is natural to your data. Why would multiplication be more "natural" to a domain than convolution, as opposed to just simpler to calculate?
https://bsky.app/profile/bsky.tdunning.com/post/3lgvuzuju3k2...
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#136Earlier quoted context omitted.
A cartoon: To form a coherent idea you need to coordinate a lot of tokens. In other words, ideas are long-distance correlations between tokens. Ideas are the long-wavelength features of streams of tokens. Is it exactly right? No. But as a cartoon it can motivate exploring an idea like this.
Right. This makes sense. But why Fourier space in particular. Why not, for example, a wavelet transform.
That is a great idea for a paper. Work on it, write it up and please be sure to put my name down as a co-author ;-)
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#137Earlier quoted context omitted.
A cartoon: To form a coherent idea you need to coordinate a lot of tokens. In other words, ideas are long-distance correlations between tokens. Ideas are the long-wavelength features of streams of tokens. Is it exactly right? No. But as a cartoon it can motivate exploring an idea like this.
Right. This makes sense. But why Fourier space in particular. Why not, for example, a wavelet transform.
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#138Earlier quoted context omitted.
this is a great way to put it, that said, it was not obvious to me that the attention space (how it is structured in LLMs) is a frequency domain
A cartoon: To form a coherent idea you need to coordinate a lot of tokens. In other words, ideas are long-distance correlations between tokens. Ideas are the long-wavelength features of streams of tokens. Is it exactly right? No. But as a cartoon it can motivate exploring an idea like this.
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#139Earlier quoted context omitted.
Right. This makes sense. But why Fourier space in particular. Why not, for example, a wavelet transform.
> Why not, for example, a wavelet transform. That is a great idea for a paper. Work on it, write it up and please be sure to put my name down as a co-author ;-)
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#140Earlier quoted context omitted.
This is a good general tool for less-mathematically-deep folks to keep in their pocket: look for well-behaved objects that do something nice under the operation you're interested in. Typical "well-behaved" objects do things like stay where they are, or end up as a constant multiple of themselves, or end up as 0 or 1, or something like that. Then try to represent everything else in terms of those objects, so that you…
A nice generalization. An example in statistics is the expectation operator. You can throw away a lot of detail if you only care about one central moment. And if you need more information about a distribution, add more moments. Also, this works for public policy. Frame everything as a well functioning market and hope for the best. /s But seriously, a nice intuition.