Unsupervised Data Augmentation

Qizhe Xie, Zihang Dai, Eduard H. Hovy, Minh-Thang Luong, Quoc V. Le

Abstract

Semi-supervised learning lately has shown much promise in improving deep learning models when labeled data is scarce. Common among recent approaches is the use of consistency training on a large amount of unlabeled data to constrain model predictions to be invariant to input noise. In this work, we present a new perspective on how to effectively noise unlabeled examples and argue that the quality of noising, specifically those produced by advanced data augmentation methods, plays a crucial role in semi-supervised learning. By substituting simple noising operations with advanced data augmentation methods such as RandAugment and back-translation, our method brings substantial improvements across six language and three vision tasks under the same consistency training framework. On the IMDb text classification dataset, with only 20 labeled examples, our method achieves an error rate of 4.20, outperforming the state-of-the-art model trained on 25,000 labeled examples. On a standard semi-supervised learning benchmark, CIFAR-10, our method outperforms all previous approaches and achieves an error rate of 5.43 with only 250 examples. Our method also combines well with transfer learning, e.g., when finetuning from BERT, and yields improvements in high-data regime, such as ImageNet, whether when there is only 10% labeled data or when a full labeled set with 1.3M extra unlabeled examples is used.

Introduction

Deep learning models are notoriously data-hungry, typically requiring massive labeled datasets that are expensive and time-consuming to curate. Semi-supervised learning (SSL) offers a solution by leveraging the vast quantities of unlabeled data available. A prominent SSL technique is consistency training, which regularizes a model to produce stable predictions when an input is perturbed with noise. However, standard noise (e.g., Gaussian noise or dropout) often fails to capture the complex underlying structure of the data.

Unsupervised Data Augmentation (UDA) addresses this by applying state-of-the-art data augmentations—such as RandAugment for images and back-translation for text—to unlabeled data. By enforcing consistency between an original unlabeled example and its heavily augmented counterpart, UDA achieves remarkable sample efficiency, often matching or exceeding the performance of fully supervised models with over 1,000x less labeled data.

Methodology

The UDA framework optimizes a dual-objective loss function consisting of a supervised component and an unsupervised consistency component.

The UDA framework overview, showing the combination of supervised cross-entropy loss on labeled data and unsupervised consistency loss on augmented unlabeled data.
  1. Supervised Loss: Standard cross-entropy loss is calculated using the available labeled data.
  2. Unsupervised Consistency Loss: For an unlabeled example $x$, the model predicts a distribution $p_\theta(y|x)$. Simultaneously, an augmented version $\hat{x}$ is generated, and the model predicts $p_\theta(y|\hat{x})$. UDA minimizes the KL divergence between these two distributions, forcing the model to be invariant to the sophisticated transformations applied.

To stabilize training on very small labeled sets, the authors introduce Training Signal Annealing (TSA). TSA prevents the model from overfitting to the few labeled examples by gradually increasing the threshold for including labeled examples in the loss calculation as the model's confidence grows.

Advanced Augmentation Strategies

The "quality" of the noise is central to UDA's success. The method utilizes domain-specific, high-quality augmentations:

  • Vision (RandAugment): Instead of manual tuning, RandAugment randomly selects and applies a sequence of transformations (e.g., rotation, color jitter, shearing) from a diverse pool.
  • NLP (Back-translation & TF-IDF): Back-translation involves translating a sentence into a pivot language and back to the original, creating a semantic paraphrase. TF-IDF based word replacement replaces common, uninformative words while preserving key terms.
Examples of advanced augmentations: Back-translation for text paraphrasing and RandAugment for diverse image transformations.

Experimental Results

UDA was evaluated across diverse benchmarks in both language (IMDb, Yelp, Amazon, DBPedia) and vision (CIFAR-10, SVHN, ImageNet).

  • IMDb (NLP): With just 20 labeled examples, UDA reached an error rate of 4.20%. This matches the performance of previous state-of-the-art models that required the full 25,000 labeled examples.
  • CIFAR-10 (Vision): UDA achieved a 5.43% error rate using only 250 examples, surpassing other popular SSL methods like MixMatch and VAT.
  • ImageNet: UDA scales to large-scale datasets. With 10% of ImageNet labels, it improved top-1 accuracy from 58.8% to 68.8%. Even with 100% of labels, adding 1.3M unlabeled images provided a performance boost.

Discussion and Key Insights

The success of UDA highlights that advanced augmentations, originally designed for supervised learning, are even more potent in the unsupervised setting. These augmentations provide "targeted inductive biases" that simple noise cannot replicate. Theoretically, diverse augmentations help "connect" different regions of the data manifold, allowing label information to propagate more effectively across the unlabeled set.

While highly effective, UDA's performance is tied to the availability of high-quality, domain-specific augmentations. Future work may involve developing automated ways to discover such augmentations for new domains like medical imaging or time-series data. Additionally, while back-translation is powerful, it incurs significant computational overhead due to the need for large translation models.

Summary updated

BibTeX
@inproceedings{xie2020unsupervised,
  author = {Qizhe Xie and Zihang Dai and Eduard H. Hovy and Minh-Thang Luong and Quoc V. Le},
  title = {{Unsupervised Data Augmentation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=o9iAYQM5Ma},
}
Figure