NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Hypernetwork-Based Augmentation

Chih-Yang Chen, Che-Han Chang, Edward Y. ChangarXiv 2020

Abstract

Data augmentation is an effective technique to improve the generalization of deep neural networks. Recently, AutoAugment proposed a well-designed search space and a search algorithm that automatically finds augmentation policies in a data-driven manner. However, AutoAugment is computationally intensive. In this paper, we propose an efficient gradient-based search algorithm, called Hypernetwork-Based Augmentation (HBA), which simultaneously learns model parameters and augmentation hyperparameters in a single training. Our HBA uses a hypernetwork to approximate a population-based training algorithm, which enables us to tune augmentation hyperparameters by gradient descent. Besides, we introduce a weight sharing strategy that simplifies our hypernetwork architecture and speeds up our search algorithm. We conduct experiments on CIFAR-10, CIFAR-100, SVHN, and ImageNet. Our results show that HBA is competitive to the state-of-the-art methods in terms of both search speed and accuracy.

Introduction

Deep neural networks are prone to overfitting, and data augmentation—transforming images via operations like rotation or color jittering—is a standard solution. However, determining the optimal "policy" (which operations to use and their intensities) remains a significant challenge. Early automated solutions like AutoAugment relied on reinforcement learning, requiring thousands of GPU hours. Subsequent methods like Population Based Augmentation (PBA) improved efficiency but still utilized discrete evolutionary steps. We propose Hypernetwork-Based Augmentation (HBA), which transforms this search into a smooth, differentiable process solvable via standard gradient descent.

Methodology

The core innovation of HBA is the use of a Hypernetwork. Instead of training a discrete population of models, HBA trains a hypernetwork ($\hat{\theta}_\phi$) that takes augmentation hyperparameters ($\lambda$) as input and generates the weights for the target classifier.

Conceptual comparison between Population-Based Training (PBT) and the proposed Hypernetwork-Based Augmentation (HBA).

As shown in Figure 1, while PBT (a) relies on discrete "exploit and explore" updates, HBA (c) uses the hypernetwork to map the hyperparameter space directly to the weight space (b). This formulation allows the augmentation policy ($\lambda$) to be updated by minimizing validation loss through gradient descent.

Weight Sharing Strategy

To optimize memory and speed, we introduce a weight-sharing strategy. We observed that generating unique weights for every layer is unnecessary. By sharing weights in deeper layers and only utilizing "hyper-layers" for specific parts of the network, we significantly accelerate the search process.

Comparison of population-based and hypernetwork-based architectures with and without weight-sharing.

Figure 2 illustrates these architectural differences. Our "1st BN" strategy—making only the first Batch Normalization layer dependent on the augmentation policy—proved particularly effective. This suggests that early layers are most sensitive to data augmentation variations.

Experimental Results

HBA was evaluated on CIFAR-10, CIFAR-100, SVHN, and ImageNet. The primary advantage of HBA is its extreme efficiency:

  • Search Speed: On CIFAR-10, HBA completes its search in just 0.1 GPU hours, a 50,000x speedup over AutoAugment (5,000 hours) and a 50x speedup over PBA (5 hours).
  • Accuracy: Despite the speed, HBA maintains state-of-the-art performance, achieving a 2.6% test error on CIFAR-10 and a 22.1% top-1 error on ImageNet, slightly surpassing AutoAugment's 22.4%.
  • Robustness: HBA performs similarly in speed to other gradient-based methods like DADA but consistently provides superior accuracy across benchmarks.

Conclusion

Hypernetwork-Based Augmentation (HBA) provides a highly efficient, gradient-based framework for automating data augmentation. By leveraging hypernetworks and strategic weight sharing, HBA achieves massive reductions in search time without sacrificing model accuracy. Future work will explore applying HBA to specialized domains such as medical imaging and developing hybrid algorithms that combine gradient-based efficiency with the strengths of population-based training.

Summary updated

BibTeX
@misc{chen2020hypernetwork,
  author = {Chih-Yang Chen and Che-Han Chang and Edward Y. Chang},
  title = {{Hypernetwork-Based Augmentation}},
  year = {2020},
  eprint = {2006.06320},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.06320},
}
Figure