Universal Hopfield Networks: A General Framework for Single-Shot Associative Memory Models
Open accessAbstract
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 possesses 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 et al (2020) to express general associative memory models using neural network dynamics with only second-order interactions between neurons, 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.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
The three components of the generalized Hopfield network not only generalize existing models but also extend their functional capabilities.
“This paper demonstrates that these three components not only generalize existing models but also extend their functional capabilities.”
From The AI Hippocampus: How Far are We From Human Memory? (2026) · cites this paper as Millidge et al. (2022)
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
Neural networks and physical systems with emergent collective computational abilities.
Hopfield, J. J. (1982) · Proceedings of the National Academy of Sciences · doi:10.1073/pnas.79.8.2554 · Cited by 19,270 · see citing works
Hopfield, J. J. (1984) · Proceedings of the National Academy of Sciences · doi:10.1073/pnas.81.10.3088 · Cited by 6,918 · see citing works
Yuille, A. L., & Rangarajan, A. (2003) · Neural Computation · doi:10.1162/08997660360581958 · Cited by 1,151 · see citing works
The mechanisms for pattern completion and pattern separation in the hippocampus
Rolls, E. T. (2013) · Frontiers in Systems Neuroscience · doi:10.3389/fnsys.2013.00074 · Cited by 545 · see citing works
Number of stable points for spin-glasses and neural networks of higher orders
Baldi, P., & Venkatesh, S. S. (1987) · Physical Review Letters · doi:10.1103/physrevlett.58.913 · Cited by 120 · see citing works
Overparameterized neural networks implement associative memory
Radhakrishnan, A., Belkin, M., & Uhler, C. (2020) · Proceedings of the National Academy of Sciences · doi:10.1073/pnas.2005013117 · Cited by 57 · see citing works
Rapid encoding of musical tones discovered in whole-brain connectivity
Bonetti, L., Brattico, E., Carlomagno, F., Donati, G., Cabral, J., Haumann, N. T., Deco, G., Vuust, P., & Kringelbach, M. L. (2021) · NeuroImage · doi:10.1016/j.neuroimage.2021.118735 · Cited by 46 · see citing works
Storage capacity of generalized networks
Abbott, L. F., & Arian, Y. (1987) · Physical Review A · doi:10.1103/physreva.36.5091 · Cited by 45 · see citing works
Associative Memories via Predictive Coding
Salvatori, T., Song, Y., Hong, Y., Frieder, S., Sha, L., Xu, Z., Bogacz, R., & Lukasiewicz, T. (2021) · arXiv · doi:10.48550/arxiv.2109.08063 · Cited by 33 · see citing works
Self-citationThe asymptotic memory capacity of the generalized Hopfield network
Ma, J. (1999) · Neural Networks · doi:10.1016/s0893-6080(99)00042-8 · Cited by 14 · see citing works
Flagged first, then by citations
Research works printed but not linked: 35
- Abu-Mostafa, Y., & Jacques, J. S. (1985). Information capacity of the Hopfield model. IEEE Transactions on Information Theory , 31 (4), 461-464.
- Bahdanau, D., Cho, K., & Bengio, Y. (2014). Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473 . · arXiv
- Bricken, T., & Pehlevan, C. (2021). Attention approximates sparse distributed memory. arXiv preprint arXiv:2111.05498 . · arXiv
- Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., . . . others (2020). Language models are few-shot learners. arXiv preprint arXiv:2005.14165 . · arXiv
- Caputo, B., & Niemann, H. (2002). Storage capacity of kernel associative memories. In International conference on artificial neural networks (pp. 51-56).
- Chen, H., Lee, Y., Sun, G., Lee, H., Maxwell, T., & Giles, C. L. (1986). High order correlation model for associative memory. In Aip conference proceedings (Vol. 151, pp. 86-99).
- Demircigil, M., Heusel, J., L¨ owe, M., Upgang, S., & Vermet, F. (2017). On a model of associative memory with huge storage capacity. Journal of Statistical Physics , 168 (2), 288-299.
- Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2018). BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805 . · arXiv
- Geva, M., Schuster, R., Berant, J., & Levy, O. (2020). Transformer feed-forward layers are key-value memories. arXiv preprint arXiv:2012.14913 . · arXiv
- Gupta, A., Dar, G., Goodman, S., Ciprut, D., & Berant, J. (2021). Memory-efficient transformers via topk attention. arXiv preprint arXiv:2106.06899 . · arXiv
- Hinton, G. E., & Anderson, J. A. (2014). Parallel models of associative memory: Updated edition . Psychology Press.
- Horn, D., & Usher, M. (1988). Capacities of multiconnected memory models. Journal de Physique , 49 (3), 389-395.
- Jiang, Y., & Pehlevan, C. (2020). Associative memory in iterated overparameterized sigmoid autoencoders. In International conference on machine learning (pp. 4828-4838).
- Kanerva, P. (1988). Sparse distributed memory . MIT Press.
- Kanerva, P. (1992). Sparse distributed memory and related models (Vol. 92). NASA Ames Research Center, Research Institute for Advanced Computer Science.
- Kaya, M., & Bilge, H. S ¸ . (2019). Deep metric learning: A survey. Symmetry , 11 (9), 1066.
- Keeler, J. D. (1988). Comparison between Kanerva's SDM and Hopfield-type neural networks. Cognitive Science , 12 (3), 299-329.
- Kirkpatrick, S., & Sherrington, D. (1978). Infinite-ranged models of spin-glasses. Physical Review B , 17 (11), 4384.
- Kitaev, N., Kaiser, Ł., & Levskaya, A. (2020). Reformer: The efficient transformer. arXiv preprint arXiv:2001.04451 . · arXiv
- Krotov, D. (2021). Hierarchical associative memory. arXiv preprint arXiv:2107.06446 . · arXiv
- Krotov, D., & Hopfield, J. (2020). Large associative memory problem in neurobiology and machine learning. arXiv preprint arXiv:2008.06996 . · arXiv
- Krotov, D., & Hopfield, J. J. (2016). Dense associative memory for pattern recognition. Advances in Neural Information Processing Systems , 29 , 1172-1180.
- Kulis, B., et al. (2013). Metric learning: A survey. Foundations and Trends® in Machine Learning , 5 (4), 287-364.
- Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., Sutskever, I., et al. (2019). Language models are unsupervised multitask learners. OpenAI Blog , 1 (8), 9.
- Radhakrishnan, A., Yang, K., Belkin, M., & Uhler, C. (2018). Memorization in overparameterized autoencoders. arXiv preprint arXiv:1810.10333 . · arXiv
- Ramsauer, H., Sch¨ afl, B., Lehner, J., Seidl, P., Widrich, M., Adler, T., . . . others (2020). Hopfield networks is all you need. arXiv preprint arXiv:2008.02217 . · arXiv
- Sukhbaatar, S., Grave, E., Lample, G., Jegou, H., & Joulin, A. (2019). Augmenting self-attention with persistent memory. arXiv preprint arXiv:1907.01470 . · arXiv
- Tang, F., & Kopp, M. (2021). A remark on a paper of Krotov and Hopfield [arxiv: 2008.06996]. arXiv preprint arXiv:2105.15034 . · arXiv
- Tay, Y., Dehghani, M., Bahri, D., & Metzler, D. (2020). Efficient transformers: A survey. arXiv preprint arXiv:2009.06732 . · arXiv
- Tolstikhin, I., Houlsby, N., Kolesnikov, A., Beyer, L., Zhai, X., Unterthiner, T., . . . others (2021). MLP-mixer: An all-MLP architecture for vision. In Thirty-fifth conference on neural information processing systems.
- Tsodyks, M., & Sejnowski, T. (1995). Associative memory and hippocampal place cells. International Journal of Neural Systems , 6 , 81-86.
- Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., . . . Polosukhin, I. (2017). Attention is all you need. In Advances in neural information processing systems (pp. 5998-6008).
- Wang, S., Li, B. Z., Khabsa, M., Fang, H., & Ma, H. (2020). Linformer: Self-attention with linear complexity. arXiv preprint arXiv:2006.04768 . · arXiv
- Wu, Y., Hu, J., Wu, W., Zhou, Y., & Du, K. (2012). Storage capacity of the Hopfield network associative memory. In 2012 5th international conference on intelligent computation technology and automation (pp. 330-336).
- Yang, L. (2007). An overview of distance metric learning. In Proceedings of the computer vision and pattern recognition conference.
Cited by
Sorted by citations
A generative model of memory construction and consolidation
Spens, E., & Burgess, N. (2024) · Nature Human Behaviour · doi:10.1038/s41562-023-01799-z · Cited by 101 · see citing works
An attractor-controllable memristive Hopfield neural network and its application on voice encryption
Li, Z., Jin, J., Zhang, D., & Chen, C. (2025) · Integration · doi:10.1016/j.vlsi.2025.102500 · Cited by 70 · see citing works
Recurrent predictive coding models for associative memory employing covariance learning
Tang, M., Salvatori, T., Millidge, B., Song, Y., Lukasiewicz, T., & Bogacz, R. (2023) · PLoS Computational Biology · doi:10.1371/journal.pcbi.1010719 · Cited by 31 · see citing works
Self-citationGershman, S. J., Fiete, I., & Irie, K. (2025) · Neuron · doi:10.1016/j.neuron.2025.02.029 · Cited by 27 · see citing works
Anatomically accurate cardiac segmentation using Dense Associative Networks
Ullah, Z., & Kim, J. (2025) · Engineering Applications of Artificial Intelligence · doi:10.1016/j.engappai.2025.112742 · Cited by 15 · see citing works
A sparse quantized hopfield network for online-continual memory
Alonso, N., & Krichmar, J. L. (2024) · Nature Communications · doi:10.1038/s41467-024-46976-4 · Cited by 15 · see citing works
Competitive learning to generate sparse representations for associative memory
Sa-Couto, L., & Wichert, A. (2023) · Neural Networks · doi:10.1016/j.neunet.2023.09.005 · Cited by 12 · see citing works
Sequential Memory with Temporal Predictive Coding
Tang, M., Barron, H. C., & Bogacz, R. (2023) · PubMed · doi:10.48550/arxiv.2305.11982 · Cited by 10 · see citing works
Self-citationHigh-order rotor Hopfield neural networks for associative memory
Chen, B., & Zhang, H. (2024) · Neurocomputing · doi:10.1016/j.neucom.2024.128893 · Cited by 11 · see citing works
Zhou, X., Menassa, C. C., & Kamat, V. R. (2025) · Expert Systems with Applications · doi:10.1016/j.eswa.2025.128470 · Cited by 5 · see citing works
Binary associative memory networks: A review of mathematical framework and capacity analysis
Bao, H., & Zhao, Z. (2024) · Information Sciences · doi:10.1016/j.ins.2024.121697 · Cited by 4 · see citing works
Predictive coding model can detect novelty on different levels of representation hierarchyPreprint
Li, T. E., Tang, M., & Bogacz, R. (2024) · bioRxiv · doi:10.1101/2024.06.10.597876 · Cited by 4 · see citing works
Self-citationHippocampo-neocortical interaction as compressive retrieval-augmented generation
Spens, E., & Burgess, N. (2026) · Nature Communications · doi:10.1038/s41467-026-74357-6 · Cited by 5 · see citing works
dos Santos, A. S., & Valle, M. E. (2023) · AppliedMath · doi:10.3390/appliedmath3040050 · Cited by 2 · see citing works
Associative Memories in the Feature Space
Salvatori, T., Millidge, B., Song, Y., Bogcaz, R., & Lukasiewicz, T. (2023) · Frontiers in artificial intelligence and applications · doi:10.3233/faia230500 · Cited by 1 · see citing works
Self-citationBounded Rational Decision Networks With Belief Propagation
Schmid, G., Gottwald, S., & Braun, D. A. (2024) · Neural Computation · doi:10.1162/neco_a_01719 · Cited by 1 · see citing works
Hashimoto, T., Isokawa, T., Kobayashi, M., & Kamiura, N. (2024) · Nonlinear Theory and Its Applications IEICE · doi:10.1587/nolta.16.197 · Cited by 1 · see citing works
The AI Hippocampus: How Far are We From Human Memory?
Jia, Z., Li, J., Kang, Y., Wang, Y., Wu, T., Wang, Q., Wang, X., Zhang, S., Shen, J., Li, Q., et al. (2026) · arXiv · doi:10.48550/arxiv.2601.09113
Relative Representations for Cognitive Graphs
Kiefer, A. B., & Buckley, C. L. (2023) · Communications in computer and information science · doi:10.1007/978-3-031-47958-8_14
On robust learning of memory attractors with noisy deep associative memory networks
Rao, X., Zhao, B., & Liu, D. (2025) · Neural Networks · doi:10.1016/j.neunet.2025.107474
- Authors
- Millidge, B., Salvatori, T., Song, Y., Lukasiewicz, T., & Bogacz, R.
- Affiliations
- University of Oxford (GB)
- TU Wien (AT)
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2022
- Volume
- 162
- Pages
- 15561-15583
- arXiv
- 2202.04557
- PMC
- PMC7614148
- OpenAlex
- W4319460387
- Cited by
- 19
- References
- 10
- Citations by year
- 2026: 1 · 2025: 5 · 2024: 7 · 2023: 6
- FWCI
- 1.48
- Type
- journal article
- Language
- en
- Open access
- green
- www.ncbi.nlm.nih.gov
- Locations
- PubMed (publishedVersion)
- PubMed Central (acceptedVersion)
- arXiv (Cornell University) (submittedVersion)
- arXiv (Cornell University)
- Funders
- AXA Research Fund
- China Scholarship Council (EP/N510129/1)
- Medical Research Council (EP/N510129/1)
- Engineering and Physical Sciences Research Council (N510129, EP/N510129/, EP/N510129/1, EP/R013667/1)
- Biotechnology and Biological Sciences Research Council (BB/S006338/1)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Neural Networks and Applications
- Life Sciences › Neuroscience › Cognitive Neuroscience › Memory and Neural Mechanisms
- Life Sciences › Neuroscience › Cognitive Neuroscience › Memory Processes and Influences
- Keywords
- Hopfield neural network, associative memory, similarity measures, Lyapunov function, energy function, memory capacity, Euclidean distance similarity
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review