ShuffleMix: Improving Representations via Channel-Wise Shuffle of Interpolated Hidden States

Kangjun Liu, Ke Chen, Lihua Guo, Yaowei Wang, Kui JiaarXiv 2023 · DOI

Introduction

Deep neural networks often struggle with generalization, frequently memorizing training data rather than learning the underlying structure of the data manifold. To combat this, regularization techniques like Mixup and Dropout have become standard. While Mixup smooths decision boundaries by interpolating between input pairs, and Dropout prevents co-adaptation by randomly disabling neurons, there remains room for more flexible augmentation strategies that operate within the network's internal representations.

This paper introduces ShuffleMix, a novel data augmentation technique that synthesizes the benefits of both Mixup and Dropout. By performing channel-wise shuffling on interpolated hidden states, ShuffleMix provides a more granular and effective regularization mechanism than previous manifold-level interpolation methods.

The Limitation of Rigid Interpolation

Standard Mixup operates in the input space, creating convex combinations of image pairs and their labels. Manifold Mixup extends this to hidden layers, interpolating feature maps at a randomly selected depth. However, Manifold Mixup is relatively "rigid" as it applies a single interpolation weight across all feature channels simultaneously. This uniformity can limit the network's ability to learn diverse, robust features.

Methodology: The ShuffleMix Operation

ShuffleMix introduces flexibility by operating on individual feature channels. During training, a hidden layer $k$ is randomly selected. For two samples $A$ and $B$ with hidden representations $g_k(x_a)$ and $g_k(x_b)$, ShuffleMix performs the following:

  1. Channel Selection: A binary mask $m$ is generated to select a specific ratio $r$ of the feature channels.
  2. Soft Interpolation: For the channels selected by the mask, the algorithm performs a linear interpolation between the features of $A$ and $B$ using a weight $\lambda$. The remaining channels from sample $A$ are kept intact.
  3. Label Assignment: The target label is adjusted proportionally based on the ratio of channels shuffled and the interpolation weight.
The ShuffleMix process: feature channels from two representations are masked and interpolated to create a new augmented hidden state.

This approach effectively treats Manifold Mixup as a special case where $r=1$. By using $r < 1$, ShuffleMix acts as a form of "soft dropout," forcing the network to maintain the identity of the primary sample while integrating information from the secondary sample.

Experimental Evaluation

The authors evaluated ShuffleMix across a wide range of architectures (ResNet, PreActResNet, Wide-ResNet) and datasets:

  • General Image Classification: On CIFAR-100, ShuffleMix achieved an accuracy of 80.02%, significantly higher than the baseline (76.12%) and Manifold Mixup (79.33%). Similar gains were observed on Tiny ImageNet.
  • Fine-Grained Classification: Tasks involving subtle differences, such as FGVC-Aircraft, saw improvements of nearly 2% over baseline models.
  • Multi-Label Classification: On Pascal VOC 2007, ShuffleMix reached a Mean Average Precision (mAP) of 94.6%. The method handles multi-label noise by using a thresholding mechanism to focus on dominant targets during interpolation.
  • Robustness to Noise: When combined with noise injection (ShuffleMix-NFM), the model showed remarkable resilience to adversarial-like perturbations, maintaining 40.45% accuracy on CIFAR-100 under high white noise levels where the baseline dropped to 14.07%.

Insights: Manifold Smoothing and Regularization

A key advantage of ShuffleMix is its impact on the learned data manifold. Visualization on synthetic datasets reveals that ShuffleMix produces smoother decision boundaries and more confident internal regions compared to its predecessors.

Decision boundary visualizations on a 3-class synthetic dataset. ShuffleMix achieves 100% accuracy with smoother transitions compared to Input and Manifold Mixup.

The "feature removal" effect inherent in shuffling acts as an implicit soft dropout. By preserving some original channels while mixing others, the network is discouraged from over-relying on any single set of features, leading to more distributed and robust representations.

Conclusion

ShuffleMix represents a significant step forward in manifold-level data augmentation. By combining the smoothing properties of Mixup with the stochastic regularization of Dropout through channel-wise shuffling, it offers a powerful tool for improving neural network generalization. Its consistent performance across diverse tasks—from fine-grained classification to multi-label detection—demonstrates its versatility and effectiveness as a general-purpose regularizer. Future work may extend this principle to other domains like NLP, where feature-level perturbations are particularly valuable.

Summary updated

BibTeX
@misc{liu2023shufflemix,
  author = {Kangjun Liu and Ke Chen and Lihua Guo and Yaowei Wang and Kui Jia},
  title = {{ShuffleMix: Improving Representations via Channel-Wise Shuffle of Interpolated Hidden States}},
  year = {2023},
  eprint = {2305.18684},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.18684},
}
Figure