Scaling Attention to Very Long Sequences in Linear Time with Wavelet-Enhanced Random Spectral Attention (WERSA)
Not on the map. Why?
Abstract (arXiv)
Transformer models are computationally costly on long sequences since regular attention has quadratic O(n2) time complexity. We introduce Wavelet-Enhanced Random Spectral Attention (WERSA), a novel mechanism of linear O(n) time complexity that is pivotal to enable successful long-sequence processing without the performance trade-off. WERSA merges content-adaptive random spectral features together with multi-resolution Haar wavelets and learnable parameters to selectively attend to informative scales of data while preserving linear efficiency. Large-scale comparisons on single GPU and across various benchmarks (vision, NLP, hierarchical reasoning) and various attention mechanisms (like Multiheaded Attention, Flash-Attention-2, FNet, Linformer, Performer, Waveformer), reveal uniform advantages of WERSA. It achieves best accuracy in all tests. On ArXiv classification, WERSA improves accuracy over vanilla attention by 1.2% (86.2% vs 85.0%) while cutting training time by 81% (296s vs 1554s) and FLOPS by 73.4% (26.2G vs 98.4G). Significantly, WERSA excels where vanilla and FlashAttention-2 fail: on ArXiv-128k's extremely lengthy sequences, it achieves best accuracy (79.1%) and AUC (0.979) among viable methods, operating on data that gives Out-Of-Memory errors to quadratic methods while being twice as fast as Waveformer, its next-best competitor. By significantly reducing computational loads without compromising accuracy, WERSA makes possible more practical, more affordable, long-context models, in particular on low-resource hardware, for more sustainable and more scalable AI development.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 32 of its 38 references that are in the map. First posted on arXiv 11 Jul 2025.
Builds on
32 of 38 references.
References · 32
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
- 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,386
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
20 more
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2020Rethinking Attention with Performerscited by 1,601
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
- 2022FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecastingcited by 1,210
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
- 2020Efficient Transformers: A Surveycited by 790
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 726
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 471
- 2022Fourier Neural Operator with Learned Deformations for PDEs on General Geometriescited by 427
- 2023Resurrecting Recurrent Neural Networks for Long Sequencescited by 408
- 2021Random Feature Attentioncited by 354
- 2021FNet: Mixing Tokens with Fourier Transformscited by 347
- 2022Mega: Moving Average Equipped Gated Attentioncited by 179
- 2017On the Properties of the Softmax Function with Application in Game Theory and Reinforcement Learningcited by 142
- 2018ListOps: A Diagnostic Dataset for Latent Tree Learningcited by 129
- 2019On the Use of ArXiv as a Datasetcited by 103
- 2023RMT: Retentive Networks Meet Vision Transformerscited by 68
- 2022WavSpA: Wavelet Space Attention for Boosting Transformers' Long Sequence Learning Abilitycited by 3
Built on by
Not cited yet.