Papers › Outlier-Efficient Hopfield Layers for Large Transformer-Based Models

Outlier-Efficient Hopfield Layers for Large Transformer-Based Models

4 Apr 2024arXiv:2404.03828archive 2025-07-28

Jerry Yao-Chieh Hu, Pei-Hsuan Chang, Robin Luo, Hong-Yu Chen, Weijian Li, Wei-Po Wang, Han Liu

We introduce an Outlier-Efficient Modern Hopfield Model (termed OutEffHop) and use it to address the outlier inefficiency problem of {training} gigantic transformer-based models. Our main contribution is a novel associative memory model facilitating \textit{outlier-efficient} associative memory retrievals. Interestingly, this memory model manifests a model-based interpretation of an outlier-efficient attention mechanism (Softmax₁): it is an approximation of the memory retrieval process of OutEffHop. Methodologically, this allows us to introduce novel outlier-efficient Hopfield layers as powerful alternatives to traditional attention mechanisms, with superior post-quantization performance. Theoretically, the Outlier-Efficient Modern Hopfield Model retains and improves the desirable properties of standard modern Hopfield models, including fixed point convergence and exponential storage capacity. Empirically, we demonstrate the efficacy of the proposed model across large-scale transformer-based and Hopfield-based models (including BERT, OPT, ViT, and STanHop-Net), benchmarking against state-of-the-art methods like Clipped_Softmax and Gated_Attention. Notably, OutEffHop achieves an average reduction of 22+\% in average kurtosis and 26+\% in the maximum infinity norm of model outputs across four models. Code is available at \href{https://github.com/MAGICS-LAB/OutEffHop}{GitHub}; models are on \href{https://huggingface.co/collections/magicslabnu/outeffhop-6610fcede8d2cda23009a98f}{Hugging Face Hub}; future updates are on \href{https://arxiv.org/abs/2404.03828}{arXiv}.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2404.03828")

Code

Syntology Ran 10 of 13 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 5 ran · our draft was wrong; 5 ran with no contract checked.

By repository: official repository: 13 samples from 1 repository, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

magics-lab/outeffhop officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 10 ran; 0 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

5ran · our draft was wrong
5ran
3unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from magics-lab/outeffhop. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

AlphaChooser magics-lab/outeffhop/STanHop_time_seeries/cross_models/hopfield.py official repository ran MIT (permissive) · e7b18cd260d16db1 · report
ClipSoftmax magics-lab/outeffhop/STanHop_time_seeries/cross_models/hopfield.py official repository ran fingerprinted MIT (permissive) · 4f7463a0aff83e2a · report
EntmaxAlpha magics-lab/outeffhop/STanHop_time_seeries/cross_models/hopfield.py official repository ran fingerprinted MIT (permissive) · 9d1fce5d64cdaaf3 · report
EntmaxBisectFunction magics-lab/outeffhop/STanHop_time_seeries/cross_models/hopfield.py official repository ran MIT (permissive) · d6305b9e14fc507d · report
Softmax_1 magics-lab/outeffhop/STanHop_time_seeries/cross_models/hopfield.py official repository ran fingerprinted MIT (permissive) · aba43948313580df · report
clipped_softmax magics-lab/outeffhop/STanHop_time_seeries/cross_models/hopfield.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 1e2438ad229df84b · report
clipped_softmax_1 magics-lab/outeffhop/STanHop_time_seeries/cross_models/hopfield.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · e9e2c444e97f90ba · report
entmax_bisect magics-lab/outeffhop/STanHop_time_seeries/cross_models/hopfield.py official repository ran · our draft was wrong MIT (permissive) · 2d3be2464ee960b7 · report
softmax_1 magics-lab/outeffhop/STanHop_time_seeries/cross_models/hopfield.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 580329f21ac41e9e · report
softmax_n_shifted_zeros magics-lab/outeffhop/STanHop_time_seeries/cross_models/hopfield.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 9bbad4b677349ef5 · report
Association magics-lab/outeffhop/STanHop_time_seeries/cross_models/hopfield.py official repository unverified MIT (permissive) · 1b3b7daf7cbbd041 · report
ClipSoftmax_1 magics-lab/outeffhop/STanHop_time_seeries/cross_models/hopfield.py official repository unverified MIT (permissive) · cc3dee79e09eb57e · report
Hopfield magics-lab/outeffhop/STanHop_time_seeries/cross_models/hopfield.py official repository unverified MIT (permissive) · 0e0d879508ab2c99 · report

Tasks

BenchmarkingQuantizationRetrieval

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Benchmarking Wiki-40B OutEffHop-Bert_base Perplexity 6.209 #1 of 1 Archive leaderboard report
Quantization Wiki-40B OutEffHop-Bert_base Perplexity 6.295 #1 of 1 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

AdamAttentionAttention DropoutBERTDense ConnectionsDropoutLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionOPTResidual ConnectionSoftmaxWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections