atlas

Research map / Architectures and efficiency / Mixture of experts

SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention

NeurIPS 2024 · Architectures and efficiency › Mixture of experts · approach: Sparse MoE as regularization and attention · 8 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes SwitchHead, a mixture-of-experts attention layer that uses expert value and output projections (with shared keys/queries) to cut the number of computed attention matrices, and SwitchAll, which combines it with sigma-MoE feedforward layers, trained from scratch on language modeling.

Problem

Self-attention accounts for much of Transformer compute and memory, but prior MoE-attention methods (e.g., MoA) fail to match parameter-matched dense baselines or give only modest resource savings.

Approach

Make value and output projections independent MoEs with sigmoid non-competitive routing, keep a single head-specific key/query, so that far fewer attention matrices need computing; the MoE projections are applied outside the attention core, enabling up to 8x fewer attention matrices.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace dense attention with SwitchHead attention using value and output projection experts47M Transformer XL · C4perplexity: 22.71 -> 22.53Helped
Replace dense attention with SwitchHead attention using value and output projection experts262M Transformer XL · C4perplexity: 16.28 -> 16.23Helped
Replace dense attention with SwitchHead attention using value and output projection experts47M Transformer XL · peS2operplexity: 12.83 -> 12.84Hurt
Replace dense attention with SwitchHead attention using value and output projection expertsTransformer XL · Enwik8bits/character: 1.10 -> 1.10No clear effect
Add sigma-MoE feedforward layers to SwitchHead47M Transformer XL · Wikitext 103perplexity: 12.32 -> 12.17Helped
Add sigma-MoE feedforward layers to SwitchHead262M Transformer XL · C4perplexity: 16.58 -> 16.45Helped
Share expert selection between source and destination (ablation)SwitchHead, 47M · C4perplexity: 22.53 -> 22.81Hurt
Share expert selection between source and destination (ablation)SwitchHead, 47M · C4BLiMP accuracy: 75.7% -> 74.6%Hurt
Remove value-projection MoE (ablation)SwitchHead, 47M · Wikitext 103perplexity: 12.27 -> 12.30Hurt
Remove output-projection MoE (ablation)SwitchHead, 47M · Wikitext 103perplexity: 12.27 -> 12.45Hurt
Add key- and query-projection MoEs (ablation)SwitchHead, 47M · Wikitext 103perplexity: 12.27 -> 12.57Hurt
Reduce attention heads to 2 while parameter-matchingTransformer XL · Wikitext 103, 47Mperplexity: 12.31 -> 12.74Hurt

Surprising findings

Limitations

Experimental setup

Datasets: C4 Enwik8 peS2o Wikitext 103 ListOps

Benchmarks: Wikitext 103 C4 peS2o Enwik8 Lambada BLiMP Children's Book Test

Metrics: perplexity bits per character accuracy MACs memory (floats) wall-clock time per iteration

Baselines: Transformer XL dense baseline (matched heads) MoA Transformer with RoPE sigma-MoE

Builds on: sigma-MoE Mixture of Attention Heads (MoA) Transformer-XL RoPE

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy