Live
Black Hat USAAI BusinessBlack Hat AsiaAI BusinessSam Altman's Sister Amends Lawsuit Accusing OpenAI CEO of Sexual Abuse - GV WireGoogle News: OpenAI‘System failure’ paralyzes Baidu robotaxis in ChinaTechCrunch AIThe Perils of AI-Generated Legal Advice for Dealers and Finance Companies - JD SupraGoogle News: Generative AIDrones Reportedly Being Used to Help Smugglers Cross the U.S.-Mexico BorderInternational Business TimesCrack ML Interviews with Confidence: Anomaly Detection (20 Q&A)Towards AIInspectMind AI (YC W24) Is HiringHacker News TopMicrosoft CFO’s AI Spending Runs Up Against Tech Bubble FearsBloomberg TechnologyWhy Traditional Defenses Can’t Hide AI Traffic Patterns - Security BoulevardGoogle News: Machine LearningHow We Built an EdTech Platform That Scaled to 250K Daily UsersDEV CommunityClaude Code leak puts Anthropic on the other side of the copyright battleBusiness InsiderPrivate equity-backed cardiology practice adding new in-house smart lab powered by AI - cardiovascularbusiness.comGoogle News: AIBuilding Trust in Generative AI Together: Cisco’s Role in the NIST GenAI Program - Cisco BlogsGoogle News: Generative AIBlack Hat USAAI BusinessBlack Hat AsiaAI BusinessSam Altman's Sister Amends Lawsuit Accusing OpenAI CEO of Sexual Abuse - GV WireGoogle News: OpenAI‘System failure’ paralyzes Baidu robotaxis in ChinaTechCrunch AIThe Perils of AI-Generated Legal Advice for Dealers and Finance Companies - JD SupraGoogle News: Generative AIDrones Reportedly Being Used to Help Smugglers Cross the U.S.-Mexico BorderInternational Business TimesCrack ML Interviews with Confidence: Anomaly Detection (20 Q&A)Towards AIInspectMind AI (YC W24) Is HiringHacker News TopMicrosoft CFO’s AI Spending Runs Up Against Tech Bubble FearsBloomberg TechnologyWhy Traditional Defenses Can’t Hide AI Traffic Patterns - Security BoulevardGoogle News: Machine LearningHow We Built an EdTech Platform That Scaled to 250K Daily UsersDEV CommunityClaude Code leak puts Anthropic on the other side of the copyright battleBusiness InsiderPrivate equity-backed cardiology practice adding new in-house smart lab powered by AI - cardiovascularbusiness.comGoogle News: AIBuilding Trust in Generative AI Together: Cisco’s Role in the NIST GenAI Program - Cisco BlogsGoogle News: Generative AI

Switch Attention: Towards Dynamic and Fine-grained Hybrid Transformers

arXivMarch 30, 202610 min read0 views
Source Quiz

arXiv:2603.26380v1 Announce Type: new Abstract: 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 ef — Yusheng Zhao, Hourun Li, Bohan Wu, Jingyang Yuan, Meng Zhang, Yichun Yin, Lifeng Shang, Ming Zhang

View PDF HTML (experimental)

Abstract: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.

Subjects:

Computation and Language (cs.CL)

Cite as: arXiv:2603.26380 [cs.CL]

(or arXiv:2603.26380v1 [cs.CL] for this version)

https://doi.org/10.48550/arXiv.2603.26380

arXiv-issued DOI via DataCite

Submission history

From: Yusheng Zhao [view email] [v1] Fri, 27 Mar 2026 13:04:29 UTC (1,150 KB)

Was this article helpful?

Sign in to highlight and annotate this article

AI
Ask AI about this article
Powered by AI News Hub · full article context loaded
Ready

Conversation starters

Ask anything about this article…

Daily AI Digest

Get the top 5 AI stories delivered to your inbox every morning.

More about

researchpaperarxiv

Knowledge Map

Knowledge Map
TopicsEntitiesSource
Switch Atte…researchpaperarxivnlplanguage-mo…arXiv

Connected Articles — Knowledge Graph

This article is connected to other articles through shared AI topics and tags.

Knowledge Graph100 articles · 168 connections
Scroll to zoom · drag to pan · click to open

Discussion

Sign in to join the discussion

No comments yet — be the first to share your thoughts!

More in Research Papers