Forward predictionBackward gradient flow
Weights: Initial vs Current
| Connection | Initial | Gradient | Step update | Current |
|---|---|---|---|---|
| x2 -> h1_2 | 0.70 | -0.040 | +0.002 | 0.726 |
| h1_2 -> h2_2 | 1.20 | -0.018 | +0.001 | 1.211 |
| h2_2 -> y_hat | 1.20 | -0.051 | +0.003 | 1.233 |
Current Update Calculation
error = prediction - target = 0.84 - 1.00 = -0.16gradient = error * activation_derivative = -0.16 * 1.00 = -0.16new_weight = old_weight - learning_rate * gradientstep_update = -0.050 * -0.040 = +0.002current_weight = 0.700 + cumulative updates = 0.726Compute output errorCompute output-layer gradientPropagate gradient to previous layerAccumulate gradients for weights and biasesUpdate weights using SGD
What is Backpropagation?
Backpropagation computes how much each weight contributed to the error, then sends that gradient backward so the optimizer can update the network.
OutputHidden 2Hidden 1Input