Home▸Machine Learning & Neural Networks▸Recurrent Network Gradient Flow: Jacobian Products, Spectral Radius and the Memory Horizon

Recurrent Network Gradient Flow: Jacobian Products, Spectral Radius and the Memory Horizon

Unroll a small recurrent network over time and watch the learning signal travel backwards. Set the spectral radius of the recurrent weights, the input drive, a gated identity path and the sequence length to see the Jacobian product shrink or blow up, the singular values fan out, the activation slopes saturate and the memory horizon appear. Gradient clipping and a leaky or gated path are included. The chips and gradient bars are modelled in Blender, with numerical checks built in, including finite differences of the real backpropagation gradient.

Machine Learning & Neural Networks3DAdvanced60 FPS📱 Mobile-adapted🟠 Blender⇄ 2D version
Recurrent Network Gradient Flow: Jacobian Products, Spectral Radius and the Memory Horizon ↗ Open standalone

Sequence models learn by pushing an error signal backward through every unrolled time step of a recurrent network, and each step multiplies that signal by the same local Jacobian — the recurrent weight times the activation's derivative. This simulator runs a real scalar RNN forward, then animates the backward pass step by step in 3D: a row of bars tracks the forward hidden-state magnitude while a second row tracks the live gradient magnitude, shrinking toward the vanishing regime or blowing up toward the exploding one depending on the recurrent weight and activation function you choose. Live readouts report the current step's gradient, the gradient that finally reaches the earliest time step, and how many steps the signal survives above a 10⁻³ threshold — the same exponential mechanism that motivated gated architectures like LSTM and GRU.

⚙ Under the hood

Unroll a small recurrent network over time and watch the learning signal travel backwards. Set the spectral radius of the recurrent weights, the input drive, a gated identity path and the sequence length to see the Jacobian product shrink or blow up, the singular values fan out, the activation slopes saturate and the memory horizon appear. Gradient clipping and a leaky or gated path are included. The chips and gradient bars are modelled in Blender, with numerical checks built in, including finite differences of the real backpropagation gradient.

RNNbackpropagationdeep learningsequence modelsgradientsLSTMRecurrent Neural NetworkVanishing GradientBackpropagation Through TimeSpectral RadiusGradient Clipping

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)