AnimG LogoAnimG

Backpropagation β€” Gradient Flow

Description

Demonstrates backpropagation in a 3-layer neural network. A forward pass first computes activations left to right, then a loss is computed. Gradients flow backward through the network as a glowing wave, with the chain rule applied at each layer. The key partial derivative formula is displayed.

Backpropagation β€” Gradient Flow

Description

Demonstrates backpropagation in a 3-layer neural network. A forward pass first computes activations left to right, then a loss is computed. Gradients flow backward through the network as a glowing wave, with the chain rule applied at each layer. The key partial derivative formula is displayed.


Phases

# Phase Name Duration Description
1 Intro 3s Title and network displayed
2 Forward Pass 10s Activations flow left to right with values shown
3 Loss Computation 5s Loss function displayed; error value shown in red
4 Backward Pass 16s Gradient glow travels right to left through layers
5 Chain Rule 8s Chain rule formula displayed layer by layer
6 Weight Update 6s Show w ← w - lr * βˆ‚L/βˆ‚w update
7 Outro 4s Training loop concept shown

Layout

+--------------------------------------------------+
|  Title: Backpropagation β€” Gradient Flow          |
+--------------------------------------------------+
|                                                  |
|  [Input]β†’β†’β†’[Hidden]β†’β†’β†’[Output]β†’β†’β†’[Loss L]       |
|                                                  |
|  Forward: activations flow β†’                     |
|  Backward: gradients flow ←  (orange glow)       |
|                                                  |
|  Chain rule:                                     |
|  βˆ‚L/βˆ‚w = (βˆ‚L/βˆ‚a)(βˆ‚a/βˆ‚z)(βˆ‚z/βˆ‚w)                 |
|                                                  |
|  Weight update:                                  |
|  w ← w - Ξ· * βˆ‚L/βˆ‚w                              |
+--------------------------------------------------+

Area Descriptions

  • Center: 3-layer network with forward (cyan) and backward (orange) flow
  • Right: Loss computation box
  • Bottom: Chain rule formula panel

Assets & Dependencies

  • Fonts: LaTeX / sans-serif
  • Manim version: ManimCE 0.19.1

Notes

  • Forward pass shown as cyan flowing wave
  • Backward pass shown as orange/red glowing wave moving in reverse
  • Gradient values shown as small floating numbers near weights
  • Chain rule decomposed into three factors with color coding
Audience: Software EngineerCategory: Cs