TL;DR
HyperErase is a new framework that moves concept erasure in text-to-image models away from static, "one-size-fits-all" adapters toward dynamic, prompt-conditioned parameter synthesis. By training a hypernetwork to generate specialized LoRA updates for each specific input prompt, it achieves high-fidelity erasure across multiple concepts without the interference or quality degradation typical of traditional weight-merging methods.
What Problem Does This Paper Address?
As text-to-image (T2I) models like Stable Diffusion become more powerful, so does their potential to generate harmful or copyrighted content (e.g., nudity, specific artist styles, or sensitive objects). Concept Erasure (CE) aims to "surgically" remove these concepts from a model's weights.
However, current CE methods suffer from two major bottlenecks:
- The Static Weight Dilemma: Most methods produce a single frozen adapter. This adapter often struggles to adapt to diverse prompt variations (e.g., "a church" vs. "a stone church on the street") and forces a trade-off between effective erasure and preserving the quality of non-target images.
- Scaling Interference: When trying to erase multiple concepts at once, parameters often "clash." Merging multiple LoRAs (Low-Rank Adaptations) leads to parameter crosstalk, while sequential fine-tuning causes "catastrophic forgetting," where previously erased concepts start to reappear.
Methods
The authors propose HyperErase, which reframes concept erasure as a parameter amortization problem. Instead of optimizing weights for a specific concept, they train a HyperNetwork to map a textual description directly to a prompt-specific LoRA update.
Key Technical Innovations:
- Hypernetwork-Driven Synthesis: The system uses a frozen BERT encoder to process the prompt, which a hyper-convolutional decoder then uses to synthesize LoRA weights in a single forward pass.
- Decoupled Rectification Strategy: To stabilize the generated weights, the authors disentangle LoRA tokens into two subspaces: Pattern (the directional structure of the weight update) and Scale (the magnitude).
- Square-Root Scale Encoding: The authors identify that traditional log-scale encoding leads to a systematic upward bias in weight magnitude (over-scaling) due to Jensen's inequality. They replace this with a square-root transform to curb multiplicative over-scaling and stabilize generation.
- Canonical Scale Anchoring: They leverage "teacher-derived" priors—averaging the statistics of gold-standard single-concept checkpoints—to provide a stable reference for the hypernetwork during inference.
Datasets
The authors evaluated HyperErase across three primary tasks using several established benchmarks:
- Nudity Erasure: Evaluated on the I2P (Inappropriate Image Prompts) dataset, including robustness tests against adversarial attacks like MMA-diffusion, P4D, and Ring-a-bell.
- Artist Style Erasure: Tested on styles like Van Gogh, Da Vinci, and Picasso using the validation set from Concept-prune.
- Object Erasure: Targeted 10 distinct object classes from ImageNet.
- General Quality: Used 10,000 prompts from MS-COCO to calculate FID (image quality) and CLIP (semantic alignment) scores to ensure the model's general utility remained intact.
Key Insights and Ideas
- Dynamic vs. Static: The core "aha moment" is that erasure should be as fluid as the prompts themselves. By generating a unique LoRA for every prompt, the model avoids the "interference" that happens when you try to bake 100 different erasure rules into one static set of weights.
- Mathematical Precision in Scaling: The realization that log-space encoding causes systematic over-erasure (due to the convexity of the exponential function) is a subtle but vital contribution. The switch to square-root scaling (Equation 5 in the paper) is a principled fix for "corrupted" image generation.
- Zero-Update Safety: If a prompt falls outside the "target family" of concepts to be erased, the hypernetwork is trained to yield near-zero updates, effectively leaving the base model untouched and preserving its original generative power.
Key Results
HyperErase demonstrates performance comparable to "gold-standard" single-concept baselines while significantly outperforming existing multi-concept methods.
- Effectiveness: In nudity erasure (Table 1), HyperErase Mix achieved an erasure effect close to the single-concept baseline (ESD Single) but with superior FID (16.96 vs 17.06) and CLIP scores, indicating better preservation of overall image quality.
- Multi-Concept Scaling: Unlike traditional multi-concept erasure (ESD Mix), which often destroys the model's general generative capability (see the significant shift in t-SNE distributions in Figure 4), HyperErase maintains a distribution close to the original model.
- Visual Fidelity: Qualitative results (Figures 3 and 5) show that while traditional sequential methods (ESD First/Last) often result in "garbage" textures or failed erasure, HyperErase consistently produces clean, concept-free images.
Limitations and Future Work
- Catastrophic Forgetting: While HyperErase handles multiple concepts better than static methods, the "HyperErase First" experiments show that sequential training without specific regularization still leads to some degradation of early-learned concepts.
- Weight-to-LoRA Conversion: When using training-free "gold" baselines like RECE, the authors noted that approximating these edits as LoRAs for the hypernetwork to learn from isn't always perfect and may require more targeted tuning.
- Future Directions: The authors suggest exploring more advanced continual learning techniques to further mitigate forgetting and extending the framework to even larger-scale concept families.
For more details, you can find the full paper under the title "HyperErase: Scale-Calibrated Hypernetwork for Multi-Concept Erasure in Text-to-Image Models" (arXiv:2609.31154v1).
Summary updated