mlsanityData to 14 Oct 2026

Stochastic Attention via Langevin Dynamics on the Modern Hopfield Energy

arXiv 2603.06875 ↗First posted 6 Mar 2026cs.LG q-fin.CPcited by 2

Not on the map. Why?

Abstract (arXiv)

Attention heads retrieve: given a query, they return a weighted average of stored values. We showed that this computation is one step of gradient descent on the modern Hopfield energy, and that Langevin sampling from the corresponding Boltzmann distribution yielded stochastic attention, a training-free sampler controlled by a single temperature parameter. Lowering the temperature gave exact retrieval; raising it gave open-ended generation. Because the energy gradient equals the attention map, no score network, training loop, or learned model was required, making the approach particularly suited to the low-data regime where learned generative models are starved of training signal. We derived an entropy inflection condition that identified the retrieval-to-generation transition temperature for any memory geometry and validated the sampler on five domains spanning two orders of magnitude in dimension. A single Boolean mask on the attention softmax, identical to the causal mask used in transformers but applied along the memory axis rather than the sequence axis, turned the sampler into a zero-shot class-conditional generator on Olivetti faces with no retraining and no learned classifier. On MNIST digit images, stochastic attention produced samples that were markedly more novel and more diverse than the best learned baseline while matching a Metropolis-corrected gold standard. On protein sequences from a small Pfam family, the generation regime preserved amino acid composition far more faithfully than a variational autoencoder at matched novelty, indicating that the training-free score function retained family-level fidelity that learned models lost. A denoising diffusion baseline failed across all memory sizes tested, producing samples indistinguishable from isotropic noise. The approach required no architectural changes to the underlying attention mechanism.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 15 of its 42 references that are in the map. First posted on arXiv 6 Mar 2026.

Builds on

15 of 42 references.

References · 15

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Denoising Diffusion Probabilistic Modelscited by 21,076
  3. 2020Score-Based Generative Modeling through Stochastic Differential Equationscited by 9,122
  4. 2015Deep Unsupervised Learning using Nonequilibrium Thermodynamicscited by 7,058
  5. 2019Generative Modeling by Estimating Gradients of the Data Distributioncited by 4,101
  6. 2015Variational Inference with Normalizing Flowscited by 2,170
  7. 2020Hopfield Networks is All You Needcited by 475
  8. 2021How to Train Your Energy-Based Modelscited by 274
  9. 2016Dense Associative Memory for Pattern Recognitioncited by 236
  10. 2014Theoretical guarantees for approximate sampling from smooth and log-concave densitiescited by 208
  11. 2015Non-asymptotic convergence analysis for the Unadjusted Langevin Algorithmcited by 197
  12. 2019Don't Blame the ELBO! A Linear VAE Perspective on Posterior Collapsecited by 121
3 more
  1. 2020Large Associative Memory Problem in Neurobiology and Machine Learningcited by 112
  2. 2023Energy Transformercited by 71
  3. 2018Latent Alignment and Variational Attentioncited by 36

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Phases in a class of associative memories via hidden neurons
  2. 2026Geometry-Aware Attention Guidance for Diffusion Models via Modern Hopfield Dynamics
  3. 2026Balancing Fidelity and Diversity in Diffusion Models via Symmetric Attention Decomposition: Hopfield Perspective
  4. 2026Training-Free Generative Sampling via Moment-Matched Score Smoothing
  5. 2025In-Context Linear Regression Demystified: Training Dynamics and Mechanistic Interpretability of Multi-Head Softmax Attention
  6. 2025Memorization to Generalization: Emergence of Diffusion Models from Associative Memory
  7. 2025The Gaussian-Multinoulli Restricted Boltzmann Machine: A Potts Model Extension of the GRBM
  8. 2026Hierarchical Prototype Emergence in Modern Hopfield Models