Long-range Sequence Modeling with Predictable Sparse Attention

Yimeng Zhuang, Jing Zhang, Mei TuACL 2022

Introduction: The Quadratic Bottleneck

The standard Transformer architecture has revolutionized natural language processing, yet it faces a fundamental scaling challenge: the "Quadratic Bottleneck." In vanilla self-attention, every token in a sequence must attend to every other token, resulting in computational and memory requirements that grow quadratically ($O(L^2)$) with sequence length. This makes processing long-form content—such as extensive documents, high-resolution images, or long video clips—prohibitively expensive.

While various "Efficient Transformers" have been proposed, they typically rely on fixed sparsity patterns or low-rank approximations that often compromise model expressivity. Researchers have recently introduced Fourier Sparse Attention for Transformer (FSAT), a novel architecture that reduces complexity to log-linear ($O(L \log L)$) by learning to predict dominant attention connections rather than calculating the full matrix.

The FSAT Architecture

FSAT's core innovation lies in making attention "predictable" through two primary mechanisms: the Pooled Hidden State Cross and Predictable Sparse Attention.

Pooled Hidden State Cross

To identify relevant token interactions without exhaustive $O(L^2)$ computation, FSAT utilizes the Fast Fourier Transform (FFT). By transforming hidden states into the frequency domain and performing Hadamard products (element-wise multiplication), the model captures all possible token-pair interactions. These are then pooled into a compressed representation, as illustrated in Figure 1. This process effectively creates "2nd-order features" that enhance the model's expressivity while maintaining $O(L \log L)$ efficiency.

The FSAT architecture uses Fast Fourier Transforms to efficiently pool hidden state interactions into a compressed representation.

Predictable Sparse Attention

Unlike models that use static sliding windows, FSAT uses the output of the FFT module to dynamically predict the indices of the most important tokens for attention. Because indexing is a discrete, non-differentiable operation, the authors employ a reparameterization trick—modeling the index selection as a Gaussian distribution—and gradient truncation. This allows the model to learn the optimal sparse structure end-to-end via standard backpropagation.

Experimental Results

The model was rigorously evaluated on the Long Range Arena (LRA) benchmark, a standard suite for testing efficient Transformers across tasks with sequence lengths up to 4,000 tokens. The benchmark includes ListOps, Text classification, Retrieval, Image classification, and Pathfinder.

FSAT achieves state-of-the-art performance across the Long Range Arena benchmark, outperforming both vanilla Transformers and other efficient variants.

As shown in the results table, FSAT achieved a new state-of-the-art average score of 64.24%, significantly outperforming the vanilla Transformer (59.72%) and popular efficient variants like BigBird (58.44%) and Performer (55.73%). Notably, FSAT set new performance records on four out of the five LRA tasks, demonstrating that its learned sparsity does not come at the cost of accuracy.

Efficiency and Scalability

Beyond accuracy, FSAT demonstrates superior scalability. While a standard Transformer's memory usage explodes as sequences grow, FSAT’s memory and time costs increase linearly. At a sequence length of 4,000, FSAT is significantly faster and more memory-efficient than the baseline. This efficiency is achieved by balancing "exploitation" (using predicted indices) and "exploration" (using random indices) during training, ensuring the model discovers robust attention patterns.

Conclusion

FSAT represents a significant step forward in breaking the quadratic bottleneck of Transformers. By leveraging the frequency domain to predict attention importance, it provides a path toward processing massive sequences that were previously computationally unreachable. Future work may extend this approach to even more demanding domains, such as 3D medical imaging and long-form video understanding, where efficient long-range modeling is critical.

Summary updated

BibTeX
@inproceedings{zhuang2022long,
  author = {Yimeng Zhuang and Jing Zhang and Mei Tu},
  title = {{Long-range Sequence Modeling with Predictable Sparse Attention}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.acl-long.19},
}
Figure