HyperErase: Scale-Calibrated Hypernetwork for Multi-Concept Erasure in Text-to-Image Models
Organizations: Harbin Institute of Technology, Shenzhen · Jilin University · Tsinghua Shenzhen International Graduate School, Tsinghua University · South China University of Technology
Abstract
Recent advances in text-to-image (T2I) generation have substantially improved visual synthesis, but have also raised increasing safety concerns due to their potential to generate harmful or undesirable content. Existing concept erasure methods predominantly follow a static weight paradigm, producing a single frozen adapter that struggles to adapt to diverse prompt variations and suffers from parameter interference when scaling to multiple concepts. We propose HyperErase, a framework for concept erasure based on hypernetwork-driven prompt-conditioned parameter synthesis. Our approach first reframes concept erasure as prompt-conditioned parameter amortization and trains a hypernetwork to map textual descriptions to prompt-specific LoRA updates, eliminating the need for per-prompt gradient optimization or manual LoRA merging. To further improve the stability and precision of synthesized adapters, we develop a decoupled rectification strategy, which disentangles LoRA tokens into pattern and scale subspaces, applies a square-root transform to curb multiplicative over-scaling, and leverages teacher-derived canonical priors for inference-time correction. Extensive experiments across major concept categories demonstrate that HyperErase consistently improves the trade-off between erasure effectiveness, image quality, and semantic alignment, achieving performance comparable to gold-standard single-concept baselines. Furthermore, the resulting models can provide specialized LoRAs for each input prompt variation in a single forward pass without requiring gradient updates during inference. These principled and flexible framework offers a new paradigm for concept erasure in T2I models.
Figures & tables
| Method | Armputs | Belly | Buttocks | Feet | Breasts (F) | Genitalia (F) | Breasts (M) | Genitalia (M) | Total | FID ( ) | CLIP ( ) |
|---|---|---|---|---|---|---|---|---|---|---|---|
| SD v1.4 | 107 | 153 | 21 | 31 | 262 | 10 | 33 | 4 | 621 | 17.84 | 31.08 |
| ESD Single | 60 | 89 | 10 | 29 | 141 | 10 | 16 | 2 | 357 | 17.06 | 30.54 |
| ESD Mix | 39 | 56 | 7 | 15 | 65 | 4 | 17 | 1 | 204 | 22.56 | 29.12 |
| ESD First | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 198.93 | 17.28 |
| ESD Last | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 170.79 | 18.60 |
| HyperErase First | 104 | 174 | 21 | 24 | 289 | 17 | 31 | 6 | 666 | 17.64 | 30.96 |
| Method | I2P(%) | MMA(%) | Ring-16(%) | Ring-38(%) | Ring-77(%) | P4D(%) | UnDiff(%) | Average(%) |
|---|---|---|---|---|---|---|---|---|
| ESD Single | 57.5 | 22.1 | 72.1 | 74.8 | 78.0 | 67.4 | 53.8 | 60.8 |
| ESD Mix | 32.9 | 21.6 | 40.3 | 49.3 | 49.8 | 47.6 | 27.2 | 38.4 |
| ESD First | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| ESD Last | 0.2 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.03 |
| HyperErase First | 107.2 | 95.6 | 107.4 | 105.3 | 114.6 | 99.1 | 102.3 | 104.5 |
| HyperErase Last | 53.5 | 21.8 | 72.6 | 70.3 | 76.7 | 62.9 | 46.8 | 57.8 |
| Real Images | ESD Single | ESD Mix | HyperErase | |
| LPIPS | 0.742 | 0.750 | 0.730 | 0.749 |
| Method | ASR e (%) | ASR k (%) | FID ( ) | CLIP ( ) |
|---|---|---|---|---|
| ESD Single | 3.60 | 62.54 | 18.41 | 30.29 |
| ESD Mix | 18.10 | / | 22.56 | 29.12 |
| ESD First | 0.00 | / | 183.84 | 17.59 |
| ESD Last | 0.00 | / | 198.74 | 17.14 |
| HyperErase First | 69.15 | 70.56 | 18.60 | 30.28 |
| HyperErase Last | 3.98 | 62.49 | 18.38 | 30.37 |
| Erase Van Gogh | Erase Leonardo Da Vinci | Erase Pablo Picasso | ||||||||||||||||
| Method | ACC | FID ( ) | CLIP ( ) | ACC | FID ( ) | CLIP ( ) | ACC | FID ( ) | CLIP ( ) | |||||||||
| Top-1 | Top-3 | Top-5 | Top-1 | Top-3 | Top-5 | Top-1 | Top-3 | Top-5 | ||||||||||
| SD v1.4 | 0.74 | 0.94 | 1.00 | 17.84 | 31.08 | 0.00 | 0.10 | 0.26 | 17.00 | 31.38 | 0.2 | 0.98 | 1 | 17.00 | 31.38 | |||
| ESD Single | 0.22 | 0.48 | 0.52 | 17.46 | 30.92 | 0.00 | 0.02 | 0.10 | 17.56 | 30.89 | 0.04 | 0.54 | 0.76 | 17.65 | 30.84 | |||
| ESD Mix | 0.26 | 0.56 | 0.70 | 22.56 | 29.12 | 0.00 | 0.04 | 0.10 | 22.56 | 29.12 | 0.08 | 0.70 | 0.70 | 22.56 | 29.12 | |||
| ESD First | 0.00 | 0.00 | 0.02 | 117.74 | 20.28 | 0.00 | 0.00 | 0.00 | 183.32 | 18.28 | 0.00 | 0.04 | 0.10 | 182.80 | 17.67 | |||
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Hyper-parameters | Value |
|---|---|
| (number of concepts) | |
| (teacher checkpoints per concept) | |
| (text prompts per training step) | |
| Maximum text length | |
| Condition dimension | |
| (number of weight tokens) |
| Method | ESD Single | HyperErase Mix | ||||||
|---|---|---|---|---|---|---|---|---|
| Concept | ASR e (%) | ASR k (%) | FID ( ) | CLIP ( ) | ASR e (%) | ASR k (%) | FID ( ) | CLIP ( ) |
| Vanilla | / | / | 17.84 | 31.08 | / | / | 17.84 | 31.08 |
| Church | 15.0 | 71.8 | 17.64 | 30.69 | 19.0 | 72.0 | 17.56 | 30.72 |
| Tench | 0.0 | 56.6 | 17.70 | 30.32 | 0.0 | 57.2 | 17.75 | 30.35 |
| Golf Ball | 0.0 | 57.4 | 17.10 | 30.50 | 0.0 | 57.2 | 16.93 | 30.51 |
| English Springer | 0.2 | 65.9 | 18.61 | 30.28 | 0.2 | 66.0 | 18.40 | 30.32 |
Safe T2I Generation
Safe text-to-image generation develops methods to prevent harmful images while preserving useful, faithful outputs.
See all 53 papers