Training Without Normalization
Fixup, NFNets and Dynamic Tanh: what normalization layers really provide.
If normalization layers mostly keep signals well scaled, careful initialization should be able to replace them. That bet has paid off three times: Fixup trained 10,000-layer residual networks with no normalization at all, normalizer-free ResNets matched the best batch-normalized image classifiers, and Dynamic Tanh replaces every LayerNorm in a transformer by an elementwise squashing function. Each success also revealed what normalization had been quietly providing, and what any replacement must supply instead.
What you’ll learn
- List what normalization layers provide (signal propagation at initialization, scale invariance, stability at large learning rates, regularization) and match each to a normalizer-free substitute.
- Prove that normalization downscales each residual branch by about the square root of its depth at initialization, and reproduce the effect with a zero-initialized scalar (SkipInit).
- Derive Fixup's rescaling from the requirement that one SGD step changes the network's output by , independently of depth.
- Build a normalizer-free ResNet with analytic variance tracking and Scaled Weight Standardization, and compute its gain for ReLU.
- Explain Dynamic Tanh, the observation behind it, its settings for language models and its limits.
What normalization really provides
BatchNorm, LayerNorm & RMSNorm listed six explanations of why normalization helps. To remove it, you have to supply each benefit some other way:
| What normalization provides | How | Normalizer-free substitute |
|---|---|---|
| Signal propagation at initialization | Rescales activations at every layer; on residual branches it shrinks each branch relative to the skip path | Zero-initialized or rescaled branches (Fixup, SkipInit, ReZero); analytic variance tracking (normalizer-free ResNets) |
| Scale invariance and an automatic effective learning rate | The loss ignores the scale of the preceding weights, so the effective rate is (What Weight Decay Really Does) | Weight standardization keeps a form of it; scalar multipliers per branch; otherwise, retune the learning rate |
| Stability at large learning rates and batch sizes | Smoother landscape; updates bounded relative to the weights | Adaptive gradient clipping (Exploding Gradients & Clipping) |
| Regularization | Batch noise | Dropout, stochastic depth, mixup, stronger augmentation |
A residual network computes , starting from an input of unit variance, as De and Smith index it (Residual Connections does the same bookkeeping from , with and without normalization and for scaled branches). With zero-mean weights, the branch output has zero mean given its input, so it is uncorrelated with the skip path and variances add:
Without normalization, take a branch with He initialization. It preserves variance, , so every block doubles the variance and the branch weighs as much as the skip path: no block is close to the identity.
With normalization on the branch, , the branch sees unit-variance inputs whatever the stream's size, so and the variance grows only linearly. Block 's branch then contributes a fraction of its output variance: its activations are downscaled by about relative to the skip path.
Most blocks of a deep normalized ResNet therefore start close to the identity, and a branch downscaled in the forward pass is downscaled in the backward pass too, so gradients stay well behaved. To test the explanation, De and Smith removed normalization and multiplied each branch by a learnable scalar initialized at zero, SkipInit, so that every block starts as exactly the identity. It trained residual networks a thousand layers deep.
In a normalized ResNet at initialization, the input to block 99 has variance about 99 and its normalized branch adds about 1. What percentage of the block's output variance comes from the branch?
Show the answer
1 %
: block 99 is 99% identity at initialization, its branch activations downscaled by relative to the skip path. Deep blocks start as small corrections; that is what makes depth trainable.
SkipInit's fine print says something about the other rows of the table. On ImageNet with ResNet-50 (V2), SkipInit with biases matched BatchNorm at a batch size of 256 (74.9% against 75.0% top-1) but fell to 70.8% against 74.9% at 4,096, where batch normalization's ability to take larger learning rates pays off. With dropout added to replace batch normalization's regularization, it beat BatchNorm at small batch sizes (75.6% at 256).
Fixup: initialize so that every step is the right size
Zhang, Dauphin and Ma (2019) started from a different requirement. They first showed that in a ResNet without normalization and with standard initialization, the gradient of some layers is bounded below by a quantity that grows with depth, because the output logits blow up. Instead of merely taming the forward pass, they asked that each SGD step change the network's output by as , independently of depth. Since the updates of different residual branches move the output in strongly correlated directions, each of branches should then contribute . The scaling follows from a one-dimensional model of a branch.
Model a branch of layers as a product of scalars, , where stands for a standard, variance-preserving initialization and for rescaling layer . One SGD step moves each by , so to first order:
The sum is dominated by the term that omits the smallest . Requiring gives Fixup's constraint:
Setting all equal gives . Fixup instead sets the last layer to zero, , so that the branch starts as the zero function and need not unlearn a random initial map; then comes only from , and the other layers carry the same scale:
ResNet-50 has residual branches, each a bottleneck of layers. By what factor does Fixup multiply the He-initialized weights of the first two layers of each branch?
Show the answer
0.5
, and the third layer starts at zero. For basic blocks of two layers the exponent is : . Deeper networks shrink their branches more, but only as a small power of .
Trained with the same learning rate as BatchNorm, Fixup matched its first-epoch accuracy on CIFAR-10 even at 10,000 layers, where other rescalings failed beyond 100. On ImageNet, ResNet-50 with Fixup alone reached 27.6% top-1 error against 23.6% for BatchNorm, but with a lower training error: the gap was overfitting, not optimization. With strong mixup (coefficient 0.7, against 0.2 for BatchNorm) it reached 24.0%, against 23.3% for BatchNorm with mixup. In machine translation, Fixup replaced every LayerNorm of a transformer and matched it (29.3 BLEU on WMT English–German for both). A transformer-specific variant, T-Fixup (Huang et al., 2020), followed.
Normalizer-free ResNets and NFNets
Brock, De and Smith (2021) copied what batch normalization does at initialization instead of only zeroing branches. Their blocks compute , where the branch is built to preserve variance, is a fixed number computed analytically from (with ), and the count restarts at each stage transition. Dividing by is what normalization did to the branch input; the slow variance growth is what it did to the stream.
One obstacle remained, invisible in variance calculations: mean shift. ReLU outputs are positive, with mean , so output channel of has mean , which is not zero for any particular weight matrix. With He weights the row sum is Gaussian with variance , so channel means of typical size appear, as large as half the signal, and they compound with depth until different inputs produce strongly correlated activations. The fix standardizes the weights rather than the activations.
Reparameterize each row (one output channel, with fan-in ) by its own mean and standard deviation , recomputed in every forward pass, with a fixed gain :
Feed it i.i.d. inputs with mean and variance . Zero row sums kill the mean shift, and the squared row norm fixes the variance:
So makes the layer variance-preserving. For ReLU and , and , so:
Compute the Scaled Weight Standardization gain for ReLU.
Show the answer
1.71
, so . It is larger than He's because the mean has been removed: He's factor restores the second moment , Scaled WS must restore the smaller variance .
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
RELU_GAIN = math.sqrt(2 / (1 - 1 / math.pi)) # 1 / std of ReLU(z), z ~ N(0, 1): about 1.713
class ScaledStdConv2d(nn.Conv2d):
"""Convolution with Scaled Weight Standardization (Brock, De & Smith, 2021)."""
def __init__(self, *args, gain=RELU_GAIN, eps=1e-4, **kwargs):
super().__init__(*args, **kwargs)
self.gain, self.eps = gain, eps
def forward(self, x):
w = self.weight # (out, in, k, k): one row per output channel
fan_in = w[0].numel()
mean = w.mean(dim=(1, 2, 3), keepdim=True)
var = w.var(dim=(1, 2, 3), keepdim=True, unbiased=False)
w_hat = self.gain * (w - mean) / torch.sqrt(var * fan_in + self.eps)
return F.conv2d(x, w_hat, self.bias, self.stride, self.padding, self.dilation, self.groups)Fed F.relu of standard Gaussian inputs, its outputs have mean about and variance about away from the zero-padded border, while a plain He-initialized convolution gives each channel a mean shift. Standardization costs little in training, since it acts on the weights rather than the activations, and nothing at inference, where is computed once.
Every other operation must be audited the same way: a squeeze-and-excitation gate multiplies by values in and attenuates the signal, so Brock et al. simply multiply its output by 2. With these pieces, normalizer-free ResNet-50 reached 76.8% top-1 accuracy on ImageNet against 76.4% for the batch-normalized version, but only once stochastic depth and dropout replaced batch normalization's regularization; without them the order reversed (75.8% against 76.8%). The models still lagged at batch sizes of 4,096 and above, and could not train with very strong augmentation.
NFNets (Brock, De, Smith & Simonyan, 2021) removed that last limit with adaptive gradient clipping, which caps each unit's gradient relative to the norm of its weights (Exploding Gradients & Clipping), plus a redesigned architecture. Their NFNet-F1 matched EfficientNet-B7's ImageNet accuracy while training up to 8.7 times faster, the largest model reached 86.5% top-1 (with sharpness-aware minimization), and after pretraining on 300 million labeled images normalizer-free models fine-tuned better than their batch-normalized counterparts, reaching 89.2%.
Transformers without normalization: Dynamic Tanh
Transformers lean on LayerNorm even harder than ResNets on BatchNorm, and the normalizer-free ResNet recipes transfer poorly: in vision transformers, Fixup and SkipInit needed much lower learning rates to avoid divergence. Zhu, Chen, He, LeCun and Liu (2025) looked at what trained LayerNorms actually compute. Plotting each LayerNorm's input against its output, before the learned affine map, in a ViT, a wav2vec 2.0 speech model and a diffusion transformer, they found nearly straight lines in early layers and S-shaped, tanh-like curves in deeper ones.
The S comes from mixing tokens. For one token, LayerNorm is linear: it subtracts a mean and divides by that token's standard deviation. But tokens have very different spreads, and the large values sit in a few channels of high-spread tokens, which get the smallest slopes. About 99% of the points lie in the linear middle; the rest, such as inputs beyond in the ViT, are squashed. Zhu et al. hypothesized that this nonlinear squashing of extreme values is what makes normalization indispensable, and replaced it with the squashing alone.
import torch
import torch.nn as nn
class DyT(nn.Module):
"""Dynamic Tanh (Zhu et al., 2025): a drop-in replacement for nn.LayerNorm(d)."""
def __init__(self, d, alpha0=0.5):
super().__init__()
self.alpha = nn.Parameter(torch.tensor(alpha0)) # one learnable scalar
self.gamma = nn.Parameter(torch.ones(d)) # per-channel gain and shift
self.beta = nn.Parameter(torch.zeros(d))
def forward(self, x):
return self.gamma * torch.tanh(self.alpha * x) + self.betaThe whole method. For large language models, Zhu et al. also added a learnable scalar after the embedding layer and tuned separately for the attention blocks and for the rest.
Without tuning, DyT matched or beat LayerNorm across their benchmarks: supervised ImageNet accuracy went from 82.3% to 82.5% for ViT-B and from 83.1% to 83.6% for ViT-L, and ConvNeXt-B stayed at 83.7%. LLaMA models from 7 to 70 billion parameters, trained on 200 billion tokens, ended within of RMSNorm's final loss. Language models were the one place where tuning the initial paid off: larger models needed smaller values, with higher values in attention blocks than elsewhere, from and at 7 billion parameters down to and at 70 billion.
The limits are as informative. Replacing BatchNorm by DyT in classic ConvNets cost accuracy (ResNet-50 fell from 76.2% to 68.9%, VGG19 from 72.7% to 71.0%), so squashing does not substitute for batch statistics in networks with a normalization after every convolution. And although an elementwise operation needs no reduction, DyT gave no speedup over RMSNorm once both were compiled.
For any single token, LayerNorm's output is a linear function of its input. Why, then, does a plot of input against output over all tokens of a trained ViT look like a tanh curve?
- Because LayerNorm applies a tanh internally before its affine map
- Because the learned gain saturates for large inputs
- Because each token is divided by its own standard deviation: high-spread tokens, which hold the extreme values, get the smallest slopes, so together the lines bend into an S
- Because the plot is on a logarithmic scale
Show the answer
C. Because each token is divided by its own standard deviation: high-spread tokens, which hold the extreme values, get the smallest slopes, so together the lines bend into an S
Each token contributes a straight line through its own mean, with slope . The extreme inputs belong to tokens with large , whose lines are flattest, so the cloud of all points bends over at the ends: a nonlinear squashing of outliers that no single token sees.
The price of going normalizer-free
| Method | Replaces normalization with | Known costs |
|---|---|---|
| Fixup (2019) | Zero-initialized branch ends, rescaling, scalar multipliers and biases | Needs stronger regularization; behind BatchNorm at very large batches (73.0% against 74.9% top-1 for ResNet-50 V2 at a batch of 4,096; De & Smith, 2020) |
| SkipInit (2020), ReZero (2021) | One learnable scalar per branch, initialized at | The same; their role in deep transformers is covered in Scaling Residual Branches with Depth |
| Normalizer-free ResNets, NFNets (2021) | Analytic variance scaling, Scaled Weight Standardization, adaptive gradient clipping | Every operation's variance must be checked; extra regularization; a clipping threshold to tune |
| Dynamic Tanh (2025) | An elementwise | must be tuned for language models; does not replace BatchNorm in classic ConvNets; no speedup once compiled |
The pattern across the table: removing normalization is possible whenever its first job, signal propagation at initialization, is done some other way, but every method then pays elsewhere. Fixup and SkipInit lose the large-batch stability and the regularization; NFNets buy them back with clipping and explicit regularizers; DyT keeps transformers stable but needs its scale tuned in large language models and fails where batch statistics did real work. Normalization layers bundle several services into one cheap operation, which is why they remain the default as of the mid-2020s.
Key takeaways
- Normalization supplies signal propagation at initialization, scale invariance, stability at large learning rates and regularization; a normalizer-free network must replace each one.
- On residual branches, normalization keeps each branch at unit variance while the stream grows like , so block starts with its branch downscaled by ; a zero-initialized scalar (SkipInit) reproduces this.
- Fixup asks every SGD step to change the output by : zero-initialize the last layer of each branch and scale the others by .
- Normalizer-free ResNets track the variance analytically and remove ReLU's mean shift with Scaled Weight Standardization (gain ); with adaptive gradient clipping, NFNets matched the best image classifiers of their time.
- Dynamic Tanh, , replaces LayerNorm and RMSNorm in transformers by squashing extreme values, but needs a tuned in large language models and does not replace BatchNorm in classic ConvNets.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Why do deep ResNets with BatchNorm on their branches train easily, according to De and Smith (2020)?
- At initialization, normalization holds each branch at unit variance while the variance carried by the skip path rises linearly with depth; block 's branch is thus about times smaller than the stream, and the block starts near the identity
- BatchNorm removes internal covariate shift on the skip path
- BatchNorm makes every residual branch an orthogonal map
- Normalization doubles the variance at every block, which prevents vanishing gradients
Show the answer
A. At initialization, normalization holds each branch at unit variance while the variance carried by the skip path rises linearly with depth; block 's branch is thus about times smaller than the stream, and the block starts near the identity
while , so the branch contributes of the output variance. A learnable scalar initialized at zero (SkipInit) reproduces the effect without any normalization.
What requirement does Fixup's rescaling come from?
- Each layer's activations should have unit variance at initialization
- The weights of every branch should be orthogonal
- One SGD step should change the network's output by independently of depth, so each of the branches contributes
- The gradient of every layer should have unit norm
Show the answer
C. One SGD step should change the network's output by independently of depth, so each of the branches contributes
For a branch , the first-order change after one step is dominated by ; making it gives .
Why does Scaled Weight Standardization subtract each row's mean from the weights?
- To make the weight matrix orthogonal
- Because ReLU outputs have a positive mean, a row with a nonzero sum gives its output channel a mean shift; zero-sum rows remove it
- To make the layer independent of the batch size
- To reduce the number of parameters
Show the answer
B. Because ReLU outputs have a positive mean, a row with a nonzero sum gives its output channel a mean shift; zero-sum rows remove it
with for ReLU, so only zero row sums guarantee zero-mean outputs. Dividing by and multiplying by then fixes the variance at one.
What does Dynamic Tanh compute, and where did it fail to match normalization?
- A per-token standardization followed by a tanh; it failed in language models
- of the batch-normalized input; it failed in vision transformers
- followed by a tanh; it failed in diffusion transformers
- elementwise, with a learnable scalar ; it matched LayerNorm and RMSNorm in transformers but lost accuracy when replacing BatchNorm in ResNet-50
Show the answer
D. elementwise, with a learnable scalar ; it matched LayerNorm and RMSNorm in transformers but lost accuracy when replacing BatchNorm in ResNet-50
DyT computes no statistics: it rescales by and squashes. It matched LayerNorm in ViTs and RMSNorm in LLaMA models up to 70 billion parameters, but ResNet-50 fell from 76.2% to 68.9% when its BatchNorms were replaced.
Further reading
- H. Zhang, Y. N. Dauphin & T. Ma, "Fixup initialization: Residual learning without normalization," ICLR (2019).
- S. De & S. L. Smith, "Batch normalization biases residual blocks towards the identity function in deep networks," NeurIPS (2020).
- A. Brock, S. De & S. L. Smith, "Characterizing signal propagation to close the performance gap in unnormalized ResNets," ICLR (2021).
- A. Brock, S. De, S. L. Smith & K. Simonyan, "High-performance large-scale image recognition without normalization," ICML (2021).
- J. Zhu, X. Chen, K. He, Y. LeCun & Z. Liu, "Transformers without normalization," CVPR (2025).