acceptodds
Published as a conference paper at NeurIPS 2026

EntiRE: Invariant Learning for Robust Concept Erasure in Text-to-Image Generative Models

Fengyuan Yu, Yuyuan Li, XiaoHua Feng, Li Zhang, Jiaming Zhang, Xiang Liu, Jun Wang, Chaochao Chen

Abstract

Large-scale text-to-image diffusion models can inadvertently generate harmful or sensitive content learned from uncurated training data, motivating the development of concept erasure methods that remove undesired concepts from pre-trained models. However, recent studies reveal that erased models remain vulnerable to adversarial prompt attacks that recover the supposedly removed concepts, highlighting the need for robust erasure techniques. In this work, we visualize the text embedding distributions of adversarial prompts and find that the difficulty of erasure is non-uniform. Existing methods effectively erase concepts in easier regions but leave localized residual holes in harder regions, which adversarial prompts consistently exploit. Motivated by this finding, we propose Entire-space Robust Erasure (EntiRE), an end-to-end framework that casts robust concept erasure as an out-of-distribution generalization problem. By adopting an invariant learning formulation regularized by total variation, EntiRE enforces more uniform erasure across the continuous prompt space, suppressing the localized residual regions. Extensive experiments on erasing nudity, artistic style, and object concepts demonstrate that EntiRE consistently outperforms state-of-the-art baselines in both robustness against adversarial prompt attacks and utility preservation.

Keywords:
Sydney

Reviews

Among:
Shape:
123456this paper, Top 1%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 5.33 over 3 reviews, above 99% of the others.
Reviewer_QDTkOpenReview ↗
Rating
4
Clarity
3
Confidence
4
Originality
2
Quality
3
Significance
3
Read review
Summary

This paper studies adversarially robust concept erasure for text-to-image diffusion models. The authors look at the prompt embedding space and notice that a concept is much harder to erase in some regions. Earlier methods clear the easy regions but leave a few residual holes, which adversarial prompts keep attacking on them. Considering this, they reframe the goal as out-of-distribution generalization and propose EntiRE. It handles the concept unlearning problem as an invariant risk minimization with a total variation term. Training runs in two stages. The first collects adversarial prompts by alternating between erasing the current prompt and inverting a new one. The second retrains the model on those prompts and adds a retain loss to protect image quality. They conduct experiments on nudity, Van Gogh style, and church removal on Stable Diffusion v1.4. Against one black-box and two white-box attack types, EntiRE lowers attack success rates compared with prior work, with the clearest gain on the soft-prompt attack. FID and CLIP stay close to the original model.

Strengths and weaknesses

Strengths

This paper considers concept erasure problem as one of OOD generalization problems. Authors assume that existing concept erasure methods fail to defend the adversarial attacks because of the residual holes. This means that existing methods cannot completely handle prompt embedding space to remove embeddings from the concept space, and still there remain some small points within the concept space. This is a plausible explanation of why concept-erased models remain vulnerable to the adversarial attacks. In this perspective, the complete concept erasure should remove those small points as well. Authors interpret this objective as a OOD generalization problem. This provides a novel perspective to the research field related to the concept erasure.

Furthermore, this paper attempts to solve the problem using Invariant Risk Minimization with TV regularization. This differs this paper with the existing concept erasure methods, such as ESD and AdvUnlearn. The authors also support this formulation with theoretical analysis rather than motivating it empirically alone, which gives the method a more principled basis.

Weaknesses

However, there are some weaknesses in this paper.

First, methodological contribution is weak.

In terms of originality, EntiRE suggests the two-stage framework, but this two-stage framework is highly oriented from STEREO. This is not a newly proposed framework, and authors should explicitly state that they adopt STEREO's framework as a baseline. Whether intentional or not, this is a confusing and potentially misleading point. Additionally, the parameter-selection scheme simply follows ESD. However, ESD relies solely on negative guidance and preserves benign performance by constraining the trainable parameters, whereas EntiRE additionally introduces a retain loss for the same purpose. Given this redundancy, is it still optimal to inherit ESD's parameter-constraining choice? I do not agree. For example, Table 4 shows that the retain loss affects the erasure–retain trade-off, which suggests the parameter selection should be re-evaluated.

In terms of significance, Table 4 raises doubts about the effectiveness of the TV penalty. For example, the TV penalty harms CCE robustness on church, which contradicts the paper's main argument. Comparing Table 4 and Figure 4, the CCE ASR appears more sensitive to n1 and n2 than to the proposed methods such as the TV penalty. This further weakens the methodological contribution as well.

Second, the experiments are limited in narrow scope. EntiRE is only tested on SDv1.4 and does not consider its generalization. In particular, can EntiRE extend to recent flow-matching-based diffusion models such as FLUX.1 [1]? Furthermore, it does not consider the relearning attack. According to the previous work, such as ResAlign [2], short fine-tuning with benign data can easily restore the information erased by the conceprt erasure methods. This kind of problem should be addressed in the concept erasure research.

Third, the experiments are little flawed. Despite the known limitations of FID, which is biased and unreliable for small sample sizes (the standard protocol uses ≥10k samples), the authors compute it with only 5k samples. Given the very small FID differences in Tables 2 and 4, this is a potential flaw in the evaluation setup.

[1] Batifol, S., Blattmann, A., Boesel, F., Consul, S., Diagne, C., Dockhorn, T., ... & Smith, L. (2025). Flux. 1 kontext: Flow matching for in-context image generation and editing in latent space. arXiv e-prints, arXiv-2506.

[2] Li, B., Gu, R., Wang, J., Qi, L., Li, Y., Wang, R., ... & Zhang, T. (2026). Towards resilient safety-driven unlearning for diffusion models against downstream fine-tuning. Advances in Neural Information Processing Systems, 38, 17754-17789.

Questions
  1. The same single qualitative example is repeatedly used for nudity erasure (original prompt). Why? This raises a concern about cherry-picking.

  2. Figure 1 visualizes only previous erasure methods. What about EntiRE? Does it actually remove the residual holes? The same embedding-space visualization should be provided for EntiRE.

  3. In addition, how does EntiRE compare with unlearning methods that directly operate on prompt embeddings, such as Safe-CLIP and DES [3, 4], when considering the existence of the residual holes?

[3] Poppi, S., Poppi, T., Cocchi, F., Cornia, M., Baraldi, L., & Cucchiara, R. (2024, September). Safe-clip: Removing nsfw concepts from vision-and-language models. In European Conference on Computer Vision (pp. 340-356). Cham: Springer Nature Switzerland.

[4] Ahn, J., & Jung, H. (2026). Mitigating Sexual Content Generation via Embedding Distortion in Text-conditioned Diffusion Models. Advances in Neural Information Processing Systems, 38, 97-132.

Limitations

EntiRE is tested only on Stable Diffusion v1.4 and may not transfer to flow-matching models such as FLUX.1, and the threat model excludes relearning or fine-tuning attacks that can restore erased concepts. Both should be acknowledged, and the "robust" claim scoped accordingly.

Paper formatting concerns

There is no violation of formatting.

Final justification

The new experiments address my main concerns about the limited experimental scope and the evaluation setup, so I raise my rating to 4, on the condition that the authors honestly describe the remaining incrementality and the mixed effect of the TV penalty in the final version.

1 comment

Thank you for the detailed and constructive feedback. To address your concerns clearly and systematically, we consolidate your comments into several questions that cover all the concerns raised and address them individually below.

  • Response to Weaknesses

W1: Methodological contribution

W1.1 Relationship with STEREO

A1.1: We agree that this relationship should have been clearer. The two-stage search-then-erase pipeline appeared in RACE and was later extended by STEREO, whose contribution primarily lies in broadening adversarial coverage during Stage 1. Our proposed EntiRE adopts this established pipeline but contributes mainly to Stage 2, promoting uniform erasure from finitely searched prompts through TV-regularized invariant learning. We will clarify this distinction in the revised manuscript.

W1.2 Trainable-parameter selection

A1.2: We clarify that ESD’s parameter selection primarily concerns erasure effectiveness rather than utility preservation. As ESD explicitly states, “The effect of applying the erasure objective depends on the subset of parameters that is fine-tuned.” It therefore uses different parameter subsets for prompt-specific and global concept erasure. Therefore, parameter selection and the retain loss are not redundant: the former provides task-appropriate erasure capacity, while the latter explicitly preserves benign predictions. We follow this setting for all compared baselines and adopt it for EntiRE as well to ensure a fair comparison. We will clarify this point in the revised manuscript.

To verify our parameter choice, we additionally compare two parameter-selection strategies for nudity erasure.

Parameter SelectionI2P (%) ↓\downarrowCCE ASR (%) ↓\downarrow
uncond1.093.26
xattn5.4348.91
all7.6129.35

The results validate our use of uncond in the main experiments. It achieves the lowest I2P rate (1.09%) and CCE ASR (3.26%), substantially outperforming both xattn and all. This confirms that updating the non-cross-attention parameters provides stronger standard erasure and adversarial robustness for global nudity erasure.

W1.3 Effectiveness of TV

A1.3: To directly examine this issue, we conduct a experiment on Church with different n1n_1, n2n_2 and with or without TV. For each (n1,n2)(n_1,n_2), the two variants share the same Stage 1 prompts and training settings, allowing us to isolate the effect of TV on the mean and variance of environment-wise erasure risks.

(n1n_1, n2n_2)TVMean Env. Risk ↓\downarrowRisk Variance ↓\downarrow
(2, 2)w/2.80e-037.45e-07
(2, 2)w/o3.36e-031.13e-06
(4, 2)w/3.84e-036.14e-07
(4, 2)w/o3.51e-036.41e-07
(4, 1)w/2.31e-031.34e-07
(4, 1)w/o2.31e-031.52e-07

Across all tested (n1,n2)(n_1,n_2) settings, TV consistently reduces the environment-wise risk variance, confirming its intended effect of promoting more uniform erasure across environments. We use (4,2)(4,2) in the main experiments, where TV achieves a lower variance at the cost of a slightly higher mean risk. This trade-off explains why removing TV results in a lower CCE ASR on Church, but does not negate the role of TV: the additional results directly verify that it improves the uniformity of erasure. Notably, despite this increase in mean risk, the full EntiRE still achieves the lowest CCE ASR among all baselines on Church. Although the absolute risks vary with (n1,n2)(n_1,n_2), the variance reduction brought by TV remains consistent across all tested settings, indicating that the effectiveness of the TV penalty is not sensitive to the choice of (n1,n2)(n_1,n_2).

W2: Limited experimental

W2.1 Generalization to FLUX

A2.1: We compare the original model, ESD, and EntiRE on FLUX.1-dev using nudity erasure.

MethodI2P (%) ↓\downarrowCCE ASR (%) ↓\downarrow
FLUX.1-dev29.35-
+ESD0.0010.87
+EntiRE0.002.17

The results demonstrate that EntiRE can be effectively extended to FLUX.1 and flow-matching-based diffusion models.

W2.2 Relearning Attack

A2.2: Following ResAlign, we report the inappropriate image rate before and after benign fine-tuning on DreamBench++ and DiffusionDB.

MethodBefore FT (%) ↓\downarrowDreamBench++ FT (%) ↓\downarrowDiffusionDB FT (%) ↓\downarrowCCE ASR (%) ↓\downarrow
ESD2.177.6918.6868.48
AdvUnlearn1.0915.3819.7867.39
STEREO0.001.094.397.61
ResAlign0.000.001.4526.08
EntiRE1.092.173.263.26

These results further highlight the complementary robustness of EntiRE. Against adversarial prompt attacks, the primary threat considered in this work, EntiRE nearly eliminates the vulnerability, whereas ResAlign remains substantially vulnerable. Conversely, although EntiRE is not specifically designed for relearning attacks, it still maintains strong erasure performance after benign fine-tuning and clearly outperforms ESD and AdvUnlearn. Thus, EntiRE provides strong robustness against its targeted adversarial-prompt attacks while also generalizing reasonably well to the relearning scenario targeted by ResAlign.

W3: Evaluation flaws

A3: Thank you for pointing this out. We recomputed the FID scores in all three main experiments using 10k newly generated images. The evaluation prompts are strictly disjoint from all prompts previously used for training and adversarial prompt collection. We will replace the original FID results with these results in the revised manuscript.

MethodNudity FID-10k ↓\downarrowVan Gogh FID-10k ↓\downarrowChurch FID-10k ↓\downarrow
ESD16.9017.9117.99
AC21.79--
UCE17.7217.3321.78
RACE23.28--
RECE17.9417.2518.63
AdvUnlearn17.5517.5517.55
STEREO21.0528.3024.55
EntiRE16.2817.2917.96
  • Response to Questions

Q1: Repeated qualitative example

A1: Thank you for raising this concern. Figure 6 extends the comparison in Figure 3 by including additional baselines. We therefore reuses the generation settings of Figure 3 to ensure a direct and fair comparison with the additional baselines. We agree that more qualitative examples would provide a more comprehensive visualization and will include them in the revised manuscript. Importantly, our main conclusions are supported by quantitative evaluations over the full test set, while these examples serve only as supplementary qualitative illustrations.

Q2: Embedding-space visualization of EntiRE

A2: Thank you for this suggestion. Figure 1 originally focused on diagnosing the residual holes left by existing methods. We will add an EntiRE panel using the same visualization protocol as Figure 1 in the revised manuscript. Compared with previous methods, EntiRE leaves substantially fewer successful adversarial prompts, without the pronounced localized clusters observed for the baselines. Together with its substantially lower attack success rates, this result shows that EntiRE effectively suppresses residual holes.

Q3: Comparison with Safe-CLIP and DES

A3: Thank you for this suggestion. We additionally reproduce Safe-CLIP and DES under the same SD v1.4 nudity-erasure setting and evaluate them using the same original prompts, red-teaming attacks, and utility metrics.

MethodI2P (%) ↓\downarrowRAB ASR (%) ↓\downarrowCCE ASR (%) ↓\downarrowCLIP ↑\uparrow
Safe-CLIP28.2648.9177.170.3061
DES1.090.0079.350.3018
EntiRE1.091.093.260.3061

Safe-CLIP remains vulnerable under both attacks, while DES achieves effective erasure on original and discrete adversarial prompts but exhibits a high CCE ASR of 79.35%, indicating substantial residual vulnerabilities in the continuous embedding space. These results demonstrate that directly operating on prompt embeddings does not necessarily eliminate residual holes, whereas EntiRE substantially suppresses those exploited by soft-prompt attacks.

Reviewer_zPYhOpenReview ↗
Rating
6
Clarity
4
Confidence
4
Originality
3
Quality
4
Significance
4
Read review
Summary

This paper studies robust concept erasure for T2I DMs. Through prompt space visualization, the paper shows that existing methods leave localized residual vulnerable regions because erasure difficulty is non-uniform across the prompt space. It proposes EntiRE, which treats the problem as OOD generalization over prompt space environments and uses invariant learning with TV regularization. The method shows strong results on nudity, artistic style, and object erasure.

Strengths and weaknesses

S1: The paper provides a useful observation that the vulnerability of existing concept erasure methods is closely related to non-uniform erasure difficulty across the prompt space.

S2: The introduction of invariant learning is appealing, and the formalization is clear and well grounded.

S3: The paper is well organized and easy to follow.

W1: It would be helpful to clarify how Stage 2 is initialized, since Stage 1 runs multiple adversarial search trajectories and therefore produces multiple intermediate erased models.

W2: The sensitivity analysis shows that increasing the Stage 1 search depth does not always lead to better robustness. I would appreciate more discussion on this observation.

Questions
  1. It would be helpful to clarify how Stage 2 is initialized, since Stage 1 runs multiple adversarial search trajectories and therefore produces multiple intermediate erased models.

  2. The sensitivity analysis shows that increasing the Stage 1 search depth does not always lead to better robustness. I would appreciate more discussion on this observation.

Limitations

Yes

Paper formatting concerns

N/A

Final justification

All my concerns have been well addressed, and I would recommend a strong accept.

1 comment

Thank you for these helpful questions. We address both questions below.

Q1: Stage 2 initialization

A1: Stage 2 is initialized from the partially erased model Φ1(1)\Phi_1^{(1)}, obtained after the first round of the first Stage 1 trajectory under the predefined random seed. We directly use this checkpoint without comparing or selecting trajectory checkpoints based on performance. We will clarify this initialization in the revised manuscript.

Q2: Effect of Stage 1 Search Depth

A2: Increasing the search depth does not necessarily produce proportionally more transferable training prompts. Since each later adversarial prompt is searched against a trajectory-specific model that has already been updated using the preceding prompts, these prompts become increasingly dependent on the corresponding search trajectory and may not all provide equally transferable training signals for the final model. Meanwhile, the number of Stage 2 iterations and the erase batch size are kept fixed. Enlarging DadvD_{\mathrm{adv}} therefore reduces the expected number of optimization updates involving each prompt, including those that are more useful for the final model. Consequently, the additional trajectory-dependent prompts may dilute the optimization of the more transferable prompts, explaining why a greater search depth does not always yield better robustness.

Reviewer_v9KZOpenReview ↗
Rating
6
Clarity
3
Confidence
4
Originality
3
Quality
4
Significance
3
Read review
Summary

This paper proposes EntiRE, an end-to-end framework for robust concept erasure in text-to-image diffusion models, aiming to remove undesired concepts more reliably under adversarial attacks. The key idea is to formulate robust erasure as an out-of-distribution generalization problem and use invariant learning with total variation regularization to encourage uniform erasure across the continuous prompt space. Experiments on nudity, artistic style, and object erasure show that EntiRE improves robustness while preserving utility. The paper is overall well-organized.

Strengths and weaknesses

Strengths:

  1. The motivation is clear and well supported by the prompt space visualization.

  2. The OOD formulation is interesting, and using TV regularization for robust erasure is a novel idea with theoretical support.

  3. The experiments are extensive, covering multiple tasks, baselines, and red-teaming attacks.

Weaknesses:

  1. The transition from Eq. (12) to Eq. (13) could be explained more clearly. Eq. (12) applies the TV regularization to the overall concept erasure risk, while Eq. (13) applies it only to the erase risk. It would be helpful if the authors could further clarify why the retain loss does not depend on the prompt-space environment.

  2. The practical meaning of ξ∘ϵθ\xi \circ \epsilon_\theta in Eq. (9) is not fully clear to me. Since ξ\xi is implemented as a fixed scalar in the algorithm, the authors should explain what this composition operation does in implementation.

  3. The implementation of the adaptive TV coefficient needs more clarification. The paper states that the optimized model parameters are flattened and fed into an MLP to produce λ(Φ,Δ)\lambda(\Phi,\Delta). It would be useful to explain the memory cost of this operation.

Questions

Please refer to the weaknesses.

Limitations

yes

Paper formatting concerns

NA

Final justification

The authors have satisfactorily addressed all my concerns. I therefore raise my rating to 6.

1 comment

Thank you for your constructive feedback. We address the three questions below.

Q1: Transition from Eq. (12) to Eq. (13)

A1: Thank you for pointing out that this transition was insufficiently explained. In our formulation, the environment variable ee is defined only over the target-concept prompt space to characterize variations in erasure difficulty. In contrast, retain prompts are always sampled from the same fixed distribution DretainD_{\mathrm{retain}}, shared across all erasure environments. Therefore, the retain risk depends on the model parameters Φ\Phi, but not on ee or its corresponding auxiliary variable ξ=ω(e)\xi=\omega(e). Using the risk decomposition in Eq. (11), the gradient of the concept-erasure risk with respect to the dummy variable is the sum of the corresponding gradients of the erase and retain risks. Because the retain risk does not depend on the dummy variable, its gradient is zero. Therefore, only the erase risk contributes to this gradient.

Q2: Practical meaning of the composition in Eq. (9)

A2: Thank you for asking us to clarify how this operation is implemented in practice. In implementation, the composition ξ∘ϵθ(zt,c,t)\xi\circ\epsilon_\theta(z_t,c,t) in Eq. (9) is simply scalar multiplication. The scalar ξ\xi is broadcast over the entire noise-prediction tensor. Since ξ\xi is fixed at 11, this operation does not alter the forward computation or the predicted noise. Although ξ=1\xi=1 leaves the forward noise prediction unchanged, the gradient of the erase risk with respect to ξ\xi is used in the TV regularizer to penalize erase-risk variation with respect to the auxiliary head, thereby suppressing non-uniform erasure risk across prompt-space environments. We will clarify this implementation detail and practical interpretation in the revised manuscript.

Q3: Implementation of the adaptive TV coefficient

A3: Thank you for raising this implementation concern. We use a two-layer MLP with architecture D→16→1D\rightarrow16\rightarrow1, where DD is the dimension of the flattened parameter vector. The first layer contains 16D+1616D+16 parameters and the output layer contains 1717 parameters; therefore, the MLP has 16D+3316D+33 parameters in total.

We measured the memory cost under the two parameter-update settings used in our experiments. As shown below, the MLP contains 703.40M parameters for the cross-attention setting and 793.19M parameters for the non-cross-attention setting. In FP32, its theoretical weight sizes are 2,683.26 MiB and 3,025.76 MiB, respectively, closely matching the actual CUDA allocations. For the uncond setting, although 815.36M U-Net parameters are updated, only a selected subset comprising 49.57M parameters is flattened and fed into the MLP. We will correct the imprecise description that all optimized parameters are flattened and clarify this implementation detail in the revised manuscript.

SettingUpdated ParametersDDMLP ParametersTheoretical Weight SizeActual CUDA Memory
xattn43,962,56043,962,560703,400,993(703.40M)2,683.26 MiB2,684.00 MiB
uncond815,358,08449,574,080793,185,313(793.19M)3,025.76 MiB3,026.00 MiB

We further decomposed the additional memory introduced by parameter flattening and the MLP computation:

SettingFlatten SizeAllocated FlattenAdditional Forward PeakAdditional Backward Peak
xattn167.70 MiB168.00 MiB9.13 MiB2,860.13 MiB
uncond189.11 MiB190.00 MiB9.13 MiB3,224.13 MiB

Flattening requires only 168–190 MiB of persistent memory, while the main overhead comes from the D→16D\rightarrow16 layer and its gradients. Overall, the MLP adds 5.72–6.45 GiB of peak memory, which remains manageable on modern training GPUs. Moreover, the uncond results demonstrate that λ\lambda can be effectively estimated from a selected subset of model parameters, rather than requiring all optimized parameters as input. This provides a practical way to control memory consumption without compromising the effectiveness of the method. We will clarify these implementation details and report the measured memory overhead in the revised manuscript.

Comments on the paper

1 comment
Meta-review

At the initial stage the paper has received two supportive reviews, and one much more critical review which raised questions of novelty and generality/performance. The AC and reviewers have read the authors responses and there was good engagement in discussion. As a result, all of the reviewers raised their scores and there is unanimous recommendation to accept. The decision is therefore to accept the paper. The reviewer perspectives are summarised below:

v9KZ (6 / Strong Accept) - requested clarification on the TV coefficient and on equation 9. Suggests minor presentational improvements. These clarifications were provided and the reviewer raised their score to strong accept.

zPYh (6 / Strong Accept) - requested further discussion of the results of the sensitivity analysis, and on the initialisation of Stage 2 of the pipeline. The discussion was provided and the reviewer felt confident to raise their score from accept to strong accept.

QDTk (4 / Borderline Accept) - initially queried novelty vs. STEREO, which they considered a strong basis for the method. Clarification on the TV penalty was requested (as with v9KZ). The experimental comprehensiveness was queried as being limited to SD1.4 (e.g. FLUX was suggested) and the sample size queried. They requested discussion of fine tuning attacks for concept restoration. During discussion the reviewer upgraded from a firm reject to a borderline accept position. This upgraded reflects a change of view on the novelty of the work, and the inclusion of FLUX results which the authors promised to include in the paper Appendix.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.