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
illustration · The calculation illustrates one layer and one distribution, not a proof of contraction.
Symbols
- Expected Rademacher complexity.
- Activation; ReLU in the toy.
- Norm-constrained network class.
- 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
Code changed. Reset to restore 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.CUses:input.CoriginalSuprema=tau.map((sign) => Math.max(Math.abs(sign * -C), Math.abs(sign * C)), )Uses:tau,CreluSuprema=tau.map((sign) => Math.max(Math.abs(sign * 0), Math.abs(sign * C)))Uses:tau,C
Returns
originalComplexity- 1
activatedComplexity- 1
upperBound- 2
Read numbers from input and return the result. JavaScript basics.
Result
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