See what .backward() actually does
Backflow is a small neural network you can poke. Drag an input slider and it runs a full
forward and backward pass, then colors every neuron by how strongly it responds to that
input. The gradients you usually only read about become something you watch move.
What it does
-
Gradients as color, not equations. Every neuron is tinted by
d(output) / d(neuron), the exact value backpropagation computes, on a
cold-to-hot diverging scale so you can see which neurons carry the signal.
-
Drag and it ripples. Moving a slider recomputes the whole network and
reveals the new gradients layer by layer, left to right, in under 300ms, so the flow
reads as a wave rather than a flat repaint.
-
Inspect any connection. Hover an edge for its weight, its upstream
gradient, and their product: one entry of the Jacobian, written out. Hover a neuron for
its exact gradient.
-
Switch the output you differentiate. Pick which output neuron to
backpropagate from and a different row of the Jacobian appears.
-
No framework, no black box. The autodiff engine is a small scalar
Value graph written from scratch and unit-tested against analytic
derivatives. No TensorFlow.js, no PyTorch.
How to use it
- Drag any
x slider and watch the heatmap recolor from left to right.
- Change the backprop target to see the gradient of a different output.
- Hover a neuron or a connection to read the exact number behind the color.
- Use Randomize to draw new weights, or Reset to return to the starting network.
FAQ
- What is a Jacobian?
-
It is the table of partial derivatives of a network's outputs with respect to its
inputs: how much each output moves when you nudge each input. Backflow shows one row of
it at a time, live, as color across the neurons.
- Does this train the network?
-
No. Backflow visualizes gradients rather than doing gradient descent. Weights only change
when you press Randomize or Reset, so you can study a fixed network as long as you like.
- Do I need to install anything?
- No. It runs entirely in the browser with no account, no server, and no GPU.
- Is the math real or an approximation?
-
Real reverse-mode automatic differentiation. The same engine that draws the heatmap is
checked against hand-derived analytic derivatives in the test suite.
- Can I read the code?
-
Yes. The autodiff engine and the network are original and small enough to read in one
sitting. The
source is on GitHub.
View the code on GitHub