Transformer as an Euler Discretization of Score-based Variational Flow
On the map: Mixture-of-experts → Expert routing strategies
Abstract (arXiv)
Despite the Transformer's dominance across machine learning, its architecture remains largely heuristic and lacks a unified theoretical foundation. We introduce Score-based Variational Flow (SVFlow), a continuous-time dynamical system for representation learning in which the state evolves according to a variational posterior-weighted average of conditional log-likelihood scores, and provide a principled basis for regularization through variational consistency. We show that forward Euler discretization of spherical SVFlow exactly recovers the Transformer architecture. Multi-head attention approximates SVFlow vector field via a vMF kernel-smoothed posterior, while MoE/FFN approximates it in a relaxed network-based way, and the residual-normalization block implements a relaxed retraction that maintains spherical geometry. This unification explains why attention trains stably without explicit regularization while MoE requires auxiliary balancing losses. Experiments on pre-trained language models with prefix shuffling show that SVFlow-induced metrics correlate with task performance, reveal depth-dependent sensitivity, and reflect the intrinsic dynamics of attention.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Expert routing strategies, one of 12 directions in Mixture-of-experts. Builds on 30 of its 35 references that are in the map. First posted on arXiv 26 Apr 2026.
Builds on
30 of 35 references.
Closest ancestors · 4
Same direction, newest first
- 2026Variational Inference, Entropy, and Orthogonality: A Unified Theory of Mixture-of-Experts7 Jan
- 2025Dense Backpropagation Improves Training for Sparse Mixture-of-Experts16 Apr
- 2023SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention13 Dec
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity11 Jan
Other references · 26
- 2017Attention Is All You Needcited by 59,932
- 2020Score-Based Generative Modeling through Stochastic Differential Equationscited by 8,964
- 2016Layer Normalizationcited by 5,579
- 2022Flow Matching for Generative Modelingcited by 5,426
- 2018Neural Ordinary Differential Equationscited by 3,733
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,413
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2016Variational Inference: A Review for Statisticianscited by 1,466
- 2019Root Mean Square Layer Normalizationcited by 1,425
- 2020Calibration of Pre-trained Transformerscited by 307
- 2024A Survey on Mixture of Experts in Large Language Modelscited by 233
- 2019Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernelcited by 211
14 more
- 2023The emergence of clusters in self-attention dynamicscited by 133
- 2024Variational Flow Matching for Graph Generationcited by 78
- 2021Large-Scale Wasserstein Gradient Flowscited by 76
- 2018Spherical Latent Spaces for Stable Variational Autoencoderscited by 66
- 2024Convergence Analysis of Probability Flow ODE for Score-based Generative Modelscited by 56
- 2025Advancing Expert Specialization for Better MoEcited by 37
- 2024Implicit Bias and Fast Convergence Rates for Self-attentioncited by 31
- 2022Fuse It More Deeply! A Variational Transformer with Layer-Wise Latent Variable Inference for Text Generationcited by 20
- 2024Implicit Regularization of Gradient Flow on One-Layer Softmax Attentioncited by 16
- 2021ODE Transformer: An Ordinary Differential Equation-Inspired Model for Neural Machine Translationcited by 12
- 2025Gradient Dynamics of Attention: How Cross-Entropy Sculpts Bayesian Manifoldscited by 6
- 2025Transformers as Unrolled Inference in Probabilistic Laplacian Eigenmaps: An Interpretation and Potential Improvementscited by 3
- 2025A Mathematical Explanation of Transformerscited by 2
- 2025Unifying Learning Dynamics and Generalization in Transformers Scaling Lawcited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025MeanFlow Transformers with Representation Autoencoders
- 2025From Condensation to Rank Collapse: A Two-Stage Analysis of Transformer Training Dynamics
- 2025Is Random Attention Sufficient for Sequence Modeling? Disentangling Trainable Components in the Transformer
- 2024Convergence Analysis of Flow Matching in Latent Space with Transformers
- 2026Linearizing Vision Transformer with Test-Time Training
- 2026Mixture of Chapters: Scaling Learnt Memory in Transformers
- 2026From Attenuation to Attention: Variational Information Flow Manipulation for Fine-Grained Visual Perception
- 2025Mixture-of-Transformers Learn Faster: A Theoretical Study on Classification Problems