[Paper Review] CPR: Retrieval Augmented Generation for Copyright Protection
지난 포스팅의 주제였던 Copyright Protection이 적용된 RAG에 대한 논문입니다.
CPR: Retrieval Augmented Generation for Copyright Protection
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
arxiv.org
RAG는 private users data를 학습 없이 사용가능하게 하지만 모델이 retrieved samples을 그대로 복사할 위험 있습니다.
그래서 제시한 것이 본 논문의 Copy-Protected generation with Retrieval (CPR)입니다.
Inference 할 때 public private 분포의 diffusion score 섞어서 sampling 하고
이는 NAF를 만족합니다. (Near Acess Free)
Mixed-Privacy RAG
$D_{private}$이 parameter update에 사용되지 않아 immediate application to privacy 가능,
하지만 inference 때 retrtrived된 sample이 정보를 유출할 수 있습니다.
$D$ (Safe dataset)로 학습한 public diffusion model = $s_\theta (x_t, t, c)$
- c는 clip encoder의 결과 ($c = CLIP(<prompt>$)
$D_{private}$ = protection 필요한 데이터셋, 본 논문에선 data for retrieval
$D_{private}$ 의 부분집합인 $D_{retr} = \{(x_i,\phi(c_i, c_{test})) \}^m_{i=1}$ 를 generation 향상 위해 사용
$score = || c_{test} - c_i|| + ||c_{test} - CLIP(x_i)||$
- 이를 기반으로 가장 가까운 m개 sample 뽑는다.
$\phi(c_i, c_{test}) = c_i + c_{test}$
Mixture-of-Distribution
public과 private 분포 섞습니다.
$p(x|c) = w_0 p_D (x|c) + w_1 p_D{retr}(x|c)$
$w_0 = λ$
$w_1 = 1−λ$
Mixture-of-Score
mixture distribution에서 샘플링하기 위해 score fucntion 계산하고
섞은 분포에서 샘플링을 진행합니다.
Proposition 1.
$\hat{w}$ : fixed hyper-parameters
$\nabla_{x_t} \log_{p_D}(x_t|c)$ → $s_\theta$ (diffusion model )로 근사 가능
근데 $D_{retr}$ 로 학습한 model은 없어 → $s_{\theta_1}$
근데 s_{\theta_1} 계산량 너무 많아 CLIP 으로 대체합니다.
Proposition 2.
modifying the user prompt c_test using the CLIP embeddings of the retrieved samples
∵ fine-tuning 안하려고
optimal diffusion model trained on retrieved data를 CLIP embedding으로 근사시킬 수 있다.
Retrieval-Mixture-Score
expression for the score function of retrieval- augmented mixture of distributions
Copy-Protected Generation
CPR-KL
q1과 q2에 access 못해
➡️ 대신 $∇_{x_t} \log \int q_t(x_t|x_0)q^{(1)}(x|c)dx_0$ , $∇_{x_t} \log \int q_t(x_t|x_0)q^{(2)}(x|c)dx_0$
average the two scores at every step during backward diffusion using Langevin Dynamics
Algorithm 1 → k-NAF 보장한다
optimal score 몰라 → DNN으로 근사
- inference time의 computation cost가 2배
...smoothly interpolates between N(0,I) at t = T...
...Langevin dynamics converge exponentially fast to the distribution estimated by the gradients...
Experiments
w1이 커지면 k는 작아져
w1커지면 k작아짐 → 더 safe 해짐
즉 Textual prompts (from clip)과의 유사성을 높아지고
Retrieved images와의 유사성은 감소합니다.
현재 Copyright Protection을 적용한 논문들은
더 추가되거나 발전시키는 부분은 없고
저자의 방법이 기존에 제시된 NAF를 만족한다고 주장하는 것에서 더 나아가지 못하는 모습입니다.
아마 아직 연구 초기 단계라 그런 것 같습니다.