No Safe Dose: How Training Data Drives Unsafe Image Generation
This paper demonstrates that the proportion of unsafe images in training data, rather than their absolute count, directly and monotonically drives unsafe outputs in text-to-image models, while showing that safety filtering improves model safety without degrading image quality and that the text encoder also significantly contributes to the residual risk.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are teaching a very talented artist to paint pictures based on written descriptions. This artist learns by looking at millions of photos and reading the captions that go with them.
This paper, "No Safe Dose," asks a simple but crucial question: If you accidentally feed this artist a few bad or dangerous pictures while they are learning, will they start painting dangerous pictures later?
Here is what the researchers found, explained through simple analogies:
1. The "Bad Apples" Effect
The researchers set up a controlled experiment. They trained the same AI artist using different "baskets" of photos.
- Basket A: 0% bad photos (completely clean).
- Basket B: 1.2% bad photos (the natural amount found on the internet).
- Basket C: 5% bad photos.
- Basket D: 10% bad photos.
The Result: As they added more bad photos to the training basket, the AI started generating more bad images. It wasn't a random jump; it was a steady, predictable climb. The more "bad apples" in the training data, the more "bad apples" the AI produced.
2. It's About the Ratio, Not the Count
You might think, "If I have a huge basket with 100,000 bad photos, that's worse than a small basket with 1,000 bad photos." The paper says no.
What matters is the percentage (the ratio) of bad photos, not the total number.
- Analogy: Imagine seasoning a soup. If you add a pinch of salt to a tiny cup of soup, it's very salty. If you add a pinch of salt to a giant pot of soup, it's barely noticeable. But if you add a spoonful of salt to the giant pot, it becomes very salty.
- The Finding: The AI cares about the concentration of bad ideas in its training data. Whether the dataset is 1 million images or 8 million images, if the percentage of bad images is the same, the AI behaves the same way. This means safety filters work the same way regardless of how big your dataset is.
3. The "Ghost in the Machine" (The Irreducible Floor)
Here is the surprising part: Even when the researchers removed 100% of the bad photos from the training data, the AI still generated about 16.6% bad images.
Why?
The AI has two parts:
- The Painter: The part that learns from the photos (which they cleaned).
- The Translator: A pre-trained "text encoder" that reads the user's prompt and tells the painter what to do. This translator was trained on its own massive, messy internet data before the researchers even started.
The Analogy: Imagine you give a painter a clean set of reference photos, but the person giving the instructions (the translator) keeps whispering dangerous ideas into the painter's ear because they learned those ideas from a different, messy source. Even with a clean photo album, the painter still makes mistakes because the instructions are tainted.
The researchers found that swapping out this "Translator" for a safer version (called SafeCLIP) lowered the bad image rate from 16.6% down to 9.6%. This proves that you need to clean both the photos and the instructions to get the best results.
4. The "Adversarial" Secret
The paper discovered that this danger is mostly hidden.
- Normal Users: If you ask the AI to "draw a cat" or "paint a sunset" (safe prompts), it produces safe images about 99% of the time, regardless of how much bad data it saw. The bad training data is invisible to normal, friendly usage.
- Bad Actors: The danger only shows up when someone tries to trick the AI with "adversarial" prompts (trying to force it to make bad content). The bad training data makes the AI much easier to trick.
Analogy: Think of the AI like a castle. If you walk through the front door politely, the guards (safety filters) let you in, and you see a beautiful garden. But if you have a "bad training diet," the castle has hidden cracks in the walls that only a skilled burglar (an adversarial prompt) can find and exploit.
5. No "Quality Tax"
A common worry is: "If we filter out all the bad stuff, will the AI become worse at drawing?"
The Answer: No. The researchers checked the quality of the images (using metrics like sharpness and how well the image matches the text) and found zero difference. Cleaning the data didn't make the AI dumber or the pictures uglier. It was a "free" safety upgrade.
Summary
- Bad training data causes bad AI output. The more bad data, the worse the output.
- It's the percentage that counts. Cleaning 10% of a small dataset is just as effective as cleaning 10% of a giant dataset.
- You can't fix it just by cleaning photos. The "Translator" part of the AI also needs to be safe, or there will always be a baseline level of risk.
- It's invisible to normal people. The risk mostly appears when someone tries to trick the system.
- Safety doesn't hurt quality. You can make the AI safer without making the pictures worse.
The paper concludes that to make AI safe, you need a layered defense: clean the training photos, use a safe "Translator," and have strong defenses against people trying to trick the system.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.