Which Model Generated This Image? A Model-Agnostic Approach for Origin Attribution

Fengyuan Liu, Haochen Luo, Yiming Li, Philip Torr, Jindong Gu

Abstract

Attributing an AI-generated image to its specific source model is a growing challenge for intellectual property protection and accountability. This paper introduces OCC-CLIP, a model-agnostic framework designed for "few-shot" origin attribution. Unlike previous methods, OCC-CLIP identifies a model's unique signature using only a handful of sample images, without requiring access to internal weights or training data. By combining prompt learning with a novel adversarial data augmentation strategy, the framework achieves state-of-the-art performance in identifying images from both open-source and proprietary models like DALL-E 3.

Introduction

The rapid proliferation of visual generative models, such as Stable Diffusion, Midjourney, and DALL-E 3, has revolutionized digital content creation. However, this ubiquity brings significant challenges regarding the "origin" of images. Identifying whether an image was produced by a specific AI model is now a legal and ethical necessity for tracking misinformation, protecting copyrights, and ensuring model accountability.

Traditional attribution methods often rely on watermarking, which can degrade image quality, or fingerprinting, which requires intrusive access during the model's training phase. White-box "inverse engineering" approaches are similarly limited, as they require full access to model parameters and a massive number of query samples. This paper addresses a more practical and difficult "open-world" scenario: identifying if an image belongs to a specific "Target Model" using only a few example outputs and zero internal access. The authors formulate this as a Few-Shot One-Class Classification (FS-OCC) problem.

Methodology: The OCC-CLIP Framework

The core of the proposed solution is OCC-CLIP, which leverages the robust multimodal embeddings of the pre-trained CLIP (Contrastive Language-Image Pre-training) model. The framework consists of two primary innovations:

1. Prompt Learning (CoOp)

Rather than relying on static, hand-crafted text prompts (e.g., "an image by Stable Diffusion"), OCC-CLIP utilizes learnable context vectors. It optimizes two distinct prompts: one representing the "Target Class" (the specific model being identified) and another for the "Non-target Class" (representing all other possible origins, including real-world photos and other AI models).

2. Adversarial Data Augmentation (ADA)

In a few-shot setting, the available "non-target" images typically fail to cover the vast diversity of the "not-Model-X" space. To solve this, the authors introduced Adversarial Data Augmentation (ADA). ADA uses gradient ascent to slightly perturb non-target images during the training process, "pushing" them toward the decision boundary of the target class. This forces the model to learn a much tighter and more precise boundary, effectively simulating "hard negatives" that define the target model's unique stylistic fingerprint.

The OCC-CLIP framework architecture, highlighting the Adversarial Data Augmentation (ADA) and prompt learning components.

Experimental Evaluation

To evaluate OCC-CLIP, the authors constructed a comprehensive benchmark spanning various architectures and commercial APIs:

  • Diffusion and Transformer Models: Stable Diffusion (SD), Latent Diffusion (LDM), GLIDE, VQ-Diffusion, and GALIP.
  • GAN Models: GauGAN, ProGAN, and StyleGAN2.
  • Real-World Baselines: Datasets including COCO, ImageNet, Flickr, and CC12M.
  • Commercial Validation: A specific test case using the DALL-E 3 API to simulate real-world forensic scenarios.

Key Results and Insights

The experimental results demonstrate that OCC-CLIP significantly outperforms existing baselines across all tested categories.

Superior Accuracy and Efficiency

OCC-CLIP achieved an overall AUC of 0.9548, surpassing traditional CNN-based classifiers like ResNet and VGG, as well as standard CLIP-based prompt tuning (CoOp). Notably, the model remains highly effective with as few as 10 to 20 images from the target model. In tests against the closed-source DALL-E 3, OCC-CLIP achieved a remarkable AUC of 0.9754 with only 10 samples, proving its utility against the most advanced proprietary models.

Performance comparison (AUC) of OCC-CLIP against baseline methods across various generative models.

The Role of the Decision Boundary

A critical insight from the study is that in one-class classification, the precision of the decision boundary is paramount. Standard data augmentations, such as blurring or rotation, were found to actually decrease performance by blurring the distinction between classes. Only Adversarial Augmentation (ADA) successfully provided the necessary contrast to isolate the subtle structural artifacts and "noise" patterns left by different generative architectures.

Conclusion and Future Work

OCC-CLIP provides a powerful, model-agnostic tool for image origin attribution in the open-world. By treating attribution as a few-shot one-class problem, it bypasses the need for model access or intrusive watermarking.

While highly effective, the authors note that distinguishing between models that share identical architectures and training data remains a significant challenge. Future research will focus on improving discrimination between such "twin" models and exploring the framework's resilience against intentional adversarial "cloaking" by malicious users. Additionally, the principles of FS-OCC could be extended to other generative domains, such as deepfake audio and synthetic text.

Summary updated

BibTeX
@inproceedings{liu2024which,
  author = {Fengyuan Liu and Haochen Luo and Yiming Li and Philip Torr and Jindong Gu},
  title = {{Which Model Generated This Image? A Model-Agnostic Approach for Origin Attribution}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73033-7\_16},
}
Figure