Manuscript Offprint

arXiv:2609.31154

HyperErase: Scale-Calibrated Hypernetwork for Multi-Concept Erasure in Text-to-Image Models

Yi Sun, Xinhao Zhong, Zhiqi Zhang, Yimin Zhou, Junhao Li, Yuxia Qiao

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.

1 INTRODUCTION

The emergence of text-to-image (T2I) models Dhariwal & Nichol (2021); Ho & Salimans (2022); Ho et al. (2020); Nichol et al. (2021); Ramesh et al. (2022); Saharia et al. (2022) has marked a transformative leap in visual synthesis, enabling the creation of photorealistic imagery from natural language descriptions. Yet this remarkable progress is shadowed by a critical vulnerability. The unfiltered nature of Internet-scale training corpora Milmo (2023) frequently imbues these systems with the capacity to render objectionable or harmful visual content Jiang et al. (2023); Roose (2022);

Figure

Figure 1: Comparison of Traditional multi-concept erasure and HyperErase. HyperErase achieves high effective erasure and avoids manual routing and over-erasure by training a hypernetwork that generates dynamic LoRAs.

∗^{*}Corresponding Author.

Setty (2023). A straightforward remedy, excising problematic data followed by full model re-

training Nichol et al. (2021); Schramowski et al. (2023), proves prohibitively costly in practice. Such an approach entails not only staggering computational demands but also the risk of unforeseen performance regressions and emergent biases O'Connor (2022). Concept erasure (CE) has consequently emerged as a pragmatic alternative, offering surgical and parameter-efficient interventions that selectively suppress targeted semantic concepts without compromising the model's broader generative fidelity.

Mainstream CE approaches, from early ESD Gandikota et al. (2023) and UCE Gandikota et al. (2024), MACE Lu et al. (2024) to EraseAnything Gao et al. (2025), follow a static weight paradigm: they output a single frozen LoRA (or fused adapter set) that bakes all designated targets into one fixed U-Net update. This works for narrow single-concept cases, but two intrinsic limits surface as erasure needs expand. First, even for a single target type, the static adapter is a forced trade-off: EraseBench Amara et al. (2025) shows all such methods face a retain set dilemma, tightening erasure to block leakage degrades visually similar non-targets, while preserving fidelity lets targets slip—because one fixed weight cannot adapt to the open-ended phrasings of the same concept (e.g. "a church" vs. "a stone church on the street") without re-running gradients. When scaling to multiple concepts, this paradigm breaks further: even MACE, which trains per-concept modules and fuses them via closed-form updates to reach 100 targets, still produces a single merged static adapter. Interference accumulates between erased concepts and preserved classes as scope widens Liu et al. (2025); merging LoRAs inherently injects parameter crosstalk and direction drift Zhang & Zhou (2025); Li et al. (2024), and sequential tuning causes earlier erased concepts to re-emerge Carter (2025). Both multi-concept erasure methods suffer from inherent bottlenecks. Storing dozens of disjoint LoRAs need manual routing and storage bloat while accepting a merged weight will under-erase targets and over-hurt non-targets.

We argue both bottlenecks stem from the core assumption that all prompts and targets must share one static weight set. We instead reframe CE as prompt-conditioned parameter amortization for a pre-defined concept family and introduce HyperErase. Concretely, we employ ESD as the gold baseline. For each concept in a pre-defined target family, we use ESD to erase target concept to obtain prompt-checkpoint pairs as the training dataset. We then train a single hypernetwork from this dataset. At inference, maps the input prompt to a prompt-specific LoRA for targeted erasure in one forward pass and yield near-zero updates if the prompt is outside the family. Our method removes the per-prompt gradient tax and skips LoRA merging entirely. To stabilize generation, we decouple LoRA tokens into pattern and scale subspaces, replace log-scale decoding with a square-root transform to curb multiplicative over-scaling, and apply inference-time rectification via teacher-derived canonical priors. Experiments demonstrate that our method achieves erasure performance comparable to the gold baseline in CE scenarios. Moreover, during inference, it can provide a specialized LoRA for each input prompt variation without requiring gradient updates or additional training. This enhances preservation capability compared to the gold baseline and establishes a new paradigm for CE tasks. In summary, we make the following contributions:

• We recast CE as conditional parameter synthesis, where a textual concept description directly produces the erasing weight update, unifying the per-concept optimization procedures into a single amortized mapping.

• We propose the first hypernetwork-based CE framework and introduce a decoupled rectification strategy that stabilizes training via square-root scale encoding and restores the erasure strength of generated adapters through pattern and scale corrections.

• Extensive experiments across major concept categories demonstrate that our method approaches the erasure performance of gold single-concept baselines while maintaining superior generative capability.

References (49)