Pristine Models

A Path to Safe, High-Quality Image Generation

*Equal contribution. †Work done during an internship at Adobe Research.

CC12M results

Avoids unsafe concepts, high-quality images

Watch the overviewPristine Models in < 4 min

Unsafe prompts

Pristine does not generate the unsafe concept.

Safesafe data onlyFullall dataPristine (Ours)unsafe branch detached
Safe output for a Sonic the Hedgehog prompt. Full model output reproducing Sonic the Hedgehog. Pristine output for a Sonic the Hedgehog prompt.

Sonic the Hedgehog fills the frame, standing on a snowy rooftop …

Safe model output for Mickey Mouse on a park bench. Full model output for Mickey Mouse on a park bench. Pristine output for Mickey Mouse on a park bench.

Close-up portrait of Mickey Mouse sitting on a weathered wooden park bench …

Safe model output for Winnie the Pooh on a woodland path. Full model output for Winnie the Pooh on a woodland path. Pristine output for Winnie the Pooh on a woodland path.

Close-up portrait of Winnie the Pooh standing on a quiet woodland path …

Safe output for a Great Wave prompt. Full model output reproducing The Great Wave. Pristine output for a Great Wave prompt.

The Great Wave off Kanagawa fills the frame, painted as a crashing wave mural …

Safe output for a Pikachu prompt. Full model output reproducing Pikachu. Pristine output for a Pikachu prompt.

Close-up portrait of Pikachu sitting on a mossy forest log …

Safe model output for a pistol on a mossy rock. Full model output for a pistol on a mossy rock. Pristine output for a pistol on a mossy rock.

Tight medium shot of a pistol placed on a mossy rock, dappled sunlight filtering …

Safe prompts

Pristine keeps quality close to Full, better than Safe.

Safesafe data onlyFullall dataPristine (Ours)unsafe branch detached
Safe output for layered brownies with green mint frosting. Full model output for layered brownies with green mint frosting. Pristine output for layered brownies with green mint frosting.

Three layers of chocolate brownies topped with vibrant green mint frosting …

Safe model output for a blackboard next to a whiteboard. Full model output for a blackboard next to a whiteboard. Pristine output for a blackboard next to a whiteboard.

A stark black blackboard and a pristine white whiteboard are mounted next to each other …

Safe model output for two teddy bears and a plush fox. Full model output for two teddy bears and a plush fox. Pristine output for two teddy bears and a plush fox.

In the early morning light, three red stuffed animals, two teddy bears and a plush fox …

Safe model output for a cat with a bubble helmet. Full model output for a cat with a bubble helmet. Pristine output for a cat with a bubble helmet.

A cat with a transparent, gleaming bubble encasing its head like an astronaut’s helmet …

Safe output for a cubist tornado made of angular shark figures. Full model output for a cubist tornado made of angular shark figures. Pristine output for a cubist tornado made of angular shark figures.

A cubist painting depicts a tornado, composed of angular shark figures …

Safe output for a floating sand teardrop containing a galaxy. Full model output for a floating sand teardrop containing a galaxy. Pristine output for a floating sand teardrop containing a galaxy.

A cosmic teardrop carved from desert sand cradles a swirling galaxy …

Generations from CC12M-trained models. Prompts shortened for readability.

Full modelHigh quality, but unsafe concepts remain.

Safe modelSafe data only, at the cost of generation quality.

Pristine ModelDetach unsafe knowledge. Keep useful visual knowledge.

Pristine Models in < 4 min

More data, better models. But at what cost?

Train an image generation model on more data and it gets better at generating images. But that quality comes at a cost: the internet is full of concepts that bad actors can exploit to spread misinformation, infringe copyright, or produce violent content. A model that has seen these concepts can reproduce them when people use it.

So why not just delete the unsafe images?

Take a look at this photo.

A photo containing a firearm, annotated to show that lighting, shadows, camera angle and object interactions in the image are safe and useful even though the firearm is not.
An image is rarely unsafe in its entirety. This photo is “unsafe” because of the gun. Everything else in it, such as the lighting, the shadows, the camera angle, and how objects sit next to each other, is harmless and useful.

The only problem here is the gun. The rest of the photo shows the model how light falls, how shadows look, and how objects fit together in the real world. Deleting the whole image throws all of that away, and the model’s understanding of the visual world is impaired.

Goal: leverage the whole dataset and learn everything except the unsafe concepts.

Given an unsafe model, what can we do?

Discarding the unsafe images is off the table, since we don't want to lose the quality they carry. So suppose we have a model that has already learned from everything. What can we do after the fact?

Option 1: Filter the outputs

Leave the model as it is and check every image after it is generated, discarding the unsafe ones. In practice this gets expensive, because the model has to keep regenerating until something passes. And the filter is not perfect: every miss lets an unsafe image through.

Option 2: Unlearning

Edit the model’s weights, the numbers inside the neural network, so that it “forgets” a concept (Cao & Yang, 2015). This works for a handful of concepts (Kumari et al., 2023) (Gandikota et al., 2023), but is much harder to scale to many (Deng et al., 2026) (Li et al., 2026) (Gandikota et al., 2024).

The reason is that a network rarely stores a concept in one tidy place. There is usually no single neuron responsible for “gun”. Instead, each neuron helps with many unrelated concepts, a property called polysemanticity (Elhage et al., 2022), so the unsafe concept ends up intertwined with plenty of safe ones. Editing it out also damages those safe concepts, and the more concepts we remove, the more the model loses. This is known as catastrophic forgetting (McCloskey & Cohen, 1989).

Safety at pretraining time

Ideally, we would find the parts of the network responsible for an unsafe concept and switch them off. As we just saw, that is hard: in a trained network those parts are spread out and tangled with everything else. So instead of searching for them after the fact, why not train the network to put them somewhere we can find?

Core idea

Treat it as a pretraining problem, not a post-hoc one. Train on safe and unsafe data, but keep the unsafe knowledge in a separate component you can detach.

This does not replace post-hoc methods; it complements them. Many unsafe concepts are known before training even starts, while others only come up after deployment.

Known at training time

Copyrighted characters, weapons, …

→ Pristine Models

Emerges after deployment

New restrictions

→ Post-hoc unlearning

The figure below illustrates exactly this goal.

Three panels. The Full Model, trained on safe and unsafe data, generates a restricted cartoon character and a well-wrapped gift. The Safe Model avoids the character but wraps the gift poorly. The Pristine Model generates a safe character and a well-wrapped gift, with a detachable unsafe branch.
Goal. The Full Model generates high-quality images but can reproduce restricted concepts. The Safe Model avoids them at the cost of useful visual knowledge, here visible in the incorrect gift-wrap placement. Pristine aims to keep the useful information and isolate the restricted concept in a detachable branch.

Here, “knowledge” means the ability to reproduce the restricted concept as a whole. For Batman, that is the recognizable combination of mask, cape, and suit, not each feature on its own. The target is a model that keeps the shared knowledge (geometry, composition, lighting) and confines the concept-specific part to a component we can detach.

Pristine Attention

It comes down to controlling where information goes. From every unsafe example, we want two things:

What we want from every unsafe example

  1. Separate. Learn the unsafe concept in its own module, apart from everything else in the image, so we can detach it at inference and the model can no longer generate that concept.
  2. Useful. Learning the rest is not enough. It has to help the model generate safe content, even once the unsafe module is gone.

Pristine Attention gets these separate modules from the attention layers, which are where words in the prompt get tied to parts of the image. It replaces each attention layer with three parallel copies, which we call branches: a safe branch, an unsafe branch, and a shared branch. Each branch has its own weights and reads its own text, and their outputs are added together.

The branches are trained to separate restricted concept information from knowledge we want to retain. On unsafe examples, the unsafe branch receives the restricted concept while the shared branch receives the remaining description. Safe examples use a matching split between the safe and shared branches, encouraging the shared knowledge learned from unsafe examples to remain useful with the safe branch after the unsafe branch is removed.

To illustrate, we start with object-centric, ImageNet-like data. There is a finite set of central concepts (a rifle, a Chihuahua), some of them unsafe, and each image shows one of them with its attributes (color, material, pose) in a scene (sand, grass). Open-world data like CC12M is covered at the end of this section.

Split the prompt

We control what each module learns by controlling what it reads. Each branch gets its own prompt, containing only the information it is responsible for. An LLM splits every training prompt in two: the concept goes to a detachable unsafe branch, and everything else goes to a shared branch.

Unsafe example

Original prompt
A dark assault rifle resting on sand.
Unsafe branch
An assault rifle.
Shared branch
A dark object resting on sand.

Together the two prompts still describe the whole image, but each branch can only account for its own part. So the unsafe branch is pushed to take responsibility for the rifle, and the shared branch for a dark object resting on sand. That covers separate.

Make it useful: add a safe branch

In the rifle example, the shared branch learns attributes and setting: the color of an object and what it rests on. For that knowledge to be useful, the shared branch should play the same role when generating safe content. So we split safe prompts the same way, sending the identity to its own safe branch and the attributes and setting to the shared branch:

Safe example

Original prompt
A brown Chihuahua standing on grass.
Safe branch
A Chihuahua.
Shared branch
A brown object standing on grass.

Now the shared branch has one job on every image, safe or unsafe: attributes and setting, never identity. So what it picks up from the rifle, like a dark finish, can be applied to a Chihuahua even after the unsafe branch is removed.

How it flows

Diagram of Pristine Cross Attention: shared, safe, and unsafe branches each attend from the spatial tokens to their own text with their own weights. A mode switch activates either the safe or unsafe branch alongside the shared branch, and their outputs are added token by token to produce updated spatial tokens.
Pristine Cross Attention. Each branch attends from the spatial tokens to its own text with its own weights. Safe mode runs the safe and shared branches; unsafe mode runs the unsafe and shared branches. Their outputs are added token by token, so removing the unsafe branch leaves safe mode intact.

Inside an attention layer, the image being generated is a grid of spatial tokens x, and the prompt is a sequence of text tokens t. With weights W, attention updates both:

(Δt, Δx) = Attn(t, x; W)

In MM-DiT-style self-attention, the text tokens are updated too. In cross-attention, the text is only read, so (0, Δx) = Attn(t, x; W). The diagram shows the cross-attention case for simplicity, but the equations below cover both.

Pristine runs this once per branch, each with its own text and its own weights. The shared branch is always on, and exactly one mode-specific branch is active: safe for safe examples, unsafe otherwise.

(Δtshared, Δxshared) = Attn(tshared, x; Wshared),   (Δtmode, Δxmode) = Attn(tmode, x; Wmode)

Each branch’s text is updated independently:

tshared ← tshared + Δtshared,   tmode ← tmode + Δtmode

Their spatial updates are added together:

x ← x + Δxshared + Δxmode

Safe examples train the shared and safe branches; unsafe examples train the shared and unsafe branches. Each prompt is embedded separately and each branch has its own weights, so the shared branch never sees an identity, not even through the text encoder.

That is what makes the unsafe branch detachable. It is the only place the model ever linked “assault rifle” to the image, so deleting Wunsafe removes that link. Nothing else has to change: the safe and shared branches were always trained together on safe examples, so safe mode runs exactly as it did during training. The shared branch also saw every unsafe image in the same role it plays on safe ones, so what it learned there, like a dark finish or a sandy scene, remains available to safe concepts. The rest of the network and the training loss are unchanged.

Beyond object-centric data. In open-world data such as CC12M there is no single central concept: once the unsafe concept is removed, the shared prompt still describes nearly the whole scene. There, safe examples go through the shared branch alone and need no splitting, while unsafe examples use the shared and unsafe branches.

ImageNet

We test Pristine on ImageNet using the MMJiT self-attention architecture. In this controlled experiment, the 131 canine classes (dogs, foxes, and wolves) are designated safe and the remaining 869 classes unsafe. Full trains on all images; Safe trains only on safe images; Pristine trains on both and then detaches its unsafe branch.

Disentangled concepts

Pristine learns concepts in a disentangled way: the mode branch learns which object it is, and the shared branch learns everything else. So the model generates according to which branch is attached. With the safe branch, a gray fox comes out as a gray fox, while a garbage truck does not appear. With the unsafe branch, the pattern flips.

Generations for a safe prompt (gray fox) and an unsafe prompt (garbage truck) from the Full baseline, Safe baseline, Pristine with the safe branch, and Pristine with the unsafe branch.
Given a safe prompt (gray fox), the safe branch succeeds and the unsafe branch fails. On an unsafe prompt (garbage truck) the pattern reverses, which is the intended behavior.

Bronze and algae dogs

The shared branch is there so that attributes learned from unsafe images stay usable on safe concepts. Bronze and algae appear mostly on unsafe classes and rarely on dogs. With the unsafe branch detached, Pristine still draws a bronze Chihuahua or an algae-covered German Shepherd far more faithfully than a model trained only on safe data.

Dogs made of bronze (a Chihuahua) and algae (a German Shepherd) generated by the Safe model, Pristine with the safe branch, and the Full model.
Compositional generation. Bronze and algae are rare on safe dogs but common among unsafe classes. Pristine renders them far more faithfully than Safe and comparably to Full.

Safety and quality, measured together

For safe prompts, we want the requested concept to appear; for unsafe prompts, we want it suppressed. A classifier measures how often the requested class is generated. Safe-class accuracy should be high, while unsafe-class accuracy should be low.

Our balanced scores combine those two goals with the harmonic mean. For a metric M, we first turn unsafe performance into a desirable quantity: Msafe should be high, and 1 − Munsafe should also be high. The harmonic mean then rewards a model only when both are high. If either safe generation or unsafe suppression is weak, the balanced score remains low instead of allowing a strong result on one side to compensate for failure on the other.

Balanced M = H(Msafe, 1 − Munsafe),   H(a, b) = 2ab / (a + b)

We apply this to accuracy and to generative precision and recall. The table below is the MMJiT portion of the paper’s ImageNet evaluation, presented in the same three groups: quality on safe concepts, safety on unsafe concepts, and their balance.

ImageNet Dog setting with MMJiT self-attention and explicit prompts. Quality is measured on safe concepts; safety measures restricted-concept generation, so lower is better. Pristine uses the safe branch with the unsafe branch detached. Values from Table 1.
Model Quality (safe concepts) Safety (unsafe concepts) Balanced
Acc ↑P ↑R ↑ Acc ↓P ↓R ↓ Acc ↑P ↑R ↑
MMJiT (self attention)
Safe0.790.760.560.000.600.050.880.530.70
Full0.830.690.710.560.800.810.580.310.30
Pristine (safe branch)0.910.770.600.000.540.220.950.570.68

The comparison is direct. Full has strong safe-concept quality, but it also retains unsafe concepts: its unsafe accuracy is 0.56. Safe brings unsafe accuracy to 0.00, but its safe accuracy falls to 0.79. Pristine also reaches 0.00 unsafe accuracy while raising safe accuracy to 0.91. It therefore achieves the highest balanced accuracy (0.95) and balanced precision (0.57).

Conclusion

The Pristine Model shows promise when scaling to CC12M. There is still room for further research in achieving the best of both worlds between the Safe and Full models, while developing safe systems with high generation quality.

Citation

Anirudh Sundara Rajan, Krishna Kumar Singh, Richard Zhang, and Yong Jae Lee. Pristine Models. arXiv:2610.14091, 2026.

@misc{sundararajan2026pristine,
  title         = {Pristine Models},
  author        = {Sundara Rajan, Anirudh and Singh, Krishna Kumar and Zhang, Richard and Lee, Yong Jae},
  year          = {2026},
  eprint        = {2610.14091},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  doi           = {10.48550/arXiv.2610.14091},
  url           = {https://arxiv.org/abs/2610.14091}
}

References

  1. Y. Cao and J. Yang. Towards making systems forget with machine unlearning. IEEE Symposium on Security and Privacy, 2015.
  2. N. Kumari, B. Zhang, S.-Y. Wang, E. Shechtman, R. Zhang, and J.-Y. Zhu. Ablating concepts in text-to-image diffusion models. ICCV, 2023.
  3. R. Gandikota, J. Materzynska, J. Fiotto-Kaufman, and D. Bau. Erasing concepts from diffusion models. ICCV, 2023.
  4. R. Gandikota, H. Orgad, Y. Belinkov, J. Materzyńska, and D. Bau. Unified concept editing in diffusion models. WACV, 2024.
  5. K. Deng, G. Li, Y. Xiao, B. Hui, and X. Ma. Forget many, forget right: Scalable and precise concept unlearning in diffusion models. arXiv:2601.06162, 2026.
  6. O. Li, Y. Wang, X. Hu, H. Jiang, Y. Hao, J. Ma, F. Feng, et al. SPEED: Scalable, precise, and efficient concept erasure for diffusion models. ICLR, 2026.
  7. N. Elhage, T. Hume, C. Olsson, N. Schiefer, T. Henighan, S. Kravec, et al. Toy models of superposition. arXiv:2209.10652, 2022.
  8. M. McCloskey and N. J. Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. Psychology of Learning and Motivation, 24, 1989.