{
  "id": "data-augmentation",
  "title": "Data Augmentation",
  "lang": "en",
  "source_lang": "en",
  "summary": "Data augmentation creates additional training examples through transformations or combinations of existing data, helping models learn useful invariances and generalize beyond their training samples.",
  "category": "computer-science",
  "subcategory": "artificial-intelligence",
  "type": "concept",
  "aliases": [
    "Training data augmentation",
    "Dataset augmentation"
  ],
  "generated_at": "2026-10-03",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/data-augmentation/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/data-augmentation/",
      "json": "https://aiwiki.page/zh/data-augmentation.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Data augmentation is a family of techniques in machine learning that expands the variety of training data by transforming existing examples or constructing new examples from them. Its purpose is usually to improve generalization rather than merely increase the number of stored records. Augmented examples encode assumptions about variations a model should tolerate, such as changes in an image’s position or illumination. The technique is widely used in deep learning and can serve as a form of regularization. (tensorflow.org)"
    },
    {
      "heading": "Principles and mathematical formulation",
      "text": "In supervised learning, each example consists of an input \\(x\\) and a target \\(y\\). A transformation produces an augmented pair \\((T(x),T_y(y))\\). For label-preserving transformations, \\(T_y(y)=y\\); when spatial annotations change, targets must change correspondingly. For example, translating an image can leave its category unchanged while requiring translated bounding boxes in object detection or a translated mask in semantic segmentation. Thus, label preservation depends on the task, not simply on the transformation’s appearance. (tensorflow.org)\n\nA common training objective can be written as\n\n\\[\\min_\\theta \\frac{1}{n}\\sum_{i=1}^{n} \\mathbb{E}_{T\\sim\\mathcal{A}} \\left[\\ell\\bigl(f_\\theta(T(x_i)),T_y(y_i)\\bigr)\\right],\\]\n\nwhere \\(f_\\theta\\) is the model, \\(\\ell\\) is its loss function, and \\(\\mathcal{A}\\) is a probability distribution over transformations. This extends empirical risk minimization by averaging over transformed versions of each observation. In practice, randomly sampled transformations approximate the expectation during training. (arxiv.org)\n\nAugmentation expresses an inductive assumption: selected transformations preserve relevant information. Group-theoretic analyses formalize this through approximately distribution-preserving symmetries and demonstrate variance reduction under specified conditions. These results do not imply that arbitrary transformations improve performance; benefits depend on how closely the assumed symmetries match the data and learning problem. (arxiv.org)"
    },
    {
      "heading": "Techniques across data types",
      "text": "In computer vision, common operations include cropping, horizontal flipping, rotation, resizing, and brightness or contrast changes. For image classification, these can expose a model to alternative views of the same category. Spatial transformations for detection and segmentation require coordinated changes to images and annotations. Augmentation libraries therefore provide operations that handle images, bounding boxes, masks, and other structured inputs together. (tensorflow.org)\n\nText augmentation presents different difficulties because small edits can alter meaning. In natural language processing, methods include synonym replacement, word insertion, word swapping, deletion, and back-translation, in which text is translated into another language and back. The 2019 Easy Data Augmentation study evaluated four simple editing operations and reported improvements on several text-classification datasets, particularly smaller ones. Such findings are task-specific rather than evidence that all edited sentences retain their original labels. (aclanthology.org)\n\nFor speech recognition, augmentation can operate on acoustic features rather than directly on audio waveforms. SpecAugment, introduced in 2019, applies time warping and masks blocks along the frequency and time axes of filter-bank features. This creates partially obscured training inputs while retaining the associated transcription, encouraging recognition from incomplete acoustic evidence. (arxiv.org)"
    },
    {
      "heading": "Combining examples and learning policies",
      "text": "Not all augmentation preserves a single original target. Mixup, first described in 2017, constructs convex combinations of two inputs and their targets:\n\n\\[\\tilde{x}=\\lambda x_i+(1-\\lambda)x_j,\\qquad \\tilde{y}=\\lambda y_i+(1-\\lambda)y_j,\\]\n\nwhere \\(0\\leq\\lambda\\leq1\\). For classification, targets are commonly vector-valued class encodings, so the resulting target can represent a mixture of classes. Mixup encourages approximately linear predictions between training examples and was evaluated on image, speech-command, and tabular datasets. (arxiv.org)\n\nCutMix, introduced in 2019, instead replaces an image region with a patch from another training image. The targets are mixed according to the relative patch area. Unlike masking that simply removes pixels, this method retains visual information from both examples while imposing a regularizing training task. (arxiv.org)\n\nAugmentation policies can also be selected computationally. AutoAugment searches combinations of transformations, their application probabilities, and their magnitudes, using validation accuracy to evaluate candidate policies. These choices function as hyperparameters: they determine the variations presented during learning without being ordinary model weights. Automated policy search makes augmentation part of model-development optimization rather than solely a manually specified preprocessing step. (arxiv.org)"
    },
    {
      "heading": "Role in self-supervised learning",
      "text": "In self-supervised learning, augmentation can define the learning task itself. Contrastive learning methods such as SimCLR generate two differently augmented views of one image and train their representations to agree relative to views from other images. Here augmentation supplies relationships between examples without requiring category labels. (arxiv.org)\n\nThe selected transformations strongly influence representation learning. SimCLR’s experiments showed that composing augmentations was important for the quality of learned visual features. Consequently, augmentation is not merely an accessory to training: it helps specify which information the representation should retain across different views. (arxiv.org)"
    },
    {
      "heading": "Implementation, evaluation, and limitations",
      "text": "Augmentation may be applied when preparing data or sampled repeatedly within a training pipeline. On-the-fly sampling provides different variants across training passes without storing every transformed example. Frameworks such as TensorFlow support augmentation through preprocessing layers or dataset transformations, with random training transformations separated from ordinary evaluation preprocessing. (tensorflow.org)\n\nReliable evaluation requires separating original observations into training and evaluation subsets before creating derived examples. Otherwise, an original sample and a closely related augmented version can appear on opposite sides of the split, creating data leakage. This is an application of the broader requirement that preprocessing and learned transformations not obtain information from held-out data. Policy selection uses a validation set, while the test set remains separate from development. (scikit-learn.org)\n\nAugmentation can reduce overfitting, but its effectiveness depends on transformation validity, diversity, and strength. Excessive perturbations may remove task-relevant information or undermine semantic consistency. Increasing the number of variants therefore cannot, by itself, establish that a dataset has gained useful information; the relevant evidence is performance on independently held-out examples under the intended evaluation conditions. (arxiv.org)"
    }
  ],
  "links": [
    "machine-learning",
    "training-data",
    "generalization",
    "deep-learning",
    "regularization",
    "supervised-learning",
    "object-detection",
    "semantic-segmentation",
    "loss-function",
    "probability-distribution",
    "empirical-risk-minimization",
    "expected-value",
    "variance",
    "computer-vision",
    "image-classification",
    "natural-language-processing",
    "speech-recognition",
    "hyperparameter",
    "self-supervised-learning",
    "contrastive-learning",
    "representation-learning",
    "data-leakage",
    "validation-set",
    "test-set",
    "overfitting"
  ],
  "sources": [
    {
      "title": "tensorflow.org/tutorials/images/data_augmentation",
      "url": "https://www.tensorflow.org/tutorials/images/data_augmentation?authuser=0000"
    },
    {
      "title": "arxiv.org/abs/1907.10905",
      "url": "https://arxiv.org/abs/1907.10905"
    },
    {
      "title": "aclanthology.org/D19-1670/",
      "url": "https://aclanthology.org/D19-1670/"
    },
    {
      "title": "arxiv.org/abs/1904.08779",
      "url": "https://arxiv.org/abs/1904.08779"
    },
    {
      "title": "arxiv.org/abs/1710.09412",
      "url": "https://arxiv.org/abs/1710.09412"
    },
    {
      "title": "arxiv.org/abs/1905.04899",
      "url": "https://arxiv.org/abs/1905.04899"
    },
    {
      "title": "arxiv.org/abs/1805.09501",
      "url": "https://arxiv.org/abs/1805.09501"
    },
    {
      "title": "arxiv.org/abs/2002.05709",
      "url": "https://arxiv.org/abs/2002.05709"
    },
    {
      "title": "scikit-learn.org/stable/common_pitfalls.html",
      "url": "https://scikit-learn.org/stable/common_pitfalls.html?highlight=linearregression"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}