Source-linked AI summary

Drawing Multiple Augmentation Samples Per Image During Training Efficiently Decreases Test Error

Stanislav Fort, Andrew Brock, Razvan Pascanu, Soham De, Samuel L. Smith

arXiv:2105.13343v2cs.LGcs.CV

TL;DR

The paper investigates how the number of augmentation samples per image affects generalization, a question motivated by data augmentation’s importance and incompletely understood benefits. It systematically studies multiplicity across batch settings and reports higher test accuracy, including 86.8% top-1 without extra data for NFNet-F5 on ImageNet.

  • Problem

    Although data augmentation is essential for competitive held-out performance, its benefits and the role of augmentation-induced gradient variance are not fully understood.

    Source: §1 · p. 1
  • Method

    The authors systematically vary augmentation samples per image, using fixed unique-image or fixed-total-batch schemes to study test accuracy across batch sizes.

    Source: §1 · p. 2, §6 · p. 9
  • Results

    Multiplicity greater than 1 consistently achieves higher test accuracy across small and large batch settings; NFNet-F5 with multiplicity 16 and SAM reaches 86.8% top-1 w/o extra data on ImageNet.

    Source: §1 · p. 2, §7 · p. 10
  • Takeaways & Limitations

    The findings suggest practitioners should consider larger augmentation multiplicities, which improve test accuracy in both fixed-unique-image and fixed-batch settings.

    Source: §6 · p. 9, §7 · p. 10

    With epoch budgets larger than optimal, large multiplicities achieve lower test accuracy, a regime the authors say is not important in practice.

    Source: §4 · p. 8

Abstract

from arXiv · show

In computer vision, it is standard practice to draw a single sample from the data augmentation procedure for each unique image in the mini-batch. However recent work has suggested drawing multiple samples can achieve higher test accuracies. In this work, we provide a detailed empirical evaluation of how the number of augmentation samples per unique image influences model performance on held out data when training deep ResNets. We demonstrate drawing multiple samples per image consistently enhances the test accuracy achieved for both small and large batch training. Crucially, this benefit arises even if different numbers of augmentations per image perform the same number of parameter updates and gradient evaluations (requiring the same total compute). Although prior work has found variance in the gradient estimate arising from subsampling the dataset has an implicit regularization benefit, our experiments suggest variance which arises from the data augmentation process harms generalization. We apply these insights to the highly performant NFNet-F5, achieving 86.8$\%$ top-1 w/o extra data on ImageNet.

1 Introduction

The paper studies how drawing multiple augmentation samples per image affects generalization and how augmentation variance interacts with SGD. It reports higher test accuracy across batch settings and an ImageNet NFNet-F5 result of 86.8% top-1 without extra data.

  • The paper asks whether augmentation benefits come only from bias or also from variance, and how augmentation variance interacts with gradient-estimation variance from dataset subsampling.Data augmentation is essential for competitive held-out performance, but its benefits are not fully understood.Source: §1 · pp. 1–2
  • The study varies augmentation multiplicity to preserve augmentation bias while reducing per-example gradient variance, using either growing batch size or fewer unique images at fixed batch size.The fixed-batch scheme also increases variance from subsampling the dataset, and both schemes are studied in small- and large-batch regimes.Source: §1 · p. 2, Figure 1 · p. 2
  • Multiplicity greater than 1 raises test accuracy with either fixed unique images per batch or fixed batch size, for small and large batch training.With fixed batch size, larger multiplicities also slow training-set convergence.Source: §1 · p. 2
  • 86.8% top-1 w/o extra data on ImageNet was achieved with an NFNet-F5 using augmentation multiplicity 16 and SAM, after 34 epochs (168900 steps).The same model without augmentation multiplicity required significantly more epochs and reached lower accuracy; NFNets with large multiplicities also achieved higher validation accuracy with less overall compute.Source: §1 · p. 2
  • The authors conclude that dataset-subsampling variance can regularize generalization, while variance from data augmentation harms test accuracy.At fixed batch size, more augmentation samples reduce per-example gradient variance even as fewer unique examples increase overall minibatch-gradient variance.Source: §1 · p. 2
  • Prior work explored augmentation multiplicity, but the authors identify a lack of conclusive evidence after careful compute-budget and learning-rate tuning.They also note that prior work had not connected its benefits to SGD's implicit regularization.Source: §1 · p. 3

2 The benefits of data augmentation arise from bias, not variance

The experiments separate augmentation’s gradient bias from its variance by averaging multiple augmentations per image while keeping the number of unique images fixed. Higher multiplicities improve test accuracy and convergence, including after tuning learning rates and epoch budgets.

2 The benefits of data augmentation arise from bias, not variance

  • Averaging multiple augmented inputs per image reduces augmentation variance while preserving the bias introduced by augmentation.The experiments keep 64 unique inputs per CIFAR-100 minibatch, so total batch size grows as multiplicity rises.Source: §2 · p. 3
  • 74.3 ± 0.1% test accuracy after 128 epochs with multiplicity 16, versus 74.1 ± 0.01% after 256 epochs with normal training (multiplicity 1).The authors attribute the improvement to reducing augmentation variance without changing bias.Source: §2 · p. 4, Figure 2 · p. 4
  • Higher multiplicities converge faster, and their test-accuracy advantage is especially apparent at large learning rates under a 128-epoch compute budget.The authors suggest augmentation variance reduces training stability, impairing training with large learning rates and consequently reducing test performance.Source: §2 · p. 4, Figure 2 · p. 4
  • 78.4% peak top-1 accuracy after 128 epochs with augmentation multiplicity 8, versus 77.9% after 512 epochs with multiplicity 1.The supplied result reports the same direction of improvement at higher multiplicity on the ImageNet experiment.Source: §2 · p. 5, Figure 3 · p. 5

3 An empirical evaluation of augmentation multiplicity for fixed batch sizes

With batch size fixed, larger augmentation multiplicities improve test accuracy in both small- and large-batch training, including at matched parameter-update budgets in the large-batch experiments. In small-batch settings, higher multiplicities typically require more updates, and their benefits saturate on CIFAR-100.

3 An empirical evaluation of augmentation multiplicity for fixed batch sizes

  • 73.7 ± 0.04% accuracy with multiplicity 4 versus 72.1 ± 0.1% with normal training after 4×105 updates on the Wide-ResNet.The comparison is at the same parameter-update budget, and thus the same compute, in the large-batch experiment.Source: §3 · p. 5, Figure 4 · p. 6
  • In large-batch training, larger multiplicities achieve substantially higher test accuracy without requiring more parameter updates on CIFAR-100 and ImageNet.At fixed batch size, increasing multiplicity reduces the number of unique images per minibatch and increases updates per epoch.Source: §3 · p. 5, Figure 4 · p. 6
  • In small-batch training, multiplicities above 1 improve test accuracy on both CIFAR-100 and ImageNet while requiring fewer epochs.The peak benefit saturates around n ≳4 on CIFAR-100, while ImageNet accuracy continues rising across the multiplicities tested.Source: §3 · p. 6, Figure 5 · p. 6
  • In small-batch settings, larger multiplicities typically require more parameter updates, unlike the update-matched large-batch improvement.The paper reports that its study checks robustness across batch sizes and retunes both compute budgets and learning rates.Source: §3 · p. 6

4 Why do large augmentation multiplicities enhance generalization?

Large augmentation multiplicities improve held-out accuracy despite slower training-set convergence, and the paper attributes this to suppressing augmentation-induced gradient variance while retaining minibatch variance. Their accuracy advantage is associated with stability at larger learning-rate–multiplicity temperatures, but very long training can reverse it.

4 Why do large augmentation multiplicities enhance generalization?

  • With fixed batch size, larger multiplicities achieve higher test accuracy at similar learning rates for large batches, but require smaller learning rates for small batches.The CIFAR-100 Wide-ResNet figure also shows smaller multiplicities reach lower training loss after a given number of parameter updates.Source: §4 · p. 7, Figure 6 · p. 7
  • The proposed temperature relationship is that the generalization benefit depends on learning rate times augmentation multiplicity when batch size is fixed, rather than learning rate divided by total batch size.The paper relates this to the ratio of learning rate to the number of unique examples per minibatch.Source: §4 · p. 7
  • At small temperatures, multiplicities perform similarly; at larger temperatures, larger multiplicities are stable and achieve higher test accuracy across four model, dataset, and batch-size settings.Temperature is the product of learning rate ϵ and augmentation multiplicity n.Source: §4 · pp. 7–8, Figure 7 · p. 8
  • Large augmentation multiplicities improve held-out accuracy while impeding training optimization, consistent with suppressing detrimental augmentation variance while retaining minibatch variance.The paper argues that finite learning rates interacting with augmentation multiplicity underlie this generalization benefit.Source: §4 · pp. 7–8
  • At epoch budgets larger than optimal, large multiplicities achieve lower test accuracy, suggesting augmentation-induced variance can help reduce overfitting when models are over-trained.The paper notes this regime is not important in practice.Source: §4 · p. 8

5 An empirical evaluation of augmentation multiplicity for NFNets

Experiments on NFNets show that larger augmentation multiplicities improve ImageNet top-1 accuracy, including at matched parameter-update budgets, and can require fewer epochs. With SAM, NFNet-F5 reaches 86.8% top-1 without extra data.

5 An empirical evaluation of augmentation multiplicity for NFNets

  • The evaluation covers NFNet-F2 and F3 without SAM and F3 and F5 with SAM, using batch size 4096 on ImageNet.The NFNet family is designed so adjacent model sizes take roughly twice as long per gradient evaluation.Source: §5 · p. 8
  • At the same 112,600 parameter updates, larger augmentation multiplicities achieve higher NFNet-F2 top-1 accuracy; multiplicity 16 improves further at 225,200 updates.Mixup and CutMix were applied to different training inputs, not different augmentations of the same image.Source: §5 · p. 9, Table 1 · p. 9
  • Larger multiplicities achieve higher accuracy while requiring an order of magnitude fewer training epochs, although they still use similar numbers of parameter updates.Here, an epoch means a full pass through the training set.Source: §5 · p. 9
  • 86.8% top-1 accuracy: NFNet-F5 with SAM and augmentation multiplicity 16 on ImageNet after 168,900 updates.The reported NFNet-F3 result is 86.45% top-1 after 225,200 updates, within 0.05% of NFNet-F6's 86.5% after 112,600 updates without augmentation multiplicity.Source: §5 · p. 9, Table 2 · p. 9

6 Discussion

The discussion reports higher test accuracy with large augmentation multiplicities across batch-size settings and distinguishes augmentation variance from minibatch variance. It also compares within-minibatch multiple sampling with resampling across neighboring minibatches.

6 Discussion

  • Unlike the cited LSTM dropout study, the Wide-ResNet experiments do not show a generalization benefit from variance introduced by dropout.The cited study found both dropout bias and variance contributed to generalization in LSTMs.Source: §6 · p. 9
  • Large multiplicities improve test accuracy both when batch size scales with multiplicity and when batch size is fixed, reducing the number of unique images per minibatch.The supplied NFNet figure caption also reports substantially higher top-1 accuracy than original NFNet results, with and without SAM.Source: §6 · p. 9, Figure 8 · p. 10
  • Sampling multiple augmentations of each image inside one minibatch yields the most significant benefits, especially at large multiplicities, though both tested schemes outperform standard training.The alternative scheme resamples augmentations of the same unique images in neighboring minibatches.Source: §6 · p. 10
  • The paper uses “augmentation multiplicity” for a technique also called “batch augmentation,” “data echoing,” or “repeated augmentation.”The terminology was chosen to describe the experiments more succinctly.Source: §6 · p. 10

7 Conclusion

The conclusion reports that augmentation multiplicities above one improve test accuracy across small- and large-batch training, despite slower training convergence at fixed overall batch size. It attributes the pattern to augmentation variance interacting with finite learning rates and recommends considering larger multiplicities as a default.

7 Conclusion

  • Augmentation multiplicities greater than 1 consistently achieve higher test accuracy for both small and large batch training.The paper reports this in an empirical study of deep residual networks.Source: §7 · p. 10
  • At fixed overall batch size, larger multiplicities improve test accuracy despite slower convergence on the training set.The conclusion states that these benefits are particularly significant in large-batch training but also arise with small batches.Source: §7 · p. 10
  • The paper argues that the generalization pattern arises from interactions between augmentation-induced gradient variance and finite learning rates.It recommends practitioners consider large augmentation multiplicities as the default when training computer-vision neural networks.Source: §7 · p. 10

A Augmentation multiplicity and gradient variance

The effect of augmentation multiplicity on minibatch-gradient variance depends on whether batch size or the number of unique examples is held fixed.

A Augmentation multiplicity and gradient variance

B The dependence on the temperature for large epoch budgets

Test accuracy varies with temperature and epoch budget: at large budgets, small augmentation multiplicities can help reduce overfitting, while the neighboring implementation performs poorly at large multiplicities.

B The dependence on the temperature for large epoch budgets

  • At large epoch budgets, small augmentation multiplicities achieve higher test accuracy at a given temperature, helping prevent overfitting in over-trained models.Temperature is the product of augmentation multiplicity n and learning rate ϵ.Source: B The dependence on the temperature… · p. 13, Figure 10 · p. 14
  • At small epoch budgets, multiplicities achieve similar test accuracy at small temperatures, while large multiplicities perform better at large temperatures.The temperature is n multiplied by ϵ.Source: B The dependence on the temperature… · p. 13, Figure 10 · p. 14
  • For moderate multiplicities, the neighboring scheme enhances test accuracy, but at large multiplicities its performance degrades while within continues to improve generalization.Within samples n augmentations per image in one minibatch; neighboring resamples the same examples across n minibatches.Source: Figure 11 · p. 14

C Do multiple augmentations need to occur within the same minibatch?

The within implementation places multiple augmentations of each image in one minibatch; the neighboring alternative spreads them across adjacent minibatches.

C Do multiple augmentations need to occur within the same minibatch?

D Bias and variance in dropout

Dropout is intended to discourage overfitting through redundant representations; in this Wide-ResNet experiment, its test-accuracy benefits appear to arise primarily from gradient bias rather than mask-sampling variance.

D Bias and variance in dropout

  • Dropout is intended to encourage redundant representations, discouraging overfitting and enhancing generalization.Source: D Bias and variance in dropout · p. 15
  • Dropout changes the expected gradient and introduces variance because training typically samples a single mask.Wei et al. [2020] found both effects enhance generalization in LSTMs; this paper contrasts that result with augmentation variance in ResNets.Source: D Bias and variance in dropout · p. 15
  • Averaging gradients over multiple dropout masks does not substantially enhance test accuracy, suggesting benefits primarily arise from gradient bias.The experiment uses a 16-4 Wide-ResNet on CIFAR-100, with dropout on the final linear layer at probability 0.4.Source: D Bias and variance in dropout · p. 15
Loading 2105.13343v2…