Skip to content

Pristine Models: A text-to-image architecture with disconnectable unsafe knowledge branchesPristine Models

Hugging Face Daily Papers· arXiv:2610.14091· Anirudh Sundara Rajan, Krishna Kumar Singh, Richard Zhang, Yong Jae LeeUniversity of Wisconsin–Madison; Adobe ResearchIndexed by this site · 2026-10-15· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

Pristine isolates restricted concepts with detachable branches; on CC12M, Restricted Gen. is 13.29% (Table 3).

Questions
Full text-to-image data teaches models concepts they should not generate, but removing those samples also loses useful knowledge such as lighting and composition; post-hoc unlearning is prone to catastrophic forgetting as the number of concepts grows.
Methods
Pristine Attention splits the prompt into safe, unsafe, and shared branches, sums the spatial updates, and removes the unsafe branch at inference time. ImageNet uses three branches; on CC12M, safe samples only go through the shared branch.
Experiments and results
On MMJiT, Pristine's safe branch has a Balanced Acc of 0.95 and an unsafe Acc of 0.00 (Table 1). On CC12M, its Restricted Gen. is 13.29%, Safe is 5.87%, and Full is 56.42% (Table 3).
Limitations and future work
The Conclusion states that this method supplements rather than replaces post-hoc unlearning and inference-time guardrails. Experiments include two ImageNet splits, UNet and MMJiT, and MMJiT on CC12M; the paper does not report total training steps or number of epochs.
Experimental setupPristine (w/ safe branch)、Pristine (w/ unsafe branch) et al. · ImageNet、ImageNetV2 et al. · Accuracy、Precision et al.
Evaluated models
Pristine (w/ safe branch)Pristine (w/ unsafe branch)AttentionSwapMLPSwapPristine (Unlearn)Pristine (TwoBranch)
Benchmarks
ImageNetImageNetV2CC12MDPG-BenchPRISM-BenchMNIST
Metrics
AccuracyPrecisionRecallBalanced AccuracyBalanced PrecisionBalanced RecallFIDVQAScoreRestricted Gen.DPG-BenchPRISM-BenchTPIPS
AI summaryThe paper proposes Pristine Models, a text-to-image generation architecture that uses attention mechanisms to separate safe and unsafe concept knowledge into independently parameterized branches during pretraining, and at inference time the unsafe branch can be disconnected to prevent generation of related concepts. The authors state that on ImageNet, this architecture retains most of the utility of full-data pretraining while maintaining safe generation, and that image quality and text alignment are better than training only on safe data or post-hoc concept removal. The study also extends the method to CC12M, stating that it remains effective in a larger, more diverse open-world pretraining setting.

The paper proposes Pristine Models, a text-to-image generation architecture that uses attention mechanisms to separate safe and unsafe concept knowledge into independently parameterized branches during pretraining, and at inference time the unsafe branch can be disconnected to prevent generation of related concepts. The authors state that on ImageNet, this architecture retains most of the utility of full-data pretraining while maintaining safe generation, and that image quality and text alignment are better than training only on safe data or post-hoc concept removal. The study also extends the method to CC12M, stating that it remains effective in a larger, more diverse open-world pretraining setting.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    During pretraining, restricted concepts are placed in detachable branches; after removal at inference, useful visual knowledge from unsafe data is retained.

    How to isolate pre-known restricted concepts during pretraining so they can be removed at inference time, while retaining useful visual knowledge in unsafe samples.

    • Scenario: The authors argue that large-scale text-to-image data cause models to learn weapons, copyrighted content, or adult material, which may be reproduced after deployment, leading to harmful content, misinformation, and intellectual property issues. Whole images are rarely entirely unsafe; excluding samples containing restricted concepts also discards safe information such as geometry, composition, and lighting (Figure 1).
    • Existing approaches: Guardrails or post-generation filtering only at inference time still often allow the model to generate unsafe images, and incur the cost of regeneration after refusal. When concept unlearning scales from a few concepts to large scale, the authors state there is a risk of catastrophic forgetting, partly because neurons are polysemantic and changing one concept affects unrelated concepts.
    • Core question: The authors ask whether, if restricted concepts are known in advance, the model can pretrain on both safe and unsafe data while keeping unsafe knowledge isolated and removable. Here, knowledge means the ability to reproduce the restricted concept as a whole, not suppressing its parts one by one.
    • This paper's approach: They propose Pristine Models. Pristine Attention separates knowledge using independently parameterized safe, unsafe, and shared branches; branch parameters are learned during training, and the unsafe branch is removed at inference time. The authors evaluate on ImageNet and CC12M.
    • Setup: The suppression set U is given in advance, such as celebrities, copyrighted characters, or weapons. Data are split into Dsafe, which contains no U, and Dunsafe, which contains at least one. The object is a text-conditioned diffusion or flow model. This setup is complementary to post-hoc unlearning; the paper does not frame it as an attacker's white-box or black-box knowledge.
  2. What related research exists?

    The authors position this work as concept separation at the pretraining stage, supplementing inference-time filtering, concept erasure, and post-hoc editing.

    Inference-time suppression and small-scale erasure

    • Safe Latent Diffusion (Schramowski et al., 2023) — suppresses unwanted generations at inference time via filtering or safety guidance.
    • Concept Ablation (Kumari et al., 2023) and Erased Stable Diffusion (Gandikota et al., 2023) — fine-tune trained models to erase a small number of target concepts. The authors state these methods suppress concepts the model has already learned, whereas this paper attempts to keep unsafe concepts from entering the retainable parameters.

    Scalable forgetting and model editing

    • Machine unlearning (Cao and Yang, 2015) relies more on model editing (Mitchell et al., 2021) as the number of concepts grows.
    • TIME (Orgad et al., 2023), UCE (Gandikota et al., 2024), RECE (Gong et al., 2024) perform targeted edits; MACE (Lu et al., 2024), SPEED (Li et al., 2026), ScaPre (Deng et al., 2026) target larger scales. The authors state these post-hoc methods risk catastrophic forgetting (McCloskey and Cohen, 1989) because they must modify already entangled representations.

    Deletable training during pretraining

    • Golatkar et al. (2023) and Chowdhury et al. (2025) organize training so individual samples can be efficiently deleted later. The paper only describes this goal and does not separately criticize these two works.
    • Concurrent modular LLM pretraining (Roland et al., 2026) routes specified concepts to removable modules, inducing separation through training. The authors state they tested a similar strategy on image generation, and without explicit decomposition control, unsafe knowledge isolation was poor.

    Baselines and data

    • Baselines are Full (all data) and Safe (safe data only); forgetting comparisons are UCE, ScaPre, SPEED, SAFREE. Backbones are Stable Diffusion UNet and MMJiT. Data are ImageNet and CC12M; open-world quality uses DPG-Bench and PRISM-Bench.

    The authors position this paper as: when restricted concepts are known in advance, during pretraining split knowledge in unsafe data into retainable and removable parts, to complement methods targeting concepts discovered after the fact.

  3. How does the paper address this problem?

    Pristine Attention uses prompt decomposition to separate identity and transferable information into independent branches, and removes the unsafe branch at inference time.

    Pristine Models use prompt decomposition and independent parameter branches during pretraining to separate restricted concept knowledge from transferable safety information, and remove the unsafe branch at inference time. The rest of the network and the standard generation objective remain unchanged.

    Data Partitioning

    • The data are image–text pairs, and U is the set of concepts to suppress. Dsafe contains no concepts in U, and Dunsafe contains at least one.
    • Full minimizes the standard generation loss on Dsafe and Dunsafe; Safe uses only Dsafe. The goal is safety close to Safe and generation quality close to Full.
    • The loss follows diffusion or flow matching objectives. The intervention point is the attention layers, not the loss.

    Prompt Decomposition

    • On object-centric data, the mode prompt keeps only the safe or unsafe concept identity, while the shared prompt keeps transferable attributes and scenes. Safe samples undergo the same decomposition so that the shared branch has a consistent role across both modes.
    • Open-world data have no single central concept. After removing the restricted concept, the shared prompt still describes nearly the entire scene, so safe samples use only the shared weights, while unsafe samples additionally use the unsafe branch.
    • Decomposition is done by an LLM. The authors state this resembles prompt rewriting in modern text-to-image pipelines. At CC12M inference time, no decomposition is performed, so compute is the same as Safe and Full. The appendix provides the decomposition and annotation prompts; the wording and constraints are not repeated here.

    Pristine Attention

    • The three branches have independent parameters. The shared branch is always active; the safe or unsafe branch is selected depending on whether the sample contains a concept in U. Each prompt is encoded separately; the authors give the reason of reducing information leakage.
    • Spatial states are merged as x ← x + Δ xshared + Δ xmode, meaning the shared increment and the current mode increment are written into the same spatial representation, while text states are updated separately.
    • Cross-attention updates only spatial tokens, with each branch using independent projections (Figure 3). MMDiT-style self-attention jointly updates text and spatial tokens within a branch, and spatial increments are still summed (Figure 14, Appendix A.4).

    Training, Inference, and Toy Example

    • Parameters are split into shared, safe, and unsafe groups, and the standard generation loss is computed on the corresponding data. Inference discards the unsafe modules, and prompts are processed as during training; CC12M safe prompts go directly into the shared branch.
    • ImageNet uses three branches. CC12M uses shared plus unsafe two branches, because the shared branch must absorb richer scene information.
    • Section 2.3 uses MNIST to illustrate the mechanism: digits 0–4 are treated as safe and appear only in thin style during training, while 5–9 are treated as unsafe and appear in both thin and thick styles. Identity goes into the mode branch, and stroke thickness goes into the shared branch. Success means that after removing the unsafe branch, the restricted concept as a whole is not reproduced, while transferable attributes are preserved. Classifiers and review models are described in the experiments section.
  4. What experiments did the paper conduct?

    Table 1: On MMJiT, Pristine's safe branch has a Balanced Acc of 0.95 and an unsafe Acc of 0.00.

    Experimental Setup

    • Backbones: Stable Diffusion 1.5 U-Net trained from scratch, with SD 1.5 VAE and CLIP text encoder frozen; MMJiT uses flow matching with flan-t5-large frozen. AdamW, global batch size 1024. U-Net learning rate 1e-4; MMJiT 4e-4, warmup 5000 steps. Inference CFG is 2 and 3, denoising steps are 500 and 200. Image side is 256×256 for ImageNet and 512×512 for CC12M.
    • ImageNet: The paper states 1M, 1000 classes. Dog Setting has 131 canine-related safe classes, and the remaining 869 classes are unsafe. Random Setting randomly selects 150 safe classes. Dense descriptions are generated by Gemini-3.1-Pro-Preview, and decomposition uses Qwen3.5-27B. Training uses the train split; quality evaluation uses the validation set and ImageNetV2 safe images, balanced with an unsafe subset.
    • Baselines: Full uses all data, Safe uses only safe data. On MMJiT, there are also AttentionSwap, MLPSwap, and Pristine (Unlearn). Unlearning baselines are UCE, ScaPre, SPEED, SAFREE, all on UNet, Dog Setting, initialized from Full.
    • Metrics: Safe concepts use EVA-02 target class accuracy, plus precision and recall; also report FID and VQAScore (Qwen3.5-9B, compared against dense descriptions). Unsafe concepts use classification accuracy as the primary leakage metric. Balanced-M is the harmonic mean of the safe metric and (1 minus the unsafe metric). Explicit prompts have 10 per class, 10,000 total; implicit prompts do not name the class, 15 per class, 15,000 total.
    • CC12M: 11 restricted categories, with a strong MLLM (citing Qwen Team, 2026) marking about 38% as restricted; the specific checkpoint used for annotation is not separately stated in the paper. Reviewer is Qwen3.5-122B-A10B. 500 per class, 5,500 total. Quality uses DPG-Bench and PRISM-Bench after filtering restricted prompts. The backbone is only stated as MMJiT.
    • Not reported: The paper does not report total training steps, number of epochs, or CC12M learning rate and batch size.

    Main Results

    Per Table 1, Dog Setting. Higher safe Acc is better, lower unsafe Acc is better.

    Swipe horizontally to read the table

    MethodBackboneSafe AccUnsafe AccBal. AccBal. P
    SafeUNet0.800.020.880.53
    FullUNet0.820.670.470.37
    Pristine (safe branch)UNet0.810.000.890.56
    SafeMMJiT0.790.000.880.53
    FullMMJiT0.830.560.580.31
    Pristine (safe branch)MMJiT0.910.000.950.57
    • The authors state that the safe branch achieves higher Balanced Accuracy and Precision than Safe and Full on both backbones, and also the highest Balanced Recall on UNet. MMJiT Balanced Recall is 0.68, while Safe is 0.70; the authors do not claim it is highest there. Unsafe Recall is lower for Safe: 0.09 vs 0.25 on UNet, and 0.05 vs 0.22 on MMJiT; the authors treat classification accuracy as the primary leakage metric.
    • Safe concept FID / VQAScore: on UNet, Pristine is 8.35 / 0.63, Full is 7.92 / 0.68, Safe is 10.72 / 0.48; on MMJiT, they are 7.32 / 0.75, 6.68 / 0.79, and 8.23 / 0.63. Implicit unsafe Acc: on UNet, Pristine 2.82%, Safe 2.80%, Full 32.30%; on MMJiT, Pristine 6.20%, Full 40.21%. The paper does not give Safe's implicit number on MMJiT.
    • When the unsafe branch is directly enabled, UNet safe Acc is 0.04 and unsafe Acc is 0.42; MMJiT is 0.00 and 0.62 (Table 1). The authors state this supports that the branch specifically models restricted concepts. Figure 4 and Figure 12 text describe the same direction.

    Comparison with Large-Scale Unlearning Methods

    Table 2 fixes UNet, Dog Setting, with unlearning methods initialized from Full.

    Swipe horizontally to read the table

    MethodSafe AccUnsafe AccBal. AccBal. PBal. R
    ScaPre0.660.300.680.360.49
    UCE0.790.070.850.420.56
    SPEED0.820.240.790.390.53
    SAFREE0.730.280.730.370.42
    Pristine (safe branch)0.810.000.890.560.72
    • The authors state that UCE is the best balanced among these unlearning baselines, but its safe VQAScore is 0.31 and FID is 12.43; Pristine is 0.63 and 8.35. The authors argue that once representations are entangled, stronger post-hoc removal damages useful knowledge, and state this does not negate the need for post-hoc unlearning.

    Compositional Generation

    • They select 10 materials common in the unsafe split and rare in the safe split, and have the model generate combinations of safe dog breeds with these materials. Reference images are generated by Qwen-Image, and TPIPS compares object identity and object material.
    • Full is 0.7705, Safe is 0.6890, Pristine safe branch is 0.7404. AttentionSwap is 0.7283, MLPSwap is 0.7272, Pristine (Unlearn) is 0.7484. The authors state that material knowledge from unsafe samples remains usable for safe concepts after removing the unsafe branch (Figure 5).
    • Appendix A.3.3 compares decomposition on ImageNet: Attribute-Shared is 0.7112, Attribute-Restricted is 0.6814 (Table 6). The table does not state the backbone. The authors state that whether attributes go into the shared or mode prompt changes whether they can recombine with safe concepts.

    CC12M

    • There are 11 restricted categories, including weapons, IP-related content, and children/infants, plus five benign categories to test whether arbitrary concepts can be isolated. Testing only counts the proportion where the prompt explicitly requests a restricted concept and the reviewer judges that the concept was drawn.

    Swipe horizontally to read the table

    Model (Table 3)Restricted Gen.↓DPG↑PRISM↑
    Safe5.87%79.304.79
    Full56.42%84.215.59
    Pristine13.29%82.315.02
    • The authors state that Pristine recovers most of the generation quality that Safe loses, while retaining most of the suppression gains. Its restricted generation rate is higher than Safe and lower than Full. Figure 6's caption states: on unsafe prompts, Full generates the requested concept while Safe and Pristine suppress it; on safe concepts, Pristine and Full are shown together.

    Other Ablations and Analyses

    • AttentionSwap (main text 3.2, MMJiT, no prompt decomposition, no shared attention): Balanced Acc 0.61 vs Pristine's 0.95; safe Acc 0.44 (Table 1).
    • MLPSwap (same section): Balanced Acc/P is 0.91/0.50 vs 0.95/0.57; the authors state it preserves safe generation more, but unsafe suppression is weaker.
    • Pristine (Unlearn) (same section, comparison numbers are 0.95/0.57/0.68): Balanced Acc/P/R is 0.93/0.40/0.55. The authors state that even retraining on full data, post-hoc separation is weaker than decomposition during pretraining.
    • Appendix A.3.1: three branches 420.8M, same-depth Safe 260.2M, shared plus safe at inference is 340M; Safe deepened to 28 layers is 416.0M. Table 4 does not state the backbone; Pristine's FID 7.32 and VQAScore 0.75 match the main text MMJiT safe concept numbers, and deepened Safe is 8.46/0.62.
    • Appendix A.3.4: TwoBranch vs the default three branches, safe FID 7.38 vs 7.32, VQAScore 0.7206 vs 0.7479, compositional TPIPS 0.7373 vs 0.7404, explicit unsafe Acc from 0.00% to 1.06%. This section does not restate the backbone and split.
    • Random Setting (Table 5): on MMJiT, Pristine's Balanced Acc/P/R is 0.56/0.43/0.60, explicit unsafe Acc is 0.01, Full is 0.53; safe FID/VQA is 9.46/0.64, Full 8.67/0.69, Safe 19.09/0.33. On UNet, Pristine's Balanced Acc/P matches Safe at 0.70/0.43, and Balanced R is 0.64.
  5. What are some points that can be further explored?

    The paper has no limitations section; the Conclusion states that this method supplements rather than replaces post-hoc unlearning and inference-time guardrails.

    Limitations and future directions noted by the authors

    • The Conclusion states: this work supplements rather than replaces post-hoc unlearning and inference-time guardrails; both remain necessary when new restrictions emerge and when suppressing harmful generation at deployment.
    • The paper has no dedicated Limitations or Future Work sections, nor does it list specific follow-up experiments. The Ethics Statement discusses that the technology could be used to design adversarial measures, without framing this as an experimental limitation.

    Experimental coverage

    • ImageNet has a Dog Setting (131 safe classes, 869 unsafe classes) and a Random Setting (150/850). The generation backbones are a from-scratch Stable Diffusion 1.5 U-Net and MMJiT. Quality evaluation uses the validation set and ImageNetV2, with the numbers of safe and unsafe images balanced.
    • Leakage determination uses EVA-02. Explicit prompts: 10 per class, 10,000 in total; implicit prompts: 15 per class, 15,000 in total. Safe alignment uses Qwen3.5-9B's VQAScore. Composition tests use 10 materials, Qwen-Image reference images, and TPIPS.
    • Unlearning baselines UCE, ScaPre, SPEED, and SAFREE are compared on UNet, Dog Setting, initialized from Full. The design variants AttentionSwap, MLPSwap, and Pristine (Unlearn) are described in the MMJiT discussion.
    • CC12M experiments use MMJiT and 11 restricted categories; about 38% of samples are labeled restricted. 5,500 prompts are tested, 500 per category, with Qwen3.5-122B-A10B as the reviewer. Quality metrics on safe prompts are DPG-Bench and PRISM-Bench.
    • The paper does not report total training steps, number of epochs, learning rate and batch size for CC12M, or Safe's unsafe accuracy under the MMJiT implicit setting. ImageNet's learning rate, batch size, CFG, and sampling steps are in Appendix A.2.1.
  6. Summarize the main content of the paper

    Pristine separates retainable and removable knowledge during pretraining, simultaneously reducing restricted generation while preserving more quality on ImageNet and CC12M.

    Pristine Models is a text-to-image pretraining architecture that places known restricted concepts into attention branches that can be removed.

    • Problem: training on full data reproduces concepts such as weapons and copyrighted content; training only on safe data loses the lighting, composition, and object interactions in those images. The authors argue that post-hoc unlearning risks catastrophic forgetting as the number of concepts grows.
    • Approach: prompts are decomposed into concept identity and transferable descriptions, which enter separately encoded modality branches and a shared branch, with spatial increments summed. The unsafe branch is removed at inference. ImageNet uses three branches; on CC12M, safe samples only go through the shared branch.
    • ImageNet: Dog Setting, MMJiT, safe branch Balanced Acc is 0.95, unsafe Acc is 0.00; on UNet, 0.89 and 0.00 (Table 1). MMJiT's Balanced Recall is 0.68, lower than Safe's 0.70. Safe-concept FID on MMJiT is 7.32 (Full 6.68, Safe 8.23); on UNet, 8.35 (Full 7.92, Safe 10.72).
    • Baselines: on the same UNet Dog Setting, the authors state the balanced metric is higher than UCE, ScaPre, SPEED, and SAFREE (Table 2). When rare materials are transferred to safe dog breeds, TPIPS is 0.7404, Full is 0.7705, and Safe is 0.6890.
    • CC12M: Restricted Gen. is 13.29%, higher than Safe's 5.87% and lower than Full's 56.42%; DPG-Bench is 82.31, Full is 84.21, Safe is 79.30 (Table 3).
    • Authors' conclusion: known restrictions can be built into pretraining while retaining part of the benefit of full data in quality, text alignment, and compositionality. Post-hoc unlearning and inference-time guardrails still handle restrictions that emerge later, as well as harmful generation at deployment.
Read originalhuggingface.co