Localized Concept Erasure in Text-to-Image Diffusion Models via High-Level Representation Misdirection
Organizations: Department of Data Science, Seoul National University of Science and Technology
Abstract
Recent advances in text-to-image (T2I) diffusion models have seen rapid and widespread adoption. However, their powerful generative capabilities raise concerns about potential misuse for synthesizing harmful, private, or copyrighted content. To mitigate such risks, concept erasure techniques have emerged as a promising solution. Prior works have primarily focused on fine-tuning the denoising component (e.g., the U-Net backbone). However, recent causal tracing studies suggest that visual attribute information is localized in the early self-attention layers of the text encoder, indicating a potential alternative for concept erasing. Building on this insight, we conduct preliminary experiments and find that directly fine-tuning early layers can suppress target concepts but often degrades the generation quality of non-target concepts. To overcome this limitation, we propose High-Level Representation Misdirection (HiRM), which misdirects high-level semantic representations of target concepts in the text encoder toward designated vectors such as random directions or semantically defined directions (e.g., supercategories), while updating only early layers that contain causal states of visual attributes. Our decoupling strategy enables precise concept removal with minimal impact on unrelated concepts, as demonstrated by strong results on UnlearnCanvas and NSFW benchmarks across diverse targets (e.g., objects, styles, nudity). HiRM also preserves generative utility at low training cost, transfers to state-of-the-art architectures such as Flux without additional training, and shows synergistic effects with denoiser-based concept erasing methods.
Figures & tables
| Methods | I2P-931 ↓ | COCO-1k | |
|---|---|---|---|
| LPIPS ↓ | CLIP↑ | ||
| SD | 24.81% | - | 0.310 |
| Diff-Q ( Basu et al., 2023 ) | 7.09% | 0.34 | 0.273 |
| Diff-Q * | 0.75% | 0.60 | 0.187 |
| Method | Weight | Training | Style erasing (%) | Object erasing (%) | Efficiency ( s, GB ) | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Modification | based | UA | IRA | CRA | AA | UA | IRA | CRA | AA | Time | Mem. | |
| SAFREE ( Yoon et al., 2024 ) | ✗ | ✗ | 53.50 | 80.66 | 97.86 | 77.34 | 29.85 | 98.82 | 95.58 | 74.75 | - | - |
| TraSCE ( Jain et al., 2024 ) | ✗ | ✗ | 72.35 | 76.06 | 96.84 | 81.75 | 49.85 | 97.87 | 95.59 | 81.10 | - | - |
| UCE ( Gandikota et al., 2024 ) | ✓ | ✗ | 98.40 | 60.22 | 47.71 | 68.78 | 94.31 | 39.35 | 34.67 | 56.11 | - | 6.47 |
| RECE ( Gong et al., 2024 ) | ✓ | ✗ | 78.40 | 97.63 | 98.48 | 91.50 | 84.20 | 98.39 | 97.73 | 93.44 | - | 19.32 |
| Diff-Q ( Basu et al., 2023 ) | ✓ | ✗ | 96.40 | 93.91 | 97.13 | 95.81 | 94.00 | 98.37 | 96.21 | 96.19 | - | 1.60 |
| Method | Weight | Training | Ring-A-Bell (%) | Unlearn- | MMA- | I2P (%) | COCO | |||
| Modification | based | K-16 | K-38 | K-77 | DiffAtk (%) | Diffusion (%) | FID ↓ | CLIP ↑ | ||
| SD1.4 | - | - | 95.79 | 95.79 | 89.47 | 78.17 | 67.90 | 17.80 | - | 0.315 |
| SAFREE ( Yoon et al., 2024 ) | ✗ | ✗ | 47.37 | 40.00 | 26.32 | 40.85 | 30.30 | 0.64 | 6.77 | 0.312 |
| TraSCE ( Jain et al., 2024 ) | ✗ | ✗ | 4.21 | 3.16 | 0.00 | 16.90 | 15.60 | 0.45 | 10.39 | 0.305 |
| UCE ( Gandikota et al., 2024 ) | ✓ | ✗ | 6.32 | 3.16 | 6.32 | 35.21 | 11.60 | 0.89 | 9.77 | 0.306 |
| RECE ( Gong et al., 2024 ) | ✓ | ✗ | 1.05 | 0.00 | 1.05 | 21.83 | 0.40 | 0.57 | 29.65 | 0.277 |
| Method | Ring-16 ↓ | Ring-38 ↓ | Ring-77 ↓ | MMA ↓ | I2P ↓ | COCO-1k (CLIP) ↑ |
|---|---|---|---|---|---|---|
| Flux1.dev ( Labs, 2024 ) | 88.42 | 87.37 | 87.37 | 25.40 | 4.49 | 0.308 |
| ESD ( Gandikota et al., 2023 ) | 41.05 | 33.68 | 32.63 | 7.10 | 2.93 | 0.307 |
| CA ( Kumari et al., 2023 ) | 11.58 | 11.58 | 6.32 | 3.20 | 1.83 | 0.302 |
| UCE ( Gandikota et al., 2024 ) | 65.26 | 66.32 | 62.11 | 9.30 | 3.27 | 0.309 |
| EraseAnything ( Gao et al., 2025 ) | 29.47 | 24.21 | 26.32 | 6.60 | 2.64 | 0.305 |
| Diff-Q ( Basu et al., 2023 ) | 57.89 | 51.58 | 64.21 | 12.20 | 4.44 | 0.306 |
| Method | Ring-16 ↓ | Ring-38 ↓ | Ring-77 ↓ | MMA ↓ | I2P ↓ | COCO-1k (CLIP) ↑ |
|---|---|---|---|---|---|---|
| ESD ( Gandikota et al., 2023 ) | 41.05 | 33.68 | 32.63 | 7.10 | 2.93 | 0.307 |
| + HiRM-R (Ours) | 12.63 | 7.37 | 4.21 | 3.30 | 2.51 | 0.306 |
| CA ( Kumari et al., 2023 ) | 11.58 | 11.58 | 6.32 | 3.20 | 1.83 | 0.302 |
| + HiRM-R (Ours) | 3.16 | 2.11 | 2.11 | 4.40 | 1.11 | 0.302 |
| EraseAnything ( Gao et al., 2025 ) | 29.47 | 24.21 | 26.32 | 6.60 | 2.64 | 0.305 |
| + HiRM-R (Ours) | 3.16 | 1.05 | 3.16 | 2.50 | 1.57 | 0.305 |
| Adversarial Robustness | Multi Concept | COCO-10k | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Method | Ring-16↓ | Ring-38↓ | Ring-77↓ | MMA↓ | I2P↓ | Acc e ↓ | Acc r ↑ | FID↓ | CLIP↑ |
| SPEED ( Li et al., 2025 ) | - | - | - | - | - | 3.46 | 88.48 | - | - |
| HiRM-S (Ours) | 1.05 | 1.05 | 0.00 | 3.30 | 0.66 | - | - | 6.75 | 0.306 |
| S-HiRM-S (w/ Ours) | 1.05 | 1.05 | 2.11 | 1.70 | 0.43 | 3.64 | 79.30 | 7.43 | 0.304 |
Appendix figures & tables26 assets
Supplementary material from the paper’s appendix.
Appendix
| Style Concepts | "Abstractionism" , "Artist_Sketch" , "Blossom_Season" , "Bricks" , "Byzantine" , "Cartoon" , "Cold_Warm" , "Color_Fantasy" , "Comic_Etch" , "Crayon" , "Cubism" , "Dadaism" , "Dapple" , "Defoliation" , "Early_Autumn" , "Expressionism" , "Fauvism" , "French" , "Glowing_Sunset" , "Gorgeous_Love" , "Greenfield" , "Impressionism" , "Ink_Art" , "Joy" , "Liquid_Dreams" , "Magic_Cube" , "Meta_Physics" , "Meteor_Shower" , "Monet" , "Mosaic" , "Neon_Lines" , "On_Fire" , "Pastel" , "Pencil_Drawing" , "Picasso" , "Pop_Art" , "Red_Blue_Ink" , "Rust" , "Seed_Images" , "Sketch" , "Sponge_Dabbed" , "Structuralism" , "Superstring" , "Surrealism" , "Ukiyoe" , "Van_Gogh" , "Vibrant_Flow" , "Warm_Love" , "Warm_Smear" , "Watercolor" , "Winter" |
|---|---|
| Object Concepts | "Architectures" , "Bears" , "Birds" , "Butterfly" , "Cats" , "Dogs" , "Fishes" , "Flame" , "Flowers" , "Frogs" , "Horses" , "Human" , "Jellyfish" , "Rabbits" , "Sandwiches" , "Sea" , "Statues" , "Towers" , "Trees" , "Waterfalls" |
| Metric | UCE | ESD-x | ESD-u | GA | TaskVec | STEREO | RECE | HiRM-S | |
|---|---|---|---|---|---|---|---|---|---|
| Diffusion Completion | CLIP (t=5) | 27.7 | 27.2 | 26.9 | 24.0 | 23.8 | 23.9 | 28.8 | 25.8 |
| Class Acc. (%) | 42.7 | 37.8 | 32.5 | 1.1 | 2.4 | 3.2 | 36.5 | 9.4 | |
| Noise-Based Probing | CLIP | 27.8 | 28.0 | 27.7 | 26.1 | 26.5 | 24.6 | 27.0 | 24.6 |
| Class Acc. (%) | 21.9 | 30.7 | 27.7 | 2.67 | 11.0 | 1.1 | 13.0 | 7.0 | |
| Unrelated Concept | CLIP | 31.2 | 30.8 | 30.7 | 28.8 | 29.4 | 29.0 | 30.5 | 31.0 |
| Class Acc. (%) | 75.0 | 71.3 | 70.4 | 52.2 | 60.4 | 52.8 | 71.7 | 81.1 |
| Metric | Accuracy (%) |
|---|---|
| Average Unlearning Accuracy | 88.33 |
| In-domain Accuracy | 65.56 |
| Cross-domain Accuracy | 98.80 |
| Concept | HiRM-S (Keyword) | HiRM-S (Template) | ||||
|---|---|---|---|---|---|---|
| UA | IRA | CRA | UA | IRA | CRA | |
| Bricks | 100.0 | 94.6 | 98.3 | 100.0 | 89.4 | 97.9 |
| Cartoon | 100.0 | 91.4 | 97.4 | 100.0 | 92.5 | 97.3 |
| Crayon | 100.0 | 92.2 | 97.6 | 100.0 | 91.4 | 97.2 |
| Van Gogh | 95.0 | 94.2 | 97.7 | 100.0 | 96.0 | 98.4 |
| Dapple | 100.0 | 94.3 | 99.0 | 100.0 | 96.4 | 98.8 |
| Method | Ring-16 ↑ | Ring-38 ↑ | Ring-77 ↑ | Avg ↑ | MLLM-as-a-judge Rank ↓ | NudeNet Rank ↓ |
|---|---|---|---|---|---|---|
| SD 1.4 | 1.13 | 1.16 | 1.25 | 1.18 | 13 | 13 |
| SAFREE ( Yoon et al., 2024 ) | 2.15 | 2.33 | 2.32 | 2.27 | 11 | 10 |
| TraSCE ( Jain et al., 2024 ) | 4.26 | 4.11 | 4.15 | 4.17 | 8 | 5 |
| UCE ( Gandikota et al., 2024 ) | 4.26 | 4.53 | 4.20 | 4.33 | 7 | 7 |
| RECE ( Gong et al., 2024 ) | 4.77 | 4.77 | 4.66 | 4.73 | 3 | 1 |
| Diff-Q ( Basu et al., 2023 ) | 4.63 | 4.53 | 4.47 | 4.54 | 5 | 7 |
| Target layer | I2P-931 ↓ | COCO-1k | |
|---|---|---|---|
| CLIP↑ | LPIPS↓ | ||
| 11-mlp-fc2 | 13.10% | 29.99 | 0.25 |
| 11- | 2.47% | 30.14 | 0.24 |
| 10-mlp-fc2 | 4.83% | 29.61 | 0.27 |
| 10- | 3.54% | 29.52 | 0.27 |
| 9-mlp-fc2 | 11.60% | 29.99 | 0.25 |
| Seed | I2P-931 | COCO-1k |
|---|---|---|
| SD1.4 | – | 30.99 |
| 42 | 2.47% | 30.14 |
| 52 | 2.26% | 30.14 |
| 62 | 3.11% | 29.64 |
| 82 | 3.33% | 29.66 |
| 72 | 2.04% | 29.81 |
| Coefficient | I2P-931 | COCO-1k |
|---|---|---|
| SD1.4 | – | 31.00 |
| 300 | 2.04% | 30.14 |
| 400 | 1.93% | 29.90 |
| 500 | 2.47% | 30.14 |
| 600 | 1.18% | 30.08 |
| 700 | 1.18% | 30.03 |
Diffusion Model Unlearning
Diffusion model unlearning removes specified concepts or training examples from generative models while preserving unrelated generation.
See all 75 papers