The Modern Mathematics of Deep Learningexplained for non-mathematicians

Rademacher contraction example

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.2 Weight size and room to decide

Compare the complexity after ReLU with twice the original complexity.

The contraction inequality is used to bound complexity layer by layer.

Source formula example

Rm(ϱ∘F~ℓ,C)≤2Rm(F~ℓ,C),ℓ∈N.{\mathfrak{R}}_{m}(\varrho\circ\widetilde{{\mathcal{F}}}_{\ell,C})\leq 2{\mathfrak{R}}_{m}(\widetilde{{\mathcal{F}}}_{\ell,C}),\quad\ell\in{\mathbb{N}}.

illustration · The calculation illustrates one layer and one distribution, not a proof of contraction.

Symbols

RmRₘ
Expected Rademacher complexity.
ϱϱ
Activation; ReLU in the toy.
F~ℓ,CF̃ℓ,C
Norm-constrained network class.
mm
Sample size.

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.C = 1

Initial values in code

  • tau = [-1, 1]

Calculated here

Result expression: { originalComplexity: mean(originalSuprema), activatedComplexity: mean(reluSuprema), upperBound: 2 * mean(originalSuprema), }

  • C = input.C Uses: input.C
  • originalSuprema = tau.map((sign) => Math.max(Math.abs(sign * -C), Math.abs(sign * C)), ) Uses: tau, C
  • reluSuprema = tau.map((sign) => Math.max(Math.abs(sign * 0), Math.abs(sign * C))) Uses: tau, C

Returns

Example result
originalComplexity
1
activatedComplexity
1
upperBound
2

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

Result

Enable JavaScript to run this example.

Technical statement

With m=1, fixed X=1 and F={x↦wx: |w|≤C}, enumerate τ=±1 with equal probability. The supremum uses the absolute signed value. The original class ranges over [−C,C] and its ReLU outputs range over [0,C]; both suprema are C for either sign. Their expected complexities are C, and the contraction upper bound is 2C. The source theorem uses a 1-Lipschitz positively homogeneous activation and its stated network class.

Source: Source expression