atlas

Research map / Architectures and efficiency / Attention and transformers

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

NeurIPS 2025 · Architectures and efficiency › Attention and transformers · approach: Attention head and block redesign · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Derives modern Hopfield attention (MHA), a Transformer self-attention variant that carries a hidden state of attention scores across layers via an exponential moving average, and shows it improves ViT and GPT-2 accuracy/perplexity and mitigates rank collapse without extra parameters.

Problem

Relating modern Hopfield networks to Transformers beyond the adiabatic approximation, and using the resulting hidden-state dynamics to improve Transformer attention, including the rank collapse / token uniformity problem in deep Transformers.

Approach

Keeping the hidden-state dynamics of the modern continuous Hopfield network (instead of the adiabatic limit) yields a new attention layer in which attention logits are an exponential moving average of query-key scores across layers, plus a skip-like term weighted by alpha; this adds no parameters and mitigates rank collapse even without skip connections.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace self-attention with MHA (α=0.5)GPT-2 Small (124M) · WikiText103perplexity: 22.87 -> 20.70Helped
Replace self-attention with MHA (α=0.5)GPT-2 Medium (350M) · WikiText103perplexity: 20.85 -> 19.61Helped
Replace self-attention with MHA (α=0.5)LLaMA · WikiText-103, DailyMail, BookCorpusperplexity: 14.49 -> 14.29; 19.36 -> 18.97; 23.76 -> 23.50Helped
Replace self-attention with MHAViT-Tiny, ViT-Small, ViT-Base, and ViT-Large · CIFAR10accuracy: 93.265 -> 93.015; 93.265 -> 93.775; 95.450 -> 95.335; 95.450 -> 95.440; 96.190 -> 96.175; 96.190 -> 96.490; 96.310 -> 96Mixed
Replace self-attention with MHAViT-Tiny, ViT-Small, ViT-Base, and ViT-Large · CIFAR100accuracy: 73.080 -> 72.030; 73.080 -> 72.570; 74.485 -> 75.420; 74.485 -> 75.590; 75.360 -> 76.215; 75.360 -> 75.590; 72.910 -> 75Mixed
Replace self-attention with MHAViT-B (86M) · ImageNet-1kvalidation accuracy: 76.074 -> 76.434; 76.074 -> 77.058Helped
Set α to 1 while fixing α'=0.5 (ablation)ViT-T MHA · CIFAR100score: 72.13 -> 1.00Hurt
Set α to 0 while fixing α'=0.5 (ablation)ViT-T MHA · CIFAR100score: 72.13 -> 69.89Hurt
Set α' to 0 while fixing α=0.5 (ablation)ViT-T MHA · CIFAR100score: 72.13 -> 71.16Hurt
Vary α' while fixing α=0.5 (ablation)ViT-T MHA · CIFAR100score: 71.16; 71.13; 72.29; 70.77; 72.12; 72.13; 72.06; 72.02; 71.98; 70.72; 66.10Mixed
Vary α while fixing α'=0.5 (ablation)ViT-T MHA · CIFAR100score: 69.89; 71.20; 71.26; 71.64; 72.02; 72.13; 72.66; 70.52; 70.46; 67.70; 1.00Mixed
Increase depth beyond 4 layers in a self-attention network (ablation)Skip-free ViT-T · CIFAR10 and CIFAR100accuracy: CIFAR10: 57.38 -> 48.59 -> 10.00; CIFAR100: 32.25 -> 17.19 -> 1.00Hurt

Surprising findings

Limitations

Experimental setup

Datasets: WikiText-103 CNN DailyMail BookCorpus CIFAR10 CIFAR100 ImageNet-1k Oxford Flowers 102 Food-101 Stanford Dogs Stanford Cars

Benchmarks: WikiText-103 perplexity CNN DailyMail perplexity BookCorpus perplexity CIFAR10 CIFAR100 ImageNet-1k Oxford Flowers 102 Food-101 Stanford Dogs Stanford Cars

Metrics: perplexity classification accuracy cosine similarity distribution normalized residual norm

Baselines: self-attention ViT self-attention GPT-2 self-attention LLaMA

Builds on: modern Hopfield networks Dense Associative Memory self-attention (Vaswani et al.) rank collapse theory (Dong et al.)

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy