Conditional Batch Normalization: Modulating Features with Side Information
· 2 min read · 345 words
Conditional batch normalization (CBN) turns batch normalization's fixed affine parameters into functions of a conditioning input.
Ordinary batch normalization applies
CBN replaces and with values predicted from a condition :
The condition may be a class embedding, a language representation, or another modality. This gives the conditioning signal direct control over intermediate channels instead of waiting for late feature fusion.
What the original work showed
The method was introduced for visual question answering. In that work, a language embedding predicted residual changes to the frozen scale and shift parameters throughout a pretrained ResNet:
This allowed the question to influence visual processing from early layers. The paper's ablations found that modulating the complete visual pipeline worked better than restricting modulation to later stages.
Practical cautions
- CBN still depends on batch statistics. Very small or non-IID batches can make those statistics noisy.
- At inference, confirm whether running statistics or current-batch statistics are used.
- If batch dependence is undesirable, the same conditioning idea can be applied after layer, group, or instance normalization.
- Bound or regularize predicted scales if the conditioning network creates unstable magnitudes.
CBN is best understood as feature-wise affine modulation attached to batch normalization. The conditioning mechanism is the reusable idea; batch normalization itself is not mandatory.
Primary source
- Harm de Vries et al., Modulating early visual processing by language, 2017.
