Output-weight gradient and kernel
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: 5.2 When parameters move only a little
For squared loss, the output-weight gradient is twice the mean of each error times its feature vector.
The full gradient contains the output-weight gradient, which provides a lower bound on its squared norm.
Source formula example
illustration · This exact one-sample calculation does not establish the inequality for arbitrary networks or a training convergence result.
Symbols
- Mean squared training loss.
- Network parameter vector.
- Output-weight gradient Gram matrix.
- Positive training sample count.
- Residual for training example i.
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.outputWeight= 1
Initial values in code
w=1x=1
Calculated here
Result expression: {
fullGradient,
fullSquaredNorm: fullGradient.reduce((sum, v) => sum + v * v, 0),
gram,
quadratic,
outputGradientSquared,
}
a=input.outputWeightUses:input.outputWeighterror=a * w * xUses:a,w,xfullGradient=[2 * error * w * x, 2 * error * a * x]Uses:error,w,x,agram=(w * x) ** 2Uses:w,xquadratic=error * gram * errorUses:error,gramoutputGradientSquared=4 * quadraticUses:quadratic
Returns
fullGradient- array (2 items): [2, 2]
fullSquaredNorm- 8
gram- 1
quadratic- 1
outputGradientSquared- 4
Read numbers from input and return the result. JavaScript basics.
Result
Technical statement
The invented one-unit network is Φ(x) = awx, the single input is x = 1, and its target is zero. Its full parameter gradient has two entries. With m = 1, 4/m² is 4. Both sides of the first inequality and the Gram equality are computed. The source’s training discussion assumes a smooth, non-affine activation, distinct training inputs, quadratic loss, and independent Gaussian hidden and output initial parameters with variance 1/n. Its high-probability and convergence statements require the additional width, neighborhood, and step-size conditions stated in that discussion.
Source: Source expression