NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Simple Hardware-Efficient Long Convolutions for Sequence Modeling

Daniel Y. Fu, Elliot L. Epstein, Eric Nguyen, Armin W. Thomas, Michael Zhang, Tri Dao, Atri Rudra, Christopher Ré

Introduction: The Problem with State Space Models

In the quest to model long sequences—such as lengthy documents, high-resolution images, or genomic data—State Space Models (SSMs) like S4 have emerged as powerful alternatives to Transformers. However, SSMs come with a dizzying array of mathematical complexities, requiring specialized initializations and custom implementations to achieve high performance.

The authors of this paper ask a fundamental question: Why not just use long convolutions?

Mathematically, SSMs are a form of long convolution. Yet, directly parameterizing a convolution kernel as long as the input sequence usually fails. Previous attempts have suffered from two primary issues:

  1. Quality: Directly learned kernels are often noisy and non-smooth, leading to poor performance compared to SSMs.
  2. Efficiency: While the Fast Fourier Transform (FFT) makes long convolutions $O(N \log N)$, standard implementations (like cuFFT) are memory-bound on GPUs. They fail to utilize specialized hardware like Tensor Cores, making them slower in practice than their theoretical complexity suggests.

Methodology: Smoothness and Hardware Efficiency

To bridge the gap between simple convolutions and complex SSMs, the researchers introduce two main innovations targeting quality and runtime efficiency.

1. Simple Regularization for Kernel Smoothness

The primary reason SSMs outperform simple convolutions is not inherent mathematical magic, but rather that their structure implicitly forces the kernels to be smooth. The authors demonstrate that simple regularization achieves the same effect with much less code. They introduce two interventions:

  • SQUASH: An element-wise operator that reduces the magnitude of weights (essentially an L1 proximal step). This promotes sparsity in the time domain and smoothness in the frequency domain.
  • SMOOTH: A straightforward average pooling operation applied directly to the kernel weights.

2. FlashButterfly: An IO-Aware Algorithm

To fix the efficiency bottleneck, the authors developed FlashButterfly, an IO-aware algorithm that draws on the classic "Butterfly" decomposition of the FFT. Instead of treating the FFT as a black box, FlashButterfly:

  • Fuses Operations: It combines the FFT, pointwise multiplication, and inverse FFT into a single GPU kernel to minimize slow memory access (IO).
  • Leverages Tensor Cores: By rewriting the FFT as a series of block-sparse matrix multiplications, the algorithm utilizes the high-speed matrix multiply units (Tensor Cores) on modern GPUs, which are significantly faster than general-purpose compute units.

Empirical Results

The authors evaluated their approach across a diverse range of benchmarks, including the Long Range Arena (LRA), image classification, language modeling, and predicting whole-brain activity from fMRI sequences.

  • Matching SSMs: Long convolutions with SQUASH regularization matched or exceeded S4 performance on the LRA benchmark (86.6 average vs. 86.1).
  • Path256 Breakthrough: On Path256, a grueling task with a sequence length of 64,000 tokens, FlashButterfly set a new state-of-the-art. It improved accuracy by 29.1 points while training 7.2x faster than previous models.
  • Unprecedented Speed: FlashButterfly proved to be 2.2x faster than standard cuFFT-based convolutions and 7.0x faster than standard Transformers on the LRA benchmark.
  • The "Learned Butterfly" Extension: The authors found they could learn the coefficients of the Butterfly matrices themselves, creating a highly expressive, hardware-efficient "Monarch" matrix structure. On WikiText-103, this extension outperformed a GPT-2 Small model by 0.2 PPL while using 30% fewer parameters.

Limitations and Future Directions

While the results demonstrate that simple, hardware-aware convolutions can effectively replace complex SSMs, the authors note a few areas for future growth. On 2D image classification, long convolutions lagged slightly (0.8 points) behind the specialized S4ND model, suggesting that higher-dimensional data might still benefit from specific inductive biases. Additionally, while more robust than SSMs, long convolutions still benefit from "geometric decay" initialization in certain text tasks.

Ultimately, the connection between convolutions and block-sparse Monarch matrices presents a fertile ground for future research, potentially allowing developers to replace dense MLP layers entirely with more efficient structured matrices.

Summary updated

BibTeX
@inproceedings{fu2023simple,
  author = {Daniel Y. Fu and Elliot L. Epstein and Eric Nguyen and Armin W. Thomas and Michael Zhang and Tri Dao and Atri Rudra and Christopher Ré},
  title = {{Simple Hardware-Efficient Long Convolutions for Sequence Modeling}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=wtL7NE6GjA},
}
Figure