Lune

NeurIPS2025顶会

On the Role of Hidden States of Modern Hopfield Network in Transformer

Tsubasa Masumura, Masato Taki

摘要

Associative memory models based on Hopfield networks and self-attention based on key-value mechanisms have been popular approaches in the study of memory mechanisms in deep learning. It has been pointed out that the state update rule of the modern Hopfield network (MHN) in the adiabatic approximation is in agreement with the self-attention layer of Transformer. In this paper, we go beyond this approximation and investigate the relationship between MHN and self-attention. Our results show that the correspondence between Hopfield networks and Transformers can be established in a more generalized form by adding a new variable, the hidden state derived from the MHN, to self-attention. This new attention mechanism, modern Hopfield attention (MHA), allows the inheritance of attention scores from the input layer of the Transformer to the output layer, which greatly improves the nature of attention weights. In particular, we show both theoretically and empirically that MHA hidden states significantly improve serious problem of deep Transformers known as rank collapse and token uniformity. We also confirm that MHA can systematically improve accuracy without adding training parameters to the Vision Transformer or GPT. Our results provide a new case in which Hopfield networks can be a useful perspective for improving the Transformer architecture.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • CutMix: Regularization Strategy to Train Strong Classifiers With Localizable Features 引用了 Random Erasing Data Augmentation
  • RandAugment: Practical Automated Data Augmentation with a Reduced Search Space 引用了 Random Erasing Data Augmentation
  • How Do Vision Transformers Work? 引用了 CutMix: Regularization Strategy to Train Strong Classifiers With Localizable Features
  • How Do Vision Transformers Work? 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • How Do Vision Transformers Work? 引用了 RandAugment: Practical Automated Data Augmentation with a Reduced Search Space
  • How Do Vision Transformers Work? 引用了 Random Erasing Data Augmentation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper28

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  2. CutMix: Regularization Strategy to Train Strong Classifiers With Localizable FeaturesSangdoo Yun, Dongyoon Han, Sanghyuk Chun, Seong Joon Oh 等ICCV 2019 · 5,843 次引用
  3. RandAugment: Practical Automated Data Augmentation with a Reduced Search SpaceEkin Dogus Cubuk, Barret Zoph, Jonathon Shlens, Quoc LeNeurIPS 2020 · 4,453 次引用
  4. Random Erasing Data AugmentationZhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li 等AAAI 2020 · 4,134 次引用
  5. How Do Vision Transformers Work?Namuk Park, Songkuk KimICLR 2022 · 653 次引用

相关 Paper

  1. Hopfield Networks is All You NeedHubert Ramsauer, Bernhard Schäfl, Johannes Lehner, Philipp Seidl 等ICLR 2021 · 620 次引用
  2. On the Role of Attention Masks and LayerNorm in TransformersXinyi Wu, Amir Ajorlou, Yifei Wang, Stefanie Jegelka 等NeurIPS 2024 · 54 次引用
  3. Attention as Implicit Structural InferenceRyan Singh, Christopher L. BuckleyNeurIPS 2023 · 12 次引用
  4. In-Context Denoising with One-Layer Transformers: Connections between Attention and Associative Memory RetrievalMatthew Smart, Alberto Bietti, Anirvan M. SenguptaICML 2025
  5. Outlier-Efficient Hopfield Layers for Large Transformer-Based ModelsJerry Yao-Chieh Hu, Pei-Hsuan Chang, Haozheng Luo, Hong-Yu Chen 等ICML 2024 · 46 次引用
黄昏的海面,两侧是细线勾勒的悬崖