TL;DR
Generative diffusion models can synthesize rich training data, but uncontrolled generations often degrade classifier performance. DiffCoRe-Mix introduces a "responsible" text-to-image (T2I) data augmentation pipeline that pairs contextual and negative prompts with automated CLIP-based cosine filtration, followed by stochastic pixel- and patch-level mixing. Across benchmarks ranging from ImageNet to fine-grained species classification, it delivers up to ~3% absolute accuracy gains over state-of-the-art augmentation methods without inflating training-time overhead.
What Problem Does This Paper Address?
Traditional mixup methods (like Mixup and CutMix) combine different training images to improve generalization, but deciding on the right supervisory signal for blended images is an open challenge. Generative diffusion models offer a potential alternative by creating diverse synthetic samples for specific classes.
However, standard generative models suffer from a lack of semantic control. When diffusion models produce ill-formed, off-concept, or visually corrupted images, feeding them to a classifier injects noise into the supervision signal, often hurting model generalization rather than helping it. Earlier generative mixup attempts (such as DiffuseMix) relied on image-to-image (I2I) style transfers, which still struggle with semantic fidelity and realistic object boundaries. DiffCoRe-Mix aims to establish explicit control over diffusion-based data generation and systematically fuse natural and synthetic data.
Methods
DiffCoRe-Mix replaces impromptu generation with an explicitly constrained, three-stage augmentation pipeline:
[Prompt Guidance (Pc & Pn)] ➔ [T2I Generation] ➔ [CLIP Hard-Cosine Filtration] ➔ [Pixel / Patch Mixing with Real Image]
-
Context Guidance via Modified Classifier-Free Guidance:
Instead of using unconditional negative baselines during sampling, the reverse diffusion process is conditioned on both a positive contextual prompt $P_c$ (e.g., "Generate heavy snow to the<label>, a<dataset>object") and an explicit negative prompt $P_n$ designed to suppress class-irrelevant features or background artifacts (e.g., text, buildings, rails): $$\tilde{\epsilon}_\theta = (1 + \gamma)\epsilon_\theta(x_t, \psi(P_c), t) - \gamma \epsilon_\theta(x_t, \psi(P_n), t)$$ -
Hard-Cosine Similarity Filtration:
Even with prompt constraints, around 10% of generated images drift semantically. To discard them automatically, the authors compute the cosine similarity between the CLIP image embeddings of the real image $I_i$ and synthetic candidate $G_i$. The acceptance threshold $\tau$ is computed dynamically as the expected pairwise CLIP similarity among real samples within that same class. If $S(I_i, G_i) \le \tau$, the sample is rejected and regenerated. -
Composite Pixel- and Patch-Wise Mixing:
Once an aligned generative counterpart $G_i$ is secured, it is mixed with the original image $I_i$ via a Bernoulli trial ($\pi = 0.5$): -
Pixel-level mixing: $M_i = \lambda I_i + (1 - \lambda)G_i$ (reduces neural network memorization).
- Patch-level mixing: $M_i = M_p \odot I_i + (1 - M_p) \odot G_i$ using a binary cutout mask $M_p$ (enhances structural regularization).
Datasets
The authors evaluated their method across seven visual recognition datasets spanning general, fine-grained, transfer learning, and data-scarce settings:
- General classification: ImageNet-1K, Tiny ImageNet-200, CIFAR-100.
- Fine-grained categorization & transfer learning: CUB-200-2011 (birds), Stanford Cars (196 car classes), Caltech.
- Data-scarcity benchmark: Flower-102 (evaluated under an extreme 10 images/class regime).
No new datasets were introduced.
Key Insights and Ideas
- T2I with negative prompts beats I2I style-transfer: I2I pipelines often distort core semantic boundaries. Shifting to text-to-image conditioned with negative prompts effectively prunes irrelevant visual patterns out of the generative distribution before pixels are ever rendered.
- Real-data distributions provide natural acceptance thresholds: Rather than manually tuning an arbitrary CLIP threshold for image filtration, using the mean intra-class similarity of real image pairs ($\tau \approx \mathbb{E}[S(I_i^k, I_j^k)]$) provides an adaptive baseline tailored to how visually compact or dispersed that particular class naturally is.
- Hybrid mixing is synergistic: Ablations demonstrated that using generative images alone, pixel-wise mixing alone, or patch-wise mixing alone yields partial gains. Combining patch- and pixel-level blending with generative data produced the strongest performance (e.g., moving Stanford Cars accuracy from 85.86% to 92.74%).
Key Results
- ImageNet-1K (ResNet-50): DiffCoRe-Mix-100 achieved 80.48% Top-1 accuracy, outperforming standard Mixup (77.03%), Co-Mixup (77.63%), and the generative baseline DiffuseMix (78.64%).
- Small-scale & Low-resolution: On Tiny ImageNet-200, DiffCoRe-Mix attained 67.81% Top-1 (a +2.04% gain over DiffuseMix and +11.22% over Mixup). On CIFAR-100, it achieved 83.37%.
- Fine-Grained Classification (DenseNet-121): Outperformed prior art across CUB (79.52%), Stanford Cars (92.71%), and Caltech (93.72%).
- Data Scarcity (Flower-102, 10 samples/class): Reached 62.58% test accuracy, beating the previous best generative mixup method (60.82%).
- Efficiency: Because images are generated offline, training-time overhead remains low (58.9% overhead at batch size 64 vs. 716.6% for Co-Mixup and 923.3% for SaliencyMix). The automated rejection rate held remarkably constant across classes at roughly 10.1% to 11.1%.
Limitations and Future Work
- Offline Generation Overhead: While runtime training overhead is low, generating high-resolution synthetic counterparts via Stable Diffusion XL requires non-trivial offline compute (several GPU hours even for moderate datasets like CUB).
- Heuristic Negative Prompt Design: The negative prompt sets ($P_n$) currently rely on domain-specific manual definitions (e.g., listing common background distractors per dataset) rather than an automated, end-to-end learned formulation.
- Small Batch Latency: At very small batch sizes (e.g., 16), processing time is roughly $3.5\times$ slower than simple Mixup, only matching or beating baseline throughput as batch sizes scale to 64 and beyond.
Summary updated