Layer Normalization: Per-Sample Feature Scaling
Interactive 3D layer-normalization simulator: watch each sample's own feature vector get re-centered to mean 0 and variance 1 independently, then rescaled by learnable gamma/beta parameters, exactly as inside a Transformer block.
Layer Normalization is the mechanism that keeps deep Transformer and RNN stacks numerically well-behaved: instead of normalizing a feature across every example in a batch (Batch Normalization), it normalizes every feature of one example against each other, independently of any other sample. This simulator renders a grid of samples (rows) and features (columns) as 3D bars — the dim front row is the raw activation vector for each sample, the bright back row is the same sample after subtracting its own mean, dividing by its own standard deviation, and applying the learnable γ (scale) and β (shift) parameters. Randomize the activations, resize the grid, and drag γ/β to see exactly how LayerNorm re-centers wildly different raw scales onto the same mean-0, variance-1 band before the network's next layer ever sees them.
Interactive 3D layer-normalization simulator: watch each sample's own feature vector get re-centered to mean 0 and variance 1 independently of the batch, then rescaled by learnable gamma/beta parameters, exactly as inside a Transformer block.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install