DiffuseMix: Label-Preserving Data Augmentation with Diffusion Models

Khawar Islam, Muhammad Zaigham Zaheer, Arif Mahmood, Karthik Nandakumar

Abstract

Data augmentation is a cornerstone of modern deep learning, yet traditional "image mixing" techniques like Mixup and CutMix often introduce label ambiguity and context loss. We present DiffuseMix, a novel augmentation strategy that leverages diffusion models to generate semantically consistent variants of training images. By combining original image segments with AI-generated counterparts and incorporating fractal blending, DiffuseMix creates diverse, label-preserving samples. Our evaluation across seven benchmarks demonstrates that DiffuseMix significantly enhances model performance and robustness, particularly in data-scarce and fine-grained classification scenarios.

Introduction

Popular augmentation techniques such as Mixup and CutMix have become standard in training deep neural networks. These methods typically blend or stitch together two different images from a dataset. While effective at regularizing models, they suffer from two primary drawbacks: label ambiguity and context loss. For instance, mixing a "cat" and a "dog" image results in a non-discrete label that may provide misleading supervisory signals. Furthermore, random cropping can inadvertently remove essential object features or context.

Traditional mixing methods like PuzzleMix (S+T) combine different classes, which can lead to label ambiguity and context loss.

DiffuseMix is designed to provide the visual diversity of mixing-based methods while maintaining 100% label purity.

Methodology

The DiffuseMix pipeline consists of three main stages:

  1. Generation: For each training image, a diffusion model (specifically InstructPix2Pix) generates a variant. The process uses "bespoke" filter-like prompts (e.g., "as a watercolor art") to alter style and context without changing the core object's identity.
  2. Concatenation: A binary mask is used to stitch a portion of the original natural image with its generated counterpart. This hybrid image preserves the original object's semantics while introducing synthetic variations.
  3. Fractal Blending: To improve structural diversity and adversarial robustness, the hybrid image is linearly blended with a randomly selected fractal image. This step acts as a powerful regularizer, forcing the model to learn more robust features.
DiffuseMix (S) generates label-preserving variants by mixing an image with its own diffusion-generated counterpart, avoiding the label noise of multi-class mixing.

Experimental Results

DiffuseMix was evaluated across seven benchmarks, including ImageNet-1k, Tiny-ImageNet, and various fine-grained classification datasets.

  • Classification Performance: On Tiny-ImageNet, DiffuseMix achieved 65.77% Top-1 accuracy, outperforming previous state-of-the-art methods. On ImageNet-1k, it reached 78.64%.
  • Data Scarcity: In ultra-low-data scenarios (10 images per class), DiffuseMix showed a significant improvement, reaching 74.12% accuracy compared to the 59.14% baseline.
  • Fine-Grained Tasks: The method proved particularly effective for fine-grained classification, with accuracy on the CUB-200-2011 dataset soaring to 79.37%.
  • Adversarial Robustness: Under FGSM attacks on CIFAR-100, DiffuseMix maintained a lower error rate (17.38%) than competing methods, highlighting the benefits of fractal blending.

Discussion and Insights

The success of DiffuseMix stems from its ability to avoid "label noise" by mixing an image with its own AI-generated variant. The use of specific, global prompts ensures that the diffusion model does not "hallucinate" new objects that would invalidate the original label. Furthermore, the synergy between AI-generated context and mathematical fractal noise provides a greater performance boost than either component alone.

Conclusion

DiffuseMix offers a sophisticated alternative to traditional image mixing by leveraging generative AI for label-preserving data augmentation. While it introduces additional computational overhead during the generation phase, this can be mitigated by offline processing. Future work will explore dynamic prompt selection and alternative masking strategies to further refine the augmentation process.

Summary updated

BibTeX
@inproceedings{islam2024diffusemix,
  author = {Khawar Islam and Muhammad Zaigham Zaheer and Arif Mahmood and Karthik Nandakumar},
  title = {{DiffuseMix: Label-Preserving Data Augmentation with Diffusion Models}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
}
Figure