Response to Reviewer 8BY8
We thank the reviewer for their thoughtful comments and constructive feedback. Below, we answer specific questions about which algorithms are exact and which are approximate, and where the speedup comes from on different applications.
**Approximation Algorithms**
We clarify that there are actually **three algorithmic contributions** in our paper. The main contribution is the FlashFFTConv algorithm, which is an **exact** FFT convolution algorithm.
But the structure of the FlashFFTConv algorithm allows immediate applications to sparsity – simply skipping portions of the matrix multiply operations yields sparse convolution algorithms. Partial convolutions and frequency-sparse convolutions are two approximate convolution algorithms that are enabled by the computational pattern of FlashFFTConv.
**Why is this not in cuFFT?**
In short – a single FFT on its own is almost always memory-bound, so the most efficient FFT implementation does not need to use tensor cores or other optimization. In other words, the older FFT algorithms suffice. These are what cuFFT uses. Please see the common response for a more detailed discussion on the history of FFT algorithms, and why the FFT convolution presents specific bottlenecks.
When fusing multiple FFT operations together, the entire operation becomes compute-bound, so different algorithms are necessary – which is why we need to translate the operation to use tensor cores.
Finally, we note that the use case of long convolutions has started to show promise in ML applications only relatively recently. For example, S4 was only published at ICLR last year, and gated convolutional models that come close to attention performance in language modeling have only started to emerge this year. So compared to FlashAttention, which took 5 years between the introduction of attention and the first IO-aware algorithm, FlashFFTConv is moving relatively quickly!
**More Detailed Breakdown of Speedup**
Thank you for the feedback to conduct a more detailed ablation study of the speedups. We have re-organized our convolution benchmarks to several distinct use cases:
* A pure convolution, where the input and FFT size are the same length
* A convolution with padding, where the input is half the length of the FFT size (i.e., causal convolution)
* Gated convolutions, where there are gating operations before and after the convolution to fuse
We have chosen to split the benchmarks into these distinct use cases, instead of a single table with “domain-specific optimizations.” The full results are given in Appendices C.1 and C.2 of the updated draft.
**Percentage of Time Each Model Spends Computing the Convolution**
We provide the percentage of time each model spends computing the convolution when implemented in PyTorch, and the relative speedup from using FlashFFTConv:
| **Model** | **% Time in Convolution** | **Speedup** |
|---------------:|:-------------------------:|:-----------:|
| **M2-BERT** | 48.5% | 1.9x |
| **Hyena** | 38.4% | 1.7x |
| **Long Convs** | 64.3% | 2.4x |
| **SaShiMi** | 22.1% | 1.3x |
| **HyenaDNA** | 81.8% | 4.4x |
As you can see, SaShiMi spends the least amount of time computing the convolution, and thus has the least amount of speedup. HyenaDNA spends the most amount of time in the convolution, and has the most speedup. We have added this table to Appendix C.
**Results on Small and Medium Sequence Tasks**
M2-BERT is a small-sequence task (sequence length 128, benchmarked in Table 4 of the original submission). We also provide benchmarks of Hyena-2.7B at different sequence lengths (2K-16K), and Hyena-s-4K, which are both medium-sequence tasks.
**Applications Outside Machine Learning**
The FFT is very widely used outside of machine learning, so we look forward to applications outside of machine learning as exciting future work for this project. We have chosen to focus on machine learning applications for this paper, since ICLR is a machine learning conference. However, we note that S4/SaShiMi and Hyena, which we benchmark in the paper, are built on signal processing primitives. We also evaluate on HyenaDNA, a scientific application, and we are sure there are many others that may be relevant.
**Limitations and Extensions of the Method**
For now, FlashFFTConv is limited to sequence lengths up to 4M. We look forward to further extending these sequence lengths, possibly to billions. This will require further innovation, since we will encounter GPU HBM limitations.
**Potential Negative Impact**
For FFT convolutions, FlashFFTConv is faster across all sequence lengths. However, FlashFFTConv does currently not support fp32 precision, which could be necessary for some applications with high-precision requirements. Some FFT applications in science may require double precision, which FlashFFTConv currently does not support.