Rethinking the Use of Vision Transformers for AI-Generated Image Detection

NaHyeon Park, Kunhee Kim, Junsuk Choe, Hyunjung Shim
12/4/2025
cs.CVcs.LG

No official code found. Best implementation: nahyeonkaty/mold (3 stars, MIT, last commit 2025-12-05).

Abstract

Rich feature representations derived from CLIP-ViT have been widely utilized in AI-generated image detection. While most existing methods primarily leverage features from the final layer, we systematically analyze the contributions of layer-wise features to this task. Our study reveals that earlier layers provide more localized and generalizable features, often surpassing the performance of final-layer features in detection tasks. Moreover, we find that different layers capture distinct aspects of the data, each contributing uniquely to AI-generated image detection. Motivated by these findings, we introduce a novel adaptive method, termed MoLD, which dynamically integrates features from multiple ViT layers using a gating-based mechanism. Extensive experiments on both GAN- and diffusion-generated images demonstrate that MoLD significantly improves detection performance, enhances generalization across diverse generative models, and exhibits robustness in real-world scenarios. Finally, we illustrate the scalability and versatility of our approach by successfully applying it to other pre-trained ViTs, such as DINOv2.

View on arXivView PDF

Code Implementations(1)

nahyeonkaty/moldCommunity72%
MIT

Official PyTorch implementation of the paper "Rethinking the Use of Vision Transformers for AI-Generated Image Detection"

31Shell, PythonDec 4, 202510 months agoMIT

Cite this paper

@article{park2025rethinking,
  title  = {Rethinking the Use of Vision Transformers for AI-Generated Image Detection},
  author = {NaHyeon Park and Kunhee Kim and Junsuk Choe and Hyunjung Shim},
  year   = {2025},
  eprint = {2512.04969},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.04969v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.04969.svg)](https://codeofpaper.com/paper/2512.04969)

Discussion