The Modern Mathematics of Deep Learningexplained for non-mathematicians

Second derivative blocks

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.

Functions and derivatives · Describe maps and how their outputs change.

Project vectors have two features; the training matrix has n rows and two columns. Mathematical tools may operate on these values when their assumptions apply.

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

A shallow network is linear in its output weights, so output-weight second derivatives vanish. Mixed derivatives can be nonzero.

The Hessian blocks indicate how parameter gradients can change near initialization.

Source formula example

E[(∂2Φ(x,Θ)∂θi(2)∂θj(2))2]=0,E[(∂2Φ(x,Θ)∂θi(2)∂(θj(1))k)2]≲δi,j,andE[(∂2Φ(x,Θ)∂(θi(1))k∂(θj(1))ℓ)2]≲δi,jn,{\mathbbm{E}}\Bigg[\Big(\frac{\partial^{2}\Phi(x,\Theta)}{\partial\theta^{(2)}_{i}\partial\theta^{(2)}_{j}}\Big)^{2}\Bigg]=0,\quad{\mathbbm{E}}\Bigg[\Big(\frac{\partial^{2}\Phi(x,\Theta)}{\partial\theta^{(2)}_{i}\partial(\theta^{(1)}_{j})_{k}}\Big)^{2}\Bigg]\lesssim\delta_{i,j},\quad\text{and}\quad{\mathbbm{E}}\Bigg[\Big(\frac{\partial^{2}\Phi(x,\Theta)}{\partial(\theta^{(1)}_{i})_{k}\partial(\theta^{(1)}_{j})_{\ell}}\Big)^{2}\Bigg]\lesssim\frac{\delta_{i,j}}{n},

illustration · The finite initialization distribution does not establish the source Gaussian expectation bounds.

Symbols

ΦΦ
Shallow network output.
ΘΘ
Random initialization.
𝔼𝔼
Expectation over the initialization distribution.
δijδᵢⱼ
1 when i = j and 0 otherwise.
nn
Hidden-unit count.
≲≲
Inequality up to a constant under the source assumptions.

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

  • samples = [-1, 1]

Calculated here

Result expression: { outputOutputExpectation: mean(outputOutputSquares), mixedExpectation: mean(mixedSquares), incomingExpectation: mean(incomingIncomingSquares), delta: 1, n: 1, chosenConstant: 64, }

  • x = input.x Uses: input.x
  • outputOutputSquares = samples.map(() => 0) Uses: samples
  • mixedSquares = samples.map(() => (2 * x * x) ** 2) Uses: samples, x
  • incomingIncomingSquares = samples.map((a) => (2 * a * x * x) ** 2) Uses: samples, x

Returns

Example result
outputOutputExpectation
0
mixedExpectation
4
incomingExpectation
4
delta
1
n
1
chosenConstant
64

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

Result

Enable JavaScript to run this example.

Technical statement

The finite initialization distribution takes output weight a = −1 or 1 with equal probability, with fixed incoming weight w = 1, and Φ = a(wx)². The activation z² is smooth and non-affine. At w = 1 the output–output second derivative is 0, mixed derivative is 2x², and incoming–incoming derivative is 2ax². Exact finite expectations of their squares are 0, 4x⁴, 4x⁴. For the displayed x range, toy constant 64 bounds both; it is not a source constant. The source uses independent Gaussian initialization with variance 1/n, unlike this finite toy.

Source: Source expression