# CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features

CutMix fills erased image regions with patches from other images

Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, Youngjoon Yoo · arXiv · 2019-5-13

- **Problem** Regional dropout erases image patches with black pixels or noise, so those pixels carry no training signal. This wastes data, which CNNs need in large amounts.
- **Method** CutMix cuts a box from a second training image and pastes it into the first image. The labels are mixed by area, and the network and loss stay unchanged.
- **Results** On CIFAR-100, PyramidNet-200 with CutMix scored 14.47% top-1 error, compared to 16.45% for the baseline.

## Erased pixels waste training signal

Regional dropout is meant to keep a CNN from leaning on a few small parts of an image, so it erases random rectangles during training. The erased areas are usually zeroed out or filled with random noise, so those pixels stop being informative. The authors see this as a serious limit, because CNNs need large amounts of data and every wasted pixel is wasted training signal.

Erasing still helps, because it pushes the model to use the whole object instead of its most discriminative part. So the open question is how to keep that generalization and localization benefit without throwing pixels away.

## Pasting a patch instead of erasing

CutMix keeps the cut-out step of regional dropout but fills the hole with a patch taken from another training image. The label is mixed in proportion to how many pixels each image contributes, so the target matches what the image shows.

The authors expected two gains from this change. No pixel is left uninformative, so every pixel in the mini-batch still teaches the model. The pasted patch also asks the network to recognize an object from a partial view, which the authors expect to sharpen localization.

Mixup is the closest relative, since it also combines two samples and mixes their labels. Mixup blends whole images, so its samples look unnatural, while CutMix keeps each region a real patch from another photo. The authors say this difference matters most for localization, not just for classification.

## How one CutMix sample is built

Each training iteration draws two samples from the same mini-batch and combines them into one new sample. The mixed image is \\( \\tilde{x} = M \\odot x\_A + (1-M) \\odot x\_B \\), where M is a binary mask that is 0 inside the cut box and 1 elsewhere. So the element-wise product keeps image A outside the box, and the box is filled with pixels from image B.

The label follows the same mixing rule: \\( \\tilde{y} = \\lambda y\_A + (1-\\lambda) y\_B \\). The ratio λ is drawn from Beta(α, α), and the authors set α to 1, which makes λ uniform on (0, 1).

To build the mask, the method samples a box at a uniform random position, with \\( r\_x \\sim \\mathrm{Unif}(0,W) \\) and \\( r\_y \\sim \\mathrm{Unif}(0,H) \\). Its sides are \\( r\_w = W\\sqrt{1-\\lambda} \\) and \\( r\_h = H\\sqrt{1-\\lambda} \\), so the cut covers the fraction \\( 1-\\lambda \\) of the image. Because the sides scale with the image, the box keeps the aspect ratio of the original image.

The mixed image and mixed label then go through the unchanged network and loss function. Since the architecture and loss stay the same, the authors say the training and inference budgets remain the same and the overhead is negligible.

## Does the model look at both objects?

To see what each augmentation teaches, the authors plot class activation mapping (CAM) for a vanilla ResNet-50 on Saint Bernard and Miniature Poodle samples. That ResNet-50 is ImageNet-pretrained and is used only to visualize the effect of each augmentation.

Cutout pushes the network toward less discriminative parts, such as the belly of a Saint Bernard, but it leaves erased pixels unused. Mixup uses every pixel but adds unnatural artifacts, and its CAM shows the model unsure which cues to use. CutMix lets the network localize both classes in the same mixed image.

These are qualitative examples on two classes, so they support the mechanism the authors propose rather than a measured effect.

## ImageNet classification results

The authors also compare CutMix with architecture changes, since adding depth or modules is the usual route to accuracy. The authors note that CutMix comes at little extra memory or computation time.

Rows marked with an asterisk come from the original papers rather than from the authors' runs. The paper reports the best performance seen during training for CutMix and for the other baselines.

## CIFAR-100 results

The baseline is PyramidNet-200 with widening factor 240 and 26.8 M parameters, which scored 16.45% top-1 error on CIFAR-100. The authors chose this strong baseline so that any gain would not come from a weak starting point. Training used batch size 64 for 300 epochs, starting at learning rate 0.25 and decaying at epochs 150 and 225, and results are averaged over three runs.

Only the CutMix plus ShakeDrop row in Table 5 is lower.

ShakeDrop adds noise to intermediate features, while CutMix works on the input image.

## Which design choices matter

The authors swept alpha over 0.1, 0.25, 0.5, 1.0, 2.0 and 4.0 on CIFAR-100. Every value beats the 16.45% baseline, and alpha of 1.0 is the best. The ImageNet runs also fix alpha at 1.

Next the authors move the CutMix step deeper into the network, with index 0 for the image and 1 to 4 for feature layers. Applying CutMix to the input image gives the best result, and every feature-level setting except after layer3 still beats the baseline.

Table 8 tests five CutMix variants on CIFAR-100. Every variant is worse than the original, so each change costs accuracy in this setting.

## Localizing objects with class labels only

In weakly supervised object localization (WSOL), the model learns from class labels only but must still say where the object is. The authors expect CutMix to help because it pushes the classifier to attend to broader sets of cues. They tested this with VGG-GAP and ResNet-50 base models, following existing WSOL training recipes.

Mixup lowers the baseline's localization, which the authors tie to its ambiguous samples pushing the classifier toward even more discriminative parts.

## Transfer to detection and captioning

The authors swap the backbone of SSD and Faster-RCNN, which both originally used VGG-16, for an ImageNet-pretrained ResNet-50. For captioning, the encoder's GoogLeNet is swapped for ResNet-50 and the model is trained on MS-COCO.

With SSD, the CutMix backbone scores 77.6 mAP compared to 76.7 for the baseline, and with Faster-RCNN it scores 76.7 compared to 75.6. Mixup pretraining lowers Faster-RCNN to 73.9 mAP, and Cutout pretraining gives 76.8 for SSD and 75.0 for Faster-RCNN. The authors attribute the CutMix gain to the stronger localizability of the pretrained backbone.

For captioning, BLEU-4 rises from 22.9 for the baseline to 24.9 with CutMix, compared to 23.2 for Mixup and 24.0 for Cutout. The authors describe these results as gains at no extra cost.

## Robustness and over-confidence

The robustness tests use ImageNet ResNet-50 models, and adversarial samples come from white-box FGSM attacks.

The authors occlude images with a hole placed at the center or on the boundary, and vary the hole size from 0 to 224. Cutout and CutMix both improve robustness under both occlusion types, while Mixup gives only a marginal gain. CutMix nearly matches Cutout even though it never sees an occluded sample during training.

For in-between samples, the authors evaluate 50,000 mixed pairs drawn from the ImageNet validation set. Mixup and CutMix both lower top-1 error on these samples, while the effect of Cutout is almost negligible.

For over-confidence, a score-threshold OOD detector is applied to PyramidNet-200 trained on CIFAR-100. The authors read Mixup and Cutout as making the network more over-confident on OOD inputs, while CutMix reduces that.

## Limitations

The robustness experiments use one white-box attack, FGSM, and the OOD experiments use one PyramidNet-200 trained on CIFAR-100. Several baseline rows, marked with an asterisk, come from original papers, so they do not come from the same runs as the authors' models.

The alpha sweep and the layer-depth sweep were run only on CIFAR-100, and the ImageNet runs fix alpha at 1. Transfer experiments use ResNet-50 as the backbone in every case. The mechanism rests on CAM examples for two classes, so the explanation of why CutMix helps localization is an interpretation.

## Paper info

- **Authors**: Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, Youngjoon Yoo
- **Venue**: arXiv · Preprint
- **First published**: 2019-5-13
- **Added**: 2026-11-11
- **Updated**: 2019-8-7
- **Version**: v2
- **arXiv**: 1905.04899
- **Category**: cs.CV · cs.LG
- **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/1905.04899v2) · [PDF ↗](https://arxiv.org/pdf/1905.04899v2)

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

Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, Youngjoon Yoo (2019). CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features. arXiv:1905.04899v2. https://arxiv.org/abs/1905.04899v2

**BibTeX**

```
@misc{yun2019cutmix,
  title = {{CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features}},
  author = {Sangdoo Yun and Dongyoon Han and Seong Joon Oh and Sanghyuk Chun and Junsuk Choe and Youngjoon Yoo},
  year = {2019},
  eprint = {1905.04899},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.04899v2}
}
```

## Other paper commentary

- [Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning](https://refivu.com/en/papers/6721e929-d93e-4c00-ac0e-6ba7eeaa97a2-dropout-as-a-bayesian-approximation-representing-model.md)
- [ADADELTA: An Adaptive Learning Rate Method](https://refivu.com/en/papers/e2abf038-96af-4e19-bbda-5c8262404473-adadelta-an-adaptive-learning-rate-method.md)
- [An overview of gradient descent optimization algorithms](https://refivu.com/en/papers/96d69873-e1ce-41dd-9333-645272090396-an-overview-of-gradient-descent-optimization-algorithms.md)
- [Decoupled Weight Decay Regularization](https://refivu.com/en/papers/19eca1c5-1291-475b-a58c-daedbe769654-decoupled-weight-decay-regularization.md)
- [SGDR: Stochastic Gradient Descent with Warm Restarts](https://refivu.com/en/papers/69cc99a3-59f2-4776-b5e2-a3baaeb53f0c-sgdr-stochastic-gradient-descent-with-warm-restarts.md)
- [mixup: Beyond Empirical Risk Minimization](https://refivu.com/en/papers/cc1e3261-af7e-47fa-99d8-0806fbe6afcf-mixup-beyond-empirical-risk-minimization.md)
- [A Survey of Convolutional Neural Networks: Analysis, Applications, and Prospects](https://refivu.com/en/papers/070c8ac2-628a-4354-98cb-c9aeae701850-a-survey-of-convolutional-neural-networks-analysis.md)
- [Neural Architecture Search with Reinforcement Learning](https://refivu.com/en/papers/f6840c8a-b2c4-418a-8435-8f37c48700e2-neural-architecture-search-with-reinforcement-learning.md)
- [Federated Learning: Strategies for Improving Communication Efficiency](https://refivu.com/en/papers/f21e9a4b-b86a-4954-8c8a-ed4ff256e5d6-federated-learning-strategies-for-improving-communication.md)
- [Context Encoders: Feature Learning by Inpainting](https://refivu.com/en/papers/7b297366-a2d7-4dfc-9233-9920c1be930e-context-encoders-feature-learning-by-inpainting.md)
- [ShapeNet: An Information-Rich 3D Model Repository](https://refivu.com/en/papers/999df31a-45d9-4587-b0aa-c46d09db631c-shapenet-an-information-rich-3d-model-repository.md)
- [Object Detection with Deep Learning: A Review](https://refivu.com/en/papers/7a141689-80c4-419f-837d-9d8f246ca5fc-object-detection-with-deep-learning-a-review.md)

## Terms in this paper

- [Object detection](https://refivu.com/en/terms/113bfdb14049-object-detection)
- [BLEU](https://refivu.com/en/terms/42cd9b97719e-bleu)
- [mAP](https://refivu.com/en/terms/477dad058d88-map)
- [MS-COCO](https://refivu.com/en/terms/3c7d75a4a2eb-ms-coco)
- [mixup](https://refivu.com/en/terms/62023d7e891b-mixup)
- [stochastic depth](https://refivu.com/en/terms/d05be8dc71c1-stochastic-depth)
- [Cutout](https://refivu.com/en/terms/a97c27442439-cutout)
- [label smoothing](https://refivu.com/en/terms/92ff7104c813-label-smoothing)
- [CutMix](https://refivu.com/en/terms/f5a873c48d2e-cutmix)
- [class activation mapping](https://refivu.com/en/terms/56b94690bdb5-class-activation-mapping)
- [Fast gradient sign method (FGSM)](https://refivu.com/en/terms/ba74056a6a4f-fast-gradient-sign-method-fgsm)
- [Weakly supervised object localization](https://refivu.com/en/terms/d095b4c771d5-weakly-supervised-object-localization)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/5b819733-3817-45f5-9d87-61545a63f83b-cutmix-regularization-strategy-to-train-strong-classifiers)
