Abstract
Scenario-Agnostic Mixup (SAMix) is a unified framework that extends the benefits of learnable data mixing to both supervised and self-supervised learning paradigms. By balancing local smoothness between mixed samples with global discrimination against the rest of the dataset, SAMix generates high-quality, non-trivial augmentations. This approach overcomes common pitfalls such as label dependency and the generation of trivial masks. Experimental results across nine benchmarks demonstrate that SAMix consistently outperforms traditional handcrafted methods and previous learnable approaches, establishing a new state-of-the-art for mixup-based representation learning.
Introduction
Mixup—the process of blending two images and their corresponding labels—has become a cornerstone of modern deep learning, encouraging models to exhibit linear behavior between training samples and improving generalization. However, advanced mixup techniques often suffer from two primary limitations: a heavy reliance on ground-truth labels for identifying salient regions (e.g., via Grad-CAM), which restricts their use in Self-Supervised Learning (SSL), and a tendency for learned generators to produce "trivial" masks that fail to provide meaningful training signals.
To address these issues, we introduce SAMix, a scenario-agnostic method that functions effectively regardless of label availability. SAMix ensures the utility of generated mixed samples by optimizing for both local smoothness and global distinctiveness.
Methods
The SAMix framework is built upon three core components: a label-free Mixer sub-network, a balanced loss objective, and a pre-trained deployment strategy.
The Mixer Sub-network
Instead of employing fixed mixing rules, SAMix utilizes a small, label-free neural network to determine the optimal mixing strategy for image pairs. As shown in Figure 5, the Mixer uses "mixing attention" to identify corresponding regions between images and "non-linear content modeling" to avoid trivial solutions.
η-Balanced Mixup Loss
The training objective for SAMix is defined by the η-balanced mixup loss, which decomposes the task into two goals:
- Local Smoothness: Ensuring a smooth transition between the two mixed images.
- Global Discrimination: Ensuring the resulting mixed sample remains distinguishable from all other images in the dataset.
The parameter η acts as a tuning mechanism to balance these objectives, preventing the generator from collapsing into uninformative states.
SAMixᴾ: Transferable Mixing Knowledge
Training a generator alongside a primary model can be computationally intensive. SAMixᴾ addresses this by leveraging the transferability of mixing knowledge. A Mixer pre-trained on a large-scale dataset like ImageNet can be "frozen" and reused for diverse tasks, providing high-quality masks with minimal additional training cost.
Key Insights
- The "Sweet Spot" of Mixing: Optimal mixed samples reside at the intersection of local smoothness and global distinctiveness. Ignoring the global constraint often leads to failure in SSL contexts.
- Non-Linearity as a Shield: Trivial solutions are frequently caused by the instability of simple linear projections when mapping high-dimensional features to 1D masks. Incorporating non-linear layers (ReLU and Batch Norm) stabilizes the generator.
- Transferability of Augmentation: The ability to mix images effectively is a general visual property. A Mixer trained on ImageNet generalizes remarkably well to specialized datasets, such as those for aircraft or bird classification.
Results
SAMix consistently outperformed standard Mixup, CutMix, and the previous state-of-the-art learnable method, AutoMix, across multiple benchmarks.
- Supervised Learning: On ImageNet-1k using a ResNet-50 backbone, SAMix achieved 78.11% top-1 accuracy, compared to 77.12% for Vanilla Mixup and 77.91% for AutoMix.
- Fine-Grained Classification: The method showed significant gains in specialized tasks, including a +1.24% boost on CUB-200 and +1.23% on Tiny-ImageNet.
- Self-Supervised Learning: In SSL scenarios using MoCo-v2, SAMix-I improved linear classification on STL-10 by nearly 3% over the baseline.
- Efficiency: The pre-trained SAMixᴾ variant achieved competitive results while being significantly faster than online-trained versions, making it suitable for production environments.
Conclusion
SAMix provides a robust, scenario-agnostic framework for learnable data mixing. By addressing the limitations of label dependency and trivial solutions through balanced objectives and non-linear modeling, it enhances visual representation learning across a wide range of supervised and self-supervised tasks.
Summary updated