Memory capacity of two layer neural networks with smooth activations
Liam Madden, Christos Thrampoulidis
TL;DR
This work analyzes the memory capacity of two-layer neural networks with $m$ hidden units and input dimension $d$, showing a lower bound of $\lfloor md/2\rfloor$ on the data size that can be memorized when activations are real analytic at a point, and proving near-optimality up to a factor of $\approx 2$. The authors develop a general framework based on the Jacobian with respect to the first-layer weights and leverage a decomposition into Hadamard powers and the Khatri-Rao product to obtain precise generic-rank results for Hadamard powers, their polynomial sums, and their Khatri-Rao combinations, with extensions to real-analytic Hadamard functions. These results yield concrete surjectivity and non-surjectivity conditions (e.g., surjectivity when $md\ge 2n$ and $m$ even; non-surjectivity when $m(d+2)<n$) and provide a principled interpolation mechanism that applies to deeper models via a constant-rank argument. By linking the algebraic-rank structure to memory capacity, the paper advances a rigorous understanding of interpolation thresholds for smooth activations and lays groundwork for extending the approach to deeper architectures and other linkages.
Abstract
Determining the memory capacity of two layer neural networks with $m$ hidden neurons and input dimension $d$ (i.e., $md+2m$ total trainable parameters), which refers to the largest size of general data the network can memorize, is a fundamental machine learning question. For activations that are real analytic at a point and, if restricting to a polynomial there, have sufficiently high degree, we establish a lower bound of $\lfloor md/2\rfloor$ and optimality up to a factor of approximately $2$. All practical activations, such as sigmoids, Heaviside, and the rectified linear unit (ReLU), are real analytic at a point. Furthermore, the degree condition is mild, requiring, for example, that $\binom{k+d-1}{d-1}\ge n$ if the activation is $x^k$. Analogous prior results were limited to Heaviside and ReLU activations -- our result covers almost everything else. In order to analyze general activations, we derive the precise generic rank of the network's Jacobian, which can be written in terms of Hadamard powers and the Khatri-Rao product. Our analysis extends classical linear algebraic facts about the rank of Hadamard powers. Overall, our approach differs from prior works on memory capacity and holds promise for extending to deeper models and other architectures.
