NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Task-Model Alignment: A Simple Path to Generalizable AI-Generated Image Detection

Ruoxin Chen, Jiahui Gao, Kaiqing Lin, Ke-Yue Zhang, Yandan Zhao, Isabel Guan, Taiping Yao, Shouhong DingarXiv 2025 · OpenReview

Abstract

Vision Language Models (VLMs) are increasingly used for detecting AI-generated images (AIGI). However, converting VLMs into reliable detectors is resource-intensive, and the resulting models often suffer from hallucination and poor generalization. To investigate the root cause, we conduct an empirical analysis and identify two consistent behaviors. First, fine-tuning VLMs with semantic supervision improves semantic discrimination and generalizes well to unseen data. Second, fine-tuning VLMs with pixel-artifact supervision leads to weak generalization. These findings reveal a fundamental task-model misalignment. VLMs are optimized for high-level semantic reasoning and lack inductive bias toward low-level pixel artifacts. In contrast, conventional vision models effectively capture pixel-level artifacts but are less sensitive to semantic inconsistencies. This indicates that different models are naturally suited to different subtasks. Based on this insight, we formulate AIGI detection as two orthogonal subtasks: semantic consistency checking and pixel-artifact detection. Neglecting either subtask leads to systematic detection failures. We further propose the Task-Model Alignment principle and instantiate it in a two-branch detector, AlignGemini. The detector combines a VLM trained with pure semantic supervision and a vision model trained with pure pixel-artifact supervision. By enforcing clear specialization, each branch captures complementary cues. Experiments on in-the-wild benchmarks show that AlignGemini improves average accuracy by 9.5 percent using simplified training data. These results demonstrate that task-model alignment is an effective principle for generalizable AIGI detection.

Introduction

As AI image generators like Midjourney and Flux achieve unprecedented levels of realism, distinguishing them from authentic photographs has become a critical challenge. Current state-of-the-art approaches typically fine-tune large Vision-Language Models (VLMs) on massive datasets of "real vs. fake" images. However, these models often struggle with generalization and are prone to hallucinations.

This paper identifies a fundamental "misalignment" in current detection strategies. VLMs are inherently optimized for high-level semantic reasoning—identifying logical absurdities like a person with six fingers. Yet, they lack the inductive bias necessary to detect low-level pixel artifacts, such as the specific noise patterns characteristic of diffusion models. Conversely, traditional vision models excel at spotting these pixel-level "fingerprints" but are often blind to semantic inconsistencies.

The Task-Model Alignment Principle

The authors propose the Task-Model Alignment principle, which suggests that AIGI detection should be split into two orthogonal subtasks, each handled by a model naturally suited for it. This principle is instantiated in the AlignGemini detector, which features a two-branch architecture:

  1. The Semantic Branch: Utilizes a VLM (Qwen2.5-VL) trained with Direct Preference Optimization (DPO). It focuses on "pure" semantic cues. Training data is heavily post-processed (e.g., blurred or compressed) to eliminate pixel-level artifacts, forcing the model to rely on logical reasoning.
  2. The Pixel-Artifact Branch: Employs a vision expert (DINOv2) trained on "pure" artifact cues. This is achieved by comparing real images with their Variational Autoencoder (VAE) reconstructions, which preserves semantics while altering pixel-level statistics.

At inference, a "Logical OR" fusion is used: if either branch flags an image as fake, it is classified as AI-generated. This conservative approach ensures that fakes cannot hide behind either semantic perfection or clean pixel statistics.

Experimental Results

AlignGemini emphasizes "purity over scale," utilizing only 10k training samples—a significant reduction compared to the 150k+ samples used by competing methods. Despite this, it demonstrates superior performance across multiple "in-the-wild" benchmarks.

Performance comparison of AlignGemini against state-of-the-art methods across various benchmarks and training data complexity.

Key findings include:

  • Superior Generalization: AlignGemini improved average accuracy by 9.5% across five major benchmarks (Chameleon, WildRF, AIGI-Bench, Co-SPY, BFree-Online).
  • Semantic Dominance: On the new AIGI-Now semantic subset, AlignGemini achieved 93.4% accuracy, significantly outperforming existing detectors that often fell below 70%.
  • Robustness: The semantic branch's indifference to pixel-level noise allows the system to remain effective even under heavy image compression or resizing.

Conclusion

The success of AlignGemini demonstrates that task-model alignment is a powerful principle for building generalizable AIGI detectors. By respecting the inherent strengths and inductive biases of different model architectures, researchers can achieve higher accuracy with significantly less training data. Future work may involve extending this framework with additional specialized branches to counter emerging generation techniques.

Summary updated

BibTeX
@misc{chen2025task,
  author = {Ruoxin Chen and Jiahui Gao and Kaiqing Lin and Ke-Yue Zhang and Yandan Zhao and Isabel Guan and Taiping Yao and Shouhong Ding},
  title = {{Task-Model Alignment: A Simple Path to Generalizable AI-Generated Image Detection}},
  year = {2025},
  eprint = {2512.06746},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.06746},
}
Figure