SPECTRE: An FFT-Based Efficient Drop-In Replacement to Self-Attention for Long Contexts
Not on the map. Why?
Abstract (arXiv)
Long-context transformers face significant efficiency challenges due to the quadratic cost of self-attention. However, many modern applications-from multi-turn dialogue to high-resolution vision-require contexts spanning tens of thousands of tokens. We introduce SPECTRE, a method that replaces each attention head with a fast real FFT, a content-adaptive spectral gate, and an inverse FFT, reducing per-layer complexity from O(L2) to O(Llog L) while preserving the surrounding architecture. We extend this efficiency to autoregressive generation through our Prefix-FFT cache and enhance local feature representation with an optional wavelet module that adds negligible computational overhead. Our experiments demonstrate that SPECTRE operates up to 7× faster than FlashAttention-2 on 128k-token contexts while matching or exceeding baseline performance on PG-19 language modeling and ImageNet-1k classification tasks. SPECTRE achieves these improvements by adding fewer than 6% parameters to the base model, making hundred-kilotoken context processing feasible on commodity GPUs without specialized hardware.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 22 of its 32 references that are in the map. First posted on arXiv 25 Feb 2025.
Builds on
22 of 32 references.
References · 22
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,509
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,073
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2020Reformer: The Efficient Transformercited by 1,668
- 2020GShard: Scaling Giant Models with Conditional Computation and Automatic Shardingcited by 1,631
- 2020Rethinking Attention with Performerscited by 1,601
10 more
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 726
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 613
- 2023Hyena Hierarchy: Towards Larger Convolutional Language Modelscited by 393
- 2021FNet: Mixing Tokens with Fourier Transformscited by 347
- 2021Adaptive Fourier Neural Operators: Efficient Token Mixers for Transformerscited by 248
- 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 204
- 2022Mega: Moving Average Equipped Gated Attentioncited by 179
- 2021CKConv: Continuous Kernel Convolution For Sequential Datacited by 120
- 2022Monarch: Expressive Structured Matrices for Efficient and Accurate Trainingcited by 106
- 2019Learning Fast Algorithms for Linear Transforms Using Butterfly Factorizationscited by 76
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026Caracal: Causal Architecture via Spectral Mixingcited by 1
- 2026SMat-Attention: Structured Long-Context Sequence Modelingcited by 1
- 2026IPatch: A Multi-Resolution Transformer Architecture for Robust Time-Series Forecastingcited by 0
- 2026WNet: Discrete Wavelets Transform for Efficient Token Mixingcited by 0
- 2026WNet: Discrete Wavelets Transform for Efficient Token Mixing3 Oct 2026
- 2026SMat-Attention: Structured Long-Context Sequence Modeling28 Sep 2026
- 2026Caracal: Causal Architecture via Spectral Mixing30 Apr 2026
- 2026IPatch: A Multi-Resolution Transformer Architecture for Robust Time-Series Forecasting25 Mar 2026