22email: [email protected], [email protected]
Which Model Generated This Image? A Model-Agnostic Approach for Origin Attribution
Abstract
Recent progress in visual generative models enables the generation of high-quality images. To prevent the misuse of generated images, it is important to identify the origin model that generates them. In this work, we study the origin attribution of generated images in a practical setting where only a few images generated by a source model are available and the source model cannot be accessed. The goal is to check if a given image is generated by the source model. We first formulate this problem as a few-shot one-class classification task. To solve the task, we propose OCC-CLIP, a CLIP-based framework for few-shot one-class classification, enabling the identification of an image’s source model, even among multiple candidates. Extensive experiments corresponding to various generative models verify the effectiveness of our OCC-CLIP framework. Furthermore, an experiment based on the recently released DALL·E-3 API verifies the real-world applicability of our solution. Our source code is available at https://github.com/uwFengyuan/OCC-CLIP.
Keywords:
Model Attribution Generated Images CLIP Classification1 Introduction
Recent visual generative models are capable of producing images of exceptional quality, which have raised public concerns regarding Intellectual Property (IP) protection and accountability for misuse [15, 31, 34, 33]. In response to both the challenges and opportunities posed by Artificial Intelligence-Generated Content (AIGC), a recent U.S. executive order [3] mandates that all AI-generated content must clearly label its source, such as Stable Diffusion [46]. This makes the attribution of origins for generated images crucial in real-world applications, referring to the process of identifying whether a given image is generated by a particular model.
To address the origin attribution problem above, three main methods have been explored in the community. The first method involves watermarking [57, 37, 43, 59, 35], which requires additional modifications to the generated results, affecting the quality of generation. The second method involves injecting fingerprints [68, 10, 69, 70] into the model during training and employing a supervised classifier to identify these fingerprints. This process necessitates changes in training. Modification-free approaches have also been proposed, which do not require modifications to the generation or training processes. Specifically, the existing methods utilize inverse engineering [64, 29], based on the idea that a synthetic sample can be most accurately reconstructed by the generator that created it. However, inverse engineering approaches necessitate access to the target model and require sampling many images as references.
![Refer to caption](extracted/5731048/figures/teaser.png)
In this work, we aim to conduct origin attribution in a practical open-world setting (Fig. 1), where model parameters cannot be accessed and only a few samples generated by the model are available. This setting is meaningful in real-world applications since current generative models, e.g., DALL·E-3 [2], are not open-sourced, and sampling many images from them requires substantial costs.
To overcome the challenges in this setting, we first formulate the problem as a few-shot one-class classification task. Then, we propose a CLIP-based framework as an effective solution, dubbed OCC-CLIP. With our framework, we can determine if a given image and the few-shot available images were generated from the same model. If so, we can confidently identify the model that generated the few images as the origin model of the given image. Furthermore, we also demonstrate that our method can be extended to conduct origin attribution for multiple source models via One-vs-Rest.
Extensive experiments on various generative models have verified that our proposed framework can effectively determine the origin attribution of a given image. Additionally, our framework demonstrates superiority when different numbers of shots are available, and when image preprocessing is applied to the given images. It also proves effective in multi-source origin attribution scenarios. Furthermore, our experiments, based on the recently released DALL·E-3 [2] API, confirm the effectiveness of our solution in real-world commercial systems.
Our main contributions can be summarized as follows.
-
•
We propose a new task within a practical setting where generated images are attributed to the origin model only with few-shot available images generated by the model.
-
•
We formulate the problem as a few-shot one-class classification task and then propose a CLIP-based framework, named OOC-CLIP, to address it.
-
•
Extensive experiments are conducted on 8 generative models, including diffusion models and GANs. Further verification of our solution is carried out on a real-world image generative system, namely, DALL·E-3 [2].
2 Related Work
Deep Visual Generative Models: The advent of deep learning has brought significant advancements in deep visual generative models, leading to the development of sophisticated methods for creating synthetic media. Variational Autoencoders (VAEs) [45, 28, 41] are notable for their dual-structure framework. In VAEs, an encoder condenses complex data into simpler latent representations, which a decoder then uses to reconstruct the original data. Generative Adversarial Networks (GANs) [14, 1, 60, 24, 49] operate on a principle of competition between two components: a generator that creates data samples and a discriminator that judges their authenticity. Through iterative training, both components enhance their capabilities, improving the overall quality of the generated data. Diffusion Models [21, 56, 46, 19, 40, 48] employ a two-phase process. Initially, they transform data into noise, and then methodically remove this noise to reverse the process. This approach can generate highly realistic images.
Origin Attribution of Generated images: Origin attribution, distinct from generated image detection, seeks to determine whether specific images were produced by a particular model. Various strategies have been proposed to address this challenge. One method involves embedding watermarks [57, 37, 43, 59] in images to trace their origins. However, this approach faces limitations as different models might use identical watermarks, which can also be manipulated or removed [35]. Alternatively, injecting unique fingerprints [68, 10, 69, 70] into a model during its training phase enables the identification of these markers using a supervised classifier. Although effective, this technique necessitates modifications to the training process and the model’s architecture. A different, modification-free method is inverse engineering [64, 29], which leverages the principle that a synthetic sample can be most accurately reconstructed by its original generator. However, this approach requires access to the target model and extensive sampling of images for comparison. Furthermore, three studies have explored this area under different settings. One develops a multi-class classifier known as an attributor for fake image attribution. Yet, it is only applicable to text-to-image models and operates within a limited, closed-world scenario[54]. One [13] utilizes an iterative multi-step pipeline to detect the origins of images generated by different GANs. However, it requires many samples. The other study[27] demonstrates a theoretical lower bound on attribution accuracy using smaller datasets (e.g. MNIST [30]). This method is only suitable for unconditional GANs and reveals limited scalability to more complex systems, such as DALL·E-3 [2].
Few-shot One-class classification: One-class classification has long been recognized as a challenging problem, with numerous studies [51, 6, 50, 47] addressing it. However, few works have explored the few-shot one-class classification (FS-OCC) problem in the image domain. Previous FS-OCC research in the image domain, specifically based on meta-learning [12], suffers from memory inefficiency, making it unsuitable for processing high-resolution images. In contrast, the CLIP-based classifier, CoOp [71], has demonstrated excellent performance in few-shot learning settings, where a few images from each class are available. Our setting, however, differs as it involves only a few images from a single class, generated by a generative model. Therefore, instead of pursuing multi-class classification, we utilize CLIP for one-class classification.
3 Approach
In this section, we first introduce the standard CLIP-based classification framework and then present our OCC-CLIP framework for few-shot one-class classification. At the end, we show how to extend our framework to multiple classes.
3.1 Background of CLIP-based Classification
CLIP is a multimodal model pre-trained to predict whether an image matches a text prompt. It includes an image encoder and text encoder . The pre-trained CLIP can perform zero-shot multi-class classification by comparing the image with a list of prompts [16], each representing a class. Formally, assume we have classes. Let denote an image and represent the prompt representing the class. The predicted class probability of the image is computed as follows:
(1) |
where measures the distance between two embeddings, e.g., dot product.
In the classification above, hand-crafted text prompts are applied to represent classes [16]. The prompt designs require specialized knowledge and are time-consuming to create. To alleviate this, Zhou et al. [71] introduced the concept of Context Optimization (CoOp), which employs learnable vectors to refine prompt-related words. Instead of manually designing a prompt, CoOp enables the model to automatically optimize for a suitable prompt. Formally, the prompt for the class can be represented as , where is the learnable context vectors, is a concatenation operation and corresponds to the name of class. The objective of optimization is to minimize the error of predicting ground truth for each . This is achieved by using a cross-entropy loss function with respect to the learnable prompts. Let represent the pre-trained CLIP model. The optimization can be described as:
(2) |
where is the number of images. In practice, CoOp [71] shows that only a small number of labeled examples are required to learn effective prompts. In summary, prompt learning enables CLIP-based Classification effective in the few-shot learning setting.
![Refer to caption](x1.png)
3.2 CLIP-based Few-shot One-Class Classification
The CLIP-based classifier, CoOp, can achieve excellent performance in the few-shot learning setting where a few images from each class are available. Nevertheless, in our setting, only a few images from one class, generated by a generative model, are available. Hence, a standard CLIP-based classifier cannot be applied directly to solve the few-shot one-class classification task.
We now present our CLIP-based framework for One-Class Classification, called OCC-CLIP. In our framework (Fig. 2), the few images collected from a generative model are treated as the target class, while the images randomly sampled from a clean dataset are labeled as the non-target class. The two classes can be labeled as any contrasting pairs, such as non-target vs. target or negative vs. positive. Two learnable prompts corresponding to the target and non-target classes are optimized on these images, respectively.
The few images selected for the non-target class cannot represent the whole distribution of the non-target class well since they are randomly sampled from an open-source dataset (e.g. ImageNet [9]). To overcome this challenge, we propose an adversarial data augmentation (ADA) technique that, during training, extends coverage of the non-target class space and more closely approximates the boundary to the target space, thereby improving the model’s ability to learn the attribution of the target model. ADA aims to maximize the loss by adding small perturbations to non-target images, while the learnable prompts aim to minimize the loss by learning the boundary between the target and non-target classes. In summary, the optimization in OCC-CLIP can be formulated as:
(3) |
where is the adversarial image perturbation computed by our ADA technique.
The implementation of our OCC-CLIP is shown in Algorithm 1. As shown in the algorithm, a forward pass and a backward pass are conducted to obtain gradient information for the images of the non-target class. The gradient information is used to compute adversarial perturbation. The learnable prompt will be updated in another forward and backward passes on the perturbed images. The sensitivity of training hyperparameters is discussed in experiments section.
In the optimization process, both visual and textual encoders of CLIP are frozen. In the verification process, if it is classified into the target class, an image will be determined to be generated by the same generative model as the source model of the target images.
3.3 CLIP-based Few-shot Multi-Class Classification
We also explore the multi-source origin attribution scenarios. For example, to determine if the origin of an image can be attributed to ProGAN [25], Stable Diffusion [46], or Vector Quantized Diffusion [19], we can employ three one-class classifiers corresponding to these models for classification. Given a set of trained one-class classifiers for classes and a threshold (e.g. 0.5), for an input sample , let denote the score of given by -th classifier . The predicted class for the sample is determined as follows:
(4) |
Given an image, if the maximum score of , provided by the -th classifier, exceeds the threshold, then is classified into the -th class. Otherwise, it is considered to belong to a category outside those defined by the classifiers.
4 Experiments
In this section, we first describe experimental settings and present our comparison with baseline methods. We also study the sensitivity of our method to various factors, such as target class corresponding to source models, non-target class datasets, the number of available images, and image preprocessing. Furthermore, we show the effectiveness of our framework in multi-source origin attribution scenarios and real-world commercial generation API.
4.1 Experimental Setting
Dataset. There are total 202,520 images generated by five different generative models, i.e. Stable Diffusion Model [46], Latent Diffusion Model [46], GLIDE [40], Vector Quantized Diffusion [19], and GALIP [60], based on the validation set of Microsoft Common Objects in Context (COCO) 2014 dataset [32]. These models are pre-trained on four different datasets, i.e. LAION-5B [52], COCO [32], LAION-400M [53], and filtered CC12M [5]. In total, five image datasets from different source models are generated, namely SD, VQ-D, LDM, Glide, GALIP. To balance the number of image datasets generated by Diffusion models and the number of image datasets generated by GANs, we utilized pre-existing datasets (namely GauGAN [42], ProGAN [25], and StyleGAN2 [26]) as provided by [63]. These datasets collectively serve as a robust benchmark covering two primary generative techniques: GANs and Diffusion Models.
Model. OCC-CLIP utilizes 16 context vectors. This model is built upon the open-source CLIP framework. The image encoder uses the ViT-B/16 architecture. Except for the prompt learner, all pre-trained parameters are fixed. Initial context vectors are stochastically sampled from a Normal distribution characterized by a mean of 0 and a standard deviation of 0.02.
Training Setting. All the generated images are resized to and then normalized according to the pre-trained datasets of each model. Stochastic Gradient Descent is utilized as the optimization strategy with a learning rate of 0.0001, modulated through cosine annealing. The cross-entropy loss is utilized as the loss function. By default, the training process is capped at a maximum of 200 epochs for 50-shot scenarios. The test dataset consists of 1,000 images that are randomly selected from the test sets to ensure a reliable evaluation. To counteract the onset of explosive gradients in the nascent phases of training, the learning rate is steadfastly maintained at during the first epoch. The eight generative models (i.e. SD, VQ-D, LDM, Glide, GALIP, ProGAN, StyleGAN2, GauGAN) are iteratively treated as the target class, while four open-source datasets (i.e. COCO [32], ImageNet [9], Flickr [66], and CC12M [5]) are iteratively treated as the non-target class. However, in the default settings, only half of the non-target images are augmented by ADA, SD is designated as the target image set, and COCO is chosen as the non-target image set.
Evaluation. Each model is evaluated by the Area Under the Receiver Operating Characteristic Curve (AUC). The Receiver Operating Characteristic Curve (ROC) is a graphical representation that plots the True Positive Rate (TPR) against the False Positive Rate (FPR) at various threshold levels.
The AUC represents the probability that a classifier will rank a randomly chosen positive instance higher than a randomly chosen negative one. To reduce randomness, each model is trained 10 times with different training sets each time. Then, the mean AUC and the corresponding standard deviation are reported over the test set. A higher AUC score signifies better performance. For each table, the corresponding standard deviations are shown in the supplementary. More experimental details, such as different testing tasks and accuracy scores, can be found in the supplementary.
4.2 Comparison with Baselines
Baselines. Since there are currently no methods perfectly suited to our setting, we conduct a comprehensive evaluation of OCC-CLIP by assessing 12 benchmark methods from various usage areas (see Table 1). The supplementary can find a comparison with other baselines [64, 13].
Methods | VQ-D | LDM | Glide | GALIP | ProGAN | StyleGAN2 | GauGAN | Overall |
---|---|---|---|---|---|---|---|---|
VGG16 [55] | ||||||||
ResNet50 [20] | ||||||||
Inception-v3 [58] | ||||||||
DenseNet-121 [22] | ||||||||
ViT-B-16 [11] | ||||||||
DeiT-B-16 [61] | ||||||||
CaiT-S-24 [62] | ||||||||
Swin-B-4 [36] | ||||||||
Image-Patch [39] | ||||||||
Feature-Patch [39] | ||||||||
CLIP [44] | ||||||||
CoOp [71] | ||||||||
OCC-CLIP |
Traditional Binary Classification Models: Four of these methods are notable CNN architectures that are often applied to Computer Vision problems, especially for image classification tasks, including ResNet [20], Inception [58], DenseNet [22], and VGG [55]. The other four models are adaptations of the transformer paradigm, including ViT [11], Deit [61], Cait [62], and Swin [36]. For both CNN and Transformer models, all layers are retained in a frozen state except for the last classification layer.
Patch-Driven Methods [39]: Two of the methods, Feature-Patch and Image-Patch, are patch-based techniques that are primarily used for deepfake and rely on the ResNet-50 architecture for feature extraction. For the Image-Patch model, each image is divided into 2x2 patches, with each patch serving as a separate input to the ResNet-50 architecture. In the case of the Feature-Patch model, which shares the same backbone, the last five layers of the standard ResNet-50 architecture are discarded and the remaining structures are employed to extract image features. Subsequently, these features are segmented into 4x4 patches, with each patch being passed through the concluding linear classification layer.
Vision-Language Models: Considering the power of the vision-language model in tackling downstream classification tasks, zero-shot CLIP [44] and CoOp[71] are also evaluated. The zero-shot CLIP [44] approach utilizes custom-crafted prompts (hard prompt) [16], adopting the format "a photo of a [CLASS]" to tackle the tasks of origin attribution. Conversely, CoOp employs prompt tuning (soft prompt) and distinguishes itself by using where is an adjustable context vector and [CLASS] is the class token which is deliberately located at the end of the sequence.
Target | Method | SD | VQ-D | LDM | Glide | GALIP | ProGAN | StyleGAN2 | GauGAN | Overall |
---|---|---|---|---|---|---|---|---|---|---|
SD | CoOp | - | ||||||||
OCC-CLIP | - | |||||||||
VQ-D | CoOp | - | ||||||||
OCC-CLIP | - | |||||||||
LDM | CoOp | - | ||||||||
OCC-CLIP | - | |||||||||
Glide | CoOp | - | ||||||||
OCC-CLIP | - | |||||||||
GALIP | CoOp | - | ||||||||
OCC-CLIP | - | |||||||||
ProGAN | CoOp | - | ||||||||
OCC-CLIP | - | |||||||||
StyleGAN2 | CoOp | - | ||||||||
OCC-CLIP | - | |||||||||
GauGAN | CoOp | - | ||||||||
OCC-CLIP | - |
Results and Analysis. Table 1 provides a comparative performance analysis of OCC-CLIP and 12 benchmark models. During the training phase, the target class is sourced from SD, and the non-target class is from COCO. In the test phase, the target class remains sourced from SD, but the non-target class is sourced from another generative image dataset (VQ-D, LDM, Glide, GALIP, ProGAN, StyleGAN2, and GauGAN). The goal of this section is to assess each model’s ability to accurately determine whether the origin of a given image can be attributed to Stable Diffusion.
Among the CNN-based and Transformer-based baselines, Swin outshines its counterparts. However, the overall disparity in performance between CNN-based and Transformer-based models is not obvious. The following two methods, Image-Patch and Feature-Patch are both based on ResNet50. Image-Patch performs worse than ResNet50 while Feature-Patch has somewhat but limited improvements compared with ResNet50. This suggests that current methods used to do deepfake detection perform poorly in this few-shot origin attribution scenarios. In addition to the aforementioned classical methods, OCC-CLIP surpasses widely-spread vision-language models such as zero-shot CLIP and CoOp. In detail, OCC-CLIP outperforms zero-shot CLIP by an average of around 31% and CoOp by approximately 2.9%. This progression emphasizes the value of ADA. In a comprehensive assessment, OCC-CLIP emerges as a leading standard, underscoring its exceptional ability in origin attribution. However, it is harder to distinguish images generated by very similar algorithms trained on similar datasets, such as DeepFloyd, which is based on Stable Diffusion and also trained on the COCO dataset. In this case, our model’s performance does decrease (dropping to ). Nevertheless, our method still outperforms the best baseline (CoOp: ).
4.3 Ablation Study
Sensitivity to Source Models. Table 2 shows the performance of CoOp and OCC-CLIP in origin attribution with eight different source models. During training, the target dataset is from the dataset shown in the leftmost column, and the non-target dataset is COCO. During testing, the target remains the same, but the non-target dataset is replaced with one of the other generated datasets shown in the first row. For example, the source model for the second row in the table is Stable Diffusion [46].
OCC-CLIP demonstrates superior performance in most cases and outperforms the baseline on average in the results from testing with seven other datasets. Overall, our proposed model has exhibited superior performance and generalization capabilities in determining if an image is from the same source model as a set of target images, compared to the baseline.
Methods | COCO | CC12M | Flickr | ImageNet | Combined |
---|---|---|---|---|---|
CoOp | |||||
OCC-CLIP |
Sensitivity to Selection of Non-target Class. As shown in Table 3, we select non-target images from combined datasets or from one of the four open-domain image datasets: COCO, ImageNet, Flickr, or CC12M. The target images are from SD. The average AUC score over 7 different testing tasks is computed. It can be noted that although the choice of the source of non-target images can somewhat affect the performance of origin attribution, our framework consistently outperforms the baseline.
Methods | None | Non-Target | Both | Target | T-NT |
---|---|---|---|---|---|
OCC-CLIP |
Sensitivity to ADA Settings. We employ four methods for applying ADA: 1) ‘Non-Target’: on half of the non-target images; 2) ‘Target’: on half of the target images; 3) ‘Both’: on half of both the non-target images and target images; 4) ‘T-NT’: on half of the target images which are then treated as non-target ones. The non-target images are selected from the COCO dataset, while the target images are from SD.
As shown in Table 4, it is evident that applying ADA on non-target images yields the best performance. This outcome is reasonable, as gradient ascent on the non-target image set enlarges the learned space of this set and further approximates the boundary to the target image set. Applying ADA on ‘T-NT’ is the next most effective method, performing only slightly worse than ‘Non-Target’. However, the boundary learned by ‘T-NT’ may be too tight for effective origin attribution tasks. Applying ADA on ‘Both’ is less effective than doing nothing, as ‘Both’ also enlarges the learned distribution of the target image set. Solely applying ADA on the target set performs significantly worse than doing nothing. This is because this approach not only enlarges the learned distribution space of the target images but also shrinks the learned distribution space of the non-target image set, leading to a higher likelihood of misclassifying many images as target images.
Methods | 0% | 25% | 50% | 75% | 100% |
---|---|---|---|---|---|
OCC-CLIP | 0.9263 |
Sensitivity to the Proportion of Augmented Non-target Images. We further investigate the influence of the proportion of augmented non-target images on the performance of OCC-CLIP. As indicated in Table 5, the performance of origin attribution is optimal when 50% to 75% of non-target images are augmented. However, when all data are augmented, the performance deteriorates, even falling below that with 0% non-target images augmented. This may be because augmenting all data could lead to a loss of the original distribution space of the non-target image set.
![Refer to caption](x2.png)
Sensitivity to the Number of Shots. We then analyze how the performance of OCC-CLIP relates to the number of shots. Our investigation covers the effects of using 10, 20, 50, 100, and 200 shots. In these experiments, SD is used for the target images, while one of COCO, ImageNet, Flickr, and CC12M is employed as the non-target dataset. Other generated image datasets are used for testing. As shown in Figure 3, OCC-CLIP consistently outperforms CoOp in all scenarios, particularly when the number of shots is small. Additionally, the incremental improvements in AUC tend to diminish as more shots are added, eventually plateauing at an upper boundary when the number of shots reaches 200.
Method | None | Gaussian Blur | Gaussian Noise | Grayscale | Rotation | Flip | Mixture |
---|---|---|---|---|---|---|---|
CoOp | |||||||
OCC-CLIP |
Sensitivity to Image Processing in Verification Stage. Table 6 presents a comparative analysis of the performance between OCC-CLIP and baseline methods in the face of potential image processing: Gaussian Blur, Gaussian Noise, Grayscale, Rotation, Flip, or a mixture of those attacks. The data indicate that OCC-CLIP exhibits superior robustness compared to the baseline across a range of potential processing of input images. This enhanced resilience of OCC-CLIP underscores its effectiveness in safeguarding against various forms of image manipulation, highlighting its utility in origin attribution.
Sensitivity to Choice of Prompts. Since we focus on the one-class classification question, the classes in our setting can be labeled as any contrasting pairs, such as negative vs. positive. Therefore, we explore the effect of the choice of prompts on the performance of OCC-CLIP. As shown in the supplementary material, the choice of prompts can have some different effects. However, regardless of which pair of prompts is chosen, OCC-CLIP always outperforms the baseline.
Methods | Gaussian Blur | Gaussian Noise | Grayscale | Rotation | Flip | Mixture | None | ADA |
---|---|---|---|---|---|---|---|---|
OCC-CLIP | 0.9263 | 0.9548 |
4.4 Comparison to Standard Data Augmentation
Data augmentation methods have been extensively developed. In real-fake detection tasks, Wang [63] and CR [4] utilized a combination of various data augmentation methods to improve model performance. To conduct a more comprehensive evaluation of ADA, we compare its performance with other common data augmentation methods: Gaussian Blur, Gaussian Noise, Grayscale, Rotation, Flip, and a mixture of all these. According to Table 7, all traditional data augmentation methods perform poorly, and in some cases, even degrade the model’s performance. Only ADA shows some improvements. Consequently, we can infer that normal data augmentation methods are not suitable for few-shot one-class classification scenarios.
![Refer to caption](x3.png)
![Refer to caption](x4.png)
4.5 Understanding Adversarial Data Augmentation
We utilize the embeddings from CLIP’s image encoder for visualization. According to Figure 4(a), it is evident that there is no clear boundary between the target image set and the non-target image set, i.e., images from SD and images from COCO. However, after applying ADA, as illustrated in Figure 4(b), a clearer boundary emerges between the augmented non-target image set and the target image set, demonstrating the effectiveness of ADA. During training, unchanged non-target images and augmented non-target images are mixed. This approach not only preserves the properties of the original non-target images but also ensures that the augmented non-target images approximate the boundary of the distribution of the target images.
Methods | 10 | 20 | 30 | 50 |
---|---|---|---|---|
CoOp | 0.9216 | 0.9687 | 0.9563 | 0.9788 |
OCC-CLIP |
4.6 Source Model Attribution with Commercial Generation API
To investigate the effectiveness of OCC-CLIP in the real world, we utilize the latest commercial digital image-generating model – DALL·E-3 [2] – to generate images. As shown in the supplementary material, 103 prompts are randomly selected from the annotations of the validation set of COCO[32], resulting in a total of 200 images generated. The default setting of DALL·E-3 is to generate 2 images simultaneously. However, due to OpenAI’s content policy, some prompts can only generate one image. In this scenario, the targets are images generated by DALL·E-3, while the non-targets are images from other datasets. We compare the performance of detection across different numbers of shots: 10, 20, 30, 50. According to Table 8, our method consistently outperforms the baseline and performs well even with as few as 10 shots.
4.7 Model Attribution with Multiple Source Models
In addition to verifying single models, we also investigate multi-source origin attribution conditions. We explore the process of verifying multiple sources using the eight trained one-class classifiers. Since this involves multi-source origin attribution, the evaluation metric used in this section is accuracy instead of AUC. We evaluate the model under the following conditions: 2 classes (SD, VQ-D), 4 classes (SD, VQ-D, LDM, Glide), and 6 classes (SD, VQ-D, LDM, Glide, GALIP, ProGan). As shown in Table 31, the accuracy decreases with an increasing number of source models. In every multi-class classification scenario mentioned above, one-class classifiers trained with OCC-CLIP consistently outperform those trained with CoOp.
Furthermore, our methods can be adapted to directly train a multi-class classifier. As demonstrated in the table included in the supplementary material, the multi-class classifier trained using the OCC-CLIP approach is still shown to be more effective compared to the one trained using the CoOp approach.
Num of Class | Method | LDM | Glide | GALIP | ProGAN | StyleGAN2 | GauGAN | Overall |
---|---|---|---|---|---|---|---|---|
2 classes | CoOp | |||||||
OCC-CLIP | ||||||||
4 classes | CoOp | - | - | |||||
OCC-CLIP | - | - | ||||||
6 classes | CoOp | - | - | - | - | |||
OCC-CLIP | - | - | - | - |
5 Conclusions
In this work, we study origin attribution in a practical setting where only a few images generated by a source model are available and the source model cannot be accessed. The introduced problem is first formulated as a few-shot one-classification task. A simple yet effective solution CLIP-based framework is proposed to solve the task. Our experiments on both open-source popular generative models and commercial generation API shows the effectiveness of our framework. Our OCC-CLIP framework can also be applied to solve the few-shot one-classification task in other domains, which we leave in future work. Another future work is to evaluate the natural and adversarial robustness of our framework [7, 8, 18, 17] and build adversarially robust variants [65, 23].
Acknowledgement: This work is supported by the UKRI grant: Turing AI Fellowship EP/W002981/1, EPSRC/MURI grant: EP/N019474/1. We thank the Royal Academy of Engineering
References
- [1] Arjovsky, M., Chintala, S., Bottou, L.: Wasserstein generative adversarial networks. In: International conference on machine learning. pp. 214–223. PMLR (2017)
- [2] Betker, J., Goh, G., Jing, L., Brooks, T., Wang, J., Li, L., Ouyang, L., Zhuang, J., Lee, J., Guo, Y., et al.: Improving image generation with better captions. Computer Science. https://cdn. openai. com/papers/dall-e-3. pdf 2(3), 8 (2023)
- [3] BIDEN, J.R.: Executive order on the safe, secure, and trustworthy development and use of artificial intelligence (Oct 2023), https://www.whitehouse.gov/briefing-room/presidential-actions/2023/10/30/executive-order-on-the-safe-secure-and-trustworthy-development-and-use-of-artificial-intelligence/
- [4] Chandrasegaran, K., Tran, N.T., Binder, A., Cheung, N.M.: Discovering transferable forensic features for cnn-generated images detection. In: European Conference on Computer Vision. pp. 671–689. Springer (2022)
- [5] Changpinyo, S., Sharma, P., Ding, N., Soricut, R.: Conceptual 12m: Pushing web-scale image-text pre-training to recognize long-tail visual concepts. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 3558–3568 (2021)
- [6] Chen, J., Sathe, S., Aggarwal, C., Turaga, D.: Outlier detection with autoencoder ensembles. In: Proceedings of the 2017 SIAM international conference on data mining. pp. 90–98. SIAM (2017)
- [7] Chen, S., Gu, J., Han, Z., Ma, Y., Torr, P., Tresp, V.: Benchmarking robustness of adaptation methods on pre-trained vision-language models. Advances in Neural Information Processing Systems 36 (2024)
- [8] Cheng, H., Xiao, E., Gu, J., Yang, L., Duan, J., Zhang, J., Cao, J., Xu, K., Xu, R.: Unveiling typographic deceptions: Insights of the typographic vulnerability in large vision-language model. arXiv. org
- [9] Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L.: Imagenet: A large-scale hierarchical image database. In: 2009 IEEE conference on computer vision and pattern recognition. pp. 248–255. Ieee (2009)
- [10] Ding, Y., Thakur, N., Li, B.: Does a gan leave distinct model-specific fingerprints. In: Proceedings of the BMVC (2021)
- [11] Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., et al.: An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929 (2020)
- [12] Frikha, A., Krompaß, D., Köpken, H.G., Tresp, V.: Few-shot one-class classification via meta-learning. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 35, pp. 7448–7456 (2021)
- [13] Girish, S., Suri, S., Rambhatla, S.S., Shrivastava, A.: Towards discovery and attribution of open-world gan generated images. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 14094–14103 (2021)
- [14] Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., Bengio, Y.: Generative adversarial networks. Communications of the ACM 63(11), 139–144 (2020)
- [15] Gu, J.: Responsible generative ai: What to generate and what not. arXiv preprint arXiv:2404.05783 (2024)
- [16] Gu, J., Han, Z., Chen, S., Beirami, A., He, B., Zhang, G., Liao, R., Qin, Y., Tresp, V., Torr, P.: A systematic survey of prompt engineering on vision-language foundation models. arXiv preprint arXiv:2307.12980 (2023)
- [17] Gu, J., Tresp, V.: Improving the robustness of capsule networks to image affine transformations. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 7285–7293 (2020)
- [18] Gu, J., Tresp, V., Qin, Y.: Are vision transformers robust to patch perturbations? In: European Conference on Computer Vision. pp. 404–421. Springer (2022)
- [19] Gu, S., Chen, D., Bao, J., Wen, F., Zhang, B., Chen, D., Yuan, L., Guo, B.: Vector quantized diffusion model for text-to-image synthesis. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 10696–10706 (2022)
- [20] He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 770–778 (2016)
- [21] Ho, J., Jain, A., Abbeel, P.: Denoising diffusion probabilistic models. Advances in neural information processing systems 33, 6840–6851 (2020)
- [22] Huang, G., Liu, Z., Van Der Maaten, L., Weinberger, K.Q.: Densely connected convolutional networks. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 4700–4708 (2017)
- [23] Jia, X., Chen, Y., Mao, X., Duan, R., Gu, J., Zhang, R., Xue, H., Liu, Y., Cao, X.: Revisiting and exploring efficient fast adversarial training via law: Lipschitz regularization and auto weight averaging. IEEE Transactions on Information Forensics and Security (2024)
- [24] Kang, M., Zhu, J.Y., Zhang, R., Park, J., Shechtman, E., Paris, S., Park, T.: Scaling up gans for text-to-image synthesis. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 10124–10134 (2023)
- [25] Karras, T., Aila, T., Laine, S., Lehtinen, J.: Progressive growing of gans for improved quality, stability, and variation. arXiv preprint arXiv:1710.10196 (2017)
- [26] Karras, T., Laine, S., Aittala, M., Hellsten, J., Lehtinen, J., Aila, T.: Analyzing and improving the image quality of stylegan. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 8110–8119 (2020)
- [27] Kim, C., Ren, Y., Yang, Y.: Decentralized attribution of generative models. arXiv preprint arXiv:2010.13974 (2020)
- [28] Kingma, D.P., Welling, M., et al.: An introduction to variational autoencoders. Foundations and Trends® in Machine Learning 12(4), 307–392 (2019)
- [29] Laszkiewicz, M., Ricker, J., Lederer, J., Fischer, A.: Single-model attribution via final-layer inversion. arXiv preprint arXiv:2306.06210 (2023)
- [30] LeCun, Y., Cortes, C., Burges, C., et al.: Mnist handwritten digit database (2010)
- [31] Li, H., Shen, C., Torr, P., Tresp, V., Gu, J.: Self-discovering interpretable diffusion latent directions for responsible text-to-image generation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 12006–12016 (2024)
- [32] Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., Zitnick, C.L.: Microsoft coco: Common objects in context. In: Computer Vision–ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part V 13. pp. 740–755. Springer (2014)
- [33] Liu, R., Khakzar, A., Gu, J., Chen, Q., Torr, P., Pizzati, F.: Latent guard: a safety framework for text-to-image generation. arXiv preprint arXiv:2404.08031 (2024)
- [34] Liu, X., Zhu, Y., Gu, J., Lan, Y., Yang, C., Qiao, Y.: Mm-safetybench: A benchmark for safety evaluation of multimodal large language models. arXiv preprint arXiv:2311.17600 (2023)
- [35] Liu, X., Liu, J., Bai, Y., Gu, J., Chen, T., Jia, X., Cao, X.: Watermark vaccine: Adversarial attacks to prevent watermark removal. In: European Conference on Computer Vision. pp. 1–17. Springer (2022)
- [36] Liu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., Lin, S., Guo, B.: Swin transformer: Hierarchical vision transformer using shifted windows. In: Proceedings of the IEEE/CVF international conference on computer vision. pp. 10012–10022 (2021)
- [37] Luo, L., Chen, Z., Chen, M., Zeng, X., Xiong, Z.: Reversible image watermarking using interpolation technique. IEEE Transactions on information forensics and security 5(1), 187–193 (2009)
- [38] Van der Maaten, L., Hinton, G.: Visualizing data using t-sne. Journal of machine learning research 9(11) (2008)
- [39] Mandelli, S., Bonettini, N., Bestagini, P., Tubaro, S.: Detecting gan-generated images by orthogonal training of multiple cnns. In: 2022 IEEE International Conference on Image Processing (ICIP). pp. 3091–3095. IEEE (2022)
- [40] Nichol, A., Dhariwal, P., Ramesh, A., Shyam, P., Mishkin, P., McGrew, B., Sutskever, I., Chen, M.: Glide: Towards photorealistic image generation and editing with text-guided diffusion models. arXiv preprint arXiv:2112.10741 (2021)
- [41] Oussidi, A., Elhassouny, A.: Deep generative models: Survey. In: 2018 International conference on intelligent systems and computer vision (ISCV). pp. 1–8. IEEE (2018)
- [42] Park, T., Liu, M.Y., Wang, T.C., Zhu, J.Y.: Semantic image synthesis with spatially-adaptive normalization. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 2337–2346 (2019)
- [43] Pereira, S., Pun, T.: Robust template matching for affine resistant image watermarks. IEEE transactions on image Processing 9(6), 1123–1129 (2000)
- [44] Radford, A., Kim, J.W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al.: Learning transferable visual models from natural language supervision. In: International conference on machine learning. pp. 8748–8763. PMLR (2021)
- [45] Rezende, D.J., Mohamed, S., Wierstra, D.: Stochastic backpropagation and approximate inference in deep generative models. In: International conference on machine learning. pp. 1278–1286. PMLR (2014)
- [46] Rombach, R., Blattmann, A., Lorenz, D., Esser, P., Ommer, B.: High-resolution image synthesis with latent diffusion models. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 10684–10695 (2022)
- [47] Sabokrou, M., Khalooei, M., Fathy, M., Adeli, E.: Adversarially learned one-class classifier for novelty detection. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 3379–3388 (2018)
- [48] Saharia, C., Chan, W., Saxena, S., Li, L., Whang, J., Denton, E.L., Ghasemipour, K., Gontijo Lopes, R., Karagol Ayan, B., Salimans, T., et al.: Photorealistic text-to-image diffusion models with deep language understanding. Advances in Neural Information Processing Systems 35, 36479–36494 (2022)
- [49] Sauer, A., Karras, T., Laine, S., Geiger, A., Aila, T.: Stylegan-t: Unlocking the power of gans for fast large-scale text-to-image synthesis. arXiv preprint arXiv:2301.09515 (2023)
- [50] Schlegl, T., Seeböck, P., Waldstein, S.M., Schmidt-Erfurth, U., Langs, G.: Unsupervised anomaly detection with generative adversarial networks to guide marker discovery. In: International conference on information processing in medical imaging. pp. 146–157. Springer (2017)
- [51] Schölkopf, B., Platt, J.C., Shawe-Taylor, J., Smola, A.J., Williamson, R.C.: Estimating the support of a high-dimensional distribution. Neural computation 13(7), 1443–1471 (2001)
- [52] Schuhmann, C., Beaumont, R., Vencu, R., Gordon, C., Wightman, R., Cherti, M., Coombes, T., Katta, A., Mullis, C., Wortsman, M., et al.: Laion-5b: An open large-scale dataset for training next generation image-text models. Advances in Neural Information Processing Systems 35, 25278–25294 (2022)
- [53] Schuhmann, C., Vencu, R., Beaumont, R., Kaczmarczyk, R., Mullis, C., Katta, A., Coombes, T., Jitsev, J., Komatsuzaki, A.: Laion-400m: Open dataset of clip-filtered 400 million image-text pairs. arXiv preprint arXiv:2111.02114 (2021)
- [54] Sha, Z., Li, Z., Yu, N., Zhang, Y.: De-fake: Detection and attribution of fake images generated by text-to-image generation models. In: Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security. pp. 3418–3432 (2023)
- [55] Simonyan, K., Zisserman, A.: Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556 (2014)
- [56] Song, J., Meng, C., Ermon, S.: Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502 (2020)
- [57] Swanson, M.D., Zhu, B., Tewfik, A.H.: Transparent robust image watermarking. In: Proceedings of 3rd IEEE International Conference on Image Processing. vol. 3, pp. 211–214. IEEE (1996)
- [58] Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., Wojna, Z.: Rethinking the inception architecture for computer vision. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 2818–2826 (2016)
- [59] Tancik, M., Mildenhall, B., Ng, R.: Stegastamp: Invisible hyperlinks in physical photographs. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 2117–2126 (2020)
- [60] Tao, M., Bao, B.K., Tang, H., Xu, C.: Galip: Generative adversarial clips for text-to-image synthesis. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 14214–14223 (2023)
- [61] Touvron, H., Cord, M., Douze, M., Massa, F., Sablayrolles, A., Jégou, H.: Training data-efficient image transformers & distillation through attention. In: International conference on machine learning. pp. 10347–10357. PMLR (2021)
- [62] Touvron, H., Cord, M., Sablayrolles, A., Synnaeve, G., Jégou, H.: Going deeper with image transformers. In: Proceedings of the IEEE/CVF international conference on computer vision. pp. 32–42 (2021)
- [63] Wang, S.Y., Wang, O., Zhang, R., Owens, A., Efros, A.A.: Cnn-generated images are surprisingly easy to spot… for now. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 8695–8704 (2020)
- [64] Wang, Z., Chen, C., Zeng, Y., Lyu, L., Ma, S.: Alteration-free and model-agnostic origin attribution of generated images. arXiv preprint arXiv:2305.18439 (2023)
- [65] Wu, B., Gu, J., Li, Z., Cai, D., He, X., Liu, W.: Towards efficient adversarial training on vision transformers. In: European Conference on Computer Vision. pp. 307–325. Springer (2022)
- [66] Young, P., Lai, A., Hodosh, M., Hockenmaier, J.: From image descriptions to visual denotations: New similarity metrics for semantic inference over event descriptions. Transactions of the Association for Computational Linguistics 2, 67–78 (2014)
- [67] Yu, F., Seff, A., Zhang, Y., Song, S., Funkhouser, T., Xiao, J.: Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365 (2015)
- [68] Yu, N., Davis, L.S., Fritz, M.: Attributing fake images to gans: Learning and analyzing gan fingerprints. In: Proceedings of the IEEE/CVF international conference on computer vision. pp. 7556–7566 (2019)
- [69] Yu, N., Skripniuk, V., Abdelnabi, S., Fritz, M.: Artificial fingerprinting for generative models: Rooting deepfake attribution in training data. In: Proceedings of the IEEE/CVF International conference on computer vision. pp. 14448–14457 (2021)
- [70] Yu, N., Skripniuk, V., Chen, D., Davis, L., Fritz, M.: Responsible disclosure of generative models using scalable fingerprinting. arXiv preprint arXiv:2012.08726 (2020)
- [71] Zhou, K., Yang, J., Loy, C.C., Liu, Z.: Learning to prompt for vision-language models. International Journal of Computer Vision 130(9), 2337–2348 (2022)
Appendix 0.A Generation of Datasets
There are a total of 202,520 fake images generated by five different generative models, namely, Stable Diffusion Model [46], Latent Diffusion Model [46], GLIDE [40], Vector Quantized Diffusion [19], and GALIP [60]. The prompts used are the first captions of each image in the validation set of the Microsoft Common Objects in Context (COCO) 2014 dataset [32]. These models were pre-trained on four different datasets: LAION-5B [52], COCO [32], LAION-400M [53], and filtered CC12M [5]. In total, as shown in Figure 5, five synthetic image datasets are generated, namely SD, VQ-D, LDM, GLIDE, and GALIP.
SD: This marks the data generated by the Stable Diffusion Model [46]111https://github.com/CompVis/stable-diffusion. It was pre-trained on the LAION-5B dataset. The size of the generated images is . The pre-trained model used is ‘sd-v1-4’.
VQ-D: This marks the data generated by the Vector Quantized Diffusion (VQ-D) Model [19]222https://github.com/microsoft/VQ-Diffusion. It was pre-trained on the COCO dataset. The size of the generated images is . The pre-trained model ‘coco_pretrained’ served as the backbone of this method.
LDM: This marks the data generated by the Latent Diffusion Model [46]333https://github.com/CompVis/latent-diffusion. It was pre-trained on the LAION-400M dataset. The size of the generated images is . The pre-trained model, ‘txt2img-f8-large’, is utilized.
GLIDE: This marks the data generated by GLIDE [40]444https://github.com/openai/glide-text2im. It was pre-trained on filtered CC12M. The size of the generated images is .
GALIP: This marks the dataset generated by GALIP [60]555https://github.com/tobran/GALIP. The model was pretrained on the COCO dataset. The size of the generated images is .
We also utilized pre-existing datasets (namely GauGAN [42], ProGAN [25], and StyleGAN2 [26]) as provided by [63]. GauGAN was trained on the COCO [32] dataset, while ProGan and StyleGan2 were trained on the LSUN [67] dataset. The size of images from those datasets is .
SD | VQ-D | LDM | Glide | GALIP | DALL·E-3 | |
---|---|---|---|---|---|---|
Caption 1 | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Caption 2 | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Caption 3 | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Caption 4 | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Caption 5 | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Appendix 0.B Implementation Details
For all models, we randomly selected 1,000 images from each dataset for testing. Besides, 500 images were chosen from each dataset for training, divided into 10 sets: train1, train2, …, train10. Each training set contained 50 images from a non-target dataset and 50 from a target dataset. After training for 200 epochs, we evaluated the results on a test set comprising 1,000 testing images from both the non-target and target datasets. There was no dedicated validation set in our experimental setup. By default, adversarial data augmentation was applied to half of the non-target images, with a perturbation step size, denoted as , of 0.1. The Average AUC value was calculated as the mean of the AUC values obtained from the 10 trained models, each trained on a distinct training set and tested on the same test set.
Appendix 0.C Comparison with Baselines
The standard deviation of each mean of AUC is shown in Table 10 and Table 11. The standard deviation of each mean of Accuracy is shown in Table 12 and Table 13.The reason why the CLIP model has a 0 standard deviation is that it is a zero-shot model, which means there are no parameters changed. Therefore, when testing on the same testing set, the result will not change.
ResNet [20], Inception [58], DenseNet [22], VGG [55], ViT [11], Deit [61], Cait [62], and Swin [36] are either milestones or leading-edge models in the field of Computer Vision. For the Image-Patch model, each image is subdivided into 2x2 patches, with each patch serving as a separate input to the ResNet-50 architecture. The ultimate prediction from the model is the average of the predictions made for each of these patches. In the case of the Feature-Patch model, which shares the same backbone, the last five layers of the standard ResNet-50 architecture are discarded, and the remaining structure is employed to extract image features. Subsequently, these features are segmented into 4x4 patches, with each patch being passed through the final linear classification layer. The model’s final output is the average prediction over these patches.
To visualize the training loss, training AUC, validation loss, and validation AUC, apart from images in the training set and test set, I randomly select 1000 images from both non-target and target datasets to build a validation set. Figure 6 shows the change of loss of the train set and validation set with the increasing number of epochs. Figure 7 shows the change of AUC of the train set and validation set with the increasing number of epochs. The reason why the loss of the train set is larger than the loss of the validation set in the Image_Patch model is that during training, each image is subdivided into 4 patches.
![Refer to caption](x5.png)
![Refer to caption](x6.png)
Appendix 0.D Sensitivity to Source Models and Value of Epsilon
To test the effect of the choice of on source models, we conducted a comprehensive evaluation using eight models with six different values of . According to Table 14 and Table 15, it can be concluded that varying the step size has different effects on source model attribution. With the adjustment of , it was observed that the use of adversarial data augmentation can have a positive effect on source model attribution tests.
Appendix 0.E Sensitivity to Selection of Non-target Class and ADA Settings
Table 16 and Table 17 show the sensitivity evaluation of various ADA methods on different open-world real image datasets. In the default setting, the target dataset is SD, and the non-target is COCO. ADA is applied to half of the non-target images. 1) During the training phase, conditioned on applying ADA to only half of the non-target images, three additional non-target image datasets are used: ImageNet, Flickr, and CC12M. 2) When selecting non-target images exclusively from COCO, ADA is applied to half of the target images, to half of both non-target and target images, and to half of the target images, which are then treated as non-target. It is observed that the choice of non-target images affects the performance of OCC-CLIP. Additionally, applying ADA to non-target images is most effective.
Appendix 0.F Sensitivity to the Proportion of Augmented Non-target Images
Appendix 0.G Sensitivity to the Number of Shots
Table 20 and Table 21 illustrate the mean origin attribution performance of CoOp and OCC-CLIP across seven different testing tasks with varying numbers of shots: 10, 20, 30, 40, 50, 100, and 200. In the training phase, SD is used as the target dataset, and one of COCO, CC12M, Flickr, or ImageNet is used as the non-target dataset.
Appendix 0.H Sensitivity to Image Processing in Verification Stage
Tables 22 and 23 present a comparative analysis of the performance between OCC-CLIP and baseline methods in response to potential image processing techniques: Gaussian Blur, Gaussian Noise, Grayscale, Rotation, Flip, or a combination of these attacks. The standard deviations and the testing results across seven different tasks, along with their average, are shown. The data indicate that OCC-CLIP exhibits superior robustness compared to the baseline in most cases, demonstrating enhanced resilience to various forms of image manipulation. This underscores the effectiveness of OCC-CLIP in safeguarding against image-based copyright infringements.
Appendix 0.I Sensitivity to Choice of Prompts
Appendix 0.J Comparison to Standard Data Augmentation
In a comprehensive evaluation of ADA, we compare its effectiveness with common data augmentation methods: Gaussian Blur, Gaussian Noise, Grayscale, Rotation, Flip, and combinations of these. According to Tables 26 and 27, traditional data augmentation methods generally perform poorly, often degrading performance across many of the seven testing tasks. Only ADA shows improvements, suggesting that standard data augmentation methods may not be suitable for few-shot one-class classification scenarios.
Appendix 0.K Source Model Attribution with Commercial Generation API
To assess OCC-CLIP’s real-world effectiveness, we used the latest commercial digital image-generating model, DALL·E-3 [2], to generate images. As detailed in Section 0.N, 103 prompts were randomly selected from the annotations of COCO’s validation set [32]. In addition to the images generated from these prompts, additional sample images are presented in Figure 5. During the training phase, the target images are those generated by DALL·E-3, while the non-target images are from COCO. In the testing phase, the non-target images are from one of the other generated datasets. The performance of detection across various shot numbers (10, 20, 30, 40, 50) is compared. According to Tables 28 and 30, our method consistently outperforms the baseline across all eight testing tasks and performs well even with as few as 10 shots. Due to limitations in the number of images generated by DALL·E-3, we train the model only once for each testing task.
Appendix 0.L Model Attribution with Multiple Source Models
Since this involves multi-source origin attribution, the evaluation metric used in this section is accuracy instead of AUC. We evaluate the model under the following conditions: 2 classes (SD, VQ-D), 4 classes (SD, VQ-D, LDM, Glide), and 6 classes (SD, VQ-D, LDM, Glide, GALIP, ProGAN). Table 31 shows the accuracy of verifying multiple sources using the eight trained one-class classifiers. Table 32 shows the accuracy of directly training a multi-class classifier.
Appendix 0.M Stronger Baselines and Harder Datasets
We also experimented with three representative methods of fine-tuning CLIP using LoRA: replacing the linear layer in the last (LoRAl), middle (LoRAm), or all (LoRAa) residual attention blocks. The other two baseline methods are Wang et al.’s [64], which uses inverse engineering and has model access, and Girish et al.’s [13], which uses a multistep pipeline. Table 29 shows the accuracy of these methods. Our approach outperforms these baselines in our setting.
Appendix 0.N Prompts for DALL·E-3
The following prompts were randomly selected from the annotations of the validation set of the COCO dataset.
A man holding a motion controlled video game controller
A person sitting at a table filled with mexican food.
a work desk with a monitor and keyboard
A clock is standing in the middle of the grass in the middle of the afternoon.
some people are walking in front of a tall building
Three people standing before airport counters below airport signs.
A snow mountain being used for winter sports.
a man that is cutting up some kind of fruit
A bench sitting on a sidewalk near a line of cars.
A skier holds his skis as he stands in the mountains.
A living room filled with lots of furniture and seats.
A train is parked at the station loading passengers.
A man and woman with two Clydesdale horses.
A bathroom with tub and toilet, tiled in white tiling.
A Amtrak train traveling on a railroad tracks.
A stuffed teddy bear sitting amongst pillows on a bed
A green train traveling down train tracks next to another train.
A set of three red double decker buses parked next to each other.
A large plate of waffles is next to plates with slices of peaches.
A couple of people riding skis down a snow covered slope.
A big building perched atop a hill with a sign in the foreground.
The man and woman are playing video games in the room.
Barbecued meat and vegetables laid out on a counter ready for dinner
A herd of elephants in the wild near a river.
A hot dog with mustard and a bun next to a ketchup cup.
A dog rides on the back of a sheep.
The woman is holding up two large hot dogs.
A person is flying through the air near some mountains on his snowboard.
A jockey riding and jumping with a horse in an obstacle course.
a big bed with a lamp and bedside table and sliding glass leading to a balcony
Several lambs and sheep standing on hay and eating it.
an image of a statue of men in a carriage being driven by horses
There is a hose hooked up to the fire hydrant by the building.
A FOUNTAIN IN A ROUNDABOUT WITH PEOPLE PASSING BY
A heard of sheep together in a wheat field.
A woman opening a suitcase on the bed
A traffic light over a city street with cars.
A photo taken from behind a fence of tennis players on the court.
A row of parking meters sitting in a park.
A woman is talking on her phone while dragging on a cigarette.
Subway braking on rails in front of metropolitan city
A young man and woman share some pastries.
An aerial photo of a very long train station at night.
a foggy day that has some lights by a road
A dog sitting on the floor between a person legs
This dirt bike rider is smiling and raising his fist in triumph.
A desk top computer and a laptop sitting on a computer desk
an orange brick building with a window and a big mascot
A person doing a trick on a skateboard in the road
LOTS OF CUPCAKES ARRANGED ON A TABLE WITH NAPKINS
A bathroom sink underneath a medicine cabinet next to a window.
A red bus driving in front of a double decker bus.
The girl is about to kick a soccer ball.
A skateboarder jumping through the air and doing a trick.
Woman with surfboard getting kisses from dog at waters edge.
A skier leaning to the side on a snowy hill.
some motorcycles parked and the one in front is a silver three wheeler
A skier standing at the stop of a mountain slope.
Two planes that are flying in the sky.
A man presenting something to another man in a tent.
A man in a wet suit walking with another man in a wet suit with equipment.
a man flying a kite in a big green field
A man holding a dog mug pints the remote.
two little birds sitting on the shore by a piece of wood
A giraffe eats next to a zebra among some rocks.
A cat thats about to take a bute out of someone’s sandwich.
A gray dog wearing an orange bow tie laying on a sofa.
A yellow swan boat ride on a body of water under a cloudless sky.
A old house with a clock tower in brown and white.
a surfer that has fallen off of his surf board
Someone is enjoying a small slice of pie.
A coach balances a soccer ball in front of her team
A couple of giraffes eating out of a feeding bin in a zoo type facility.
A large gray teddy bear sitting next to a candle.
an image of a cat lying next to a stuffed animal
A woman smiling while she prepares a plate of food.
A group of zebras are standing in a desert.
Cat sitting on a window sill in front of a windmill.
A bunch of people walking on the street with umbrellas.
A skate boarder doing jumps at night on city street.
A man with glasses holding a baby in a white outfit.
A man in glasses talking on a cellphone.
A man with glasses is smiling and clapping.
two people sitting on benches with trees in the background
A girl riding on the back of a scooter on a cobbled road.
A small computer keyboard, box and matching mouse
a couple of people on skis stand in the snow
A man sitting in a chair with an infant laying on his lap and a woman standing over the top and looking down at the infant.
Several alcoholic beverages and mixers on a airplane tray.
A very big pretty horse pulling a fancy carriage.
A young man has just hit a baseball with the bat
A woman in a green shirt stands near a table with bowls or oranges on it in a market.
A person watching a small plane taking off in a field
A bicycle being held by a bar on a train.
A baseball game in progress in the open air.
A police car parked on the side of the road.
A white toilet sitting next to a toilet paper roller.
A bright green frog on a bright green plant.
A man surfing a wave on his surf board.
A small dog reclines on a piece of furniture next to an electronic game controller.
A person skiing alone in the snow capped area
A large family group at a round table in a restaraunt.
A stop sign is erected next to a flower bush.
Methods | VQ-D | LDM | Glide | GALIP |
---|---|---|---|---|
VGG16 [55] | ||||
ResNet50 [20] | ||||
Inception-v3 [58] | ||||
DenseNet-121 [22] | ||||
ViT-B-16 [11] | ||||
DeiT-B-16 [61] | ||||
CaiT-S-24 [62] | ||||
Swin-B-4 [36] | ||||
Image_Patch [39] | ||||
Feature_Patch [39] | ||||
CLIP [44] | ||||
CoOp [71] | ||||
OCC-CLIP |
Methods | ProGan | StyleGan2 | GauGan | Overall |
---|---|---|---|---|
VGG16 [55] | ||||
ResNet50 [20] | ||||
Inception-v3 [58] | ||||
DenseNet-121 [22] | ||||
ViT-B-16 [11] | ||||
DeiT-B-16 [61] | ||||
CaiT-S-24 [62] | ||||
Swin-B-4 [36] | ||||
Image_Patch [39] | ||||
Feature_Patch [39] | ||||
CLIP [44] | ||||
CoOp [71] | ||||
OCC-CLIP |
Methods | VQ-D | LDM | Glide | GALIP |
---|---|---|---|---|
VGG16 [55] | ||||
ResNet50 [20] | ||||
Inception-v3 [58] | ||||
DenseNet-121 [22] | ||||
ViT-B-16 [11] | ||||
DeiT-B-16 [61] | ||||
CaiT-S-24 [62] | ||||
Swin-B-4 [36] | ||||
Image_Patch [39] | ||||
Feature_Patch [39] | ||||
CLIP [44] | ||||
CoOp [71] | ||||
OCC-CLIP |
Methods | ProGan | StyleGan2 | GauGan | Overall |
---|---|---|---|---|
VGG16 [55] | ||||
ResNet50 [20] | ||||
Inception-v3 [58] | ||||
DenseNet-121 [22] | ||||
ViT-B-16 [11] | ||||
DeiT-B-16 [61] | ||||
CaiT-S-24 [62] | ||||
Swin-B-4 [36] | ||||
Image_Patch [39] | ||||
Feature_Patch [39] | ||||
CLIP [44] | ||||
CoOp [71] | ||||
OCC-CLIP |
Target | Epsilon | SDLAION-5B | VQ-Dcoco | LDMLAION-400M | Glidefiltered-cc |
---|---|---|---|---|---|
SDLAION-5B | 0.0 | - | |||
0.03125 | - | ||||
0.0625 | - | ||||
0.1 | - | ||||
0.2 | - | ||||
0.5 | - | ||||
VQ-Dcoco | 0.0 | - | |||
0.03125 | - | ||||
0.0625 | - | ||||
0.1 | - | ||||
0.2 | - | ||||
0.5 | - | ||||
LDMLAION-400M | 0.0 | - | |||
0.03125 | - | ||||
0.0625 | - | ||||
0.1 | - | ||||
0.2 | - | ||||
0.5 | - | ||||
Glidefiltered-cc | 0.0 | - | |||
0.03125 | - | ||||
0.0625 | - | ||||
0.1 | - | ||||
0.2 | - | ||||
0.5 | - | ||||
GALIPcoco | 0.0 | ||||
0.03125 | |||||
0.0625 | |||||
0.1 | |||||
0.2 | |||||
0.5 | |||||
ProGanlsun | 0.0 | ||||
0.03125 | |||||
0.0625 | |||||
0.1 | |||||
0.2 | |||||
0.5 | |||||
StyleGan2lsun | 0.0 | ||||
0.03125 | |||||
0.0625 | |||||
0.1 | |||||
0.2 | |||||
0.5 | |||||
GauGancoco | 0.0 | ||||
0.03125 | |||||
0.0625 | |||||
0.1 | |||||
0.2 | |||||
0.5 |
Target | Epsilon | GALIPcoco | ProGanlsun | StyleGan2lsun | GauGancoco | Overall |
---|---|---|---|---|---|---|
SDLAION-5B | 0.0 | |||||
0.03125 | ||||||
0.0625 | ||||||
0.1 | ||||||
0.2 | ||||||
0.5 | ||||||
VQ-Dcoco | 0.0 | |||||
0.03125 | ||||||
0.0625 | ||||||
0.1 | ||||||
0.2 | ||||||
0.5 | ||||||
LDMLAION-400M | 0.0 | |||||
0.03125 | ||||||
0.0625 | ||||||
0.1 | ||||||
0.2 | ||||||
0.5 | ||||||
Glidefiltered-cc | 0.0 | |||||
0.03125 | ||||||
0.0625 | ||||||
0.1 | ||||||
0.2 | ||||||
0.5 | ||||||
GALIPcoco | 0.0 | - | ||||
0.03125 | - | |||||
0.0625 | - | |||||
0.1 | - | |||||
0.2 | - | |||||
0.5 | - | |||||
ProGanlsun | 0.0 | - | ||||
0.03125 | - | |||||
0.0625 | - | |||||
0.1 | - | |||||
0.2 | - | |||||
0.5 | - | |||||
StyleGan2lsun | 0.0 | - | ||||
0.03125 | - | |||||
0.0625 | - | |||||
0.1 | - | |||||
0.2 | - | |||||
0.5 | - | |||||
GauGancoco | 0.0 | - | ||||
0.03125 | - | |||||
0.0625 | - | |||||
0.1 | - | |||||
0.2 | - | |||||
0.5 | - |
Methods | VQ-D | LDM | Glide | GALIP |
---|---|---|---|---|
COCO+Neg | ||||
Flickr+Neg | ||||
CC12M+Neg | ||||
ImageNet+Neg | ||||
COCO+None | ||||
COCO+Neg | ||||
COCO+Both | ||||
COCO+Target | ||||
COCO+T-NT |
Methods | ProGan | StyleGan2 | GauGan | Overall |
---|---|---|---|---|
COCO+Neg | ||||
Flickr+Neg | ||||
CC12M+Neg | ||||
ImageNet+Neg | ||||
COCO+None | ||||
COCO+Neg | ||||
COCO+Both | ||||
COCO+Target | ||||
COCO+T-NT |
Methods | VQ-D | LDM | Glide | GALIP |
---|---|---|---|---|
OCC-CLIP 0% | ||||
OCC-CLIP 25% | ||||
OCC-CLIP 50% | ||||
OCC-CLIP 75% | ||||
OCC-CLIP 100% |
Methods | ProGan | StyleGan2 | GauGan | Overall |
---|---|---|---|---|
OCC-CLIP 0% | ||||
OCC-CLIP 25% | ||||
OCC-CLIP 50% | ||||
OCC-CLIP 75% | ||||
OCC-CLIP 100% |
Non-Target | Methods | 10 | 20 | 30 | 40 |
---|---|---|---|---|---|
COCO | CoOp | ||||
OCC-CLIP | |||||
Flickr | CoOp | ||||
OCC-CLIP | |||||
CC12M | CoOp | ||||
OCC-CLIP | |||||
ImageNet | CoOp | ||||
OCC-CLIP |
Non-Target | Methods | 50 | 100 | 200 |
---|---|---|---|---|
COCO | CoOp | |||
OCC-CLIP | ||||
Flickr | CoOp | |||
OCC-CLIP | ||||
CC12M | CoOp | |||
OCC-CLIP | ||||
ImageNet | CoOp | |||
OCC-CLIP |
Process | Method | VQ-D | LDM | Glide | GALIP |
---|---|---|---|---|---|
None | CoOp | ||||
OCC-CLIP | |||||
Gaussian Blur | CoOp | ||||
OCC-CLIP | |||||
Gaussian Noise | CoOp | ||||
OCC-CLIP | |||||
Grayscale | CoOp | ||||
OCC-CLIP | |||||
Rotate 90 | CoOp | ||||
OCC-CLIP | |||||
Flip | CoOp | ||||
OCC-CLIP | |||||
Mixture | CoOp | ||||
OCC-CLIP |
Process | Method | ProGan | StyleGan2 | GauGan | Overall |
---|---|---|---|---|---|
None | CoOp | ||||
OCC-CLIP | |||||
Gaussian Blur | CoOp | ||||
OCC-CLIP | |||||
Gaussian Noise | CoOp | ||||
OCC-CLIP | |||||
Grayscale | CoOp | ||||
OCC-CLIP | |||||
Rotate 90 | CoOp | ||||
OCC-CLIP | |||||
Flip | CoOp | ||||
OCC-CLIP | |||||
Mixture | CoOp | ||||
OCC-CLIP |
Names of Classes | Methods | VQ-D | LDM | Glide | GALIP |
---|---|---|---|---|---|
fake-real | CoOp | ||||
OCC-CLIP | |||||
negative-positive | CoOp | ||||
OCC-CLIP | |||||
other-this | CoOp | ||||
OCC-CLIP | |||||
real-fake | CoOp | ||||
OCC-CLIP | |||||
positive-negative | CoOp | ||||
OCC-CLIP | |||||
this-other | CoOp | ||||
OCC-CLIP |
Names of Classes | Methods | ProGan | StyleGan2 | GauGan | Overall |
---|---|---|---|---|---|
fake-real | CoOp | ||||
OCC-CLIP | |||||
negative-positive | CoOp | ||||
OCC-CLIP | |||||
other-this | CoOp | ||||
OCC-CLIP | |||||
real-fake | CoOp | ||||
OCC-CLIP | |||||
positive-negative | CoOp | ||||
OCC-CLIP | |||||
this-other | CoOp | ||||
OCC-CLIP |
Methods | VQ-D | LDM | Glide | GALIP |
---|---|---|---|---|
None | ||||
Gaussian Blur | ||||
Gaussian Noise | ||||
Grayscale | ||||
Rotate | ||||
Flip | ||||
Mixture | ||||
ADA |
Methods | ProGan | StyleGan2 | GauGan | Overall |
---|---|---|---|---|
None | ||||
Gaussian Blur | ||||
Gaussian Noise | ||||
Grayscale | ||||
Rotate | ||||
Flip | ||||
Mixture | ||||
ADA |
No. of Shots | Methods | SD | VQ-D | LDM | Glide | GALIP |
---|---|---|---|---|---|---|
10 | CoOp | |||||
OCC-CLIP | ||||||
20 | CoOp | |||||
OCC-CLIP | ||||||
30 | CoOp | |||||
OCC-CLIP | ||||||
40 | CoOp | |||||
OCC-CLIP | ||||||
50 | CoOp | |||||
OCC-CLIP |
Methods | ViT-L | ViT-Res | CLIP-LoRAm | CLIP-LoRAl |
---|---|---|---|---|
Average ACC | ||||
Methods | CLIP-LoRAa | Girish et al. | Wang et al. | OCC-CLIP |
Average ACC |
No. of Shots | Methods | ProGan | StyleGan2 | GauGan | Overall |
---|---|---|---|---|---|
10 | CoOp | ||||
OCC-CLIP | |||||
20 | CoOp | ||||
OCC-CLIP | |||||
30 | CoOp | ||||
OCC-CLIP | |||||
40 | CoOp | ||||
OCC-CLIP | |||||
50 | CoOp | ||||
OCC-CLIP |
Num of Class | Method | LDM | Glide | GALIP | ProGAN | StyleGAN2 | GauGAN | Overall |
---|---|---|---|---|---|---|---|---|
2 classes | CoOp | |||||||
OCC-CLIP | ||||||||
4 classes | CoOp | - | - | |||||
OCC-CLIP | - | - | ||||||
6 classes | CoOp | - | - | - | - | |||
OCC-CLIP | - | - | - | - |
Num of Class | Method | LDM | Glide | GALIP | ProGan | StyleGan2 | GauGan | Overall |
---|---|---|---|---|---|---|---|---|
2 classes | CoOp | |||||||
OCC-CLIP | ||||||||
4 classes | CoOp | - | - | |||||
OCC-CLIP | - | - | ||||||
6 classes | CoOp | - | - | - | - | |||
OCC-CLIP | - | - | - | - |