NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Small ReLU networks are powerful memorizers: a tight analysis of memorization capacity

Chulhee Yun, Suvrit Sra, Ali Jadbabaie

Introduction

In the era of over-parameterized deep learning, it is a well-known phenomenon that neural networks can easily "memorize" training data—even when that data consists of pure noise. However, a fundamental theoretical question remains: exactly how large does a network need to be to achieve this perfect memorization?

Historically, theoretical work suggested a "one neuron per data point" rule of thumb, implying that memorizing $N$ data points required a hidden layer with roughly $N$ neurons. This paper challenges that intuition, proving that 3-layer ReLU networks are far more efficient at memorization than previously thought. By establishing tight upper and lower bounds, the authors demonstrate that even tiny networks can theoretically "brute-force" massive datasets, requiring only $\Omega(\sqrt{N})$ hidden nodes to perfectly fit $N$ data points.

The Core Problem: Defining Memorization Capacity

The authors seek to find the precise "memorization capacity" of neural networks—defined as the maximum number of points a network can fit perfectly. Beyond just finding a theoretical limit, the paper explores how architectural depth and data geometry (such as data points existing in a "general position") alter the underlying mathematics of network capacity.

Methodology: Constructive Proofs over Empirical Runs

Unlike empirical studies that rely on training massive models, this paper is deeply theoretical, utilizing constructive proofs and combinatorial analysis. Key methodological approaches include:

  • Parameter Construction: Rather than merely proving that a solution exists, the authors detail how to carefully construct weight matrices so that each data point triggers a unique "activation pattern" within the hidden layers.
  • Piecewise Linear Analysis: Because ReLU and Hard-Tanh activation functions are piecewise linear, the authors employ "piece-counting" techniques to determine the maximum number of linear segments a network can produce. This sets a strict upper limit on the number of points the network can interpolate.
  • General Position Assumption: For their ResNet analysis, the authors assume data points are in a "general position" (meaning no $d_x + 1$ points lie on the same hyperplane). This mild, realistic assumption enables much tighter bounds in high-dimensional spaces.
  • SGD Dynamics: The paper analyzes "without-replacement" Stochastic Gradient Descent (SGD)—the variant most commonly used in practice—to observe its behavior when initialized near a known global minimum that perfectly memorizes the data.

Key Insights and Theoretical Breakthroughs

The Power of the Square Root and Depth

The most striking insight from the paper is the mathematical impact of adding just one layer. Moving from a 2-layer to a 3-layer network drops the neuron requirement from $N$ to $\sqrt{N}$. In a 3-layer architecture, two hidden layers collaborate to create a "grid" of activation patterns. This grid allows a remarkably small number of neurons to uniquely identify a vast number of data points.

This finding highlights why depth acts as a force multiplier: while a 2-layer network's capacity scales linearly with its width, a 3-layer network's capacity scales quadratically.

High-Dimensional Efficiency

The research shows that high-dimensional input data ($d_x$) actually reduces the number of required neurons. For deep ResNets, the memorization requirement scales with $N/d_x$, making high-dimensional memorization mathematically "cheaper."

SGD as a Local Optimizer

The authors demonstrate that if SGD starts near a memorizing solution, it does not simply stagnate. Instead, it rapidly converges to a point with even lower empirical risk ($O(\epsilon^4)$), indicating that the optimization "landscape" near these global minima is surprisingly well-behaved.

Real-World Scaling: CIFAR-10 and ImageNet

While the study is theoretical and does not introduce new benchmarks, the authors apply their formulas to standard datasets to illustrate the practical implications of their bounds:

  • CIFAR-10 ($N = 50,000$): Previous theories suggested 50,000 ReLUs were needed to memorize this dataset. This paper proves that a mere 106 ReLUs are theoretically sufficient for a 2-layer Feedforward Neural Network (FNN), and even fewer are needed for a ResNet.
  • ImageNet ($N \approx 10^6$): A 4-layer network utilizing a "2k-2k-4k" width configuration (totaling roughly 8,000 hidden nodes) is theoretically capable of memorizing the entire million-point ImageNet dataset.

Limitations and Open Questions

Despite these impressive theoretical bounds, the authors are careful to note several limitations:

  1. Existence vs. Optimization: The paper proves that these highly efficient, memorizing networks exist, but it does not guarantee that standard random initialization and SGD will actually find them. In practice, the deep learning community uses massively over-parameterized networks because they are easier to optimize, not strictly because the extra capacity is required to represent the data.
  2. The Generalization Gap: The focus of this paper is strictly on memorization, not generalization. A tiny network that perfectly memorizes the training set is highly likely to overfit and may not generalize well to unseen data.
  3. Fixed Depth Constraints: While the authors establish tight bounds for 2-layer and 3-layer networks, discovering a universally tight bound for networks of any arbitrary depth $L$ remains an open challenge for future theoretical research.

Conclusion

By proving that $\Theta(\sqrt{N})$ width is both necessary and sufficient for a 3-layer ReLU network to memorize $N$ points, this paper fundamentally reshapes our understanding of neural network capacity. It proves that the massive scale of modern models is driven by the demands of optimization and generalization, rather than the raw mathematical limits of memorization.

Summary updated

BibTeX
@inproceedings{yun2019small,
  author = {Chulhee Yun and Suvrit Sra and Ali Jadbabaie},
  title = {{Small ReLU networks are powerful memorizers: a tight analysis of memorization capacity}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=nbEMQeoKzFc},
}
Figure