Hopfield Network

最初的 Hopfield Network 的能量函数长成这样

其中 是询问

这个函数正是 Ising Model 中的自旋自由能

[1] 中提出使用其新定义的能量函数的现代连续 Hopfield Network 的更新方式与 Attention 是等价的

而它定义的新能量函数正是一个基于自旋系统的能量函数

[2] 中也解释了除了 Attention 本身之外, Trasnsformer 自身结构如何对应于自旋系统


参考:

  1. HOPFIELD NETWORKS IS ALL YOU NEED

  2. Transformers Are Secretly Collectives of Spin Systems

  3. Neural networks and physical systems with emergent collective computational abilities

  4. An Energy-Based Perspective on Attention Mechanisms in Transformers