Generative Classification via Flow Matching for AI-Generated Image Detection
Abstract
The rapid evolution of generative models and the growing diversity of generation sources pose persistent challenges to the cross-generator generalization of AI-generated image detectors. Existing approaches primarily improve detection by exploiting forensic artifacts, enhancing visual representations, or adapting pretrained models. However, they typically formulate authenticity prediction as a direct mapping, which may encourage reliance on salient cues specific to training generators. To address this limitation, we propose FakeFlow, a generative classification framework based on Flow Matching that formulates authenticity prediction as an image-conditioned continuous process in label space. Given representations from a frozen visual encoder, FakeFlow learns conditional trajectories from Gaussian initial states toward real or fake label vectors. We instantiate FakeFlow with two complementary parameterizations: FakeFlow regresses the trajectory velocity field, whereas FakeFlow predicts the target label vector and converts it into the corresponding update velocity. Although both formulations admit an equivalent one-step decision rule under ideal conditions, their different temporal error weighting leads to complementary generalization behavior. We further incorporate Classifier-Free Guidance (CFG) to amplify the discrepancy between image-conditioned and unconditional predictions, encouraging the final decision to rely more strongly on image-specific evidence. Experiments on GenImage, AIGI-Holmes, AIGI-Now, and In-the-Wild demonstrate strong generalization across unseen generators and real-world settings. Code is available at https://anonymous.4open.science/r/fakeflow-7575.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.