Fast Finite Width Neural Tangent Kernel

Roman Novak, Jascha Sohl-Dickstein, Samuel S. Schoenholz
6/17/2022
86 citations
cs.LGcs.AIstat.ML

Official code: google/neural-tangents (2,385 stars, Jupyter Notebook, Apache-2.0, JAX, last commit 2024-03-01).

Abstract

The Neural Tangent Kernel (NTK), defined as $Θ_θ^f(x_1, x_2) = \left[\partial f(θ, x_1)\big/\partial θ\right] \left[\partial f(θ, x_2)\big/\partial θ\right]^T$ where $\left[\partial f(θ, \cdot)\big/\partial θ\right]$ is a neural network (NN) Jacobian, has emerged as a central object of study in deep learning. In the infinite width limit, the NTK can sometimes be computed analytically and is useful for understanding training and generalization of NN architectures.

Show full abstract

At finite widths, the NTK is also used to better initialize NNs, compare the conditioning across models, perform architecture search, and do meta-learning. Unfortunately, the finite width NTK is notoriously expensive to compute, which severely limits its practical utility. We perform the first in-depth analysis of the compute and memory requirements for NTK computation in finite width networks. Leveraging the structure of neural networks, we further propose two novel algorithms that change the exponent of the compute and memory requirements of the finite width NTK, dramatically improving efficiency. Our algorithms can be applied in a black box fashion to any differentiable function, including those implementing neural networks. We open-source our implementations within the Neural Tangents package (arXiv:1912.02803) at https://github.com/google/neural-tangents.

View on arXivView PDF

Code Implementations(1)

JAXApache-2.0

Fast and Easy Infinite Neural Networks in Python

2,385240Jupyter Notebook, PythonApr 8, 20192 years agoApache-2.0
bayesian-inferencebayesian-networksdeep-networksgaussian-processesgradient-descent+8 more

Similar Papers

Cite this paper

@article{novak2022fast,
  title  = {Fast Finite Width Neural Tangent Kernel},
  author = {Roman Novak and Jascha Sohl-Dickstein and Samuel S. Schoenholz},
  year   = {2022},
  eprint = {2206.08720},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.08720}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2206.08720.svg)](https://codeofpaper.com/paper/2206.08720)

Discussion