The Modern Mathematics of Deep Learningexplained for non-mathematicians

Expected feature Gram matrix

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: 5.2 When parameters move only a little

Average the Gram matrices over the initialization distribution.

This expectation is used in the source argument about eigenvalues.

Source formula example

E[KˉΘ]{\mathbbm{E}}[\bar{K}_{\Theta}]

illustration · This finite distribution is not the Gaussian initialization used in the source and does not prove its asymptotic conclusion.

Symbols

KˉΘK̄Θ
Output-gradient Gram matrix at random initialization.
𝔼𝔼
Expectation over initialization.
ΘΘ
Random network 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.x = 1

Initial values in code

  • hiddenWeights = [-1, 1]

Calculated here

Result expression: { grams, expectedGram }

  • grams = hiddenWeights.map((w) => Math.max(0, w * input.x) ** 2) Uses: hiddenWeights, input.x
  • expectedGram = grams.reduce((a, b) => a + b, 0) / grams.length Uses: grams

Returns

Example result
grams
array (2 items): [0, 1]
expectedGram
0.5

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

Result

Enable JavaScript to run this example.

Technical statement

The toy has one sample and one ReLU unit; its incoming weight is equally likely −1 or 1. The 1 by 1 Gram matrix is feature squared. The two outcomes are enumerated exactly.

Source: Source expression