The Modern Mathematics of Deep Learningexplained for non-mathematicians

A finite class of scores and labels

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.

Model classes and structure · Describe families of rules, their size and structural properties.

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 Learning from examples · 1.2.3 Does it work on new examples? · 1.3 The questions ahead · More source sections

The source forms a class of real-valued network rules by changing parameters, and a class of classifiers by applying sign.

In the toy, the input space contains just x=1 and two candidate weights produce scores −1 and +1. The learning algorithm selects the positive rule for a positive label.

Function classes describe which rules an algorithm can choose.

Source formula example

Fa,sgn⁡={sgn⁡(Φa(⋅,θ)):θ∈RP(N)}\mathcal F_{a,\operatorname{sgn}}=\{\operatorname{sgn}(\Phi_a(\cdot,\theta)): \theta\in\mathbb R^{P(N)}\}

illustration · The toy has a finite domain and two explicitly chosen parameter values. It does not calculate the size, VC dimension or Rademacher complexity of the full source network class.

Symbols

Faℱ_a
Source class of realizations for architecture a as parameters vary.
Fa,sgnℱ_{a,sgn}
Classifier class obtained by applying the source sign function.
M(X,Y)\mathcal{M}(\mathcal{X},\mathcal{Y})
Measurable functions from input to output space.

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

  • x = 1
  • weights = [-1, 1]
  • label = 1

Calculated here

Result expression: { x, weights, scores, classifiers, risks, selected, selectedClass, classSize: classifiers.length, vcDimension: 1, rademacherComplexity: 1, }

  • scores = weights.map((weight) => weight * x) Uses: weights, x
  • classifiers = scores.map((score) => (score >= 0 ? 1 : -1)) Uses: scores
  • risks = classifiers.map((prediction) => (prediction === label ? 0 : 1)) Uses: classifiers, label
  • selected = risks.indexOf(Math.min(...risks)) Uses: risks
  • selectedClass = [classifiers[selected]] Uses: classifiers, selected

Returns

Example result
x
1
weights
array (2 items): [-1, 1]
scores
array (2 items): [-1, 1]
classifiers
array (2 items): [-1, 1]
risks
array (2 items): [1, 0]
selected
1
selectedClass
array (1 items): [1]
classSize
2
… (10 items)

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

Result

Enable JavaScript to run this example.

Technical statement

On the single-point toy domain, the two binary rules are all functions from {1} to {−1,1}; the positive rule is optimal for the shown label. Both label patterns on one point occur, so the toy VC dimension is 1. For one sample point, the supremum of the absolute signed average over the two constant ±1 rules is 1 for either random sign, so its expected Rademacher complexity is 1. The source discusses a potentially data-dependent restricted algorithm range; the toy selectedClass has one member and is a proper subset of this toy class.

Source: Function classes