Abstract
With the increasing utilization of deep learning in outdoor settings, its robustness needs to be enhanced to preserve accuracy in the face of distribution shifts, such as compression artifacts. Data augmentation is a widely used technique to improve robustness, thanks to its ease of use and numerous benefits. However, it requires more training epochs, making it difficult to train large models with limited computational resources. To address this problem, we treat data augmentation as supervised domain generalization (SDG) and benefit from the SDG method, contrastive semantic alignment (CSA) loss, to improve the robustness and training efficiency of data augmentation. The proposed method only adds loss during model training and can be used as a plug-in for existing data augmentation methods. Experiments on the CIFAR-100 and CUB datasets show that the proposed method improves the robustness and training efficiency of typical data augmentations.
Introduction
Deep learning models often struggle with "distribution shifts"—changes in data caused by sensor noise, weather, or compression—especially in real-world outdoor applications like autonomous driving. Data Augmentation (DA) is the standard "vaccine" for this, but it comes with a high price: it significantly increases training time, requiring many more epochs to converge.
This paper proposes treating data augmentation as a Supervised Domain Generalization (SDG) problem. The authors identify a conceptual gap: while DA creates diverse data, standard training doesn't explicitly inform the model that "clean" and "augmented" images belong to different domains but share the same semantic meaning. By treating clean data as a "source" domain and augmented data as an "out-of-distribution" (target) domain, tools from Domain Generalization can be leveraged to make training more efficient.
Proposed Method: Contrastive Semantic Alignment
The core of the proposal is a "plug-in" loss function that can be added to existing augmentation pipelines (like AugMix or CutMix).
Contrastive Semantic Alignment (CSA) Loss
The CSA loss consists of two primary components:
- Semantic Alignment ($L_{SA}$): This forces features with the same label—regardless of whether they come from the source (clean) or target (augmented) domain—to be closer together in the embedding space.
- Separation ($L_S$): This forces features with different labels to be farther apart, ensuring clear decision boundaries.
Feature Shuffling
A standard DA batch usually pairs a clean image with its own augmented version, sharing the same label. This makes calculating the "Separation" loss impossible within a pair. To address this, the authors introduce Feature Shuffling: randomly shuffling the indices of augmented features within a mini-batch. This creates pairs with different labels, allowing the model to learn how to distinguish between different classes across domains.
Experimental Setup
The method was evaluated on two benchmarks:
- CIFAR-100: A standard dataset for general object classification.
- CUB (Caltech-UCSD Birds-200): A fine-grained classification dataset consisting of 200 bird species, challenging due to subtle inter-class differences.
The researchers tested these across several architectures, including ResNet18, ResNet50, Wide ResNet (WRN), and ResNeXt.
Key Results and Discussion
Robustness and Accuracy Gains
The proposed method consistently improves both Standard Accuracy (SA) and Robust Accuracy (RA) across various models and datasets.
As shown in the results table, on CIFAR-100 with ResNet18, the method improved SA by 1.56 points and RA by 1.64 points over standard AugMix. On the CUB dataset, the method consistently improved Robust Accuracy across all architectures, with significant gains when combined with other DA techniques like CutMix (up to 2.29 points).
Training Efficiency
The method acts as a catalyst for convergence. In "few-epoch" experiments, models trained with this approach for only 25% or 50% of the usual training time often outperformed standard DA models trained for the full duration. This effectively mitigates the high computational cost typically associated with data augmentation.
The Role of Shuffling and Separation
Ablation studies revealed that simply aligning same-label features ($L_{SA}$) is insufficient. Without the Feature Shuffling trick to enable the separation loss ($L_S$), standard accuracy can actually drop. Pushing different classes apart is as critical as pulling the same classes together for learning robust, domain-invariant representations.
Conclusion
By reframing data augmentation as a domain generalization problem, this work introduces a simple yet effective plug-in to enhance model robustness and training speed. While there is some sensitivity to the hyperparameter $\gamma$ balancing the losses, the method provides a strong baseline for incorporating supervised domain generalization into standard deep learning workflows. Future work may explore more advanced SDG techniques to further bridge the gap between efficiency and robustness.
Summary updated