math.PRSep 24, 2026

Boolean threshold functions, neuron capacity, and memory retrieval

Authors: Xinyuan Xie

Abstract

How much information can a single neuron remember? How many memories can neural networks retrieve without creating false memories? These questions are related to a basic question: how many Boolean threshold functions f(x)=sgn⁡(a0+⟨a,x⟩)f(x)=\operatorname{sgn}(a_0+\langle a,x\rangle), x∈{−1,1}nx\in\{-1,1\}^n, are there? In this paper, we show that the number TnT_n of distinct Boolean threshold functions is

Tn=2(2n−1n)(1+O(n−99)).T_n=2\binom{2^n-1}{n}\bigl(1+O(n^{-99})\bigr).

Equivalently, the capacity of a single threshold neuron is n2−log⁡2(n!)+1+O(n−99)n^2-\log_2(n!)+1+O(n^{-99}) bits, improving the O(n)O(n) error term in the result of Kahn--Komlós--Szemerédi to O(n−99)O(n^{-99}). To prove this, we show that, for 1≤r≤n−11\le r\le n-1, and v1,…,vrv_1,\ldots,v_r are chosen at random from {−1,1}n\{-1,1\}^n,

P ⁣{⟨v1,…,vr⟩∩{−1,1}n={±v1,…,±vr}}=1−O(n−99).\mathbb P\!\left\{ \langle v_1,\ldots,v_r\rangle\cap\{-1,1\}^n =\{\pm v_1,\ldots,\pm v_r\} \right\} =1-O(n^{-99}).

In the context of the Kanter--Sompolinsky Hamiltonian for memory retrieval, this identifies r=n−1r=n-1 as a sharp threshold, at which, for almost every collection of rr memories, the only ground states are these memories and their negatives, confirming a weaker form of the Kalai--Linial--Odlyzko conjecture. It also settles a recent open problem posed by M. Anthony on the specification number of Boolean threshold functions. In addition, we show that, for every 1≤r≤n−11\le r\le n-1,

P{v1,…,vr are linearly dependent}=2(r2) 2−n+O ⁣(2−ne−cn),\mathbb P\{v_1,\ldots,v_r\text{ are linearly dependent}\} =2\binom r2\,2^{-n}+O\!\left(2^{-n}e^{-cn}\right),

confirming a conjecture of Kahn--Komlós--Szemerédi.

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 pclog⁡pc/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.
May 6, 2026stat.ML

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

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 d2≍nlog⁡nd^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 d2≍nd^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 d2∼2nlog⁡nd^2\sim 2n\log n.
Jun 28, 2026cs.DM

Chamber geometry and specification numbers of Boolean threshold functions

The specification number σn(f)σ_n(f) of a Boolean threshold function ff on nn variables is the least number of points whose ff-values determine ff uniquely among all threshold functions. Its essential points form the unique minimum such set. We develop Zuev's geometric interpretation: the threshold functions are the chambers of a central hyperplane arrangement in the (n+1)(n+1)-dimensional space of weights and thresholds, and the essential points of a function correspond exactly to the facets of its chamber, so the specification number is the chamber's facet number. The lower bound σn(f)≥n+1σ_n(f)\ge n+1 becomes the fact that a pointed full-dimensional cone has at least n+1n+1 facets, with equality for simplicial chambers. The average specification number σ‾n\overlineσ_n becomes an average facet count. We evaluate this average exactly via the resonance arrangement and bound it through a theorem of Fukuda, Tamura, and Tokuyama, obtaining σ‾n≤2n\overlineσ_n\le 2n; hence σ‾n=Θ(n)\overlineσ_n=Θ(n). This settles a question of Gutekunst, Mészáros, and Petersen. The method also extends to polynomial threshold functions. The same geometry links threshold functions with a threshold zonotope, whose vertices are modified Chow vectors. Its one-skeleton is the one-inclusion graph, and a vertex's degree is the specification number of that function. Finally, we treat the operations of Lozin et al. on functions of minimum specification number. Adding a variable and extending on a variable both take the product of a chamber closure with a half-line, preserving simpliciality. For the symmetric-variables extension we give an exact thresholdness criterion and show that minimum specification number is preserved whenever the extension is a threshold function. We also resolve a question they pose concerning a fourth operation.