Sparse and Structured Hopfield Networks
Saul José Rodrigues dos Santos, Vlad Niculae, Daniel C. McNamee, André F. T. Martins
Abstract
Modern Hopfield networks have enjoyed recent interest due to their connection to attention in transformers. Our paper provides a unified framework for sparse Hopfield networks by establishing a link with Fenchel-Young losses. The result is a new family of Hopfield-Fenchel-Young energies whose update rules are end-to-end differentiable sparse transformations. We reveal a connection between loss margins, sparsity, and exact memory retrieval. We further extend this framework to structured Hopfield networks via the SparseMAP transformation, which can retrieve pattern associations instead of a single pattern. Experiments on multiple instance learning and text rationalization demonstrate the usefulness of our approach.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
11 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Provably Optimal Memory Capacity for Modern Hopfield Models: Transformer-Compatible Dense Associative Memories as Spherical Codes cites Hopfield Networks is All You Need
- Provably Optimal Memory Capacity for Modern Hopfield Models: Transformer-Compatible Dense Associative Memories as Spherical Codes cites Dense Associative Memory Through the Lens of Random Features
- Dense Associative Memory with Epanechnikov Energy cites Hopfield Networks is All You Need
- Dense Associative Memory with Epanechnikov Energy cites Dense Associative Memory Through the Lens of Random Features
- Universal Hopfield Networks: A General Framework for Single-Shot Associative Memory Models cites Hopfield Networks is All You Need
- Dense Associative Memory Through the Lens of Random Features cites Energy Transformer
- Dense Associative Memory Through the Lens of Random Features cites Universal Hopfield Networks: A General Framework for Single-Shot Associative Memory Models
- Dense Associative Memory Through the Lens of Random Features cites Hopfield Networks is All You Need
- Memory-Integrated Reconfigurable Adapters: A Unified Framework for Settings with Multiple Tasks cites Dense Associative Memory with Epanechnikov Energy
- Memory-Integrated Reconfigurable Adapters: A Unified Framework for Settings with Multiple Tasks cites Universal Hopfield Networks: A General Framework for Single-Shot Associative Memory Models
- Memory-Integrated Reconfigurable Adapters: A Unified Framework for Settings with Multiple Tasks cites Hopfield Networks is All You Need
- Memory-Integrated Reconfigurable Adapters: A Unified Framework for Settings with Multiple Tasks cites Relating transformers to models and neural representations of the hippocampal formation
Cited by top-tier papers11
- Provably Optimal Memory Capacity for Modern Hopfield Models: Transformer-Compatible Dense Associative Memories as Spherical CodesJerry Yao-Chieh Hu, Dennis Wu, Han LiuNeurIPS 2024 · 26 citations
- Dense Associative Memory Through the Lens of Random FeaturesBenjamin Hoover, Duen Horng Chau, Hendrik Strobelt, Parikshit Ram et al.NeurIPS 2024 · 18 citations
- Dense Associative Memory with Epanechnikov EnergyBenjamin Hoover, Zhaoyang Shi, Krishnakumar Balasubramanian, Dmitry Krotov et al.NeurIPS 2025 · 11 citations
- Memory-Integrated Reconfigurable Adapters: A Unified Framework for Settings with Multiple TasksSusmit Agrawal, Krishn Vishwas Kher, Saksham Mittal, Swarnim Maheshwari et al.NeurIPS 2025 · 2 citations
- Transformer Circuits Can Realize Clustering AlgorithmsKenneth Clarkson, Lior Horesh, Takuya Ito, Charlotte Park et al.ICML 2026 · 1 citation
Builds on6
- Hopfield Networks is All You NeedHubert Ramsauer, Bernhard Schäfl, Johannes Lehner, Philipp Seidl et al.ICLR 2021 · 620 citations
- An Exponential Learning Rate Schedule for Deep LearningZhiyuan Li, Sanjeev AroraICLR 2020 · 267 citations
- Relating transformers to models and neural representations of the hippocampal formationJames C. R. Whittington, Joseph Warren, Tim E. J. BehrensICLR 2022 · 110 citations
- Energy TransformerBenjamin Hoover, Yuchen Liang, Bao Pham, Rameswar Panda et al.NeurIPS 2023 · 100 citations
- Universal Hopfield Networks: A General Framework for Single-Shot Associative Memory ModelsBeren Millidge, Tommaso Salvatori, Yuhang Song, Thomas Lukasiewicz et al.ICML 2022 · 72 citations
Related papers
- Nonparametric Modern Hopfield ModelsJerry Yao-Chieh Hu, Bo-Yu Chen, Dennis Wu, Feng Ruan et al.ICML 2025
- On Sparse Modern Hopfield ModelJerry Yao-Chieh Hu, Donglin Yang, Dennis Wu, Chenwei Xu et al.NeurIPS 2023 · 52 citations
- Learning Energy Networks with Generalized Fenchel-Young LossesMathieu Blondel, Felipe Llinares-López, Robert Dadashi, Léonard Hussenot et al.NeurIPS 2022 · 13 citations
- In-Context Denoising with One-Layer Transformers: Connections between Attention and Associative Memory RetrievalMatthew Smart, Alberto Bietti, Anirvan M. SenguptaICML 2025
- Associative TransformerYuwei Sun, Hideya Ochiai, Zhirong Wu, Stephen Lin et al.CVPR 2025
