Vanishing Gradients vs. Residual Connections (2D)
A 2D companion to the 3D ResNet residual-connections lab: real backpropagation through a deep multi-layer network, plain vs. residual, with per-layer gradient-norm readouts showing the plain network's gradient vanish exponentially while the residual network's stays healthy.
This is the 2D companion to the 3D residual-connections lab. Instead of an orbiting 3D layer stack, it runs a real forward and backward pass through two small multi-layer networks side by side — one plain, one with identity skip connections — using the same random weights and the same input. Watch the per-layer gradient-norm curve: the plain network's line collapses toward zero as it approaches the input layers (the vanishing-gradient problem that made very deep networks untrainable before 2015), while the residual network's line stays close to 1 all the way through, because its extra identity path guarantees the gradient a way back that never depends on the layer's weights shrinking it.
A 2D companion to the 3D ResNet residual-connections lab that runs real backpropagation instead of an animated 3D layer stack: two small multi-layer networks sharing the same random weights and input -- one plain, one with identity skip connections -- get a real forward and backward pass every rebuild, and a per-layer gradient-norm chart shows the plain network's signal decay exponentially toward the input layers while the residual network's stays close to 1, exactly the degradation problem the original ResNet paper diagnosed.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install