Abstract
We investigate the memory capacity of two-layer neural networks employing smooth, real analytic activation functions—a class that includes sigmoids, tanh, and GELU. By leveraging novel algebraic techniques to analyze the generic rank of the network's Jacobian, we establish that these networks can perfectly interpolate datasets of size roughly half the number of their trainable parameters. This result is optimal up to a factor of approximately two and provides a unified theoretical framework for activations beyond simple piecewise linear functions.
Introduction
In machine learning, "memory capacity" is defined as the maximum size of a general dataset that a neural network can perfectly memorize. This threshold is a fundamental concept, marking the transition from underfitting to overfitting and playing a crucial role in the "double descent" phenomenon. While previous research has established capacity bounds for specific activations like the Heaviside step function or ReLU, a unified theory for "smooth" or "real analytic" activations—standard in modern deep learning—has been lacking.
This work addresses this gap by shifting the focus from specific activation properties to the generic rank of the network's Jacobian. The Jacobian matrix, representing the partial derivatives of the network's output with respect to its weights, determines the network's local capability to map inputs to arbitrary target labels.
Methods and Technical Framework
The core of the proof relies on representing the Jacobian of a two-layer network using specific matrix operations: Hadamard powers (element-wise powers) and Khatri-Rao products (column-wise Kronecker products).
The authors demonstrate that for "generic" data—data not falling into rare algebraic patterns—these complex matrix products maintain full rank. The logical progression of the proof, moving from individual Hadamard powers to general analytic functions, is summarized in the following diagram:
Key technical steps include:
- Generic Rank Analysis: Proving that the rank of the Jacobian is determined by the number of non-zero coefficients in the activation function's Taylor expansion. If the function has enough "non-linearity" (high-degree terms), the Jacobian will be full rank.
- Constant Rank Theorem: By establishing full rank at a point where the activation is analytic, the authors use the Constant Rank Theorem from differential geometry to prove local interpolation capability.
- Width Doubling: To extend local existence to global surjectivity, they show that a network with $2m$ neurons can effectively cover the target space by implementing scaled and shifted versions of a smaller network.
Key Results
The theoretical analysis yields several significant findings:
- Lower Bound on Capacity: For a network with $m$ hidden neurons and input dimension $d$, the memory capacity $n$ is at least $\lfloor md/2 \rfloor$.
- Near-Optimality: Given that the total number of trainable parameters is $md + 2m$, this result is optimal up to a factor of approximately 2.
- Surjectivity: If $md \ge 2n$ and $m$ is even, the network mapping is surjective for generic data, meaning it can hit any target label vector exactly.
- Tightness: A matching upper bound shows that if $m(d+2) < n$, the network cannot be surjective for any data $X$.
Discussion and Conclusion
This research highlights that real analyticity is the essential property for guaranteeing high memory capacity. As long as an activation function has a valid Taylor series expansion at a single point and is not a low-degree polynomial, it provides near-optimal capacity. This generalizes results for sigmoids, tanh, arctan, and GELU under a single algebraic framework.
While the current analysis is restricted to two-layer architectures and leaves a factor-of-2 gap to the theoretical maximum, it provides a cleaner, linear-algebraic alternative to previous probabilistic approaches. Future work may extend these techniques to deeper models, where the algebraic complexity of the Jacobian increases significantly.
Summary updated