techlist.io
OpenAI2022-06-274 min read

Curated summary

DALL·E 2 pre-training mitigations

Read original(opens in new tab)

DALL·E 2 Pre-training Mitigations

OpenAI's post describes three pre-training mitigations applied to DALL·E 2 before training, each of which modifies the image-caption data the model learns from. The first removes violent and sexual images using classifiers trained with active learning. The second corrects the demographic bias that this filtering introduces by reweighting the remaining data. The third reduces image regurgitation, where the model reproduces training images, by deduplicating near-identical images. Together, these steps reduce harmful outputs while limiting the side effects that filtering and duplication would otherwise cause.

Filtering Violent and Sexual Content

  • The team trained in-house classifiers for graphic violence and sexual content, reusing an approach previously applied to GLIDE: define categories, gather a few hundred labeled examples, run active learning, then apply a conservative threshold.
  • The thresholds favor recall over precision, since it is easier to fine-tune a model to learn new things than to make it forget what it has already learned.
  • Two active learning techniques were used: labeling images the model flagged as positive to reduce false positives, and nearest-neighbor search around misclassified positives to reduce false negatives. Scaling across GPUs cut this step from hours or days to minutes.
  • A GLIDE model trained on the filtered data produced less explicit content, but it also showed amplified demographic biases.

Fixing Bias Introduced by Filtering

  • Generative models reproduce the distribution of their training data, so filtering can shift that distribution and amplify existing biases. For example, the prompt "a ceo" produced almost exclusively images of men from the filtered model.
  • The likely causes are that the dataset may depict women in more sexualized contexts, and that the classifiers may themselves be biased, so they remove more images of women than men.
  • To measure this, the team used Apache Spark to compute keyword frequencies across captions in both datasets. Filtering reduced "woman" by 14% and "man" by 6%.
  • To correct the shift, each image receives a weight of P(unfiltered|image)/P(filtered|image). These probabilities come from a linear probe on a small CLIP model, which is intentionally smoother than the original filters.
  • After reweighting, the frequency changes for "man" and "woman" dropped to 1% and –1%. The authors note that this is a proxy metric, and that bias work continues.

Preventing Image Regurgitation

  • Earlier internal models sometimes reproduced training images verbatim, which raised concerns about originality, copyright, and privacy.
  • Sampling 50,000 training prompts and checking for duplicates found only a few hundred true duplicate pairs, a rate below 1% that the team still wanted to reduce to zero.
  • The regurgitated images were mostly simple vector graphics, and all had many perceptually similar near-duplicates in the dataset, such as the same clock face at different times.
  • Naive pairwise comparison across hundreds of millions of images is infeasible, so the team clustered the data first and deduplicated within clusters. Running five different clusterings with different random subsets caught about 97% of duplicate pairs.
  • Deduplication removed almost a quarter of the dataset. Human evaluators slightly preferred the model trained on the deduplicated data, which suggests redundancy was hurting performance. The new model never regurgitated training images, even under nearest-neighbor checks across the full dataset.

Limitations and Next Steps

  • The current filters are tuned for low miss rates at the cost of many false positives, removing about 5% of the dataset, most of which did not violate the content policy. Better filters could recover this data.
  • Bias arises at many stages of development and deployment, so ongoing work includes new evaluations, datasets, and human feedback.
  • Deduplication reduces memorization but does not fully explain why models memorize training data, so that research continues.

Continue with another curated summary.