What is data augmentation?
Data augmentation is a training technique that creates new examples by applying label-preserving changes to existing ones, such as flipping, cropping or brightening an image. The model sees many variations of each example, which makes it less likely to memorize the training set and better at handling the variation it will meet in real data.
Augmentation is standard in computer vision, where nearly every image classifier, detector and segmentation model trains with random crops, flips and color jitter. It is also used for audio, with time shifts, added noise and SpecAugment's masking of spectrogram bands, and for text, with back-translation and synonym replacement. Self-supervised methods such as SimCLR learn by comparing two augmented views of the same image.
Key ideas
- Augmentation creates new training examples by transforming existing ones without changing their labels.
- It acts as a regularizer and reduces overfitting, especially on small datasets.
- Geometric transforms move pixels around, and photometric transforms change their values.
- For detection and segmentation, geometric transforms must also be applied to the boxes or masks.
- Mixup and CutMix blend both the images and their labels.
- Too much augmentation, or a transform that changes the label, lowers accuracy.
Common questions
Should you augment the validation and test sets?
No. Random augmentation belongs only in training, and validation and test images should stay as close as possible to real inputs so the scores mean something. The one exception is deterministic preprocessing, such as resizing and center-cropping, which is applied the same way to every split.
Which image augmentations should you start with?
Random resized crops and horizontal flips are the usual first choice, followed by mild color jitter. For larger models and longer training, add RandAugment, mixup or CutMix. Check each transform against the task, since flips and large rotations can change the meaning of text, digits or medical images.
Does data augmentation work for tabular data?
It is less common, because there is no obvious label-preserving transform for a row of mixed features. Adding small noise to numeric features is one option. For class imbalance, SMOTE creates synthetic minority-class rows by interpolating between neighboring examples.
What is the difference between data augmentation and synthetic data?
Augmentation transforms real examples, so every new sample stays close to one that exists. Synthetic data is generated from scratch, by a simulator, a 3D renderer or a generative model such as a diffusion model. Synthetic data can cover cases the real dataset lacks, but it risks a gap between the generated and real distributions.
Related explainers
- Overfitting & Underfitting — The bias-variance tradeoff and generalization
- Regularization — Dropout, L1, and L2 — keeping models honest
- Convolutional Neural Networks — How CNNs see and understand images
- Class Imbalance & Resampling — SMOTE, class weights, and metrics beyond accuracy
- Transfer Learning — Standing on the shoulders of pretrained giants
- Image Segmentation — Classify every pixel in an image — from semantic regions to individual object instances
References
- Shorten & Khoshgoftaar (2019), "A survey on Image Data Augmentation for Deep Learning", Journal of Big Data
- Zhang et al. (2017), "mixup: Beyond Empirical Risk Minimization"
- DeVries & Taylor (2017), "Improved Regularization of Convolutional Neural Networks with Cutout"
- Yun et al. (2019), "CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features"
- Cubuk et al. (2019), "RandAugment: Practical automated data augmentation with a reduced search space"
Last updated