Abstract
We study finite sample expressivity, i.e., memorization power of ReLU networks. Recent results require $N$ hidden nodes to memorize/interpolate arbitrary $N$ data points. In contrast, by exploiting depth, we show that 3-layer ReLU networks with $\Omega(\sqrt{N})$ hidden nodes can perfectly memorize most datasets with $N$ points. We also prove that width $\Theta(\sqrt{N})$ is necessary and sufficient for memorizing $N$ data points, proving tight bounds on memorization capacity. The sufficiency result can be extended to deeper networks; we show that an $L$-layer network with $W$ parameters in the hidden layers can memorize $N$ data points if $W = \Omega(N)$. Combined with a recent upper bound $O(WL\log W)$ on VC dimension, our construction is nearly tight for any fixed $L$. Subsequently, we analyze memorization capacity of residual networks under a general position assumption; we prove results that substantially reduce the known requirement of $N$ hidden nodes. Finally, we study the dynamics of stochastic gradient descent (SGD), and show that when initialized near a memorizing global minimum of the empirical risk, SGD quickly finds a nearby point with much smaller empirical risk.
Introduction
In modern deep learning, models with millions of parameters often achieve zero training error, effectively "memorizing" the dataset. While the Universal Approximation Theorem establishes that sufficiently large networks can approximate any continuous function, it provides little guidance on the specific resources required to interpolate a finite set of $N$ data points.
Historically, research suggested that a shallow network (one hidden layer) requires $N$ hidden nodes to memorize $N$ points. This paper challenges that paradigm by investigating how depth influences memorization capacity. The authors demonstrate that by adding just one or two hidden layers, the number of neurons required to perfectly fit $N$ data points drops from $N$ to approximately $\sqrt{N}$.
Methodology: Construction and Necessity
The authors employ a dual approach to establish tight bounds on memorization capacity:
1. Constructive Sufficiency
To prove that a network can memorize a dataset, the authors explicitly construct weight and bias parameters. They design the first hidden layer to "project and divide" data into distinct groups. Subsequent layers are then engineered to assign unique activation patterns to each point, allowing the network to isolate and fit individual data points with high precision.
2. Mathematical Necessity
To determine the absolute minimum number of nodes required, the authors utilize the fact that ReLU networks are piecewise linear. By counting the maximum number of linear regions (pieces) a network can produce, they establish a lower bound. This analysis proves that for 3-layer networks, the $\Theta(\sqrt{N})$ width requirement is not merely sufficient but necessary.
The Power of Depth and Dimension
The $\sqrt{N}$ Efficiency
The paper establishes that for a 3-layer network (two hidden layers), a width of $\Theta(\sqrt{N})$ is sufficient to memorize $N$ points. Specifically, if the hidden widths $d_1, d_2$ satisfy $d_1 d_2 \ge 4N d_y$ (where $d_y$ is the output dimension), the network can achieve perfect interpolation. For scalar outputs, this implies that roughly $2\sqrt{N}$ nodes per layer are sufficient—a massive improvement over the $N$ nodes required by shallow architectures.
Residual Networks (ResNets)
The analysis extends to ResNets, where the authors introduce a "general position" assumption (assuming no $d_x + 1$ points lie on the same affine hyperplane). Under this mild assumption, they show that the input dimension ($d_x$) significantly aids memorization. Because high-dimensional data is easier to separate with hyperplanes, the required number of nodes scales as $\Omega(N/d_x)$.
To illustrate the impact, consider the CIFAR-10 dataset ($N=50,000$). While previous theories suggested 50,000 ReLUs were necessary, this ResNet analysis shows that only 126 ReLUs are theoretically sufficient. Similarly, for ImageNet, a 4-layer network with only ~2,000 nodes per layer could theoretically memorize the entire 1.2 million image dataset.
Optimization Dynamics
Beyond the existence of memorizing solutions, the paper examines whether these solutions are reachable via standard optimization. By analyzing the trajectory of Stochastic Gradient Descent (SGD) using Taylor expansions near a global minimum, the authors show that if SGD is initialized near a "memorizing" minimum, it quickly converges to a nearby point with even lower empirical risk ($O(\epsilon^4)$). This suggests that these small, powerful memorizers are locally stable under gradient-based optimization.
Conclusion and Future Directions
This work provides a tight analysis of the memorization capacity of ReLU networks, proving that depth and input dimensionality are powerful levers for reducing the required number of parameters. However, several questions remain:
- Training vs. Existence: While the paper proves these small networks can memorize via specific constructions, it does not guarantee that random initialization will consistently find these solutions in practice.
- Generalization: The study focuses exclusively on training error (memorization). The relationship between these minimal memorizing architectures and their performance on unseen data (generalization) remains an open area for research.
- Deep FNN Gaps: While bounds for 2 and 3-layer networks are tight, a small logarithmic gap persists for very deep networks ($L > 3$).
By establishing that $W = \Omega(N)$ parameters are sufficient for $L$-layer networks to memorize $N$ points, this research brings our theoretical understanding of network capacity closer to the empirical realities of deep learning.
Summary updated