mlsanityData to 14 Oct 2026

Flexformer: Flexible Linear Transformer with Learnable Attention Kernel

arXiv 2606.27748 ↗First posted 26 Jun 2026cs.LG cs.AIcited by 1

Not on the map. Why?

Abstract (arXiv)

Transformer models rely on attention mechanism to capture long-range dependencies but suffer from quadratic complexity, limiting their scalability to long sequences. Kernel-based linear attention reduces this complexity but typically relies on fixed or weakly learnable kernels, restricting expressiveness and performance. In this work, we propose Flexformer, a flexible linear Transformer that learns attention kernels in a fully data-driven manner. Flexformer builds on random Fourier feature-based linear attention and treats spectral frequencies as trainable parameters, enabling the model to learn a broad family of attention kernels. We develop both stationary and nonstationary variants, with the latter offering strictly greater expressiveness. Extensive experiments on language modeling and sequence classification demonstrate that Flexformer consistently outperforms baselines. Moreover, Flexformer can be effectively distilled from pretrained Transformers to recover softmax attention and exhibits strong kernel transferability across domains, achieving both high efficiency and competitive performance on long-sequence tasks.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 33 of its 43 references that are in the map. First posted on arXiv 26 Jun 2026.

Builds on

33 of 43 references.

References · 33

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  5. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  6. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  7. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  8. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
  9. 2020Longformer: The Long-Document Transformercited by 3,413
  10. 2016Pointer Sentinel Mixture Modelscited by 3,096
  11. 2020Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecastingcited by 2,169
  12. 2022A Time Series is Worth 64 Words: Long-term Forecasting with Transformerscited by 2,039
21 more
  1. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  2. 2020Big Bird: Transformers for Longer Sequencescited by 1,684
  3. 2020Reformer: The Efficient Transformercited by 1,668
  4. 2020Rethinking Attention with Performerscited by 1,601
  5. 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,488
  6. 2023iTransformer: Inverted Transformers Are Effective for Time Series Forecastingcited by 931
  7. 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 700
  8. 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 471
  9. 2018Fundamentals of Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM) Networkcited by 420
  10. 2021Random Feature Attentioncited by 354
  11. 2018Adaptive Input Representations for Neural Language Modelingcited by 226
  12. 2022cosFormer: Rethinking Softmax in Attentioncited by 213
  13. 2024Simple linear attention language models balance the recall-throughput tradeoffcited by 208
  14. 2018ListOps: A Diagnostic Dataset for Latent Tree Learningcited by 129
  15. 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 120
  16. 2021Skyformer: Remodel Self-Attention with Gaussian Kernel and Nystr"om Methodcited by 63
  17. 2025PolaFormer: Polarity-aware Linear Attention for Vision Transformerscited by 32
  18. 2015An Exploration of Softmax Alternatives Belonging to the Spherical Loss Familycited by 27
  19. 2024Understanding the differences in Foundation Models: Attention, State Space Models, and Recurrent Neural Networkscited by 26
  20. 2023Building Blocks for a Complex-Valued Transformer Architecturecited by 16
  21. 2024Nonstationary Sparse Spectral Permanental Processcited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.