Semantic Equivariant Mixup

Zongbo Han, Tianchi Xie, Bingzhe Wu, Qinghua Hu, Changqing ZhangarXiv 2023 · DOI

Abstract

Data augmentation through "mixup" has become a cornerstone for training robust deep neural networks. However, traditional mixup primarily focuses on the label-equivariance assumption, potentially allowing models to rely on superficial "shortcuts" in the latent space. We present Semantic Equivariant Mixup (SEM), a regularization technique that enforces linear interpolation not only in the label space but also within the high-level representation space. By requiring that mixed inputs yield mixed semantic features, SEM encourages models to capture richer conceptual information. Empirical evaluations across CIFAR and Tiny-ImageNet benchmarks demonstrate that SEM consistently improves classification accuracy, out-of-distribution detection, and robustness to distribution shifts.

Introduction

Deep neural networks often suffer from "simplicity bias," where they prioritize superficial correlations—such as background textures—over fundamental semantic features like object shape. While the Mixup augmentation strategy was introduced to mitigate this by training on convex combinations of input pairs and their labels, it typically only supervises the final output. This narrow focus on the label space can lead to a disorganized latent representation where the model satisfies the "mixed label" requirement through non-semantic shortcuts.

Comparison between traditional mixup (label-equivariance) and Semantic Equivariant Mixup (semantic-equivariance).

As illustrated above, standard mixup ensures that a dog-cat hybrid image maps to a "dog + cat" label. However, it ignores the underlying semantic context (e.g., "on the floor" vs. "on the grass"). SEM addresses this by introducing the semantic-equivariance assumption: if inputs are mixed, their corresponding high-level representations should follow the same linear trajectory.

Methodology: Semantic Equivariance

The core of SEM is a plug-and-play regularization term that can be integrated into various mixup-based training pipelines. The approach rests on the idea that the internal "representation space" should be as structurally consistent as the input space.

The SEM Objective

SEM adds a semantic regularization term to the standard mixup loss. For a pair of inputs $(x_i, x_j)$ and their mixed counterpart $\tilde{x} = \lambda x_i + (1-\lambda)x_j$, the model is penalized if the feature vector of the mixed image deviates from the weighted average of the feature vectors of the original images.

The mathematical flow of SEM, showing the relationship between mixed inputs, representations, and labels.

The total loss function is defined as: $$Loss = \text{Mixup Loss} + \gamma \| g(\tilde{x}) - (\lambda g(x_i) + (1-\lambda)g(x_j)) \|_2$$ where:

  • $g(\cdot)$ represents the feature extractor (encoder).
  • $\lambda$ is the mixing coefficient.
  • $\gamma$ is a hyperparameter balancing the standard loss and the semantic constraint.

By enforcing this constraint, the model is discouraged from discarding label-independent semantic information, forcing the latent space to preserve the structural relationships of the input data.

Experimental Results

The researchers evaluated SEM across multiple benchmarks, including CIFAR-10/100 and Tiny-ImageNet, focusing on accuracy, robustness, and generalization.

Performance Gains

SEM consistently outperformed baseline mixup techniques. On Tiny-ImageNet using a PreActResNet18, SEM provided a significant 3.60% accuracy boost over standard Mixup and a 0.70% improvement over CutMix.

Robustness and Generalization

To test the model's resilience to real-world noise, the authors used the CIFAR-100-C dataset, which contains 15 types of image corruptions. SEM improved performance by 2.09% over vanilla Mixup, suggesting that the learned semantic features are more stable. Furthermore, SEM showed a remarkable ability to detect Out-of-Distribution (OOD) samples. When trained on CIFAR-100, the AUROC for detecting unseen SVHN samples improved by 8.83% compared to standard Mixup.

Latent Space Visualization

Visual analysis using UMAP confirmed the theoretical motivation. In models trained with SEM, mixed representations lie on a clear linear path between original class clusters. In contrast, standard Mixup often results in scattered, non-linear clusters in the latent space, indicating a lack of semantic structure.

Conclusion and Future Work

Semantic Equivariant Mixup offers a powerful way to regularize the internal representations of neural networks, moving beyond simple label-level supervision. While the method introduces some computational overhead during training due to the additional forward passes required for the original images, this cost is absent during inference. Future research may explore more efficient ways to approximate these semantic constraints, potentially bringing the benefits of SEM to even larger-scale datasets and real-time training scenarios.

Summary updated

BibTeX
@misc{han2023semantic,
  author = {Zongbo Han and Tianchi Xie and Bingzhe Wu and Qinghua Hu and Changqing Zhang},
  title = {{Semantic Equivariant Mixup}},
  year = {2023},
  eprint = {2308.06451},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.06451},
}
Figure