Universal Hopfield Networks: A General Framework for Single-Shot Associative Memory Models
Beren Millidge, Tommaso Salvatori, Yuhang Song, Thomas Lukasiewicz, Rafal Bogacz
Abstract
A large number of neural network models of associative memory have been proposed in the literature. These include the classical Hopfield networks (HNs), sparse distributed memories (SDMs), and more recently the modern continuous Hopfield networks (MCHNs), which possess close links with self-attention in machine learning. In this paper, we propose a general framework for understanding the operation of such memory networks as a sequence of three operations: similarity, separation, and projection. We derive all these memory models as instances of our general framework with differing similarity and separation functions. We extend the mathematical framework of Krotov and Hopfield (2020) to express general associative memory models using neural network dynamics with local computation, and derive a general energy function that is a Lyapunov function of the dynamics. Finally, using our framework, we empirically investigate the capacity of using different similarity functions for these associative memory models, beyond the dot product similarity measure, and demonstrate empirically that Euclidean or Manhattan distance similarity metrics perform substantially better in practice on many tasks, enabling a more robust retrieval and higher memory capacity than existing models.
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.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 8ef0ff1f-99e6-457a-8bde-b40bf7d27cc7Cited by top-tier papers26
- On Sparse Modern Hopfield ModelJerry Yao-Chieh Hu, Donglin Yang, Dennis Wu, Chenwei Xu et al.NeurIPS 2023 · 52 citations
- Uniform Memory Retrieval with Larger Capacity for Modern Hopfield ModelsDennis Wu, Jerry Yao-Chieh Hu, Teng-Yun Hsiao, Han LiuICML 2024 · 44 citations
- STanHop: Sparse Tandem Hopfield Model for Memory-Enhanced Time Series PredictionDennis Wu, Jerry Yao-Chieh Hu, Weijian Li, Bo-Yu Chen et al.ICLR 2024 · 39 citations
- Sequential Memory with Temporal Predictive CodingMufeng Tang, Helen Barron, Rafal BogaczNeurIPS 2023 · 30 citations
- Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformersYibo Jiang, Goutham Rajendran, Pradeep Ravikumar, Bryon AragamNeurIPS 2024 · 19 citations
Builds on10
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- MLP-Mixer: An all-MLP Architecture for VisionIlya O. Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer et al.NeurIPS 2021 · 3,862 citations
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
- Hopfield Networks is All You NeedHubert Ramsauer, Bernhard Schäfl, Johannes Lehner, Philipp Seidl et al.ICLR 2021 · 620 citations
- Large Associative Memory Problem in Neurobiology and Machine LearningDmitry Krotov, John J. HopfieldICLR 2021 · 202 citations
Related papers
- Relating Hopfield Networks to Episodic ControlHugo Chateau-Laurent, Frédéric AlexandreNeurIPS 2024 · 1 citation
- Simplicial Hopfield networksThomas F. Burns, Tomoki FukaiICLR 2023 · 1 citation
- Kernel Memory Networks: A Unifying Framework for Memory ModelingGeorgios Iatropoulos, Johanni Brea, Wulfram GerstnerNeurIPS 2022 · 15 citations
- Dynamical properties of dense associative memoryKazushi Mimura, Jun'ichi Takeuchi, Yuto Sumikawa, Yoshiyuki Kabashima et al.ICLR 2026 · 6 citations
- Nonparametric Modern Hopfield ModelsJerry Yao-Chieh Hu, Bo-Yu Chen, Dennis Wu, Feng Ruan et al.ICML 2025
