A Unified Analysis of Mixed Sample Data Augmentation: A Loss Function Perspective

Chanwoo Park, Sangdoo Yun, Sanghyuk Chun
8/21/2022
cs.LGcs.CV

Official code: naver-ai/hmix-gmix (21 stars, Jupyter Notebook, last commit 2022-11-07).

Abstract

We propose the first unified theoretical analysis of mixed sample data augmentation (MSDA), such as Mixup and CutMix. Our theoretical results show that regardless of the choice of the mixing strategy, MSDA behaves as a pixel-level regularization of the underlying training loss and a regularization of the first layer parameters.

Show full abstract

Similarly, our theoretical results support that the MSDA training strategy can improve adversarial robustness and generalization compared to the vanilla training strategy. Using the theoretical results, we provide a high-level understanding of how different design choices of MSDA work differently. For example, we show that the most popular MSDA methods, Mixup and CutMix, behave differently, e.g., CutMix regularizes the input gradients by pixel distances, while Mixup regularizes the input gradients regardless of pixel distances. Our theoretical results also show that the optimal MSDA strategy depends on tasks, datasets, or model parameters. From these observations, we propose generalized MSDAs, a Hybrid version of Mixup and CutMix (HMix) and Gaussian Mixup (GMix), simple extensions of Mixup and CutMix. Our implementation can leverage the advantages of Mixup and CutMix, while our implementation is very efficient, and the computation cost is almost neglectable as Mixup and CutMix. Our empirical study shows that our HMix and GMix outperform the previous state-of-the-art MSDA methods in CIFAR-100 and ImageNet classification tasks. Source code is available at https://github.com/naver-ai/hmix-gmix

View on arXivView PDF

Code Implementations(1)

naver-ai/hmix-gmixOfficial100%
213Jupyter Notebook, PythonAug 21, 20224 years agoNOASSERTION

Similar Papers

Cite this paper

@article{park2022unified,
  title  = {A Unified Analysis of Mixed Sample Data Augmentation: A Loss Function Perspective},
  author = {Chanwoo Park and Sangdoo Yun and Sanghyuk Chun},
  year   = {2022},
  eprint = {2208.09913},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2208.09913}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2208.09913.svg)](https://codeofpaper.com/paper/2208.09913)

Discussion