Relative patch response learning improves ai generated image detection accuracy

Relative Patch Response Learning for Generalizable AI-Generated Image Detection

Computer Vision and Pattern Recognition

Summary

AI can now create very realistic images, which can be used to spread false information. Detecting these AI-generated images is hard, especially when the detector encounters new AI models or image changes it hasn't seen before. The authors found that existing methods struggle because they confuse the source of image patches when analyzing them contextually. They introduced a new approach called Relative Patch Response Learning that compares how individual parts of an image differ across two versions, making detection more precise. Their method performed better than previous ones on multiple tests.

What this means in practice

Authors

Tianyu Wang, Ouxiang Li, Yanbin Hao, Zhenhua Tang, Shuo Wang

Abstract

Generative models can now synthesize highly realistic images, simultaneously increasing the risks of misinformation and visual forgery. Therefore, detecting AI-generated images becomes more essential, and a reliable detector must generalize to unseen generators and stay robust to unseen perturbations in the wild. Existing detectors are typically trained on either independently collected real and generated images or aligned real-generated pairs designed to mitigate content bias. Building on aligned pairs, recent methods form a mixed view by replacing some patches of the real image with their generated counterparts. However, we find that self-attention lets real and generated patches interact, so the feature of each patch no longer reflects its own source alone. This contextual shift makes a per-patch source label an imprecise target. To this end, we propose Relative Patch Response Learning (PRL). Instead of labeling each patch, PRL compares the same patch across two mixed views of an aligned pair and learns from its patch response, the change of its score between the views. (i) To give precise supervision under the contextual shift, a relative response objective measures the responses of source-changed patches against those of source-unchanged patches, which respond to the shift alone. (ii) To provide a reliable reference for the shift, a reference coherence objective keeps each group of source-unchanged patches moving as a whole. (iii) Since the two views contain different amounts of generated content, an area ranking objective asks the view with the larger generated area to have a higher mean patch score. Extensive experiments demonstrate the superior performance of PRL, which surpasses the best prior methods by 4.3% and 5.9% in average balanced accuracy across eight standard and three in-the-wild benchmarks, respectively.