Gradient Descent as Implicit EM in Distance-Based Neural Models
Not on the map. Why?
Abstract (arXiv)
Neural networks trained with standard objectives exhibit behaviors characteristic of probabilistic inference: soft clustering, prototype specialization, and Bayesian uncertainty tracking. These phenomena appear across architectures -- in attention mechanisms, classification heads, and energy-based models -- yet existing explanations often rely on loose analogies to mixture models or post-hoc architectural interpretation. We provide a direct explanation. For any objective with log-sum-exp structure over distances or energies, the gradient with respect to each distance is exactly the negative posterior responsibility of the corresponding component: partial L / partial dj = -rj. The identity is algebraic, requiring only differentiability; it is a specialization of Fisher's identity, and its significance here is its address: standard neural objectives instantiate it without modification. The consequence is that gradient descent on such objectives performs generalized expectation-maximization implicitly, with responsibilities arising as gradients to be applied rather than auxiliary variables to be computed. This result unifies three regimes of learning: unsupervised mixture modeling, where responsibilities are fully latent; attention, where responsibilities are conditioned on queries; and cross-entropy classification, where supervision clamps responsibilities to targets. Our claims live at training time: the responsibility-weighted gradient dynamics recently documented in transformers follow from the objective's geometry. The in-context Bayesian computation that trained transformers perform at inference time is the endpoint of these dynamics, not their per-step content.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 12 of its 21 references that are in the map. First posted on arXiv 31 Dec 2025.
Builds on
12 of 21 references.
References · 12
- 2017Attention Is All You Needcited by 60,361
- 2015Variational Inference with Normalizing Flowscited by 2,170
- 2020Hopfield Networks is All You Needcited by 475
- 2019Expectation-Maximization Attention Networks for Semantic Segmentationcited by 147
- 2017Neural Expectation Maximizationcited by 123
- 2025The Bayesian Geometry of Transformer Attentioncited by 13
- 2025Gradient Dynamics of Attention: How Cross-Entropy Sculpts Bayesian Manifoldscited by 6
- 2024Interpreting Neural Networks through Mahalanobis Distancecited by 3
- 2025Geometric Scaling of Bayesian Inference in LLMscited by 3
- 2019Comparing EM with GD in Mixture Models of Two Componentscited by 1
- 2024Neural Networks Use Distance Metricscited by 1
- 2025Neural Networks Learn Distance Metricscited by 1
Built on by
Citing papers per year: 2026: 1.
1 paper.