Tensor Programs II: Neural Tangent Kernel for Any Architecture

Greg Yang
6/25/2020
190 citations
stat.MLcond-mat.dis-nncs.LG

Official code: thegregyang/NTK4A (110 stars, Jupyter Notebook, last commit 2020-08-26).

Abstract

We prove that a randomly initialized neural network of *any architecture* has its Tangent Kernel (NTK) converge to a deterministic limit, as the network widths tend to infinity. We demonstrate how to calculate this limit.

Show full abstract

In prior literature, the heuristic study of neural network gradients often assumes every weight matrix used in forward propagation is independent from its transpose used in backpropagation (Schoenholz et al. 2017). This is known as the *gradient independence assumption (GIA)*. We identify a commonly satisfied condition, which we call *Simple GIA Check*, such that the NTK limit calculation based on GIA is correct. Conversely, when Simple GIA Check fails, we show GIA can result in wrong answers. Our material here presents the NTK results of Yang (2019a) in a friendly manner and showcases the *tensor programs* technique for understanding wide neural networks. We provide reference implementations of infinite-width NTKs of recurrent neural network, transformer, and batch normalization at https://github.com/thegregyang/NTK4A.

View on arXivView PDF

Code Implementations(1)

thegregyang/NTK4AOfficial100%

Code for the paper: "Tensor Programs II: Neural Tangent Kernel for Any Architecture"

11013Jupyter Notebook, PythonJun 26, 20206 years ago

Similar Papers

Cite this paper

@article{yang2020tensor,
  title  = {Tensor Programs II: Neural Tangent Kernel for Any Architecture},
  author = {Greg Yang},
  year   = {2020},
  eprint = {2006.14548},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2006.14548}
}

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/2006.14548.svg)](https://codeofpaper.com/paper/2006.14548)

Discussion