Skip to main content
QUICK REVIEW

[Paper Review] CPR: Retrieval Augmented Generation for Copyright Protection

Aditya Golatkar, Alessandro Achille|arXiv (Cornell University)|Mar 27, 2024
Digital Rights Management and SecurityComputer Science4 citations
TL;DR

This paper proposes CPR (Copy-Protected Generation with Retrieval), a novel Retrieval-Augmented Generation method for diffusion models that enables private data retrieval while ensuring strong copyright protection. By blending public and private diffusion score functions via a learnable mixture at inference, CPR achieves Near Access Freeness (NAF) with a single backward pass, improving text-to-image alignment (TIFA: 81.4 → 83.17) and preventing memorization of retrieved images.

ABSTRACT

Retrieval Augmented Generation (RAG) is emerging as a flexible and robust technique to adapt models to private users data without training, to handle credit attribution, and to allow efficient machine unlearning at scale. However, RAG techniques for image generation may lead to parts of the retrieved samples being copied in the model's output. To reduce risks of leaking private information contained in the retrieved set, we introduce Copy-Protected generation with Retrieval (CPR), a new method for RAG with strong copyright protection guarantees in a mixed-private setting for diffusion models.CPR allows to condition the output of diffusion models on a set of retrieved images, while also guaranteeing that unique identifiable information about those example is not exposed in the generated outputs. In particular, it does so by sampling from a mixture of public (safe) distribution and private (user) distribution by merging their diffusion scores at inference. We prove that CPR satisfies Near Access Freeness (NAF) which bounds the amount of information an attacker may be able to extract from the generated images. We provide two algorithms for copyright protection, CPR-KL and CPR-Choose. Unlike previously proposed rejection-sampling-based NAF methods, our methods enable efficient copyright-protected sampling with a single run of backward diffusion. We show that our method can be applied to any pre-trained conditional diffusion model, such as Stable Diffusion or unCLIP. In particular, we empirically show that applying CPR on top of unCLIP improves quality and text-to-image alignment of the generated results (81.4 to 83.17 on TIFA benchmark), while enabling credit attribution, copy-right protection, and deterministic, constant time, unlearning.

Motivation & Objective

  • To address the risk of private data leakage in Retrieval-Augmented Generation (RAG) for diffusion models, where generated outputs may copy unique features from retrieved images.
  • To provide strong, tunable copyright protection guarantees in a mixed-private setting using the Near Access Freeness (NAF) privacy notion.
  • To enable efficient, deterministic, and constant-time unlearning of private data without retraining.
  • To improve text-to-image alignment and generation quality while preserving privacy, using only a single backward pass during inference.

Proposed method

  • CPR combines the diffusion score of a pre-trained public model with the diffusion score of a private retrieval set via a learnable mixture at inference time.
  • It uses a weighted combination of public and private scores, defined in Eq. 8, to generate samples that preserve the concept of the prompt but avoid copying unique features from retrieved images.
  • The method introduces two algorithms: CPR-KL and CPR-Choose, both designed to satisfy NAF by construction, avoiding expensive rejection sampling.
  • CPR ensures that the generated output contains at most $k$-bits of unique information about any retrieved sample, where $k$ is tunable by the user.
  • The approach is compatible with any pre-trained conditional diffusion model, such as Stable Diffusion or unCLIP, and operates without fine-tuning.
  • It enables deterministic, constant-time unlearning by simply removing the private data from the retrieval store.
Figure 1 : RAG vs CPR image generation. Images generated using the given prompt for a fixed random seed using different methods. Safe Model : Pre-trained model with no access to the retrievable data store, Retrieval-Score : Image generated using Eq. 7 , Retrieval-Mix-Score : Image generated using Eq
Figure 1 : RAG vs CPR image generation. Images generated using the given prompt for a fixed random seed using different methods. Safe Model : Pre-trained model with no access to the retrievable data store, Retrieval-Score : Image generated using Eq. 7 , Retrieval-Mix-Score : Image generated using Eq

Experimental results

Research questions

  • RQ1Can RAG-based image generation be made provably private, such that no unique information from retrieved private images leaks into the output?
  • RQ2Can copyright protection be achieved efficiently without rejection sampling, enabling single-pass inference?
  • RQ3Can private data be used to improve generation quality and text-to-image alignment while still ensuring unlearning and credit attribution?
  • RQ4How does the proposed method compare to prior NAF-based approaches in terms of privacy-utility trade-off and computational cost?

Key findings

  • CPR improves text-to-image alignment from 81.4 to 83.17 on the TIFA benchmark when applied to the unCLIP model, demonstrating improved generation quality with privacy.
  • The method achieves strong privacy guarantees via Near Access Freeness (NAF), with the amount of leaked information bounded by a user-tunable parameter $k$.
  • CPR outperforms prior rejection-sampling-based NAF methods like CP-Δ and CP-K in both speed and efficiency, reducing inference time by 5–10x for equivalent privacy levels.
  • The CLIP-score analysis shows that CPR-generated images are significantly less similar to retrieved images but more aligned with the input text prompt, confirming reduced memorization.
  • CPR enables deterministic, constant-time unlearning by simply removing private data from the retrieval store, without model retraining.
  • The method is compatible with existing pre-trained models like Stable Diffusion and unCLIP, requiring no architectural changes or fine-tuning.
Figure 2 : (A) We plot the histogram of $\Delta_{\text{max}}=\log\dfrac{p(x|c)}{\operatorname{safe}(x|c)}$ as we vary the contribution of the retrieval-score ( $\hat{w_{1}}$ in Eq. 8 ). We use $\hat{w_{1}}$ as a user tunable parameter which controls the amount of bits the generated images are differ
Figure 2 : (A) We plot the histogram of $\Delta_{\text{max}}=\log\dfrac{p(x|c)}{\operatorname{safe}(x|c)}$ as we vary the contribution of the retrieval-score ( $\hat{w_{1}}$ in Eq. 8 ). We use $\hat{w_{1}}$ as a user tunable parameter which controls the amount of bits the generated images are differ

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.