The Modern Mathematics of Deep Learningexplained for non-mathematicians

Regularized objective minimum

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.

Learning and parameter updates · Select a rule or update parameters using a learning rule.

The current objective supplies a gradient; training updates the model parameters.

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 Learning from examples

Minimize empirical squared error plus α times the squared parameter.

The regularizer changes the best parameter selected by fitting.

Source formula example

min⁡θ∈RP(N)R^s(Φa(⋅,θ))+α∥θ∥22,\min_{\theta\in{\mathbb{R}}^{P(N)}}\widehat{\mathcal{R}}_{s}(\Phi_{{a}}(\cdot,\theta))+\alpha\|\theta\|^{2}_{2},

exact · This explicit minimizer applies only to the toy linear model and squared loss.

Symbols

R^sR̂s
Empirical risk on sample s.
ΦaΦₐ
Network predictor.
αα
Nonnegative regularization parameter.
θθ
Real parameter vector.

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.alpha = 0.5

Initial values in code

  • xs = [1, 2]
  • ys = [2, 4]

Calculated here

Result expression: { theta, empiricalRisk, penalty, minimum: empiricalRisk + penalty }

  • alpha = input.alpha Uses: input.alpha
  • theta = 5 / (2.5 + alpha) Uses: alpha
  • errors = xs.map((x, i) => theta * x - ys[i]) Uses: xs, theta, ys
  • empiricalRisk = errors.reduce((sum, e) => sum + e * e, 0) / 2 Uses: errors
  • penalty = alpha * theta * theta Uses: alpha, theta

Returns

Example result
theta
≈1.667
empiricalRisk
≈0.2778
penalty
≈1.389
minimum
≈1.667

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

Result

Enable JavaScript to run this example.

Technical statement

The toy uses fθ(x)=θx and two invented pairs (1,2),(2,4). Differentiating its quadratic objective gives θ=5/(2.5+α), its global minimum for α ≥ 0.

Source: Source expression