# Instance Normalization: The Missing Ingredient for Fast Stylization

Dmitry Ulyanov, Andrea Vedaldi, Victor Lempitsky · arXiv · 2016-7-27

- **Problem** Optimization-based style transfer gives strong results but is slow, and the feed-forward generators that replace it have not matched its quality, with border artifacts and poorer results on large training sets.
- **Method** Swaps the batch normalization layers of the feed-forward generator for instance normalization, which normalizes each image's channels over its own spatial positions, and keeps this normalization active at test time.
- **Results** Both generator architectures looked clearly better after the swap than with batch normalization, in qualitative comparisons; the residual generator of Johnson et al. was used for the main results.

## Why feed-forward stylization falls short

Gatys et al. transfer style by iterative optimization that matches feature statistics, and the results are strong but expensive, since one 512×512 image can take several minutes. Feed-forward generators trained by Ulyanov et al. and by Johnson et al. produce a stylized image in a single pass, but in the reported comparisons neither reached the quality of the optimization method.

Figure 1 shows the kind of stylization that these generators aim to match.

The fast stylization generator of Ulyanov et al. gave poorer results when trained on many examples, and a network trained on 16 images did better than one trained on thousands. The most serious artifacts appeared along the image border, caused by the zero padding applied before every convolution, and more elaborate padding did not remove them.

The authors argue that the output should not depend on the contrast of the content image, because the style loss makes the contrast of the stylized image follow that of the style image. The generator should therefore discard the contrast of its input, but the convolution, pooling, upsampling and batch normalization layers of the existing generators make such a highly nonlinear normalization hard to learn.

## Per-image normalization in place of batch statistics

The starting point is a simple contrast normalization, in which each element of a channel is divided by the sum of that channel over the spatial positions of the same image. Given the tensor x with T images, C channels and spatial size W×H, the operation is written as follows. \\\[ y\_{tijk} = \\frac{x\_{tijk}}{\\sum\_{l=1}^{W}\\sum\_{m=1}^{H} x\_{tilm}} \\\] The authors note that it is unclear how such a division could be realized with ReLU and convolution alone.

Batch normalization, which the generator of Ulyanov et al. already uses, subtracts a mean \\(\\mu\_i\\) and divides by \\(\\sqrt{\\sigma\_i^2+\\epsilon}\\), with both statistics computed for each channel over all images in the batch and all spatial positions. \\\[ y\_{tijk} = \\frac{x\_{tijk}-\\mu\_i}{\\sqrt{\\sigma\_i^2+\\epsilon}}, \\quad \\mu\_i = \\frac{1}{HWT}\\sum\_{t=1}^{T}\\sum\_{l=1}^{W}\\sum\_{m=1}^{H} x\_{tilm} \\\] The statistics therefore mix images, so the normalization is not specific to a single image.

Instance normalization keeps the same form but computes the mean \\(\\mu\_{ti}\\) and variance \\(\\sigma\_{ti}^2\\) separately for each image t and channel i, using only the H×W spatial positions of that image. \\\[ y\_{tijk} = \\frac{x\_{tijk}-\\mu\_{ti}}{\\sqrt{\\sigma\_{ti}^2+\\epsilon}}, \\quad \\mu\_{ti} = \\frac{1}{HW}\\sum\_{l=1}^{W}\\sum\_{m=1}^{H} x\_{tilm} \\\] The authors replace every batch normalization layer in the generator with an instance normalization layer.

The authors argue that removing the instance-specific shift in mean and covariance simplifies the learning problem. Unlike batch normalization, which is frozen at test time, instance normalization is also applied when the trained generator stylizes new images.

## Effect of the swap on both generators

The authors tested the generator of Ulyanov et al. and the generator of Johnson et al., the latter reproduced from its published description because the original network was not available. Before the change, the two generators showed similar performance and similar shortcomings. Figure 5 shows this comparison in its first row, with batch normalization.

After batch normalization was replaced by instance normalization and both generators were retrained with the same hyperparameters, both improved, as the second row of Figure 5 shows. The authors report that the two architectures remained similar in quality after the change, and that they preferred the residual architecture of Johnson et al.

because it was somewhat more efficient and easier to use.

## Limits of the visual evidence

The improvement is shown through visual comparisons in the figures, and the text reports no quantitative metric for the comparison of the generators. Only the generators of Ulyanov et al. and Johnson et al. were compared, and the Johnson generator was rebuilt from its description. The border artifacts caused by zero padding were described before the change, and the text does not measure them after the swap.

## Paper info

- **Authors**: Dmitry Ulyanov, Andrea Vedaldi, Victor Lempitsky
- **Venue**: arXiv · Preprint
- **First published**: 2016-7-27
- **Added**: 2026-10-18
- **Updated**: 2017-11-6
- **Version**: v3
- **arXiv**: 1607.08022
- **Category**: cs.CV
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1607.08022v3) · [PDF ↗](https://arxiv.org/pdf/1607.08022v3)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Dmitry Ulyanov, Andrea Vedaldi, Victor Lempitsky (2016). Instance Normalization: The Missing Ingredient for Fast Stylization. arXiv:1607.08022v3. https://arxiv.org/abs/1607.08022v3

**BibTeX**

```
@misc{ulyanov2016instance,
  title = {{Instance Normalization: The Missing Ingredient for Fast Stylization}},
  author = {Dmitry Ulyanov and Andrea Vedaldi and Victor Lempitsky},
  year = {2016},
  eprint = {1607.08022},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1607.08022v3}
}
```

## Other paper commentary

- [Group Normalization](https://refivu.com/en/papers/73ea525c-b90c-43b2-b656-bb21666ab914-group-normalization.md)
- [Layer Normalization](https://refivu.com/en/papers/2f67f179-7720-4b69-8cac-e7157bee38ae-layer-normalization.md)
- [Root Mean Square Layer Normalization](https://refivu.com/en/papers/97c61522-5940-4a28-ad7d-4126a3ce8c01-root-mean-square-layer-normalization.md)
- [Expectile Regularization for Fast and Accurate Training of Neural Optimal Transport](https://refivu.com/en/papers/eed71a11-0424-45c6-8f8e-e7d5e94053d5-expectile-regularization-for-fast-and-accurate-training-of.md)
- [Observational Scaling Laws and the Predictability of Langauge Model Performance](https://refivu.com/en/papers/97beb965-1477-4864-b69f-e363cc2d64d9-observational-scaling-laws-and-the-predictability-of.md)
- [Nearly Tight Almost Sure Convergence Rates for the Last iterate of SGD](https://refivu.com/en/papers/c26b6eb1-221b-422a-af69-6be099d9f639-nearly-tight-almost-sure-convergence-rates-for-the.md)
- [LoRA: Low-Rank Adaptation of Large Language Models](https://refivu.com/en/papers/fec4f8e4-2771-4948-a986-0295db47b321-lora-low-rank-adaptation-of-large-language-models.md)

## Terms in this paper

- [Batch Normalization](https://refivu.com/en/terms/2b3e5f8509f6-batch-normalization)
- [Instance Normalization](https://refivu.com/en/terms/a80f303a09b9-instance-normalization)
- [style transfer](https://refivu.com/en/terms/00f82d672737-style-transfer)
- [zero padding](https://refivu.com/en/terms/9ba05b7fdd35-zero-padding)
- [style loss](https://refivu.com/en/terms/162c474955cc-style-loss)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/d30fae5e-d1ad-4ef1-9b41-da9a7a9f25cf-instance-normalization-the-missing-ingredient-for-fast)
