Abstract
As AI image generators like FLUX and Midjourney reach new heights of realism, traditional detection methods face significant challenges in generalization and robustness. We present CO-SPY, a framework that adaptively fuses enhanced semantic features with robust artifact features. By utilizing a pre-trained VAE for artifact extraction and a CLIP backbone for semantic analysis, CO-SPY achieves state-of-the-art performance. Evaluated on the massive CO-SPYBENCH, our method outperforms existing detectors by 11% to 34% in accuracy, maintaining high precision even under heavy JPEG compression.
Introduction
The rapid evolution of generative AI has created a "cat and mouse" game between image generators and detectors. While semantic detectors identify high-level inconsistencies (e.g., anatomical errors), they often fail to generalize to new models. Conversely, artifact detectors find microscopic "fingerprints" but are easily defeated by simple image transformations like JPEG compression. CO-SPY addresses this gap by combining the strengths of both approaches through an adaptive fusion mechanism.
Methodology
CO-SPY introduces three primary innovations to bridge the gap between semantic and artifact-based detection:
1. Enhanced Semantic Extraction
Instead of training from scratch, CO-SPY leverages a frozen CLIP (ViT-SO400M) backbone. To avoid simple label memorization, the framework employs feature interpolation, creating "soft" labels between real and synthetic embeddings. This forces the model to learn a more nuanced decision boundary that generalizes better to unseen generative styles.
2. VAE-Based Artifact Extraction
Traditional artifact detectors often rely on simple up-sampling noise, which is easily erased by compression. CO-SPY instead uses a pre-trained Variational Autoencoder (VAE). By analyzing the reconstruction error between the input and the VAE's output, the system identifies structural artifacts inherent to the decoding stage of modern generators.
3. Adaptive Fusion
The core of CO-SPY is a regulator module that dynamically weights semantic and artifact features. Rather than simple concatenation, this module assesses the input image's characteristics—such as resolution and compression level—to decide which feature set to trust more. For instance, it may prioritize semantic clues in heavily compressed images where pixel-level artifacts are degraded.
The CO-SPYBENCH Dataset
To evaluate the framework, the researchers introduced CO-SPYBENCH, a benchmark of over one million images. It includes outputs from 22 state-of-the-art models (including FLUX.1) and incorporates five real-image sources. The dataset simulates real-world conditions with random JPEG compression and includes an "in-the-wild" set of 50,000 images scraped from platforms like Lexica and Midjourney.
Experimental Results
CO-SPY demonstrates superior performance across multiple metrics:
- State-of-the-Art Accuracy: On CO-SPYBENCH, the framework achieved an average accuracy of 87.06% and an Average Precision (AP) of 96.02%, significantly outperforming baselines like DRCT.
- Generalization: When tested on the previously unseen FLUX model, CO-SPY maintained a performance lead of over 30% compared to standard semantic detectors.
- Robustness: The system remains stable across various transformations, including blurring, resizing, and noise, maintaining a 14% lead over competitors in "in-the-wild" scenarios.
Conclusion
CO-SPY represents a significant step forward in synthetic image detection by synergizing high-level semantic understanding with low-level structural artifacts. Its adaptive fusion mechanism allows it to remain effective across diverse models and real-world image degradations. Future work will explore combining these techniques with localized editing detection to provide a more comprehensive forensic toolkit.
Summary updated