GAMMA: Generalizable Alignment via Multi-task and Manipulation-Augmented Training for AI-Generated Image Detection

Haozhen Yan, Yan Hong, Suning Lang, Jiahui Zhan, Yikun Ji, Yujie Gao, Jun Lan, Huijia Zhu, Weiqiang Wang, Jianfu ZhangarXiv 2025 · DOI

Abstract

AI image detectors often fail to generalize to unseen generative models due to overfitting on model-specific artifacts. We present GAMMA, a framework that leverages multi-task segmentation and a reverse cross-attention mechanism to focus on structural and semantic inconsistencies. GAMMA achieves state-of-the-art performance, reaching 95.1% accuracy on the GenImage benchmark and significantly outperforming existing methods on recent models like GPT-4o.

Introduction

The rapid advancement of generative AI has made it increasingly difficult to distinguish between real and synthetic images. While current detectors perform well on in-distribution data, they suffer from a significant "generalization gap" when encountering images from new, unseen models. This is largely due to generation-specific bias, where models memorize superficial cues like noise patterns or compression artifacts unique to their training sets. To address this, we propose GAMMA, which shifts the focus from binary classification to recognizing intrinsic structural and semantic "glitches" that persist across different generative processes.

Methodology: The GAMMA Framework

GAMMA (Generalizable AI-generated image detection via Multi-task and Manipulation-Augmented supervision) is built upon three core pillars designed to enhance robustness and generalization.

1. Manipulation-Augmented Training

To prevent overfitting to a single generative style, GAMMA utilizes a diverse training set incorporating three types of forgeries:

  • Inpainting: AI-filled regions that maintain semantic flow but often introduce structural anomalies.
  • Copy-Move & Splicing: Model-agnostic manipulations that rearrange real pixels, preserving structural plausibility but disrupting local semantics.

2. Multi-Task Fine-Grained Supervision

GAMMA employs two parallel segmentation heads alongside the main classifier. The AI Segmentation Head localizes synthesized pixels, while the Manipulation Segmentation Head identifies any altered pixels, including those from real-pixel rearrangements. This dual supervision forces the model to learn the difference between general image editing and AI generation.

3. Reverse Cross-Attention

The technical "secret sauce" of GAMMA is the Reverse Cross-Attention mechanism. Unlike standard multi-task models where global features guide local segmentation, GAMMA allows the segmentation branch—which is more sensitive to local anomalies—to provide feedback to the classification branch. This enables the model to rectify biased global predictions if the segmentation head detects local forgeries that the classifier might have missed.

The GAMMA architecture featuring dual segmentation decoders and a classifier with reverse cross-attention.

Experimental Setup

The model was trained using a combination of COCO, COCO-Inpaint, and TampCOCO datasets. Evaluation was conducted across several benchmarks:

  • GenImage: A comprehensive benchmark covering eight generative models.
  • SynthWildX: Synthetic images collected "in the wild."
  • GPT-4o Datasets: Including OpenAI-4o, GPT-ImgEval, and ShareGPT-4o to test against the latest state-of-the-art generators.

Results and Discussion

GAMMA sets a new state-of-the-art (SOTA) standard for generalizable AI image detection.

Benchmark Performance

On the GenImage benchmark, GAMMA achieved an accuracy of 95.1%, representing a 5.8% improvement over the previous leading method, B-Free.

Performance comparison on the GenImage benchmark.

Robustness to Modern Generators

GAMMA's generalization capabilities are most evident when tested against recent models like GPT-4o. On the OpenAI-4o dataset, GAMMA reached 79.4% accuracy, whereas previous SOTA methods like DMID (49.8%) and B-Free (53.5%) performed near the level of random chance.

Ablation Studies

The importance of the Reverse Cross-Attention mechanism was confirmed through ablation testing. Removing this component resulted in a drop in accuracy from 93.2% to 91.8%, highlighting the critical role of the interaction between local segmentation and global classification features.

Conclusion

GAMMA demonstrates that multi-task supervision and cross-modal feedback are powerful tools for bridging the generalization gap in AI image detection. By decoupling superficial artifacts from structural inconsistencies, GAMMA provides a more reliable defense against the evolving landscape of synthetic content. Future work will explore integrating these visual cues with frequency-domain analysis and adapting the framework for multimodal models.

Summary updated

BibTeX
@misc{yan2025gamma,
  author = {Haozhen Yan and Yan Hong and Suning Lang and Jiahui Zhan and Yikun Ji and Yujie Gao and Jun Lan and Huijia Zhu and Weiqiang Wang and Jianfu Zhang},
  title = {{GAMMA: Generalizable Alignment via Multi-task and Manipulation-Augmented Training for AI-Generated Image Detection}},
  year = {2025},
  eprint = {2509.10250},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.10250},
}
Figure