HiMix: Hierarchical Artifact-aware Mixup for Generalized Synthetic Image Detection

Shuchang Zhou, Kaiwen Shen, Jiwei Wei, Yuyang Zhou, Peng Wang, Yang YangarXiv 2026

TL;DR

HiMix is a new framework designed to solve the "generalization gap" in synthetic image detection—the tendency for detectors to fail when encountering AI-generated images from models they weren't trained on. By combining a novel mixup-based data augmentation strategy with a hierarchical feature fusion module, HiMix achieves state-of-the-art performance across diverse generators, including a massive 15% accuracy boost on unseen diffusion models.

What Problem Does This Paper Address?

As generative models like Stable Diffusion and Midjourney become more sophisticated, distinguishing "real" from "fake" is increasingly difficult. Most current Synthetic Image Detection (SID) tools suffer from two main flaws:

  1. Source Overfitting: They become experts at spotting the specific "fingerprints" of one generator (e.g., ProGAN) but are completely blind to another (e.g., DALL-E).
  2. Content Bias: Instead of learning the technical artifacts of the generation process, they often learn to associate certain image categories or semantics with being "fake."

When these detectors face a new, unseen generator, the fake images often fall into "low-confidence" regions of the model's feature space, leading to dispersed and overlapping logit distributions where the decision boundary becomes a coin flip.

Traditional training leads to source-overfitted distributions, while HiMix enriches low-confidence regions for better separation.

Methods

The authors propose HiMix, which attacks the problem from both the data and representation perspectives:

  • Mixup-driven Distributional Augmentation (MDA): Standard training uses discrete "real" and "fake" labels. MDA creates continuous transitional samples by performing pixel-wise mixup between real and synthetic images. Crucially, these mixed samples are labeled as "fake." This forces the model to ignore high-level semantics (which are now a blend) and focus on the subtle, low-level synthetic artifacts that persist even in a diluted state.
  • Hierarchical Artifact-aware Representation (HAR): To capture these artifacts, the model needs to look at multiple scales. The HAR module includes:
  • Hierarchical Region Pooling (HiRP): This partitions the image into multi-scale windows to aggregate local statistics, helping the model find spatially consistent forgery cues.
  • Cross-Layer & Cross-Granularity Fusion: The model integrates information from different depths of a transformer backbone, adaptively weighting global structural patterns against fine-grained local textures.
  • Task-Adaptive Encoding: The system uses a frozen CLIP ViT-L/14 backbone but adds LoRA (Low-Rank Adaptation) layers. This allows the model to repurpose CLIP’s powerful visual features for forgery detection without inheriting its heavy bias toward image semantics.
The HiMix architecture, showing the MDA module and the HAR module's hierarchical pooling and fusion stages.

Datasets

The authors evaluated HiMix on several rigorous benchmarks:

  • GenImage: A million-scale benchmark featuring eight diverse generators (GANs and Diffusion Models).
  • Ojha's Diffusion Dataset: Specifically focused on diffusion variants like LDM, Glide, and ADM.
  • TwinSynths-GAN: A challenging high-fidelity dataset where real and fake images are content-aligned.
  • ForenSynths: A classic benchmark for CNN-based generator detection.

Key Insights and Ideas

  • The Power of "In-Between" Data: The most striking insight is that training on "diluted" fakes (mixup samples) actually makes the detector more robust. By filling the low-confidence gap between real and fake distributions, the model learns a much sharper and more stable decision boundary.
  • Decoupling Semantics from Forgery: By using LoRA on a frozen semantic model, the authors show you can "steer" a model that knows what a dog looks like to instead focus on the mathematical inconsistencies in how that dog was rendered.
  • Multi-Scale is Mandatory: Forgery artifacts aren't just at the pixel level. Some appear as global structural inconsistencies, while others are local upsampling traces. The Hierarchical Region Pooling (HiRP) is essential for catching both.

Key Results

HiMix sets a new bar for cross-generator generalization:

  • GenImage Benchmark: Achieved an average accuracy of 97.6% and an Average Precision (AP) of 99.7% across eight different generators.
  • Unseen Diffusion Models: On the ADM generator (which it never saw during training), HiMix improved accuracy by 15.44% over previous state-of-the-art methods.
  • Data Efficiency: Remarkably, HiMix trained on just 1% of the data (about 1,600 images) still achieved 96.71% accuracy, proving the effectiveness of the MDA module.
  • Robustness: It maintained significantly higher accuracy under JPEG compression and Gaussian blur compared to competitors like AIDE.
Logit distributions showing that HiMix produces much more compact and well-separated predictions on unseen generators compared to baselines.

Limitations and Future Work

While HiMix is highly effective, the authors note that extreme image degradation (very high compression or heavy blurring) still poses a challenge for all detectors, as it wipes out the high-frequency artifacts the models rely on.

Future work could explore:

  • Extending the hierarchical mixup approach to video deepfake detection, where temporal artifacts add another layer of complexity.
  • Investigating how these detectors handle adversarial attacks specifically designed to mimic the "low-confidence" regions HiMix tries to bridge.
  • Further reducing the computational overhead for real-time deployment in browser extensions or social media filters.

Summary updated

Abstract

The rapid evolution of generative models has enabled the creation of highly realistic and diverse synthetic images, posing significant challenges to reliable and generalizable Synthetic Image Detection (SID). However, existing detectors are typically trained on limited and biased datasets, resulting in poor generalization to unseen generators. To address this issue, we propose HiMix, a unified framework that enhances generalization by expanding the training distribution and promoting artifact-aware representations. Specifically, the Mixup-driven Distributional Augmentation (MDA) module constructs continuous transitional samples between real and fake images, improving coverage of low-confidence regions and exposing the model to more challenging samples, while the pixel-wise mixup operation smoothly perturbs semantics to enhance sensitivity to low-level artifacts. Moreover, the Hierarchical Artifact-aware Representation (HAR) module aggregates artifact information from both global and local levels through cross-layer integration and coarse-to-fine feature fusion, enabling the extraction of discriminative forgery representations under diverse distributions. Extensive experiments across multiple benchmarks demonstrate that HiMix achieves state-of-the-art performance, establishing well-separated logits for improved generalization to unseen forgeries.
BibTeX
@misc{zhou2026himix,
  author = {Shuchang Zhou and Kaiwen Shen and Jiwei Wei and Yuyang Zhou and Peng Wang and Yang Yang},
  title = {{HiMix: Hierarchical Artifact-aware Mixup for Generalized Synthetic Image Detection}},
  year = {2026},
  eprint = {2604.27903},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.27903},
}

Loading related content...

Figure