stat.MLMay 6, 2026

Sharp Capacity Thresholds in Linear Associative Memory: From Winner-Take-All to Listwise Retrieval

Authors: Nicholas BarnfieldJuno KimEshaan NichaniJason D. LeeYue M. Lu

Abstract

How many key-value associations can a d×dd\times d linear memory store? We show that the answer depends not only on the d2d^2 degrees of freedom in the memory matrix, but also on the retrieval criterion. In an isotropic Gaussian model for the stored pairs, we show that top-1 retrieval, where every signal must beat its largest distractor, requires the logarithmic model-size scale d2nlognd^2\asymp n\log n. We prove that the correlation matrix memory construction, which stores associations by superposing key-target outer products, achieves this scale through a sharp phase transition, and that the same scaling is necessary for any linear memory. Thus the logarithm is the intrinsic extreme-value price of winner-take-all decoding. We next consider listwise retrieval, where the correct target need not be the unique top-scoring item but should remain among the strongest candidates. To formalize this regime, we propose the Tail-Average Margin (TAM), a convex upper-tail criterion that certifies inclusion of the correct target in a controlled candidate list. Under this listwise retrieval criterion, the capacity follows the quadratic scale d2nd^2\asymp n. At load n/d2αn/d^2\toα, we develop an exact asymptotic theory for the TAM empirical-risk minimizer through a two-parameter scalar variational principle. The theory has a rich phenomenology: in the ridgeless limit it yields a closed-form critical load separating satisfiable and unsatisfiable phases, and it predicts the limiting laws of true scores, competitor scores, margins, and percentile profiles. Finally, a small-tail extrapolation further leads to the conjectural sharp top-1 threshold d22nlognd^2\sim 2n\log n.

Explore similar work

May 11, 2026stat.ML

Factual recall in linear associative memories: sharp asymptotics and mechanistic insights

Large language models demonstrate remarkable ability in factual recall, yet the fundamental limits of storing and retrieving input--output associations with neural networks remain unclear. We study these limits in a minimal setting: a linear associative memory that maps pp input embeddings in Rd\mathbb{R}^d to their corresponding~dd-dimensional targets via a single layer, requiring each mapped input to be well separated from all other targets. Unlike in supervised classification, this strict separation induces~pp constraints per association and produces strong correlations between constraints that make a direct characterisation of the storage capacity difficult. Here, we provide a precise characterisation of this capacity in the following way. We first introduce a decoupled model in which each input has its own independent set of competing outputs, and provide numerical and analytical evidence that this decoupled model is equivalent to the original model in terms of storage capacity, spectra of the learnt weights, and storage mechanism. Using tools from statistical physics, we show that the decoupled model can store up to pclogpc/d2=1/2p_c \log p_c / d^2 = 1 / 2 associations, and generalise the computation of pcp_c to linear two-layer architectures. Our analysis also gives mechanistic insight into how the optimal solution improves over a naïve Hebbian learning rule: rather than boosting input-output alignments with broad fluctuations, the optimal solution raises the correct scores just above the extreme-value threshold set by the competing outputs. These findings give a sharp statistical-physics characterisation of factual storage in linear networks and provide a baseline for understanding the memory capacity of more realistic neural architectures.
Alessio Giorlandino, Sebastian Goldt, Antoine Maillard
Jul 21, 2026cond-mat.dis-nn

Free energy landscape of Dense Associative Memory

Using large deviations theory, we solve and obtain a general expression for the free energy functional for a broad class of associative memories, including dense associative memories. We illustrate the method by reproducing classical results for the Hopfield model. For a finite number of patterns, we derive the temperature-dependent free energy functional for dense associative memories featuring polynomial interactions and Log-Sum-Exponential (LSE) activation. We also evaluate the disorder-averaged ground-state energy of these systems in the extensive limit. Our analytical framework reveals how memory retrieval depends on the initial state in higher-order dense networks, and gives the exact full-retrieval threshold for the LSE model. This method provides a systematic procedure for analyzing diverse, complex architectures in associative memory.
Sumedha, Abhishek Singh
Sep 15, 2026cond-mat.dis-nn

Bias-Induced Crossover in Absolute Capacity of Dense Associative Memory

The absolute capacity of dense associative memory has mainly been analyzed for unbiased patterns. Here we examine the effect of bias in centered binary patterns under the Krotov-Hopfield single-site criterion Perror=1/NP_{\mathrm{error}}=1/N, where PerrorP_{\mathrm{error}} is the probability that a single-site flip lowers the energy of a stored pattern and NN is the number of neurons. Each pattern component takes 1q1-q with probability qq and q-q otherwise, where 0<q1/20<q\le1/2. For polynomial interactions of order nn, a signal-to-noise analysis gives an absolute capacity of order Nn1/lnNN^{n-1}/\ln N at q=1/2q=1/2. For fixed q<1/2q<1/2, however, the capacity is O(Nn/2)O(N^{n/2}) for even n4n\ge4 and O(N(n+1)/2)O(N^{(n+1)/2}) for odd n5n\ge5. For n=3n=3, both the unbiased and fixed-bias capacities remain O(N2/lnN)O(N^2/\ln N). For n4n\ge4, these different asymptotic forms imply a nonuniform large-NN limit near q=1/2q=1/2. Asymptotic matching predicts a bias-induced crossover in the region 12q=O(lnN/Nn/21)1-2q=O(\ln N/N^{\lfloor n/2\rfloor-1}). The crossover originates from a bias-dependent crosstalk mean that reduces the stability of sites carrying the more frequent value q-q. Computer simulations are compared with the finite-size conditioned-Gaussian predictions. An activity-dependent control potential that cancels the conditional crosstalk mean restores the Nn1/lnNN^{n-1}/\ln N capacity for fixed 0<q<1/20<q<1/2 within the conditioned-Gaussian approximation.
Yuto Sakurai, Takeaki Shimokawa, Kazunori Iwata +1