The Modern Mathematics of Deep Learningexplained for non-mathematicians

Balanced adjacent layers

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.

Optimization theory · Study convergence and loss geometry under assumptions.

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.3 The path matters

The source relates the gradient-flow changes of adjacent weight matrices. In its stated setting, the difference of their squared Frobenius norms stays constant.

The toy uses two scalar linear layers, output uvx, and one squared-loss example.

The equality links how neighboring layers change during gradient flow.

Source formula example

diag⁡(ϱ′(Φ(ℓ)))W(ℓ)(t)(dW(ℓ)(t)dt)T=(dW(ℓ+1)(t)dt)TW(ℓ+1)(t)diag⁡(ϱ′(Φ(ℓ))).\operatorname{diag}\big(\varrho^{\prime}(\Phi^{(\ell)})\big)W^{(\ell)}(t)\Big(\frac{{\mathrm{d}W^{(\ell)}(t)}}{\mathrm{d}t}\Big)^{T}=\Big(\frac{{\mathrm{d}W^{(\ell+1)}(t)}}{\mathrm{d}t}\Big)^{T}W^{(\ell+1)}(t)\operatorname{diag}\big(\varrho^{\prime}(\Phi^{(\ell)})\big).

illustration · This checks a scalar linear example at one instant. It does not prove the matrix identity or behavior for networks outside the stated assumptions.

Symbols

W(ℓ)W^{(ℓ)}
Weight matrix in layer ℓ.
ρ′ρ^{\prime}
Derivative of the activation at the relevant preactivation.

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.u = 2
  • input.v = 3
  • input.x = 1
  • input.target = 1

Calculated here

Result expression: { prediction, residual, uRate, vRate, left, right, normDifferenceRate: 2 * right - 2 * left, }

  • u = input.u Uses: input.u
  • v = input.v Uses: input.v
  • x = input.x Uses: input.x
  • target = input.target Uses: input.target
  • prediction = u * v * x Uses: u, v, x
  • residual = prediction - target Uses: prediction, target
  • uRate = -2 * residual * v * x Uses: residual, v, x
  • vRate = -2 * residual * u * x Uses: residual, u, x

More expressions in code

Returns

Example result
prediction
6
residual
5
uRate
-30
vRate
-20
left
-60
right
-60
normDifferenceRate
0

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

Result

Enable JavaScript to run this example.

Technical statement

The source considers biasless scalar-output networks evolving under gradient flow with an activation satisfying ρ(z)=ρ′(z)z at the points used. It derives the adjacent-layer identity and conservation of the difference of squared Frobenius norms. The toy uses the linear activation, whose derivative is 1.

Source: Source expression