Towards Generalizable AI-Generated Image Detection via Image-Adaptive Prompt Learning

Yi-Heng Li, Zichang Tan, Guo-Qing Xu, Zheng-Dong Lei, Xu Zhou +1 more
8/1/2025
10 citations

No official code found. Best implementation: liyih/IAPL (29 stars, Python, last commit 2026-03-08).

Abstract

In AI-generated image detection, current cutting-edge methods typically adapt pre-trained foundation models through partial-parameter fine-tuning. However, these approaches often struggle to generalize to forgeries from unseen generators, as the fine-tuned models capture only limited patterns from training data and fail to reflect the evolving traits of new ones.

Show full abstract

To overcome this limitation, we propose Image-Adaptive Prompt Learning (IAPL), a novel paradigm that dynamically adjusts the prompts fed into the encoder according to each testing image, rather than fixing them after training. This design significantly enhances robustness and adaptability to diverse forged images. The dynamic prompts integrate conditional information with test-time adaptive tokens through a lightweight learnable scaling factor. The conditional information is produced by a Conditional Information Learner, which leverages CNN-based feature extractors to model both forgery-specific and general conditions. The test-time adaptive tokens are optimized during inference on a single sample by enforcing prediction consistency across multiple views, ensuring that the parameters align with the current image. For the final decision, the optimal input with the highest prediction confidence is selected. Extensive experiments show that IAPL achieves state-of-the-art performance, with mean accuracies of 95.61% and 96.7% on the widely used UniversalFakeDetect and GenImage datasets, respectively. Codes and weights will be released on https://github.com/liyih/IAPL.

View on arXivView PDF

Code Implementations(1)

liyih/IAPLCommunity25%

[CVPR 2026] Towards Generalizable AI-Generated Image Detection via Image-Adaptive Prompt Learning

293Python, ShellAug 3, 20258 months ago
ai-generated-image-detectiongenimageimage-adaptiveprompt-learninguniversalfakedetect

Similar Papers

Cite this paper

@article{li2025towards,
  title  = {Towards Generalizable AI-Generated Image Detection via Image-Adaptive Prompt Learning},
  author = {Yi-Heng Li and Zichang Tan and Guo-Qing Xu and Zheng-Dong Lei and Xu Zhou and Yang Yang},
  year   = {2025},
  eprint = {2508.01603},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2508.01603},
  url    = {https://doi.org/10.48550/arXiv.2508.01603},
  journal = {Computer Vision and Pattern Recognition}
}

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/2508.01603.svg)](https://codeofpaper.com/paper/2508.01603)

Discussion