Bidirectional Attention as a Mixture of Continuous Word Experts
On the map: Mixture-of-experts → MoE large language models
Abstract (arXiv)
Bidirectional attention unicodex2013 composed of self-attention with positional encodings and the masked language model (MLM) objective unicodex2013 has emerged as a key component of modern large language models (LLMs). Despite its empirical success, few studies have examined its statistical underpinnings: What statistical model is bidirectional attention implicitly fitting? What sets it apart from its non-attention predecessors? We explore these questions in this paper. The key observation is that fitting a single-layer single-head bidirectional attention, upon reparameterization, is equivalent to fitting a continuous bag of words (CBOW) model with mixture-of-experts (MoE) weights. Further, bidirectional attention with multiple heads and multiple layers is equivalent to stacked MoEs and a mixture of MoEs, respectively. This statistical viewpoint reveals the distinct use of MoE in bidirectional attention, which aligns with its practical effectiveness in handling heterogeneous data. It also suggests an immediate extension to categorical tabular data, if we view each word location in a sentence as a tabular feature. Across empirical studies, we find that this extension outperforms existing tabular extensions of transformers in out-of-distribution (OOD) generalization. Finally, this statistical perspective of bidirectional attention enables us to theoretically characterize when linear word analogies are present in its word embeddings. These analyses show that bidirectional attention can require much stronger assumptions to exhibit linear word analogies than its non-attention predecessors.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in MoE large language models, one of 12 directions in Mixture-of-experts. Builds on 26 of its 50 references that are in the map. First posted on arXiv 8 Jul 2023.
Builds on
26 of 50 references.
References · 26
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,462
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2021Revisiting Deep Learning Models for Tabular Datacited by 725
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2019TabNet: Attentive Interpretable Tabular Learningcited by 640
- 2020TabTransformer: Tabular Data Modeling Using Contextual Embeddingscited by 398
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2018AutoInt: Automatic Feature Interaction Learning via Self-Attentive Neural Networkscited by 319
14 more
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
- 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
- 2019Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernelcited by 211
- 2023Birth of a Transformer: A Memory Viewpointcited by 154
- 2023Large Language Models Are Latent Variable Models: Explaining and Finding Good Demonstrations for In-Context Learningcited by 149
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
- 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understandingcited by 85
- 2023In-Context Learning through the Bayesian Prismcited by 78
- 2019Analogies Explained: Towards Understanding Word Embeddingscited by 63
- 2018Towards Understanding Linear Word Analogiescited by 57
- 2021BERT is to NLP what AlexNet is to CV: Can Pre-Trained Language Models Identify Analogies?cited by 56
- 2020A Mixture of h-1 Heads is Better than h Headscited by 22
- 2021PyTorch Tabular: A Framework for Deep Learning with Tabular Datacited by 20
- 2020Attention Word Embeddingcited by 4
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2024A Survey on Mixture of Experts in Large Language Models
- 2026Attention Sink Forges Native MoE in Attention Layers: Sink-Aware Training to Address Head Collapse
- 2022Mixture of Attention Heads: Selecting Attention Heads Per Token
- 2025MoBA: Mixture of Block Attention for Long-Context LLMs
- 2026Attention-Aware Routing: Coupling Routing and Attention in MoEs
- 2026Through the Bottleneck: How Multi-head Latent Attention Separates Content from Position in Language Models
- 2021Efficient Large Scale Language Modeling with Mixtures of Experts
- 2025Sparsity and Superposition in Mixture of Experts