English

Network size and weights size for memorization with two-layers neural networks

Machine Learning 2020-11-04 v2 Machine Learning

Abstract

In 1988, Eric B. Baum showed that two-layers neural networks with threshold activation function can perfectly memorize the binary labels of nn points in general position in Rd\mathbb{R}^d using only n/d\ulcorner n/d \urcorner neurons. We observe that with ReLU networks, using four times as many neurons one can fit arbitrary real labels. Moreover, for approximate memorization up to error ϵ\epsilon, the neural tangent kernel can also memorize with only O(ndlog(1/ϵ))O\left(\frac{n}{d} \cdot \log(1/\epsilon) \right) neurons (assuming that the data is well dispersed too). We show however that these constructions give rise to networks where the magnitude of the neurons' weights are far from optimal. In contrast we propose a new training procedure for ReLU networks, based on complex (as opposed to real) recombination of the neurons, for which we show approximate memorization with both O(ndlog(1/ϵ)ϵ)O\left(\frac{n}{d} \cdot \frac{\log(1/\epsilon)}{\epsilon}\right) neurons, as well as nearly-optimal size of the weights.

Keywords

Cite

@article{arxiv.2006.02855,
  title  = {Network size and weights size for memorization with two-layers neural networks},
  author = {Sébastien Bubeck and Ronen Eldan and Yin Tat Lee and Dan Mikulincer},
  journal= {arXiv preprint arXiv:2006.02855},
  year   = {2020}
}

Comments

27 pages

R2 v1 2026-06-23T16:03:24.803Z