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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
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
