ReSmooth: Detecting and Utilizing OOD Samples when Training with Data Augmentation

Chenyang Wang, Junjun Jiang, Xiong Zhou, Xianming Liu · DOI

Introduction

Data Augmentation (DA) has become a fundamental component of deep learning, serving as a powerful tool to artificially expand training datasets and improve model generalization. The core objective of any DA strategy is to balance two competing factors: diversity (introducing new information) and affinity (maintaining the characteristics of the original data distribution).

However, modern "heavy" DA strategies, such as RandAugment, often prioritize diversity to such an extent that they generate samples that fall outside the original data distribution. This paper identifies a specific category of these samples termed DAOOD (DA-incurred OOD). While these images remain semantically recognizable to humans, they appear as high-loss outliers to models trained on standard data. Forcing a model to learn these samples using standard "hard" one-hot labels can degrade performance on the original test set. ReSmooth is proposed as a framework to resolve this tension by detecting and intelligently utilizing these samples rather than discarding them.

The Problem of DA-Incurred OOD Samples

The authors argue that the primary issue with heavy augmentation is not the lack of semantic content, but the metric shift it introduces. When a model is trained on standard data, DAOOD samples appear as noise.

A DAOOD sample of a pizza where heavy augmentation creates a distribution shift while maintaining semantic identity.

If these samples are treated with the same weight as in-distribution (ID) data, the model may overfit to distorted features, leading to a drop in accuracy. Conversely, simply removing these samples wastes potentially valuable diverse data. ReSmooth seeks a middle ground by adjusting how the model learns from these "difficult" samples.

Methodology: The ReSmooth Framework

ReSmooth implements a two-step "detect-and-utilize" pipeline to handle augmented data:

1. DAOOD Detection via GMM

The framework first trains a model on unaugmented data to establish a baseline. When augmented data is passed through this model, the authors observed that the log-loss distribution follows a Gaussian Mixture Model (GMM) with two distinct components: one representing In-Distribution (ID) samples and another for OOD samples. By using the Expectation-Maximization (EM) algorithm, ReSmooth can calculate the posterior probability ($w_i$) of a sample being in-distribution in an unsupervised manner.

2. DAOOD Utilization via Label Smoothing

Rather than a binary inclusion/exclusion, ReSmooth applies sample-wise label smoothing based on the detection probability.

  • ID samples ($w_i \approx 1$) are trained with standard cross-entropy.
  • OOD samples ($w_i \approx 0$) are trained with increased label smoothing, moving the target closer to a uniform distribution.
Comparison of prediction distributions for ID (left) vs. OOD (right) samples.

This approach prevents the model from over-committing to the distorted features of OOD samples while still allowing it to extract the underlying semantic information. This logic also extends to Negative Data Augmentation (NDA)—transformations like Jigsaw puzzles that are typically considered harmful but become beneficial under ReSmooth's adaptive smoothing regime.

Experimental Evaluation

The authors evaluated ReSmooth across several standard benchmarks, including CIFAR-10/100, SVHN, and ImageNet.

  • CIFAR-100: Combined with RandAugment, ReSmooth achieved 84.84% accuracy, a significant improvement over the 83.04% baseline.
  • ImageNet: Using a ResNet-50 backbone, ReSmooth reached a top-1 accuracy of 78.27%, outperforming competitive methods like TeachAugment.
  • Robustness to NDA: ReSmooth consistently converted "negative" augmentations (like 180-degree rotations) into performance gains, whereas standard training often saw performance declines with such transformations.

Conclusion and Future Work

ReSmooth demonstrates that the "harmful" nature of heavy data augmentation is often a matter of label treatment rather than the data itself. By identifying DAOOD samples through log-loss GMMs and applying adaptive label smoothing, models can leverage high-diversity data without suffering from distribution shift.

While effective, the current method requires a pre-training stage, which increases computational overhead. Future research may focus on end-to-end implementations that estimate the GMM online during a "warm-up" phase, potentially reducing training time while maintaining the benefits of the ReSmooth framework.

Summary updated

BibTeX
@article{wang2022resmooth,
  author = {Chenyang Wang and Junjun Jiang and Xiong Zhou and Xianming Liu},
  title = {{ReSmooth: Detecting and Utilizing OOD Samples when Training with Data Augmentation}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2022},
  doi = {10.1109/tnnls.2022.3222044},
}
Figure