Image Copy Detection for Diffusion Models

Wenhao Wang, Yifan Sun, Zhentao Tan, Yi Yang

Abstract

As diffusion models like Midjourney and DALL-E 2 become ubiquitous in digital art production, distinguishing between novel generation and the replication of training data has become a critical challenge for copyright and content integrity. Traditional Image Copy Detection (ICD) methods, designed to identify geometric manipulations like cropping or flipping, struggle with the subtle "pattern gap" inherent in AI-generated replicas. This paper introduces ICDiff, a framework specifically designed for detecting content replication in diffusion models. By utilizing a novel PDF-Embedding method that treats replication as a continuous spectrum rather than a binary state, and leveraging the new D-Rep benchmark dataset, ICDiff significantly outperforms existing vision-language and ICD models in identifying high-fidelity AI-generated copies.

1. Introduction

The rapid adoption of generative AI has sparked a debate regarding the nature of machine creativity. While diffusion models are capable of producing stunningly original imagery, they are also known to occasionally "memorize" and replicate training samples. Detecting these high-fidelity replicas is difficult for traditional tools because diffusion models do not "edit" images in a conventional sense; instead, they generate new pixels based on learned patterns. This results in copies that may share structural and semantic DNA with a source image while differing in texture, lighting, or exact pixel values.

To address this, researchers from the University of Technology Sydney, Baidu, and Zhejiang University have developed ICDiff, the first framework dedicated to identifying when a diffusion model has borrowed too heavily from existing training data.

2. The Problem: The "Pattern Gap"

Traditional Image Copy Detection (ICD) models (such as SSCD) are optimized for invariance to "hand-crafted" replicas—images that have undergone Photoshop-style edits like rotation, color shifting, or cropping. However, diffusion models introduce a different kind of replication. An AI-generated copy might maintain the core composition of a source image but alter the artistic style or fine details.

Existing state-of-the-art models often fail to bridge this "pattern gap." Because they are trained to ignore geometric shifts, they lack the sensitivity to detect the semantic-yet-pixel-distinct replication typical of generative models. This creates a significant vulnerability in our ability to protect intellectual property in the age of generative AI.

3. Methodology: PDF-Embedding

The core innovation of the ICDiff framework is PDF-Embedding. Most retrieval systems produce a single scalar similarity score (e.g., a cosine similarity). The authors argue that replication is not binary but exists on a smooth gradient.

3.1 PDF Supervision

Instead of training the model to output a single number, ICDiff is trained to predict a Probability Density Function (PDF) across six discrete levels of replication (ranging from Level 0: "no replication" to Level 5: "total replication"). This approach uses "label smoothing" logic: if an image is a Level 3 copy, it should naturally share characteristics with Level 2 and Level 4. By predicting a distribution, the model learns the nuanced relationships between neighboring levels of similarity, creating a more robust embedding space.

3.2 Multi-Vector Representation

Rather than compressing an entire image into a single feature vector, the framework utilizes a Vision Transformer (ViT) to extract a set of representative vectors. The similarity between two images is determined by calculating the inner products between these vector sets to generate the predicted PDF. Experiments with different PDF shapes—Gaussian, Linear, and Exponential—revealed that the Exponential shape provided the highest accuracy for ranking and correlation.

4. The D-Rep Benchmark

To facilitate this research, the authors curated the Diffusion-Replication (D-Rep) dataset.

  • Source Data: Images were sourced from the LAION-Aesthetics V2 6+ gallery.
  • Generation: Using Stable Diffusion V1.5, the researchers generated 40,000 image-replica pairs by matching text prompts to existing image titles.
  • Annotation: Human experts manually labeled each pair into one of the six replication levels.
  • Scale: The dataset consists of 36,000 training pairs and 4,000 testing pairs, specifically designed to capture the unique characteristics of AI-generated replication.

5. Results and Insights

5.1 Performance Metrics

The authors evaluated ICDiff against general-purpose and specialized models using the Pearson Correlation Coefficient (PCC) and Relative Deviation (RD). The PDF-Embedding (Exp.) method achieved a 56.3% PCC, significantly outperforming:

  • General Vision Models: CLIP (36.8%) and DINOv2 (39.0%).
  • Specialized ICD Models: SSCD (29.1%) and BoT (35.6%).

5.2 Auditing Generative Models

The researchers used ICDiff to audit six major diffusion models against an open-source gallery. The study found that 10% to 20% of generated images showed significant replication. Notably, Midjourney exhibited the highest replication ratio (20.21%), while SDXL was the most conservative (10.91%).

5.3 Computational Efficiency

ICDiff is designed for practical, large-scale application. On a standard A100 GPU, the model requires approximately 2 milliseconds for inference and can match a generated image against a gallery of 12 million images in roughly 83 milliseconds.

6. Limitations and Future Work

Despite its success, the model faces challenges with "semantic confusion," where it may flag false positives for images that share high-level themes (e.g., two different portraits of a woman with similar hair) without direct replication. Additionally, the replication of generic elements like "grass" or "sky" can occasionally trigger the model. Future research will focus on incorporating "hard negatives"—images that are semantically similar but artistically distinct—to further refine the boundary between creative inspiration and algorithmic copying.

7. Conclusion

ICDiff represents a significant step forward in the oversight of generative AI. By moving beyond binary similarity and addressing the specific "pattern gap" of diffusion models, this framework provides a necessary tool for artists, researchers, and platforms to ensure that the future of AI art remains both innovative and respectful of original content.

Summary updated

BibTeX
@inproceedings{wang2024image,
  author = {Wenhao Wang and Yifan Sun and Zhentao Tan and Yi Yang},
  title = {{Image Copy Detection for Diffusion Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=gvlOQC6oP1},
}
Figure