Autodiff applies the chain rule on a computation graph. Forward pass stores values. Backward pass multiplies local gradients along each path to get ∂loss/∂param.
Try: Click Forward, then Backward. Watch indigo flow forward and orange flow backward.
Automatic differentiation is the engine behind every deep learning framework. It builds a computation graph of operations during the forward pass, then applies the chain rule backwards to compute exact gradients. This visualization shows z = (x+y)·sin(x) as a DAG. Click Forward to see values flow left-to-right, then Backward to see gradients flow right-to-left - exactly what PyTorch's autograd does.
Step through forward pass: values flow from inputs to output
Step through backward pass: gradients flow from output to inputs
Adjust x and y sliders to see all values recompute
See chain rule applied at each node in the graph
Understand exactly what torch.backward() does under the hood
Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.