The Modern Mathematics of Deep Learningexplained for non-mathematicians

A second divided difference

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.

Approximation and depth · Study approximation error and network size under stated conditions.

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: 1.2.2 Can the network express the answer? · 1.2 Learning from examples

The source builds powers using a scaled combination of activation values.

Choose p = 2, ρ(t) = exp(t), and λ = 0. The expression becomes (exp(hx) − 2 + exp(−hx))/h², which approaches x².

Finite differences link a smooth non-polynomial activation to polynomial approximation.

Source formula example

lim⁡h→0 sup⁡x∈K∣∑i=0p(−1)i(pi)hpϱ(p)(λ)ϱ((p/2−i)hx+λ)−xp∣=0.\limp_{h\to 0}\ \sup_{x\in K}\Big|\sum_{i=0}^{p}\frac{(-1)^{i}\binom{p}{i}}{h^{p}\varrho^{(p)}(\lambda)}\varrho\big((p/2-i)hx+\lambda\big)-x^{p}\Big|=0.

approximation · The result is one pointwise finite-step approximation. It is not a supremum over K, a limit computation, or a proof; very small h can lose precision.

Symbols

pp
Positive integer order of the difference.
KK
A compact subset of ℝ.
λλ
Point at which the p-th activation derivative is nonzero.

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.h = 0.5
  • input.x = 1

Calculated here

Result expression: { approximation, target: x * x, firstDerivativeAtLambda: 1, derivativeAtLambda: 1, absoluteError: Math.abs(approximation - x * x), }

  • h = input.h Uses: input.h
  • x = input.x Uses: input.x
  • approximation = (Math.exp(h * x) - 2 + Math.exp(-h * x)) / (h * h) Uses: h, x

Returns

Example result
approximation
≈1.021
target
1
firstDerivativeAtLambda
1
derivativeAtLambda
1
absoluteError
≈0.02101

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

Result

Enable JavaScript to run this example.

Technical statement

The source assumes the activation is p-times differentiable at λ with nonzero p-th derivative and K is compact. It states uniform convergence as nonzero h tends to zero. The toy uses p=2, λ=0 and the exponential activation, for which ρ′(0)=ρ″(0)=1.

Source: Source expression