Provably Optimal Memory Capacity for Modern Hopfield Models: Transformer-Compatible Dense Associative Memories as Spherical Codes
Not on the map. Why?
Abstract (arXiv)
We study the optimal memorization capacity of modern Hopfield models and Kernelized Hopfield Models (KHMs), a transformer-compatible class of Dense Associative Memories. We present a tight analysis by establishing a connection between the memory configuration of KHMs and spherical codes from information theory. Specifically, we treat the stored memory set as a specialized spherical code. This enables us to cast the memorization problem in KHMs into a point arrangement problem on a hypersphere. We show that the optimal capacity of KHMs occurs when the feature space allows memories to form an optimal spherical code. This unique perspective leads to: (i) An analysis of how KHMs achieve optimal memory capacity, and identify corresponding necessary conditions. Importantly, we establish an upper capacity bound that matches the well-known exponential lower bound in the literature. This provides the first tight and optimal asymptotic memory capacity for modern Hopfield models. (ii) A sub-linear time algorithm mathttU-mathttHop+ to reach KHMs' optimal capacity. (iii) An analysis of the scaling behavior of the required feature dimension relative to the number of stored memories. These efforts improve both the retrieval capability of KHMs and the representation learning of corresponding transformers. Experimentally, we provide thorough numerical results to back up theoretical findings.
Key facts. Cited by 19 papers in the map (data through 14 Oct 2026). Builds on 47 of its 93 references that are in the map. First posted on arXiv 30 Oct 2024.
Builds on
47 of 93 references.
References · 47
- 2017Attention Is All You Needcited by 60,361
- 2023GPT-4 Technical Reportcited by 18,396
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2022Scalable Diffusion Models with Transformerscited by 6,054
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
- 2021On the Opportunities and Risks of Foundation Modelscited by 4,033
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,592
- 2020Prevalence of Neural Collapse during the terminal phase of deep learning trainingcited by 719
- 2024Movie Gen: A Cast of Media Foundation Modelscited by 644
- 2020Hopfield Networks is All You Needcited by 475
- 2022Text and Code Embeddings by Contrastive Pre-Trainingcited by 361
- 2023Improving Text Embeddings with Large Language Modelscited by 303
35 more
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 298
- 2016Dense Associative Memory for Pattern Recognitioncited by 236
- 2021A Geometric Analysis of Neural Collapse with Unconstrained Featurescited by 227
- 2019Sparse Sequence-to-Sequence Modelscited by 170
- 2023Birth of a Transformer: A Memory Viewpointcited by 161
- 2023DNABERT-2: Efficient Foundation Model and Benchmark For Multi-Species Genomecited by 143
- 2020Large Associative Memory Problem in Neurobiology and Machine Learningcited by 112
- 2021CLOOB: Modern Hopfield Networks with InfoLOOB Outperform CLIPcited by 89
- 2020The Complexity of Constrained Min-Max Optimizationcited by 82
- 2023Energy Transformercited by 71
- 2021Dissecting Supervised Contrastive Learningcited by 64
- 2020Modern Hopfield Networks and Attention for Immune Repertoire Classificationcited by 53
- 2020The limits of min-max optimization algorithms: convergence to spurious non-critical setscited by 50
- 2023Conformal Prediction for Time Series with Modern Hopfield Networkscited by 42
- 2023On Sparse Modern Hopfield Modelcited by 42
- 2024On Computational Limits of Modern Hopfield Models: A Fine-Grained Complexity Analysiscited by 41
- 2024On Statistical Rates and Provably Efficient Criteria of Latent Diffusion Transformers (DiTs)cited by 40
- 2018Averaging Stochastic Gradient Descent on Riemannian Manifoldscited by 39
- 2023Generalized Neural Collapse for a Large Number of Classescited by 39
- 2024Uniform Memory Retrieval with Larger Capacity for Modern Hopfield Modelscited by 38
- 2024Outlier-Efficient Hopfield Layers for Large Transformer-Based Modelscited by 38
- 2023Scaling Laws for Associative Memoriescited by 35
- 2023STanHop: Sparse Tandem Hopfield Model for Memory-Enhanced Time Series Predictioncited by 35
- 2024CAMELoT: Towards Large Language Models with Training-Free Consolidated Associative Memorycited by 24
- 2024BiSHop: Bi-Directional Cellular Learning for Tabular Data with Generalized Sparse Modern Hopfield Modelcited by 21
- 2023Simplicial Hopfield networkscited by 16
- 2024Nonparametric Modern Hopfield Modelscited by 16
- 2023End-to-end Differentiable Clustering with Associative Memoriescited by 15
- 2021The Separation Capacity of Random Neural Networkscited by 14
- 2024Sparse and Structured Hopfield Networkscited by 13
- 2022Kernel Memory Networks: A Unifying Framework for Memory Modelingcited by 12
- 2024Energy-based Hopfield Boosting for Out-of-Distribution Detectioncited by 9
- 2022Randomly Initialized One-Layer Neural Networks Make Data Linearly Separablecited by 6
- 2024Semantically-correlated memories in a dense associative modelcited by 2
- 2019Optimization on the Surface of the (Hyper)-Spherecited by 1
Built on by
Citing papers per year: 2024: 3; 2025: 11; 2026: 5.
19 papers.
Sort:
By area:
- 2025ATLAS: Learning to Optimally Memorize the Context at Test Timecited by 66
- 2025It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimizationcited by 64
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecturecited by 26
- 2026Memory Caching: RNNs with Growing Memorycited by 15
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformerscited by 12
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolationcited by 11
- 2025Circuit Complexity Bounds for Visual Autoregressive Modelcited by 10
- 2024Modern Hopfield Networks Require Chain-of-Thought to Solve mathsfNC1-Hard Problemscited by 9
- 2025TNT: Improving Chunkwise Training for Test-Time Memorizationcited by 8
- 2026Krause Synchronization Transformerscited by 5
- 2025Neural Algorithmic Reasoning for Hypergraphs with Looped Transformerscited by 4
- 2025Hyper-SET: Designing Transformers via Hyperspherical Energy Minimizationcited by 2
7 more
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiencycited by 2
- 2025Adaptive Hopfield Network: Rethinking Similarities in Associative Memorycited by 1
- 2026Proteus: Incremental Memory Activation for Long-Context Sequence Modelingcited by 1
- 2025Effects of Feature Correlations on Associative Memory Capacitycited by 0
- 2025DeMoGen: Towards Decompositional Human Motion Generation with Energy-Based Diffusion Modelscited by 0
- 2026Recursive Binding on a Budget: Subspace Carving in Order-p Tensor Memoriescited by 0
- 2026Phases in a class of associative memories via hidden neuronscited by 0
- 2026Phases in a class of associative memories via hidden neurons10 Sep 2026
- 2026Proteus: Incremental Memory Activation for Long-Context Sequence Modeling17 Aug 2026
- 2026Recursive Binding on a Budget: Subspace Carving in Order-p Tensor Memories9 Jun 2026
- 2026Memory Caching: RNNs with Growing Memory27 Feb 2026
- 2026Krause Synchronization Transformers12 Feb 2026
- 2025DeMoGen: Towards Decompositional Human Motion Generation with Energy-Based Diffusion Models26 Dec 2025
- 2025Adaptive Hopfield Network: Rethinking Similarities in Associative Memory25 Nov 2025
- 2025TNT: Improving Chunkwise Training for Test-Time Memorization10 Nov 2025
- 2025Effects of Feature Correlations on Associative Memory Capacity2 Aug 2025
- 2025ATLAS: Learning to Optimally Memorize the Context at Test Time29 May 2025
- 2025It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimization17 Apr 2025
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiency18 Mar 2025
7 more
- 2025Hyper-SET: Designing Transformers via Hyperspherical Energy Minimization17 Feb 2025
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolation1 Feb 2025
- 2025Neural Algorithmic Reasoning for Hypergraphs with Looped Transformers18 Jan 2025
- 2025Circuit Complexity Bounds for Visual Autoregressive Model8 Jan 2025
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformers23 Dec 2024
- 2024Modern Hopfield Networks Require Chain-of-Thought to Solve mathsfNC1-Hard Problems7 Dec 2024
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecture12 Nov 2024
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolationcited by 11
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiencycited by 2
- 2025DeMoGen: Towards Decompositional Human Motion Generation with Energy-Based Diffusion Modelscited by 0
- 2025DeMoGen: Towards Decompositional Human Motion Generation with Energy-Based Diffusion Models26 Dec 2025
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiency18 Mar 2025
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolation1 Feb 2025
- 2025ATLAS: Learning to Optimally Memorize the Context at Test Timecited by 66
- 2025It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimizationcited by 64
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecturecited by 26
- 2026Memory Caching: RNNs with Growing Memorycited by 15
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformerscited by 12
- 2025Circuit Complexity Bounds for Visual Autoregressive Modelcited by 10
- 2024Modern Hopfield Networks Require Chain-of-Thought to Solve mathsfNC1-Hard Problemscited by 9
- 2025TNT: Improving Chunkwise Training for Test-Time Memorizationcited by 8
- 2026Krause Synchronization Transformerscited by 5
- 2025Hyper-SET: Designing Transformers via Hyperspherical Energy Minimizationcited by 2
- 2025Adaptive Hopfield Network: Rethinking Similarities in Associative Memorycited by 1
- 2026Proteus: Incremental Memory Activation for Long-Context Sequence Modelingcited by 1
12 most cited of 15 All 15 (JSON)
- 2026Phases in a class of associative memories via hidden neurons10 Sep 2026
- 2026Proteus: Incremental Memory Activation for Long-Context Sequence Modeling17 Aug 2026
- 2026Recursive Binding on a Budget: Subspace Carving in Order-p Tensor Memories9 Jun 2026
- 2026Memory Caching: RNNs with Growing Memory27 Feb 2026
- 2026Krause Synchronization Transformers12 Feb 2026
- 2025Adaptive Hopfield Network: Rethinking Similarities in Associative Memory25 Nov 2025
- 2025TNT: Improving Chunkwise Training for Test-Time Memorization10 Nov 2025
- 2025Effects of Feature Correlations on Associative Memory Capacity2 Aug 2025
- 2025ATLAS: Learning to Optimally Memorize the Context at Test Time29 May 2025
- 2025It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimization17 Apr 2025
- 2025Hyper-SET: Designing Transformers via Hyperspherical Energy Minimization17 Feb 2025
- 2025Circuit Complexity Bounds for Visual Autoregressive Model8 Jan 2025
12 newest of 15 All 15 (JSON)