The Modern Mathematics of Deep Learningexplained for non-mathematicians

A recurrent update

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.

Recurrent updates · Update a state using successive inputs.

Convolution, recurrent and residual architectures are not part of this linear penguin model.

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: 6.6 Working through a sequence

Start with a state. At each time step, add the next input and apply ReLU. The resulting state is used at the next step.

A recurrent network can use earlier inputs when processing a sequence.

Source formula example

ht=ϱR(ht−1+xt)h_t=\varrho_R(h_{t-1}+x_t)

illustration · This invented scalar recurrence illustrates state and time steps. It is not a general RNN training algorithm or proof of the source approximation result.

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.last = 3

Initial values in code

  • state = 0

Calculated here

Result expression: { inputs: xs, states }

  • xs = [1, -2, input.last] Uses: input.last
  • states = xs.map((x) => { state = Math.max(0, state + x); return state; }) Uses: xs, state

Returns

Example result
inputs
array (3 items): [1, -2, 3]
states
array (3 items): [1, 0, 3]

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

Result

Enable JavaScript to run this example.

Technical statement

Change the input and run the same code again. The displayed result uses the values shown above.

Source: Teaching example