mlsanityData to 14 Oct 2026

Scaling Attention to Very Long Sequences in Linear Time with Wavelet-Enhanced Random Spectral Attention (WERSA)

arXiv 2507.08637 ↗First posted 11 Jul 2025cs.LG cs.AI cs.CLcited by 0

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  4. 2020Language Models are Few-Shot Learnerscited by 32,419
  5. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  6. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  7. 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,386
  8. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  9. 2020Longformer: The Long-Document Transformercited by 3,413
  10. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  11. 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
  12. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
20 more
  1. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
  2. 2020Big Bird: Transformers for Longer Sequencescited by 1,684
  3. 2020Rethinking Attention with Performerscited by 1,601
  4. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  5. 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
  6. 2022FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecastingcited by 1,210
  7. 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
  8. 2020Efficient Transformers: A Surveycited by 790
  9. 2019Compressive Transformers for Long-Range Sequence Modellingcited by 726
  10. 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 471
  11. 2022Fourier Neural Operator with Learned Deformations for PDEs on General Geometriescited by 427
  12. 2023Resurrecting Recurrent Neural Networks for Long Sequencescited by 408
  13. 2021Random Feature Attentioncited by 354
  14. 2021FNet: Mixing Tokens with Fourier Transformscited by 347
  15. 2022Mega: Moving Average Equipped Gated Attentioncited by 179
  16. 2017On the Properties of the Softmax Function with Application in Game Theory and Reinforcement Learningcited by 142
  17. 2018ListOps: A Diagnostic Dataset for Latent Tree Learningcited by 129
  18. 2019On the Use of ArXiv as a Datasetcited by 103
  19. 2023RMT: Retentive Networks Meet Vision Transformerscited by 68
  20. 2022WavSpA: Wavelet Space Attention for Boosting Transformers' Long Sequence Learning Abilitycited by 3

Built on by

Not cited yet.