# 霍普菲尔德网络

霍普菲尔德网络是一种循环人工神经网络，由具有对称连接的二值阈值单元组成，它将模式存储为能量函数的吸引子，因此带有噪声或部分线索的输入会收敛到与之最相似的已存储模式。当时在加州理工学院（Caltech）的物理学家[约翰·J·霍普菲尔德](https://www.edgepedia.org/zh/john-j-hopfield)（John J. Hopfield）于1982年提出了这一模型，将其作为一种内容可寻址存储器——即通过内容而非地址来检索的记忆——并证明其集体特性包括纠错、分类和泛化。<sup>[1](https://authors.library.caltech.edu/records/w41x7-8bn13)</sup>

| 关键事实 | 详情 |
|---|---|
| 起源 | 由约翰·J·霍普菲尔德在1982年《美国国家科学院院刊》（PNAS）论文《具有涌现集体计算能力的神经网络和物理系统》中提出，作为内容可寻址存储器<sup>[1](https://authors.library.caltech.edu/records/w41x7-8bn13)</sup> |
| 架构 | 单层双态阈值单元，全连接且对称连接，无自连接；权重通过赫布规则存储<sup>[2](https://ntrs.nasa.gov/api/citations/19870017148/downloads/19870017148.pdf)</sup><sup> • </sup><sup>[3](https://www.psychology.mcmaster.ca/3w03/hopfield.html)</sup> |
| 动力学 | 异步更新最小化一个与伊辛自旋玻璃的能量函数等价的能量函数，保证收敛到稳定吸引子<sup>[2](https://ntrs.nasa.gov/api/citations/19870017148/downloads/19870017148.pdf)</sup><sup> • </sup><sup>[3](https://www.psychology.mcmaster.ca/3w03/hopfield.html)</sup> |
| 经典容量 | 在d维网络中约可存储0.138d个记忆；在更严格的零误差不动点定义下，容量按N/(4 log N)缩放<sup>[4](https://www.frontiersin.org/journals/big-data/articles/10.3389/fdata.2022.1044709/full)</sup><sup> • </sup><sup>[5](https://proceedings.nips.cc/paper_files/paper/2023/file/aa32ebcdd2ce1bed4ef7f456fc8fa5c1-Paper-Conference.pdf)</sup> |
| 现代推广 | 密集关联记忆（现代霍普菲尔德网络，克罗托夫与霍普菲尔德，2016）将容量提升至超线性，并在使用指数交互函数时达到指数级<sup>[4](https://www.frontiersin.org/journals/big-data/articles/10.3389/fdata.2022.1044709/full)</sup> |
| 与Transformer的联系 | 连续现代霍普菲尔德网络（拉姆绍尔等，2020）的更新规则等价于Transformer的注意力机制<sup>[6](https://arxiv.org/abs/2008.02217)</sup> |
| 荣誉 | 2024年诺贝尔物理学奖授予约翰·霍普菲尔德和杰弗里·辛顿，以表彰其使人工神经网络机器学习成为可能的基础性发现和发明<sup>[7](https://www.nobelprize.org/prizes/physics/2024/press-release/)</sup> |

## 经典网络的工作原理

经典模型是一个由高度互联的双态阈值单元组成的网络，每个状态为+1（发放）或−1（不发放），这种单元类型可追溯至麦卡洛克与皮茨（1943）。随机选择的二值模式通过赫布学习算法存储，其中同时活跃的神经元之间的连接得到增强；权重矩阵是已存储模式外积之和。<sup>[2](https://ntrs.nasa.gov/api/citations/19870017148/downloads/19870017148.pdf)</sup><sup> • </sup><sup>[5](https://proceedings.nips.cc/paper_files/paper/2023/file/aa32ebcdd2ce1bed4ef7f456fc8fa5c1-Paper-Conference.pdf)</sup>

**能量下降。** 对于单元间的对称连接，网络的动力学由一个与[伊辛模型](https://www.edgepedia.org/zh/ising-model)自旋玻璃的能量函数等价的能量函数支配。<sup>[2](https://ntrs.nasa.gov/api/citations/19870017148/downloads/19870017148.pdf)</sup>单元按随机顺序逐个更新（异步更新），遵循线性阈值规则：若单元的总加权输入至少为零，则将其状态设为1，否则设为−1。每次这样的更新都会降低能量或使其保持不变，因此网络保证收敛到稳定吸引子。<sup>[3](https://www.psychology.mcmaster.ca/3w03/hopfield.html)</sup>已存储的模式对应于该能量曲面的局部极小值，带有噪声或部分线索的输入沿曲面滑入最近的吸引子，从而重建已存储的模式。<sup>[8](https://staff.itee.uq.edu.au/janetw/cmc/chapters/Hopfield/)</sup>

**作为模式补全的检索。** 这些集体特性产生了一种内容可寻址存储器，能够从任何足够大小的子部分正确产出完整的记忆，该模型还表现出纠错、熟悉性识别、分类和时间序列保持。<sup>[1](https://authors.library.caltech.edu/records/w41x7-8bn13)</sup>在通用霍普菲尔德网络框架中，经典模型使用点积相似度函数和恒等分离函数，这是其存储容量相对较差的根源。<sup>[9](https://pmc.ncbi.nlm.nih.gov/articles/PMC7614148/)</sup>

1984年，霍普菲尔德将模型扩展到具有分级连续响应值的神经元，并证明原始双态模型的内容可寻址存储器和其他涌现集体特性延续到了分级响应版本中。<sup>[10](https://pmc.ncbi.nlm.nih.gov/articles/PMC345226/)</sup>

## 容量与局限

经典网络的存储容量较小：在d维空间中，它可以在检索退化之前存储约0.138d个记忆。<sup>[4](https://www.frontiersin.org/journals/big-data/articles/10.3389/fdata.2022.1044709/full)</sup>在容量的不动点定义下——即已存储的模式必须在动力学下保持稳定——对于N个神经元，零误差容量按N/(4 log N)缩放，这是一个陡峭的阈值。<sup>[5](https://proceedings.nips.cc/paper_files/paper/2023/file/aa32ebcdd2ce1bed4ef7f456fc8fa5c1-Paper-Conference.pdf)</sup>

**伪吸引子。** 可能出现不属于训练集的局部能量极小值；这些被称为伪吸引子，通常是两个或多个训练模式的混合，因此网络可能陷入对已存储约束满足不佳的状态。<sup>[3](https://www.psychology.mcmaster.ca/3w03/hopfield.html)</sup>在霍普菲尔德型模型中，网络状态与其他记忆之间的重叠——称为伪重叠——会在检索中引入噪声；近期工作表明，使用从神经生物学数据推断的学习规则，这些重叠可以通过稀疏化网络活动而悖论性地增加存储容量。<sup>[11](https://doi.org/10.1103/wjsd-xzlq)</sup>

其他已注意到的局限包括：标准模型无法成功存储模式的时间序列；对称连接作为大脑模型不切实际；模型在存储相关模式集方面存在局限。<sup>[2](https://ntrs.nasa.gov/api/citations/19870017148/downloads/19870017148.pdf)</sup>[吸引子网络](https://www.edgepedia.org/zh/attractor-network)也难以存储现实世界数据中典型的重叠非正交模式，这会导致串扰和伪记忆。<sup>[12](https://www.frontiersin.org/journals/neuroscience/articles/10.3389/fnins.2024.1439414/full)</sup>

[杰弗里·辛顿](https://www.edgepedia.org/zh/geoffrey-hinton)及其同事提出的[玻尔兹曼机](https://www.edgepedia.org/zh/boltzmann-machine)旨在克服这些局限：随机单元和模拟退火使其能够逃离局部能量极小值，带有隐藏特征的对比赫布学习克服了容量限制，尽管实际学习非常缓慢。<sup>[3](https://www.psychology.mcmaster.ca/3w03/hopfield.html)</sup>诺贝尔委员会新闻稿指出，辛顿以霍普菲尔德网络作为玻尔兹曼机的基础。<sup>[7](https://www.nobelprize.org/prizes/physics/2024/press-release/)</sup>

## 优化应用

由于网络的稳定状态是能量函数的极小值，它可用于优化：给定一个问题，设计一个霍普菲尔德网络，使其能量函数在与问题代价函数相同的点达到极小值，从而网络的稳定配置对应于解。<sup>[13](https://www.sciencedirect.com/science/article/pii/S092523120100337X)</sup>在霍普菲尔德与坦克（1985）引入求解旅行商问题的网络模型后，霍普菲尔德神经网络在优化的神经网络方法中占据主导地位，并已应用于一系列数学规划问题。<sup>[14](https://www.sciencedirect.com/science/article/pii/S0377221708009788)</sup>实际困难包括动力学与能量函数之间的不一致、离散化误差、局部极小值的存在，以及收敛性依赖于代价函数各项的加权系数。<sup>[13](https://www.sciencedirect.com/science/article/pii/S092523120100337X)</sup>

## 现代霍普菲尔德网络与Transformer

现代霍普菲尔德网络，也称为密集关联记忆，由克罗托夫和霍普菲尔德于2016年提出。他们修改了原始网络的能量函数和更新规则，加入更强的、高阶非线性[激活函数](https://www.edgepedia.org/zh/activation-function)，使存储容量随特征空间维度呈超线性增长；使用由德米尔吉吉尔等人在2017年引入的指数交互函数，容量变为指数级。<sup>[4](https://www.frontiersin.org/journals/big-data/articles/10.3389/fdata.2022.1044709/full)</sup>在这些网络中，存储记忆的数量可以与特征空间的维度解耦，并变得非常大。<sup>[15](https://openreview.net/pdf?id=MoS7YBzlIQ)</sup>离散状态现代霍普菲尔德网络保留了类似于经典模型的收敛保证。<sup>[16](https://www.mdpi.com/2504-2289/10/3/71)</sup>

**与注意力的等价性。** 拉姆绍尔等人（2020）将这些网络推广到连续状态，获得了一个现代霍普菲尔德网络，可存储指数级数量的模式，在单次更新中检索模式，且检索误差指数级小；其更新规则等价于Transformer中使用的注意力机制，这使得Transformer的注意力头可以被描述为执行关联检索。<sup>[6](https://arxiv.org/abs/2008.02217)</sup>连续回忆操作计算记忆向量与查询之间的点积相似度，并返回记忆的加权平均，这是一种最近邻计算形式。<sup>[17](https://www.nature.com/articles/s41467-024-46976-4)</sup>后续工作扩展了这一对应关系，例如以更广义的形式将源自现代霍普菲尔德网络的隐藏状态添加到自注意力中。<sup>[18](https://arxiv.org/abs/2511.20698)</sup>

现代霍普菲尔德网络也已应用于注意力之外的领域，包括图嵌入——其中可学习的记忆模式从上下文信息中检索目标节点<sup>[4](https://www.frontiersin.org/journals/big-data/articles/10.3389/fdata.2022.1044709/full)</sup>——以及序列学习研究，其中密集关联记忆以牺牲经典网络的一些生物学合理特征为代价，提供了更大的容量和原型学习能力。<sup>[19](https://arxiv.org/abs/2409.15729)</sup>

## 认可与影响

2024年[诺贝尔物理学奖](https://www.edgepedia.org/zh/nobel-prize-in-physics)联合授予约翰·霍普菲尔德和杰弗里·辛顿，“以表彰其使人工神经网络机器学习成为可能的基础性发现和发明”。委员会指出，霍普菲尔德构建了一种关联记忆，能够在数据中存储和检索图像及其他类型的模式，获奖者借鉴统计物理学的核心思想来构建人工神经网络，使其充当关联记忆并在大量数据集中检测模式。<sup>[7](https://www.nobelprize.org/prizes/physics/2024/press-release/)</sup><sup> • </sup><sup>[20](https://www.lemonde.fr/en/science/article/2024/10/08/nobel-prize-in-physics-awarded-to-two-scientists-for-work-on-machine-learning_6728610_10.html)</sup>霍普菲尔德1982年的工作为辛顿的研究奠定了基础，霍普菲尔德对美联社表示：“我仍然对它产生的影响感到惊讶。”<sup>[21](https://apnews.com/article/fc0567de3f2ca45f81a7359a017cd542)</sup>霍普菲尔德网络作为生物记忆功能的模型在计算神经科学中也产生了重大影响，原始网络的后续推广以“现代霍普菲尔德网络”的名义发展，允许神经元之间更复杂的连接。<sup>[22](https://www.lemonde.fr/en/pixels/article/2024/10/09/nobel-prize-in-physics-celebrates-pioneers-of-artificial-intelligence_6728686_13.html)</sup><sup> • </sup><sup>[23](https://pmc.ncbi.nlm.nih.gov/articles/PMC12447707/)</sup>

## References

1. [J. J. Hopfield (1982). Neural networks and physical systems with emergent collective computational abilities. PNAS 79(8):2554–2558. CaltechAUTHORS record.](https://authors.library.caltech.edu/records/w41x7-8bn13)
2. [Keeler (1987). Comparison between Hopfield model and Sparse Distributed Memory. NASA NTRS.](https://ntrs.nasa.gov/api/citations/19870017148/downloads/19870017148.pdf)
3. [PSYCH3W03/NEURCOMP3W03: Hopfield networks and Boltzmann machines, McMaster University course notes.](https://www.psychology.mcmaster.ca/3w03/hopfield.html)
4. [Modern Hopfield Networks for graph embedding. Frontiers in Big Data (2022).](https://www.frontiersin.org/journals/big-data/articles/10.3389/fdata.2022.1044709/full)
5. [A Review of Modern Hopfield Networks (appendix on classical Hopfield capacity). NeurIPS 2023.](https://proceedings.nips.cc/paper_files/paper/2023/file/aa32ebcdd2ce1bed4ef7f456fc8fa5c1-Paper-Conference.pdf)
6. [Ramsauer et al. (2020). Hopfield Networks is All You Need. arXiv:2008.02217.](https://arxiv.org/abs/2008.02217)
7. [Press release: The Nobel Prize in Physics 2024, NobelPrize.org.](https://www.nobelprize.org/prizes/physics/2024/press-release/)
8. [The Hopfield Network: Descent on an Energy Surface, University of Queensland.](https://staff.itee.uq.edu.au/janetw/cmc/chapters/Hopfield/)
9. [Millidge, Salvatori, et al. Universal Hopfield Networks: A General Framework for Single-Shot Associative Memory Models. PMC.](https://pmc.ncbi.nlm.nih.gov/articles/PMC7614148/)
10. [J. J. Hopfield (1984). Neurons with graded response have collective computational properties like those of two-state neurons. PNAS 81(10):3088–3092.](https://pmc.ncbi.nlm.nih.gov/articles/PMC345226/)
11. [Paradoxical Increase of Capacity due to Spurious Overlaps in Attractor Networks. Physical Review Letters.](https://doi.org/10.1103/wjsd-xzlq)
12. [Spiking representation learning for associative memories. Frontiers in Neuroscience (2024).](https://www.frontiersin.org/journals/neuroscience/articles/10.3389/fnins.2024.1439414/full)
13. [Hopfield neural networks for optimization: study of the different dynamics. Neurocomputing.](https://www.sciencedirect.com/science/article/pii/S092523120100337X)
14. [A review of Hopfield neural networks for solving mathematical programming problems. European Journal of Operational Research.](https://www.sciencedirect.com/science/article/pii/S0377221708009788)
15. [Dense Associative Memory / Modern Hopfield Network generalization, OpenReview.](https://openreview.net/pdf?id=MoS7YBzlIQ)
16. [A Convergent Method for Energy Optimization in Modern Hopfield Networks. MDPI (2025).](https://www.mdpi.com/2504-2289/10/3/71)
17. [A sparse quantized Hopfield network for online-continual memory. Nature Communications (2024).](https://www.nature.com/articles/s41467-024-46976-4)
18. [On the Role of Hidden States of Modern Hopfield Network in Transformer. arXiv:2511.20698.](https://arxiv.org/abs/2511.20698)
19. [McAlister, Robins, Szymanski (2024). Sequential Learning in the Dense Associative Memory. arXiv:2409.15729.](https://arxiv.org/abs/2409.15729)
20. [Nobel Prize in physics awarded to two scientists for work on machine learning. Le Monde (2024).](https://www.lemonde.fr/en/science/article/2024/10/08/nobel-prize-in-physics-awarded-to-two-scientists-for-work-on-machine-learning_6728610_10.html)
21. [Pioneers in artificial intelligence win the Nobel Prize in physics. AP News (2024).](https://apnews.com/article/fc0567de3f2ca45f81a7359a017cd542)
22. [Nobel Prize in Physics celebrates pioneers of artificial intelligence. Le Monde (2024).](https://www.lemonde.fr/en/pixels/article/2024/10/09/nobel-prize-in-physics-celebrates-pioneers-of-artificial-intelligence_6728686_13.html)
23. [pmc.ncbi.nlm.nih.gov](https://pmc.ncbi.nlm.nih.gov/articles/PMC12447707/)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026; Oct 21, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Machine learning and neural computation › Neural networks and deep learning › Neural network architectures › Associative memory and Hopfield architectures

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/hopfield-network

English original: https://www.edgepedia.org/hopfield-network
