The Modern Mathematics of Deep Learningexplained for non-mathematicians

Geometric loss decrease

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

If each iteration multiplies loss by a fixed factor between zero and one, loss decreases geometrically.

The first-order loss change motivates a geometric convergence estimate.

Source formula example

r(Θ(K+1))≈r(Θ(K))−η∥∇θr(Θ(K))∥22≤(1−cηnm)r(Θ(K))≲(1−cηnm)K,{r}(\Theta^{(K+1)})\approx{r}(\Theta^{(K)})-\eta\|\nabla_{\theta}{r}(\Theta^{(K)})\|_{2}^{2}\leq\Big(1-\frac{c\eta n}{m}\Big){r}(\Theta^{(K)})\lesssim\Big(1-\frac{c\eta n}{m}\Big)^{K},

illustration · This one quadratic update illustrates the approximate and inequality symbols; it does not prove geometric convergence of a neural network.

Symbols

rr
Nonnegative squared training loss.
Θ(K)Θ⁽ᴷ⁾
Parameter vector at iteration K.
ηη
Positive step size.
cc
Positive constant in the source bound.
n,mn,m
Hidden-unit and training-sample counts.

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.rate = 0.25

Initial values in code

  • theta = 1

Calculated here

Result expression: { loss, gradient, nextLoss, firstOrder, factor, geometricBound: factor * loss, chosenConstant: 2, }

  • rate = input.rate Uses: input.rate
  • loss = theta ** 2 Uses: theta
  • gradient = 2 * theta Uses: theta
  • nextTheta = theta - rate * gradient Uses: theta, rate, gradient
  • nextLoss = nextTheta ** 2 Uses: nextTheta
  • firstOrder = loss - rate * gradient ** 2 Uses: loss, rate, gradient
  • factor = 1 - 2 * rate Uses: rate

Returns

Example result
loss
1
gradient
2
nextLoss
0.25
firstOrder
0
factor
0.5
geometricBound
0.5
chosenConstant
2

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

Result

Enable JavaScript to run this example.

Technical statement

The invented loss is r(θ) = θ², starting at θ = 1, with n = m = 1. The first-order expression omits the nonzero quadratic remainder η²‖gradient‖². For the permitted step sizes the actual loss is at most (1 − 2η) times the starting loss; 2 is selected for this toy and is not a general source constant. 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