paper-with-me

홈 › Papers

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

2025-11-24 · Tsubasa Masumura, Masato Taki arxiv

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.

📄 PDF Abstract BibTeX arXiv:2511.20698

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Hopfield Networks is All You Need

2020-07-16 · ICLR 2021 1 · Hubert Ramsauer, Bernhard Schäfl, Johannes Lehner, Philipp Seidl 외

We introduce a modern Hopfield network with continuous states and a corresponding update rule. The new Hopfield network can store exponentially (with the dimension of the associative space) many patterns, retrieves the p…

AllDrug DesignImmune Repertoire ClassificationMultiple Instance Learning+1

Nonparametric Modern Hopfield Models

2024-04-05 · Jerry Yao-Chieh Hu, Bo-Yu Chen, Dennis Wu, Feng Ruan 외

We present a nonparametric construction for deep learning compatible modern Hopfield models and utilize this framework to debut an efficient variant. Our key contribution stems from interpreting the memory storage and re…

On the Expressive Power of Modern Hopfield Networks

2024-12-07 · Xiaoyu Li, Yuanpeng Li, YIngyu Liang, Zhenmei Shi 외

Modern Hopfield networks (MHNs) have emerged as powerful tools in deep learning, capable of replacing components such as pooling layers, LSTMs, and attention mechanisms. Recent advancements have enhanced their storage ca…

Simplicial Hopfield networks

2023-05-09 · Thomas F Burns, Tomoki Fukai

Hopfield networks are artificial neural networks which store memory patterns on the states of their neurons by choosing recurrent connection weights and update rules such that the energy landscape of the network forms at…

Contrastive Abstraction for Reinforcement Learning

2024-10-01 · Vihang Patil, Markus Hofmarcher, Elisabeth Rumetshofer, Sepp Hochreiter

Learning agents with reinforcement learning is difficult when dealing with long trajectories that involve a large number of states. To address these learning problems effectively, the number of states can be reduced by a…

Contrastive LearningDeep Reinforcement Learningreinforcement-learningReinforcement Learning+1