The Modern Mathematics of Deep Learningexplained for non-mathematicians

A boundary case in the printed margin inequality

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

The paper’s sign convention assigns +1 at score zero. With one example x=1, y=1, θ-hat=1 and δ=1, every parameter in the closed radius-1 neighborhood has zero classification loss.

The printed boundary expression nevertheless has margin 0, so its strict 0 < margin claim fails in this case.

This example distinguishes zero classification error from a strictly positive margin at the boundary.

Source formula example

0<min⁡i∈[m]y(i)⟨θ^−δy(i)x(i)∥x(i)∥2,x(i)⟩≤γ(θ^)−δmin⁡i∈[m]∥x(i)∥2,0<\min_{i\in[m]}y^{(i)}\langle\hat{\theta}-\delta y^{(i)}\tfrac{x^{(i)}}{\|x^{(i)}\|_{2}},x^{(i)}\rangle\leq\gamma(\hat{\theta})-\delta\min_{i\in[m]}\|x^{(i)}\|_{2},

exact · This demonstrates a boundary case under the paper’s sign convention. It does not determine the intended correction or refute other margin bounds.

Symbols

θ^θ̂
The proposed minimizing parameter.
δδ
The radius of the parameter neighborhood.
x,yx,y
A nonzero training input and binary label.

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

Initial values in code

  • thetaHat = 1
  • delta = 1
  • x = 1
  • y = 1

Calculated here

Result expression: { thetaHat, delta, boundaryTheta, boundaryScore, predictedLabel, boundaryLoss, boundaryMargin, strictPositive: boundaryMargin > 0, }

  • boundaryTheta = thetaHat - (delta * y * x) / Math.abs(x) Uses: thetaHat, delta, y, x
  • boundaryScore = boundaryTheta * x Uses: boundaryTheta, x
  • predictedLabel = boundaryScore >= 0 ? 1 : -1 Uses: boundaryScore
  • boundaryLoss = predictedLabel === y ? 0 : 1 Uses: predictedLabel, y
  • boundaryMargin = y * boundaryScore Uses: y, boundaryScore

Returns

Example result
thetaHat
1
delta
1
boundaryTheta
0
boundaryScore
0
predictedLabel
1
boundaryLoss
0
boundaryMargin
0
strictPositive
false

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

Result

Enable JavaScript to run this example.

Technical statement

The source assumes zero-one classification loss, linearly separable training data, and zero loss throughout a radius-δ neighborhood. For the displayed example, the closed neighborhood is [0,2], and every score is nonnegative. The paper defines sign(0)=+1, so all of those scores classify the positive label correctly. The specific boundary perturbation gives score 0 and margin 0. The source prints a strict positive inequality; the calculation does not propose how it should be amended.

Source: Printed robust-margin inequality