TAP into the Patch Tokens: Leveraging Vision Foundation Model Features for AI-Generated Image Detection

arXiv cs.CV / 4/30/2026

📰 NewsSignals & Early TrendsIdeas & Deep AnalysisModels & Research

Key Points

  • The paper evaluates how well modern vision foundation models (VFMs) can detect AI-generated and AI-inpainted images from unseen generative sources, using them as feature extractors rather than detectors trained end-to-end.
  • Across multiple VFM families with different pretraining objectives, input resolutions, and model sizes, the study finds that the top-performing model exceeds the original CLIP by more than 12% in detection accuracy and outperforms prior methods.
  • To better exploit VFM features, the authors introduce a simple classifier-head redesign that applies tunable attention pooling (TAP) to aggregate token outputs into a stronger global representation.
  • Adding TAP to recent VFMs produces substantial gains on several AI image forensics benchmarks and sets a new state of the art on two difficult “in-the-wild” detection benchmarks for both generated and inpainted images.

Abstract

Recent methods demonstrate that large-scale pretrained models, such as CLIP vision transformers, effectively detect AI-generated images (AIGIs) from unseen generative models when used as feature extractors. Many state-of-the-art methods for AI-generated image detection build upon the original CLIP-ViT to enhance this generalization. Since CLIP's release, numerous vision foundation models (VFMs) have emerged, incorporating architectural improvements and different training paradigms. Despite these advances, their potential for AIGI detection and AI image forensics remains largely unexplored. In this work, we present a comprehensive benchmark across multiple VFM families, covering diverse pretraining objectives, input resolutions, and model scales. We systematically evaluate their out-of-the-box performance for detecting fully-generated AI-images and AI-inpainted images, and discover that the best model outperforms the original CLIP by more than 12% in accuracy, beating established approaches in the process. To fully leverage the features of a modern VFM, we propose a simple redesign of the classifier head by utilizing tunable attention pooling (TAP), which aggregates output tokens into a refined global representation. Integrating TAP with the latest VFMs yields substantial performance gains across several AIGI detection benchmarks, establishing a new state-of-the-art on two challenging benchmarks for in-the-wild detection of AI-generated and -inpainted images.