Data augmentation

Data augmentation is a way of enlarging a training set by making modified copies of existing examples, such as flipped or cropped images, so a model sees more variety and overfits less.

Collecting and labelling new data is slow and expensive, so machine learning engineers often stretch the data they already have. Google's machine learning glossary defines data augmentation as artificially increasing the range and number of training examples by transforming existing ones. Training on many slightly altered copies makes a model less likely to memorise its training set, the problem known as overfitting.

Images are the classic case. A photo of a cat can be flipped, rotated, shifted, scaled, cropped, brightened, given more contrast or sprinkled with random noise, and it is still a photo of a cat. Each version teaches the model that the label does not depend on those details. The transformations have to preserve meaning, though: flipping a picture of a dog is harmless, but rotating a handwritten 6 by half a turn turns it into a 9.

The technique grew up with neural networks for vision. In the mid-1990s, as convolutional networks grew larger, researchers proposed applying geometric transformations to existing images to create new labelled examples, elastic distortions were added in 2003, and augmentation became standard practice in the 2010s.

It is not limited to pictures. For datasets where one class is rare, SMOTE, published in 2002, creates synthetic examples of the rare class by placing new points between existing ones. Researchers have used resampling and generative models to augment time series and brain-signal recordings. Augmentation differs from synthetic data mainly in degree: augmentation transforms real examples, while synthetic data can be generated from scratch.

Augmentation is cheap and usually helps, but it cannot add information that was never collected. Flipping and cropping photos taken in daylight will not teach a model what a street looks like at night. It makes the most of a dataset; it does not fix gaps in it.

Common questions

What is data augmentation in machine learning?

It is the practice of creating extra training examples by modifying existing ones, for instance rotating, cropping or recolouring images, while keeping their labels. The model sees more variety without anyone collecting or labelling new data.

Why does data augmentation reduce overfitting?

Overfitting happens when a model memorises details of its training examples instead of learning general patterns. Showing it many altered versions of each example makes those incidental details unreliable, pushing the model to rely on features that hold across all the versions.

What is the difference between data augmentation and synthetic data?

Data augmentation starts from real examples and changes them in small ways. Synthetic data is generated, often by a simulation or another model, and may not be based on any single real example. The line between them is blurry, and both aim to give a model more to learn from.

What are common image augmentation techniques?

Typical techniques include flipping, rotating, shifting, scaling and cropping images, adjusting brightness, contrast, saturation and hue, and adding random noise. Engineers choose transformations that do not change what the image shows.

Finding more

Search for "data augmentation", "image augmentation techniques" or "SMOTE" to explore the methods. Reliable sources include Google's machine learning glossary, the documentation of deep learning frameworks, and original papers on arXiv and in peer-reviewed journals. Claims that augmentation or synthetic data removes the need for real data deserve scepticism, so look for tests on genuinely new data.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.