mlsanityData to 14 Oct 2026

Switch Attention: Towards Dynamic and Fine-grained Hybrid Transformers

arXiv 2603.26380 ↗First posted 27 Mar 2026cs.CLcited by 4

Not on the map. Why?

Abstract (arXiv)

The attention mechanism has been the core component in modern transformer architectures. However, the computation of standard full attention scales quadratically with the sequence length, serving as a major bottleneck in long-context language modeling. Sliding window attention restricts the context length for better efficiency at the cost of narrower receptive fields. While existing efforts attempt to take the benefits from both sides by building hybrid models, they often resort to static, heuristically designed alternating patterns that limit efficient allocation of computation in various scenarios. In this paper, we propose Switch Attention (SwiAttn), a novel hybrid transformer that enables dynamic and fine-grained routing between full attention and sliding window attention. For each token at each transformer layer, SwiAttn dynamically routes the computation to either a full-attention branch for global information aggregation or a sliding-window branch for efficient local pattern matching. An adaptive regularization objective is designed to encourage the model towards efficiency. Moreover, we adopt continual pretraining to optimize the model, transferring the full attention architecture to the hybrid one. Extensive experiments are conducted on twenty-three benchmark datasets across both regular (4K) and long (32K) context lengths, demonstrating the effectiveness of the proposed method.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 68 of its 93 references that are in the map. First posted on arXiv 27 Mar 2026.

Builds on

68 of 93 references.

References · 68

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
  4. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
  5. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
  6. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
  7. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  8. 2020Longformer: The Long-Document Transformercited by 3,413
  9. 2016Pointer Sentinel Mixture Modelscited by 3,096
  10. 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,073
  11. 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,955
  12. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
38 more
  1. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
  2. 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,183
  3. 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,164
  4. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  5. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
  6. 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
  7. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
  8. 2020Big Bird: Transformers for Longer Sequencescited by 1,684
  9. 2020Reformer: The Efficient Transformercited by 1,668
  10. 2022Fast Inference from Transformers via Speculative Decodingcited by 1,653
  11. 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,554
  12. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  13. 2019Root Mean Square Layer Normalizationcited by 1,480
  14. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
  15. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
  16. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
  17. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
  18. 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,135
  19. 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 992
  20. 2016Deep Variational Information Bottleneckcited by 930
  21. 2019DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphscited by 903
  22. 2024Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Headscited by 843
  23. 2019Fast Transformer Decoding: One Write-Head is All You Needcited by 717
  24. 2026GLM-5: from Vibe Coding to Agentic Engineeringcited by 587
  25. 2019SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarizationcited by 535
  26. 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
  27. 2021A Dataset of Information-Seeking Questions and Answers Anchored in Research Paperscited by 486
  28. 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMscited by 474
  29. 2019Multi-News: a Large-Scale Multi-Document Summarization Dataset and Abstractive Hierarchical Modelcited by 431
  30. 2018Lipschitz regularity of deep neural networks: analysis and efficient estimationcited by 415
  31. 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 383
  32. 2024Better & Faster Large Language Models via Multi-token Predictioncited by 360
  33. 2021Efficient Attentions for Long Document Summarizationcited by 345
  34. 2025FlashInfer: Efficient and Customizable Attention Engine for LLM Inference Servingcited by 258
  35. 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 232
  36. 2019ERNIE 2.0: A Continual Pre-training Framework for Language Understandingcited by 231
  37. 2023CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Servingcited by 203
  38. 2025Kimi Linear: An Expressive, Efficient Attention Architecturecited by 196

50 most cited of 68 All 68 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 4.

4 papers.