Skip to main content
QUICK REVIEW

[Paper Review] Simple Hardware-Efficient Long Convolutions for Sequence Modeling

Daniel Y. Fu, Elliot L. Epstein|arXiv (Cornell University)|Feb 13, 2023
Topic ModelingComputer Science6 citations
TL;DR

This paper proposes direct parameterization of long convolutional kernels for sequence modeling, showing that simple regularization—like squashing kernel weights—enables smooth kernels that match state space model (SSM) performance. With FlashButterfly, an IO-aware algorithm leveraging Butterfly decompositions, long convolutions achieve 2.2× speedup over cuFFT and train 7.2× faster on 64K-length sequences, outperforming SSMs and Transformers on multiple benchmarks including Path256 and brain fMRI data.

ABSTRACT

State space models (SSMs) have high performance on long sequence modeling but require sophisticated initialization techniques and specialized implementations for high quality and runtime performance. We study whether a simple alternative can match SSMs in performance and efficiency: directly learning long convolutions over the sequence. We find that a key requirement to achieving high performance is keeping the convolution kernels smooth. We find that simple interventions--such as squashing the kernel weights--result in smooth kernels and recover SSM performance on a range of tasks including the long range arena, image classification, language modeling, and brain data modeling. Next, we develop FlashButterfly, an IO-aware algorithm to improve the runtime performance of long convolutions. FlashButterfly appeals to classic Butterfly decompositions of the convolution to reduce GPU memory IO and increase FLOP utilization. FlashButterfly speeds up convolutions by 2.2$ imes$, and allows us to train on Path256, a challenging task with sequence length 64K, where we set state-of-the-art by 29.1 points while training 7.2$ imes$ faster than prior work. Lastly, we introduce an extension to FlashButterfly that learns the coefficients of the Butterfly decomposition, increasing expressivity without increasing runtime. Using this extension, we outperform a Transformer on WikiText103 by 0.2 PPL with 30% fewer parameters.

Motivation & Objective

  • To investigate whether directly parameterized long convolutions can match the performance of state space models (SSMs) in sequence modeling without complex initialization or specialized implementations.
  • To address the runtime inefficiency of long convolutions on modern hardware, especially GPU memory I/O bottlenecks and underutilized FLOP capacity.
  • To explore whether structured matrix decompositions, such as Butterfly decompositions, can improve both efficiency and expressivity in long convolutions.
  • To evaluate the generalization of the proposed method across diverse modalities, including language, vision, and neuroimaging.
  • To demonstrate that simple regularization and efficient algorithm design can close the performance gap between standard convolutions and SSMs, while enabling faster training on long sequences.

Proposed method

  • Apply a Squash operator to kernel weights to enforce sparsity and promote smoothness in the frequency domain, improving model quality.
  • Use a Smooth operator in the time domain to further regularize kernel weights and enhance frequency-domain smoothness.
  • Develop FlashButterfly, an IO-aware algorithm that rewrites FFT-based convolutions using block-sparse Butterfly matrix decompositions to reduce memory I/O and improve FLOP utilization.
  • Leverage GPU matrix multiplication units by restructuring convolutions into sequences of sparse matrix multiplications via Butterfly decomposition.
  • Introduce a learned Butterfly extension that allows the decomposition coefficients to be trained, increasing expressivity without increasing inference cost.
  • Use the resulting architecture as a drop-in replacement for SSM layers in models like S4 and H3, and evaluate on diverse benchmarks including LRA, CIFAR, WikiText103, and fMRI.

Experimental results

Research questions

  • RQ1Can directly parameterized long convolutions match the performance of SSMs on long sequence modeling tasks without complex initialization or specialized kernels?
  • RQ2What simple regularization techniques can make long convolutions competitive with SSMs by promoting smooth kernel behavior?
  • RQ3Can an IO-aware algorithm like FlashButterfly significantly improve the runtime efficiency of long convolutions on modern GPUs?
  • RQ4Does the use of structured Butterfly decompositions enable both speedup and higher expressivity in long convolutions?
  • RQ5Can long convolutions outperform Transformers and SSMs in challenging, real-world applications such as fMRI sequence modeling?

Key findings

  • Simple regularization—specifically squashing and smoothing kernel weights—results in smooth frequency-domain kernels and recovers SSM-level performance on the Long Range Arena (LRA), matching S4 even with random initialization.
  • On image classification, long convolutions achieve 0.3% higher accuracy than S4 on sequential CIFAR and are within 0.8% of S4ND-ISO on 2D CIFAR.
  • On language modeling, long convolutions match H3 performance on the PILE (within 0.3 PPL) and are within 0.3 PPL on OpenWebText.
  • On brain fMRI modeling, long convolutions outperform both Transformers and SSMs by 0.14 and 0.16 MAE points, respectively.
  • FlashButterfly accelerates long convolutions by 2.2× over cuFFT and enables training on Path256 (64K sequence length), achieving state-of-the-art performance with 29.1 points higher accuracy and 7.2× faster training than prior work.
  • The learned Butterfly extension increases expressivity without runtime cost, allowing long convolutions to outperform a Transformer on WikiText103 by 0.2 PPL with 30% fewer parameters.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.