Generalized Leverage Score Sampling for Neural Networks

Jason D. Lee, Ruoqi Shen, Zhao Song, Mengdi Wang, Zheng Yu

Introduction

In classical machine learning, Kernel Ridge Regression (KRR) is a highly effective tool, but its $O(n^3)$ computational complexity makes it notoriously difficult to scale to large datasets. A standard workaround involves approximating the kernel using a finite set of "random features." Recently, theoretical computer science has introduced leverage score sampling to this domain—a technique that measures the importance of specific features to sample them more efficiently, thereby requiring fewer features to achieve a robust approximation.

Simultaneously, deep learning theory has established that infinitely wide neural networks behave identically to kernel methods governed by the Neural Tangent Kernel (NTK). However, proving that a finite neural network converges in the same way as the NTK typically requires assuming absurdly large, heavily over-parameterized network widths. In this context, the network width effectively acts as the number of random features.

This paper bridges these two domains, asking a fundamental question: Can leverage score sampling be generalized to the NTK and used to initialize neural networks? Furthermore, can this "smarter" sampling strategy reduce the theoretical width required for a neural network to guarantee convergence?

Methodology: Generalized Leverage Score Sampling

The authors approach this bridging problem through rigorous mathematical analysis, merging numerical linear algebra with deep learning theory. Their methodology is built on several theoretical pillars:

  1. Generalized Leverage Score Sampling: The authors extend existing leverage score sampling theories—previously limited mostly to Fourier features—to a much broader class of kernels defined by expectations over random features, expressed as $K(x,z) = \mathbb{E}_{w \sim p}[\phi(x,w)^\top \phi(z,w)]$.
  2. Ridge Leverage Function: They define a modified sampling distribution that incorporates the $\ell_2$ regularization parameter. This ensures the sampling mechanism prioritizes features that are genuinely impactful for the regularized problem.
  3. Gradient Flow Analysis: By analyzing the training dynamics (gradient flow) of a two-layer ReLU neural network with $\ell_2$ regularization, they compare its trajectory to the gradient flow of NTK ridge regression, proving they remain mathematically proximate throughout the training process.
  4. Reweighted Initialization: Instead of the standard practice of initializing neural network weights with a Gaussian distribution, the authors propose an initialization scheme that samples from the newly defined leverage score distribution. This acts as a form of "importance sampling" for the network's initial weights.

Key Insights: Initialization as Feature Sampling

A central insight of this work is viewing neural network initialization directly as the drawing of random features to approximate the NTK. The width of the hidden layers corresponds directly to the number of random features used.

Under this lens, initializing a network with standard Gaussian weights is equivalent to uniformly sampling random features. While functional, it is highly inefficient, explaining why theoretical proofs demand massive over-parameterization to guarantee the network captures the necessary feature space.

Conversely, leverage scores act as importance sampling. By utilizing leverage scores for initialization, the network prioritizes initial weights that contribute most significantly to the kernel's row space. Consequently, the network requires fewer total weights (i.e., a narrower architecture) to achieve the same quality of kernel approximation. Furthermore, unlike prior NTK equivalence proofs that ignore regularization for mathematical simplicity, this paper rigorously establishes the equivalence between regularized neural networks and NTK ridge regression.

Main Results

The theoretical contributions of the paper culminate in three primary results:

  • Efficient Kernel Approximation: The authors successfully generalize leverage score sampling, proving it can approximate a broad class of kernel matrices to within a $(1 \pm \epsilon)$ factor using significantly fewer features than naive uniform sampling.
  • Equivalence under Gaussian Initialization: They prove that training an $\ell_2$-regularized two-layer ReLU network with standard Gaussian initialization is mathematically equivalent to solving NTK ridge regression, provided the network width $m$ scales polynomially as $m \geq \tilde{O}(n^4 d / \Lambda_0^4 \epsilon^2)$.
  • Equivalence under Leverage Score Initialization: Crucially, they prove this equivalence holds when the network is initialized using a leverage score distribution. Because leverage scores require fewer samples to approximate the kernel, this theoretically enables tighter upper bounds on the required network width compared to standard initialization.

Limitations and Future Directions

As a purely theoretical work, the paper does not include empirical datasets, benchmarks, or experiments. A primary limitation is the lack of a computationally tractable algorithm for calculating these leverage scores for massive deep learning models in practice, as computing exact leverage scores is notoriously expensive.

However, the authors frame this work as a foundational starting point for integrating leverage score sampling into neural network training. Future research directions include developing efficient approximations for these leverage scores. Such advancements could lead to novel, practical initialization schemes for frameworks like PyTorch or TensorFlow, ultimately enabling faster convergence with narrower, more efficient network architectures.

Summary updated

BibTeX
@inproceedings{lee2020generalized,
  author = {Jason D. Lee and Ruoqi Shen and Zhao Song and Mengdi Wang and Zheng Yu},
  title = {{Generalized Leverage Score Sampling for Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=uzKYhX8Z7N2},
}
Figure