Normalising flows: interactive change-of-variables and layer stacking
log p(x) = log p_z(f⁻¹(x)) + log|df⁻¹/dx|
The orange probe x tracks through the formula live. Stretching spreads probability — density must shrink. Squishing concentrates it — density grows.
Each layer f_k is a simple invertible function. Stacking K layers: x = f_K(f_{K−1}(…f_1(z)…)). The log-likelihood just sums the log-Jacobians: log p(x) = log p_z(z) + Σ_k log|det J_{f_k}|