The Modern Mathematics of Deep Learningexplained for non-mathematicians

Variance with correlated coordinates

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.

Generalization and risk bounds · Relate sample behavior to population risk under stated 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.4 A second descent

For the source’s one-sample binary-feature model, the expected variance term is the squared Frobenius norm of the covariance divided by d².

This toy has two ±1 coordinates, each with mean zero, and correlation ρ.

Correlation can change the variance term even when the number of coordinates stays fixed.

Source formula example

E[Tr⁡(Σ+E[XXT])]=1d2∥E[XXT]∥F2.{\mathbbm{E}}\big[{\operatorname{Tr}}\big(\Sigma^{+}{\mathbbm{E}}[XX^{T}]\big)\big]=\frac{1}{d^{2}}\big\|{\mathbbm{E}}\big[XX^{T}\big]\big\|_{F}^{2}.

illustration · This evaluates the exact right side for a specific covariance matrix. It does not simulate fitted models or imply all correlated data follow the same result.

Symbols

Σ+Σ^+
Moore–Penrose inverse of the sample matrix Σ.
dd
Number of binary input coordinates.
∥⋅∥F\Vert ·\Vert _F
Frobenius norm.

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.rho = 0.5

Calculated here

Result expression: { covariance, squaredNorm, expectedVariance: squaredNorm / 4 }

  • covariance = [ [1, input.rho], [input.rho, 1], ] Uses: input.rho
  • squaredNorm = covariance.reduce( (sum, row) => sum + row.reduce((total, value) => total + value * value, 0), 0, ) Uses: covariance

Returns

Example result
covariance
array (2 items): [array (2 items): [1, 0.5], array (2 items): [0.5, 1]]
squaredNorm
2.5
expectedVariance
0.625

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

Result

Enable JavaScript to run this example.

Technical statement

The source specializes to m = 1 and X taking values in {−1,1}ᵈ, so ‖X‖² = d. The formula is for the expected variance term defined in the source model. The covariance shown is realizable by centered ±1 coordinates for ρ in [−1,1].

Source: Source expression