Blog Info

  • Author: Alex Nichol
  • Affiliation: OpenAI
  • blog link : https://openai.com/research/dall-e-2-pre-training-mitigations
  • Task : DALL-E 2가 OpenAI content policy를 지키도록, potential legal issues를 방지하도록 만들기
    - DALL-E 2가 graphic violence, sexual content images를 생성하지 못하도록
    - DALL-E 2가 training image를 reproduce하지 못하도록
  • TLDR : OpenAI content policy를 위반하는 data를 제거하고, deduplication을 통해 potential legal issues를 방지

1. Brief Summary

OpenAI가 DALL-E 2를 서비스하는데 있어, DALL-E 2를 통해 구한 이미지는 OpenAI content policy를 지키여하며 저작권, 소유권, 개인정보 등을 침해해서는 안됨

 

DALL-E 2가 학습할 data를 directly modify하는 pre-training mitigation 방식을 이용하여 위 조건들을 만족

 

문제 1: DALL-E 2가 OpenAI content policy를 위반하는 이미지를 생성

해결 1: OpenAI content policy를 위반하는 data를 training data에서 모두 filter-out

 

문제 2: filtered dataset으로 학습한 모델은 unfiltered dataset으로 학습한 모델의 bias를 amplify함

원인 2: data filtering은 data distribution을 shift하기에 발생

해결 2: unfiltered dataset의 distribution을 match하도록 data re-weight

 

문제 3: DALL-E 2가 image를 generation하는 것이 아니라, trained image를 reproduce함

원인 3: 모델은 training data에 있는 duplicated data에 대해 memorize함

해결 3: training data에 대해 deduplication 수행


2. Reducing graphic and explicit training data

DALL-E 2의 training data 중 graphic violence, sexual content images를 filter-out하여 이에 해당하는 이미지들을 생성하지 못하도록 만듬


image가 graphic violence, sexual content인지 identify하기 위해, image classifier를 학습

 

더보기
active learning pipeline from blog

 

  1. label할 image category specification
  2. 각 category마다 수백장의 positive, negative examples gather
  3. active learning을 이용하여 데이터 추가 확보 + 성능 개선
    2가지 유형의 데이터에 대해 사람이 검수
    1. current image classifier가 positive라고 predict한 images
        목적 : to reduce the classifier’s false positive rate
        방법 : unlabeled dataset에서 image classifier가 positive라고 예측한 images를 gather
    2. difficult positive examples의 nearest neighbor images
        목적 : to reduce the classifier’s false negative rate
        방법 : current labeled dataset에서 image classifier가 negative라고 misclassify하는 positive samples를 찾음 (difficult positive examples) → unlabeled dataset에서 difficult positive samples와 perceptual feature space에서 nearest neighbors인 images를 gather 

 

학습이 완료된 image classifier + conservative threshold를 이용하여 entire dataset을 filter-out한 결과, entire dataset의 약 5%를 제거했다고 함

 

Figure from blog

unfiltered model : unfiltered dataset으로 학습한 모델
filtered model : filtered dataset으로 학습한 모델

 


filtering이 효과가 있는지 확인하기 위해 GLIDE 모델을 학습한 결과, filtered model은 content policy를 잘 지켰다고 함

 


3. Fixing bias introduced by data filters

주의 : 모든 bias를 mitigate하겠다는 것이 아니라, data filtering으로 인한 bias amplification을 mitigate하겠다가 목표임
text prompt : “a ceo”
unfiltered model : 남자를 더 많이 생성하지만 여자도 생성
filtered model : 거의 남자만 생성

 

저자는 몇가지 text prompt에 대해 실험해본 결과, filtered model이 unfiltered model의 bias를 amplify함을 발견함

 

filtered model이 unfiltered model의 bias를 amplify하는지 수치적으로 볼 수 있도록 Method 1을 제안

 

  • Method 1
    1. hand-selected keywords를 정의
    2. target dataset의 image의 text captions를 gather
    3. hand-selected keywords의 frequency를 측정

Method 1을 통해 filtered dataset과 unfiltered dataset의 frequency를 비교해본 결과, 특정 keywords가 다른 keywords보다 더 skew됐음을 확인할 수 있었다고 함
(filters reduced the frequency of the word “woman” by 14%, while the frequency of the word “man” was only reduced by 6%)

 

overall concept of data re-weighting from blog

 

filtered dataset이 unfiltered dataset의 bias를 amplify하는 것을 mitigate하기 위해, data를 re-weight하는 방식을 사용

즉, filtered dataset을 re-weight하여 unfiltered dataset의 distribution을 최대한 match하겠다는 의미

 

real dataset에서 largely automatic하게 사용할 수 있도록, P(unfiltered | image)를 모델링한 image classifier를 학습하여 P(unfiltered | image) / P(filtered | image)를 곱해주어 re-weight

(P(unfiltered | image) / P(filtered | image) = P(unfiltered | image) / (1 - P(unfiltered | image)))

 

더보기
  • model architecture : small CLIP model
  • training : linear probing
    fine-tuning 안하는 이유 : too powerful하면 data filtering을 배울 수 있기에
  • training details
    filtered dataset, unfiltered dataset에 대해 uniform sampling
    filtered dataset에서 나온 data는 0, unfiltered dataset에서 나온 data는 1이 되도록 모델 학습

 

Method 1에서 re-weight factor를 곱하여 frequency를 구해 비교한 결과, bias amplification이 해결되었다고 함

(for “man” and “woman”, the relative frequency reductions became 1% and 1%, whereas their previous values were 14% and 6%, respectively)

 


4. Preventing image regurgitation

  • Method 2
    1. training dataset에서 50k개의 prompts를 선택
    2. 50k prompts에 대한 image generation
    3. training images와 generated image간의 perceptual similarity를 측정
    4. perceptual similarity를 기준으로 sorting
    5. top-matched data pair에 대해 사람이 직접 확인

저자는 Method 2를 통해 수백개의 duplicate pairs를 발견했으며, regurgitated images에는 2가지 pattern이 있었다고 함

  1. 이미지의 대부분이 simple vector graphics인 경우
  2. training dataset에서 near-duplicates이 많은 경우

이를 보다 엄밀히 확인하기 위해 regurgitated images에 대해 nearest neighbor search한 결과, 모든 regurgitated images가 training dataset에 perceptually similar duplicates가 있었다고 함

 

clustering-based deduplication from blog

 

모델이 image를 generation하는 것이 아닌 training data를 reproduce하는 것을 방지하기 위해, feature space에서의 clustering을 이용하여 data deduplication을 진행

(Figure에서의 방식은 time complexity가 높아서 더 효율적인 방법을 사용하는데, 이는 블로그 참고)

 

clustering-based deduplication을 통해 filtered dataset을 정제한 결과, filtered dataset의 25%를 제거했다고 함

 

GLIDE 모델을 deduplicated dataset으로 학습하여 Method 2 방식을 통해 사람이 철저히 검사했음에도, image regurgitation을 발견할 수 없었다고 함

 

potential legal issues는 방지할 수 있지만, train dataset을 워낙 많이 제거하다보니 성능 문제가 있을 수 있음

놀랍게도 human evaluation한 결과, 사람들은 오히려 deduplicated data로 학습한 모델을 slightly prefer했다고 함

 


5. Conclusions

The author's conclusions

  • pre-training filter가 완벽하지 않고 conservative threshold를 사용하다보니, graphic violence, sexual content가 아닌 images도 많이 filter-out됐다고 함
  • bias amplification만 mitigate했지 bias를 mitigate하지는 않았음
  • deduplication을 통해 memorization 문제를 해결하긴 했다만 DALL-E 2가 왜, 어떻게 memorize하는지는 밝히진 않음

이러한 문제들을 극복하기 위해, OpenAI는 앞으로 이런 연구들을 계속 진행할 것임

 

My Conclusion

논문이 아니라 블로그 글이다보니, 부족한 부분이 많다고 생각됨

  • [기존 연구에 대한 부재] 해당 문제를 해결하기 위한 기존 연구들에 대한 설명이 없음
  • [성능 지표 부재] 제안한 방법론을 통해, 얼마나 개선되었는지에 대한 수치가 부재

그럼에도 불구하고 OpenAI가 AI 서비스를 배포하는 입장에서 어떠한 점들을 고민했고 해결했는지를 단편적으로라도 볼 수 있어서 좋았음

 

Rating

Good

+ Recent posts