Beta

Sync to cloud

Uses your current signed-in YoolVi account. A Learn profile is not required.

Upload a snapshot of this browser’s saved lesson work across all subjects, including notes, experiments, journal and review history. Existing guest work is included only when you confirm below. This does not upload account credentials or award XP.

Sync uploads to your private account; it does not automatically merge or replace this device’s work. On another device, download the cloud copy and use My Learning’s backup import. The previous cloud snapshot is retained when a new one replaces it.

Export or import this device’s work

No background uploads. Edits made after a snapshot need another sync. On shared devices, work is bound to the first account observed by cloud sync; another account must use a separate browser profile. Keep your own downloaded backup too.

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Back to Representations and gradients

Shared AI lesson · Representations and gradients

Explain: Gradient contributions

Why did that happen?

The first weight turns input 2 into a middle number. The second weight turns that number into the answer. Working backward tells us how each weight affects the mistake. We calculate both changes before applying either one. Otherwise the changes would use different starting points.

Explain it in your own words · optional

Compare your prediction and explanation with the observed numbers.

Try a different case · guided practice
A different case

At w₁ = 2, w₂ = 1, input 2 and target 10, what simultaneous rate-0.01 update follows?

At w₁ = 2, w₂ = 1, input 2 and target 10, what simultaneous rate-0.01 update follows?
Need a hint?

Keep the old weights fixed while you work out both changes. Apply them together only after both calculations are ready.

How this helps your classifier project

The classifier computes all gradients before changing its parameters. Training is not a replay animation: its next predictions must come from the actual updated model.

Watch how it works Forward, backward, then update
READ & CONNECT

Understand what changed.

Back to the experiment

A shorter explanation, with the original worked examples available below. Both explain the same experiment and its limits.

Same learning goal in both modes: Follow a wrong answer back through two adjustable numbers.

The idea in everyday terms

Think of two adjustable knobs connected in a chain. The first changes an intermediate value and the second changes the final prediction. To improve the prediction, we need to know how much each knob contributes to the error. Backpropagation calculates these sensitivities by working backward through the chain.

What to watch in the experiment

First calculate and keep the forward values. Then work backward, multiplying the sensitivities along each connection. Keep both weights fixed while calculating both gradients. Only after that does the optimizer use the gradients to change the weights together.

What this does not establish

A gradient is a local sensitivity, not a new weight or a guarantee of a better final model. Updating a weight midway changes the calculation and no longer reproduces this simultaneous update.

Open the full worked examples, calculations and limitations

This is the same reference used in Technical mode. Expand it whenever you need the exact numbers, assumptions or further explanation.

First, keep the forward values

We compute h = w₁x, prediction = w₂h, and L = ½(prediction − target)². The factor ½ makes the derivative simpler; it is a different scaling from the previous lesson, so compare losses within this example.

With input 2, target 10, and weights 3 and 1, hidden value h = 6, prediction = 6, and loss = 8. Keep these intermediate values: the backward pass will reuse them.

x→×w1h→×w2y^⟶Lx \xrightarrow{\times w_1} h \xrightarrow{\times w_2} \hat y \longrightarrow L

Multiply local sensitivities along each path

The derivative of loss with respect to prediction is prediction − target, here −4. Changing w₂ changes prediction by h times as much, so its gradient is −4 × 6 = −24.

For w₁, the influence passes through h and then w₂. Multiply the local sensitivities: −4 × w₂ × x = −4 × 1 × 2 = −8. This is the chain rule: changes propagate through dependent operations.

∂L∂w1=(y^−y)w2x,∂L∂w2=(y^−y)h\frac{\partial L}{\partial w_1}=(\hat y-y)w_2x,\qquad\frac{\partial L}{\partial w_2}=(\hat y-y)h

Now the optimizer can take a step

Use gradients from the same old weights for both updates. With rate 0.01, w₁ becomes 3.08 and w₂ becomes 1.24. The new prediction is 7.6384 and the loss is about 2.7886. Updating one weight before calculating the other gradient would be a different procedure.

Backpropagation reuses intermediate values rather than perturbing every parameter and rerunning the whole model. Automatic differentiation applies these rules across large graphs. Long chains can shrink or amplify gradients; initialization, residual connections, normalization, and gradient clipping can help.

Notes, help and related ideas
My notes and reflection
CURIOSITY JOURNAL

What will you take away?

Keep a private reminder for yourself.

Loading your journal…

Add a short reflection

Open your journal or back it up.

Prerequisites and related ideas

Key terms: Backpropagation Gradient Loss