The Modern Mathematics of Deep Learningexplained for non-mathematicians

Neural tangent kernel

Penguin learning project

The project uses 342 complete Palmer penguin records: 240 training-pool and 102 held-out rows. The selected training rows determine feature scaling and model parameters. Source CSV

This project trains weights with softmax, unlike the homepage lab, which uses nearest species averages. Same penguin measurements; different classification methods. Predictions can differ.

Kernels and linearization · Relate parameter gradients or features to kernel matrices.

The project supplies finite observations and fitted parameters. A held-out sample does not establish population bounds or prove a theorem.

Consider this concept alongside the project; its source assumptions may differ. These observations do not prove a theorem.

Input: 12 × 2; Held-out evaluation: 102 · #58 · 40.6 mm, 193 mm. Known answer: Adélie; Prediction: Adélie · [≈0.7383, ≈0.2444, ≈0.01737].

Used in these source sections: 2.1 A view through similarity

Compute the gradient of each output with respect to all parameters, then take their dot product.

For the toy linear predictor Φ(x,θ) = θx, the parameter gradient is x.

This kernel compares how two outputs respond to parameter changes.

Source formula example

Kθ ⁣:Rd×Rd→R,Kθ(x1,x2)=(∇θΦ(x1,θ))T∇θΦ(x2,θ).K_{\theta}\colon{\mathbb{R}}^{d}\times{\mathbb{R}}^{d}\to{\mathbb{R}},\quad K_{\theta}(x_{1},x_{2})=\big(\nabla_{\theta}\Phi(x_{1},\theta)\big)^{T}\nabla_{\theta}\Phi(x_{2},\theta).

illustration · The example uses a scalar linear model. General networks require their full parameter gradients.

Symbols

KθK_θ
Kernel at parameter vector θ.
∇θΦ∇_θΦ
Gradient of network output with respect to its parameters.

Source formula example

This source example uses its own inputs and assumptions. Editing it does not change the project.

Edit a value or the code, then run the example. This is a finite demonstration, not a proof of the paper’s theorem.

This example’s data flow

You choose

  • input.x1 = 2
  • input.x2 = 3

Calculated here

Result expression: { gradient1, gradient2, kernel: gradient1 * gradient2 }

  • gradient1 = input.x1 Uses: input.x1
  • gradient2 = input.x2 Uses: input.x2

Returns

Example result
gradient1
2
gradient2
3
kernel
6

Read numbers from input and return the result. JavaScript basics.

Result

Enable JavaScript to run this example.

Technical statement

Change the input and run the same code again. The displayed result uses the values shown above.

Source: Source expression