Abstract: Data augmentation is used in machine learning to make the classifier invariant to label-preserving transformations. Usually this invariance is only encouraged implicitly by including a single augmented input during training. However, several works have recently shown that using multiple augmentations per input can improve generalisation or can be used to incorporate invariances more explicitly. In this work, we first empirically compare these recently proposed objectives that differ in whether they rely on explicit or implicit regularisation and at what level of the predictor they encode the invariances. We show that the predictions of the best performing method are also the most similar when compared on different augmentations of the same input. Inspired by this observation, we propose an explicit regulariser that encourages this invariance on the level of individual model predictions. Through extensive experiments on CIFAR-100 and ImageNet we show that this explicit regulariser (i) improves generalisation and (ii) equalises performance differences between all considered objectives. Our results suggest that objectives that encourage invariance on the level of the neural network itself generalise better than those that achieve invariance by averaging predictions of non-invariant models.
Introduction
Data augmentation (DA) is a cornerstone of modern deep learning, helping models learn "invariances"—the principle that a semantic label (e.g., "cat") remains unchanged despite transformations like horizontal flips or random crops. Standard training typically encourages this implicitly by feeding the model one random augmentation per image per batch. Recent research suggests that "multiplicity"—sampling $K$ different augmentations of the same image in a single batch—can further improve performance. This paper investigates how to best leverage these multiple samples to improve generalization and proposes an explicit regularizer to enforce invariance.
Methods
The authors evaluate three primary strategies for handling multiple augmentations ($K > 1$):
- Average the Losses ($\mathcal{L}_{\langle losses \rangle}$): The loss is calculated for each augmentation independently and then averaged.
- Average the Probabilities ($\mathcal{L}_{\langle probs \rangle}$): Softmax outputs are averaged before calculating a single loss.
- Average the Logits ($\mathcal{L}_{\langle logits \rangle}$): Raw network outputs are averaged before loss calculation.
To enhance these methods, the authors propose a KL regularizer. This soft constraint calculates the symmetrized KL divergence (Jeffrey’s divergence) between the predictive distributions of all pairs of augmentations for a single input. This explicitly penalizes the model for producing inconsistent predictions across different versions of the same image.
Key Insights and Results
The study reveals that averaging losses often outperforms more complex averaging of logits or probabilities. The authors hypothesize that averaging losses forces every individual augmentation to be correctly classified, implicitly encouraging stronger invariance. In contrast, averaging outputs allows the model to be "lazy," requiring only the average prediction to be correct while individual predictions may remain non-invariant.
The proposed KL regularizer acts as an "equalizer." Once added, the performance gap between the three loss-averaging methods virtually disappears, suggesting that achieving invariance at the individual prediction level is the primary driver of generalization, regardless of the base objective.
On ImageNet using an NF-ResNet-101, the KL regularizer improved top-1 accuracy from 79.3% to 80.1% at a multiplicity of $K=8$. These gains were consistent across various architectures, including WideResNet and NFNet, and even when using strong augmentations like RandAugment.
Discussion and Conclusion
While effective, increasing augmentation multiplicity increases computational cost, as it requires more forward and backward passes per unique image. Additionally, the authors focused on "Normalizer-Free" (NF) models to avoid the complexities of Batch Normalization, which can leak information between augmentations in the same batch. Future work could extend this approach to self-supervised learning or other domains like NLP and audio processing.
In summary, explicitly regularizing for invariance at the prediction level significantly improves the generalization of supervised vision models. By forcing consistent outputs across multiple augmentations, the proposed KL regularizer provides a robust and effective way to boost performance on large-scale benchmarks.
Summary updated