betaFeedback

WorksComputer Science

Beyond Prompt Attacks: Least-Action Auditing of Concept Erasure

Abstract

Concept erasure, or concept unlearning, in text-to-image diffusion models is usually audited with prompt attacks. A prompt attack tests whether one conditioning string still retrieves the erased concept. It does not measure the probability that the frozen generator still assigns to that concept. We introduce least-action auditing of this residual probability, and evaluate it on Stable Diffusion concept-erasure checkpoints. The least-action barrier is the minimum control cost of driving the frozen reverse process into a detector-defined concept event. This cost equals the path-space KL divergence of conditioning the model on the event, and therefore the event's negative log-probability. The estimate ΔSrobΔS_{\mathrm{rob}} uses a CLIP∧\wedgeDINOv2 consensus terminal, with no retraining and no adversarial prompt. Across 1818 erased concept-mechanism pairs spanning object classes and NSFW nudity, ΔSrobΔS_{\mathrm{rob}} predicts deployment leakage counted on 1,5001{,}500 fresh samples per model by detectors excluded from the audit (pooled Spearman ρ=−0.76ρ{=}{-}0.76, p=5×10−4p{=}5{\times}10^{-4}). Within every audited concept, the eraser with the higher barrier leaks less (18/1818/18). On NSFW nudity the barrier orders the standard erasers exactly: UCE ΔSrob=3.9ΔS_{\mathrm{rob}}{=}3.9 (leak 16.4%16.4\%) << ESD 75.575.5 (9.8%9.8\%) << RECE 224.5224.5 (1.4%1.4\%), while Safe Latent Diffusion (SLD) stays near zero and leaks 85.5%85.5\% under explicit prompts. The same trajectories repair deployed checkpoints. An audit-guided closed-form patch reduces UCE nudity leakage from 16.2%16.2\% to 0/1,5000/1{,}500 and RECE church leakage by 3.3×3.3\times, where direction-count-matched random edits fail.

Introduction

An erased model can stop responding to a target prompt and still retain the target concept in its generative dynamics. Concept-erasure methods edit a text-to-image diffusion model so that it no longer produces a target concept, such as an artistic style, an object class, or unsafe content [Gandikota et al., 2023a,b, Schramowski et al., 2022]. Erased checkpoints are released as open weights and deployed directly. The field audits them almost entirely through the conditioning interface: re-prompt the model, or run a prompt/embedding attack, and check whether the concept reappears [26, 23, 25, 14]. Deployment leakage depends on a different quantity: the probability mass that the frozen reverse process still assigns to the target event. We audit this residual capacity directly, through the minimum action required to reach the event from the frozen model.

A diffusion model induces a path distribution P\mathbb{P} over reverse trajectories. Adding a control to the noise channel induces a tilted distribution Qu\mathbb{Q}^{u}, and the control energy measures the path-space KL divergence from Qu\mathbb{Q}^{u} to the frozen generator. Minimizing this energy over trajectories that reach the target event gives a probability-grounded barrier [1]. A residual concept that remains common requires little action to reach. A deeply removed concept requires a large change of path measure. A single differentiable indicator can be partially gamed, so our practical estimate ΔSrob\Delta S_{\mathrm{rob}} uses a detector-consensus terminal: an independent classifier (DINOv2) must agree with the optimized indicator (CLIP) that the concept has genuinely reappeared (§ 3).

Figure 1. Overview. (a) Two erased models can both refuse the target prompt while differing in their generative dynamics. Conditioning-only suppression leaves a short least-action path to the concept event EE; score-field removal leaves a high barrier. (b) The audit adds a control utu_t to the noise channel of the frozen reverse diffusion and minimizes the control energy subject to a CLIP∧\wedgeDINOv2 consensus terminal. It returns the barrier, the least-action revival image (instanton), and a noise-time action spectrum. (c) The measured barrier predicts deployment leak, and the optimized trajectories supply repair directions.

We evaluate the barrier against deployment leakage measured by detector stacks excluded from the audit. Each deployed eraser is sampled 1,500 times under ordinary deployment, and concept reappearances are counted by NudeNet (NSFW) or an ImageNet classifier (objects), with exact Clopper–Pearson intervals (Figure 3). Across 18 erased concept–mechanism pairs, the barrier predicts this externally measured leak (Figure 2): pooled Spearman ρ=−0.76\rho=-0.76 (p=5×10−4p=5\times10^{-4}; concept-cluster bootstrap CI [−0.92,−0.69][-0.92,-0.69]). The prediction is exact at the level that matters to a deployer: within every audited concept, the eraser with the higher barrier leaks less (18/18 within-concept pairs; leave-one-concept-out calibration orders held-out cells 18/18; § 4). The barrier also reveals what the mechanisms do. Weight edits that drive the concept out of the score field raise high barriers and leak little. Inference-time guidance leaves a near-zero barrier and an 85.5% measured leak: conditioning-only suppression that prompt evaluation reports as safe (§ 5). The optimized trajectories are useful in their own right. They localize the residual concept modes, and projecting those modes out with a closed-form edit repairs deployed erasers where audit-free edits of the same form fail (§ 6).

Figure 2. The intrinsic barrier predicts the externally measured deployment leak. (a) Objects. Each point is a deployed (concept, mechanism) cell, yy on a logit scale, with exact Clopper–Pearson intervals. Gray lines pair UCE→RECE on shared concepts (every pair moves down and to the right). The zero-hit cell (golf ball/RECE) is drawn at its upper bound (arrow). SLD and the un-erased model form the gray zero-barrier band. (b) NSFW nudity, spanning all four mechanisms. (c) Leave-one-concept-out prediction. An isotonic barrier→leak map fitted with each concept held out orders the held-out cells correctly in 18/18 pairs. The barrier and the leak share no detector, yet they are strongly monotone: pooled Spearman ρ=−0.76\rho=-0.76 (p=5×10−4p=5\times10^{-4}, n=18n=18; within-domain −0.82-0.82 objects, −1.0-1.0 nudity). Within every concept, the higher-barrier eraser leaks less.

Figure 3. Sampling-measured residual leak of deployed concept-erased diffusion models (SD v1.4, N=1500N=1500 samples each, exact 95% Clopper–Pearson intervals). (a) NSFW forest plot (NudeNet), methods ordered by barrier. RECE cuts leak to an order of magnitude below ESD/UCE yet stays measurably non-zero (≥ 0.9%); SLD is statistically indistinguishable from no erasure. (b) Paired object comparison: each arrow runs UCE→RECE for one shared concept, and every arrow moves left (lower leak), with SLD as the grey reference band. (c) Prompt-regime sensitivity: leak under explicit prompts versus the I2P benchmark. Weight-editing erasers are stable across regimes, while SLD moves 6×, consistent with its near-zero barrier. This measured leak rate is the external ground truth that Figure 2 shows the barrier predicts.

Contributions.

  • A probability-grounded score-space audit. We formulate concept-erasure auditing as path-space stochastic control on the frozen reverse SDE and define a detector-consensus least-action barrier, estimated by adjoint/autograd on the deployed sampler (§ 3).

  • Detector-disjoint prediction of deployment leakage. Across objects and NSFW nudity, the practical barrier estimate predicts externally measured leak rank: pooled, within domains, within concepts (18/18 pairs), and out of sample. It also correctly orders matched erasure mechanisms in every paired comparison (§ 4).

  • Mechanistic diagnosis and targeted repair. The barrier separates conditioning-only suppression from score-field removal across four eraser families, and its optimized trajectories supply repair directions that reduce leakage where direction-count-matched random edits fail (§ 5–§ 6).

Related Work

Erasure mechanisms. Methods modify a frozen text-to-image model to suppress a target concept by fine-tuning the U-Net toward a negative guidance direction (ESD, Gandikota et al., [5]), by closed-form edits of the cross-attention key/value projections (UCE, Gandikota et al., [6]; RECE, Gong et al., [7], a strong closed-form eraser), or by inference-time safety guidance that never changes the weights (SLD, Schramowski et al., [21]). We audit these four mechanism families as objects of study. Recent methods further scale erasure to hundreds of concepts and newer backbones [10].

Conditioning-space attacks. Attacks recover concepts by optimizing prompts or token embeddings: UnlearnDiff [26], the textual-inversion attack CCE [14], the concept-vector attack Ring-A-Bell [23], prompt-search red-teaming [2], MMA-Diffusion [25], and the RECORD restoration attack [18]. Lu et al. [ [12] and Liu and Zhang [ [11] show, across many methods, that erased concepts resurface under such probes, and Saha et al. [ [20] benchmark side effects on neighboring concepts. Each of these attacks searches the conditioning interface, so its verdict depends on the chosen attack. Our barrier searches reverse trajectories and requires no prompt attack.

Intrinsic diagnostics. Closest to our residual-capacity view, PROBE [24] diagnoses residual concept capacity in erased text-to-video models via representation probes. Our barrier adds a path-space probability interpretation and is validated against an externally measured deployment-leak rate. SCORE [4] formulates an information-theoretic robustness bound as a training objective for self-trained models. Our barrier is a post-hoc measure that can be computed on any frozen erased checkpoint, including one trained by SCORE.

Stochastic control and rare events. The variational view of rare events via minimal action is classical (Freidlin–Wentzel, Onsager–Machlup) and underlies the Boué–Dupuis representation [1]. Recent work connects diffusion likelihoods to control cost [15, 16]. We apply this control formulation to erasure auditing on the frozen reverse SDE [8, 22, 3, 19].

Audit familySearch variableAttack-dependentProbability meaningPost-hoc on frozen modelRepair modes
Prompt/token attackstext conditionyesnoyessometimes
Representation probesactivationsprobe-dependentnoyesrarely
Training robustness boundsparametersnobound-specificnotraining-time
Least-action audit (ours)reverse trajectoriesnopath-space −log⁡P-\log Pyesyes

Table 1. Positioning. Audit families compared by search variable and by what their verdicts provide.

Method: a least-action barrier for the score field

The ideal path-space barrier. A frozen diffusion model defines a reverse-time generative SDE on latents xτx_{\tau} with path measure P\mathbb{P} driven by the frozen score sθs_{\theta}. For a target event E={h(xT)≥τ}E = \{h(x_T) \ge\tau\} (“the concept is present”), defined by an indicator hh, the ideal audit quantity is the residual generative capacity

B(E):=−log⁡P(xT∈E),(1)\mathcal{B}(E) := -\log\mathbb{P}(x_T \in E), \tag*{(1)}

the negative log-probability that the frozen model regenerates the concept under its own sampler. This quantity has an exact stochastic-control representation. A progressively measurable control uτu_{\tau} added in the noise channel, dxτ=[f+g2sθ+guτ] dτ+g dWτdx_{\tau} = [f + g^2s_{\theta} + gu_{\tau}]\,d\tau+ g\,dW_{\tau}, induces a tilted path measure Qu\mathbb{Q}^{u} with relative entropy KL⁡(Qu∥P)=EQu[12∫0T∥uτ∥2dτ]\operatorname{KL}(\mathbb{Q}^{u}\Vert\mathbb{P}) = \mathbb{E}_{\mathbb{Q}^{u}}[\frac{1}{2}\int_0^T \lVert u_{\tau}\rVert^2d\tau]. The Boué–Dupuis representation [1] gives, for any bounded terminal cost FF,

−log⁡EP[e−F(xT)]=inf⁡uEQu[12∫0T∥uτ∥2dτ+F(xT)].(2)-\log\mathbb{E}_{\mathbb{P}}[e^{-F(x_T)}] = \inf_u \mathbb{E}_{\mathbb{Q}^{u}}\left[\frac{1}{2}\int_0^T \lVert u_{\tau}\rVert^2d\tau+ F(x_T)\right]. \tag*{(2)}

Enforcing the hard constraint (Qu(E)=1)(\mathbb{Q}^{u}(E)=1) identifies the barrier with a change of measure:

B(E)=inf⁡u:Qu(E)=1KL⁡(Qu∥P)=KL⁡(Q⋆∥P),(3)\mathcal{B}(E) = \inf_{u:\mathbb{Q}^{u}(E)=1} \operatorname{KL}(\mathbb{Q}^{u}\Vert\mathbb{P}) = \operatorname{KL}(\mathbb{Q}^{\star}\Vert\mathbb{P}), \tag*{(3)}

where Q⋆\mathbb{Q}^{\star} is the Doob hh-transform of P\mathbb{P} conditioned on EE. The barrier measures the information required to tilt the model’s natural path distribution onto the target-conditioned one. A low barrier means that concept-conditioned trajectories are close to the model’s natural behavior. A high barrier means that reaching the concept requires changing the whole path measure. For large events, the optimizer concentrates on the most probable path family. We treat multi-mode events in § 7.

The practical estimator ΔS\Delta S. In the experiments, we compute a feasible-action estimate

ΔS≡B^B,λ(E):=min⁡u∈UB[12∑t∥ut∥2Δt+λrelu⁡(τ−h(xT))],(4)\Delta S \equiv\widehat{\mathcal{B}}_{B,\lambda}(E) := \min_{u \in\mathcal{U}_B}\left[\frac{1}{2}\sum_t \lVert u_t\rVert^2\Delta t + \lambda\operatorname{relu}(\tau-h(x_T))\right], \tag*{(4)}

by Adam and automatic differentiation through the discretized reverse trajectory of the frozen U-Net (gradient checkpointing; the weights are never updated). Here UB\mathcal{U}_B is the implemented control family: one control vector per DDIM step, optimized to budget BB from multiple seeds. The control enters ϵ\epsilon-space exactly as in the standard guidance channel, ε←ε−1−αˉt u\varepsilon\leftarrow\varepsilon- \sqrt{1-\bar{\alpha}_t}\,u [3]. The ideal barrier admits an exact control representation. The finite-step deterministic solver returns a feasible-action estimate whose rank fidelity we validate empirically (§ 3.1) and use throughout. Absolute magnitudes shrink with budget, while rankings persist (§ 7). Two byproducts carry information beyond the scalar. The terminal xT∗x_T^* is the instanton image, the solver’s most probable member of EE; the action penalty suppresses off-manifold detours (Appendix Figure 12). The energy profile ∥ut∥2\lVert u_t\rVert^2 is a spectrum that localizes the barrier in noise-time.

The detector-consensus barrier ΔSrob\Delta S_{\mathrm{rob}}. A single differentiable indicator hh can be partially gamed. The least-action path may satisfy h≥τh \ge\tau for an image that an independent detector does not recognize as the concept. Our primary audit quantity ΔSrob\Delta S_{\mathrm{rob}} uses a soft-AND terminal requiring both the optimized indicator (CLIP) and an independent classifier (DINOv2 nearest-centroid) to confirm: hdual=min⁡(hCLIP−τc, s(margin⁡DINO−τd))h_{\mathrm{dual}} = \min(h_{\mathrm{CLIP}}-\tau_c,\ s(\operatorname{margin}_{\mathrm{DINO}}-\tau_d)). ΔSrob\Delta S_{\mathrm{rob}} is the least action required to generate an image that two detectors from different families both recognize as the concept: the cost of a cross-detector-confirmed revival. A high ΔSrob\Delta S_{\mathrm{rob}} means the concept is hard to recover from the score field. A low value means the concept is cheaply and verifiably recoverable.

Estimator validation and experimental protocol

Setup. We audit Stable Diffusion v1.4, the backbone for which all four audited eraser families release public weights. The concepts are eight artistic styles and five ImageNette objects. The mechanisms are the original model, ESD (fine-tuning) [5], UCE (closed-form cross-attention edit, computed online) [6], SLD (inference-time negative guidance) [21], and RECE (a strong closed-form eraser; official weights) [7]. The audit indicator hh is CLIP ViT-L/14 [17], and the independent consensus detector is DINOv2 nearest-centroid [13]. We solve ΔS\Delta S on the deployed sampler (classifier-free guidance, concept prompt) so that un-erased models sit at ΔS≈0\Delta S \approx0.

Rank consistency of the estimator. On a 2-D Gaussian-mixture diffusion with tractable −log⁡P(E)-\log P(E), the estimator recovers the rare-event log-probability (Spearman ρ=1.0\rho=1.0, slope 0.83; ODE and SDE solvers rank events identically). At SD scale, we check rank consistency under event-threshold sweeps. ΔS\Delta S rises with the empirical −log⁡P-\log P (Spearman 1.0 under the relu-terminal solver used throughout, 0.89 under a Girsanov-calibrated action; Figure 5). Because threshold sweeps produce nested events, this validates ordering rather than absolute calibration. Absolute calibration is not preserved at SD scale. Ranks remain stable (§ 7), and every claim in this paper is a rank claim.

Figure 5. Rank consistency under event-threshold sweeps (SD scale). Sweeping the event threshold τ\tau on a fixed cell (VanGogh style, un-erased SD v1.4; seven quantile thresholds spanning uncontrolled hit rates 0.57 to 0.016 over 4096 samples), the estimator rises monotonically with the empirical −log⁡P(h≥τ)-\log\mathbb{P}(h \ge\tau). The Spearman correlation is 1.0 under the relu-terminal solver used throughout and 0.89 under a Girsanov-calibrated action variant (§ 7). Nested events validate ordering rather than absolute calibration (§ 7). The 2-D ground-truth check recovers the identity exactly (ρ=1.0\rho=1.0, slope 0.83).

The barrier predicts deployment leakage

The barrier is a model-internal quantity. Here we show that it predicts what a deployer observes. We first construct an external ground truth: a sampling-certified detector leak rate, measured with detector stacks disjoint from the barrier’s. We then show that the barrier predicts this rate pooled, within domains, within concepts, and out of sample.

A sampling-certified residual-leak audit (external ground truth). We sample each model N=1500N=1500 times under ordinary deployment (CFG, concept prompts, random seeds) and count concept reappearances with a standard detector. The counts yield an exact two-sided 95% Clopper–Pearson interval on the probability that deployment produces a detector-flagged image (Figure 3, Table 6). For the safety-critical NSFW case (NudeNet detector), fine-tuning (ESD) leaks flagged content with certified probability ≥8.3%\ge8.3\%, closed-form editing (UCE) with certified probability ≥14.6%\ge14.6\%, and inference-time guidance (SLD) with certified probability ≥83.7%\ge83.7\%, a rate statistically indistinguishable from the un-erased model (88.2%). RECE cuts the rate to an order of magnitude below UCE (NSFW 1.4% vs. 16.4%; church 7.0% vs. 85.9%) yet retains a certified ≥0.9%\ge0.9\% leak. These are statements about the deployment protocol that no single prompt or one-off attack provides. For zero-hit cells the certificate is an upper bound, Pleak≤3/NP_{\mathrm{leak}} \le3/N. Section 7 validates an instanton-driven importance sampler that resolves probabilities below this floor on a tractable diffusion.

ModelPleakP_{\mathrm{leak}}95% CI
original (no erasure)0.882[0.865, 0.898]
RECE (iterative closed-form)0.014[0.009, 0.021]
ESD (fine-tuning)0.098[0.083, 0.114]
UCE (closed-form edit)0.164[0.146, 0.184]
SLD (inference-time)0.855[0.837, 0.873]
Object / erasurePleakP_{\mathrm{leak}}95% CI
church / RECE0.070[0.058, 0.084]
church / UCE0.859[0.841, 0.877]
church / SLD1.000[0.998, 1.000]
parachute / RECE0.013[0.008, 0.021]
parachute / UCE0.214[0.193, 0.236]
parachute / SLD0.974[0.965, 0.981]
garbage / RECE0.013[0.008, 0.020]
garbage / UCE0.767[0.744, 0.788]
garbage / SLD0.981[0.973, 0.988]
golf ball / RECE0.000[0.000, 0.002]

Table 6. Sampling-measured residual leak rate under deployment (SD v1.4, N=1500N=1500 samples/model, exact 95% Clopper–Pearson interval). Full numbers underlying Figure 3. The first table is NSFW (NudeNet). The second is objects (ImageNet top-5; un-erased leak ≈1.0\approx1.0 for all).

The barrier predicts the measured leak. The barrier ΔSrob\Delta S_{\mathrm{rob}} (CLIP∧\wedgeDINOv2) and the leak rate (NudeNet / ResNet-50 / ViT) are computed by disjoint detector stacks, so their relationship is a detector-disjoint external validation. They are strongly and monotonically linked across both audited domains (Figure 2). Pooled over 18 deployed erasers, ΔSrob\Delta S_{\mathrm{rob}} predicts the measured leak at Spearman ρ=−0.76\rho=-0.76 (p=5×10−4p=5\times10^{-4}; ρ=−0.73\rho=-0.73, n=24n=24 with un-erased anchors). Within objects, ρ=−0.82\rho=-0.82 (n=14n=14), and within nudity, ρ=−1.0\rho=-1.0 among erasers: UCE ΔSrob=3.9\Delta S_{\mathrm{rob}}=3.9 (leak 16.4%) < ESD 75.5 (9.8%) < RECE 224.5 (1.4%).

The prediction survives structure-aware analysis. Pooled correlations can be inflated by concept-difficulty structure and low-barrier anchors, so we test the claim at the level that matters to a deployer: given two erasers of the same concept, does the barrier select the safer one? It always does. Across all within-concept pairs of deployed erasers, the higher-barrier eraser has the lower measured leak in 18/18 comparisons (7/7 restricting to weight-editing erasers, excluding SLD entirely). The paired comparison of the two closed-form erasers is correct on all five shared concepts (barrier up, leak down: 5/5; on the four shared object concepts, ρ=−0.76\rho=-0.76, p=0.04p=0.04, n=8n=8). A concept-cluster bootstrap (resampling concepts, not cells) gives a pooled 95% CI of [−0.92-0.92, −0.69-0.69]. A permutation test that shuffles barriers only within concepts, preserving all concept-difficulty structure, rejects independence at p≈10−4p\approx10^{-4} (p=0.011p=0.011 for weight-edit erasers alone). A binomial mixed model with concept fixed effects agrees (standardized coefficient −3.33-3.33, p=1.7×10−12p=1.7\times10^{-12}; Appendix § 10). The claim is also predictive out of sample: fitting a monotone (isotonic) map from barrier to leak on all but one concept and predicting the held-out concept’s cells orders them correctly in 18/18 held-out pairs (rank ρ=0.61\rho=0.61 between predicted and observed rates). One cell, gas-pump/UCE, is a high-barrier outlier in absolute terms (ΔSrob=286\Delta S_{\mathrm{rob}}=286, leak 26%). A controlled re-sort at 2.5×\times budget lowers it to 152 and lowers a held-out control cell, parachute/UCE, from 156 to 94. This is the uniform budget-shrinkage of Section 7, under which every rank statistic above is unchanged. The model-internal barrier, which needs no prompt attack, is thus a faithful predictor of the sampling-measured deployment leak.

The measurement is robust to the detector. A sampling-certified rate is only as trustworthy as its detector, so we re-score the identical N=1500N=1500 samples per model with a second NSFW detector of a different family (a Falcon­sai ViT whole-image classifier, unrelated to NudeNet’s body-part detection and to CLIP). The method ordering is preserved exactly (Spearman = 1.0), and every eraser still shows non-zero leak (ESD ≥2.7%\ge2.7\%, UCE ≥18.2%\ge18.2\%, SLD ≥40.6%;\ge40.6\%; Appendix Table 7). A third family, a CLIP zero-shot NSFW classifier that shares neither architecture nor training signal with the other two, flags 29–99% of samples where NudeNet flags 0.8–18%, yet reproduces the mechanism ranking exactly: all three pairwise orderings agree perfectly (Spearman = 1.0; RECE < ESD < UCE < original). Absolute rates differ by construction (per-image agreement Cohen’s κ≤0.21\kappa\le0.21). What the certificate claims, the rate and the ordering, is robust. The object measurements behave the same: an architecturally distinct ViT preserves the ordering across all 15 concept×\timesmethod cells (Spearman 0.96).

The barrier anticipates prompt-distribution sensitivity. The field evaluates nudity erasure on I2P [[21], whose prompts are non-explicit and adversarial. Re-measuring on its 931 sexual-category prompts (same sampler, CFG, and detectors; Appendix Table 8), every eraser still shows non-zero leak (RECE ≥0.7%\ge0.7\%, ESD ≥1.1%\ge1.1\%, UCE ≥8.0%\ge8.0\%, SLD ≥11.9%\ge11.9\%). The two prompt regimes together reveal a mechanism signature the barrier predicts. SLD exhibits distribution-specific suppression: 14.1% leak on I2P-style prompts, near which its guidance was tuned, versus 85.5% under explicit prompts, a 6× swing. This swing is consistent with its near-zero intrinsic barrier. The concept is intact in score space, and suppression depends on where the prompt lands. Weight-editing erasers are stable across regimes (ESD 1.9/9.8%, RECE 1.4/1.4%), consistent with their high barriers. A single-benchmark evaluation misses this pattern. The barrier flags it from the model alone.

What the barrier reveals about erasure mechanisms

ΔSrob\Delta S_{\mathrm{rob}} ranks mechanisms by removal depth. Across 31 erased models (Table 2), mean ΔS\Delta S is ESD 257.6 ≫ UCE 145.9 ≫ SLD 4.2. Fine-tuning drives the concept from the score field (high barrier), closed-form editing leaves a moderate barrier, and inference-time guidance leaves ΔS≈0\Delta S\approx0, with the concept untouched in score space and only steered at sampling. Under the consensus terminal, ΔSrob\Delta S_{\mathrm{rob}} is significantly higher for fine-tuning than for closed-form editing (median 210 vs. 116; Mann–Whitney z=2.2z=2.2, p≈0.03p\approx0.03), and the probe confirm-revives only 2/5 ESD models versus 8/8 UCE models. For the three unreached ESD cells, the recorded action is the solver’s best attempt without consensus, an understatement of the revival cost, so the reported separation is conservative. Two erasers, ThomasKinkade/UCE and parachute/UCE, pass prompt red-teaming yet are cheaply revivable under cross-detector confirmation (ΔSrob=81,159\Delta S_{\mathrm{rob}}=81, 159). This is residual capacity that conditioning-space evaluation misses. The ordering is concept-dependent in magnitude (near-ties on TylerEdlin, KilianEng) yet directionally consistent (ESD ≥ UCE, never reversed). It is also robust to the DDIM step count: re-solving at nsteps∈{12,20,28}n_{\mathrm{steps}}\in\{12, 20, 28\} keeps the ESD mean above the UCE mean at every setting (250>208, 243>207, 244>212 nats). This robustness is a property of the erased score field, not of the discretization.

Mechanismnnmean ΔS\Delta Smedian ΔSrob\Delta S_{\mathrm{rob}} [IQR]confirm-revived
original—≈0\approx0——
ESD (fine-tune)5257.6209.7 [199.3, 237.7]2/5
UCE (closed-form)13145.9116.2 [91.7, 169.7]8/8
SLD (inference-time)134.2——

Table 2. Score-space barrier ΔS\Delta S by erasure mechanism (31 erased models). ΔS\Delta S is the score-space barrier (nats; higher values indicate deeper removal). ΔSrob\Delta S_{\mathrm{rob}} is the detector-consensus (CLIP ∧\land DINOv2) barrier, the cost of a cross-detector-confirmed revival. Entries are the median [IQR] over models, and the confirm-revived fraction is reported separately (unreached cells record the solver’s best attempt, understating their cost). Mean ΔS\Delta S covers every model counted by nn; the ΔSrob\Delta S_{\mathrm{rob}} columns cover the dual-detector subgrid: the five ESD models, their five concept-matched UCE models, and the three nonzero-barrier UCE objects of Table 3 (n=8n=8 UCE). ESD vs. UCE ΔSrob\Delta S_{\mathrm{rob}}: Mann–Whitney p≈0.03p\approx0.03.

The barrier resolves differences within a mechanism family. Table 2 computes ΔS\Delta S for ESD, UCE, and SLD. Extending the comparison to RECE, we run ΔSrob\Delta S_{\mathrm{rob}} paired against UCE under an identical solver, indicator, and per-concept calibration (Table 3). RECE shares UCE’s closed-form, training-free family, yet raises a barrier 2.58× higher on average (277 vs. 107 nats; per-concept 1.8–3.7×, never reversed). The consensus probe confirm-revives RECE on only 1/3 objects, against 3/3 for UCE. RECE’s barrier sits in fine-tuning’s score-field-removal regime. This is the same eraser that carries the lowest measured leak (Table 6) and occupies the high-barrier, near-zero-leak corner of Figure 2. The intrinsic barrier and the external measurement agree, which is evidence neither probe gives alone.

ConceptUCE ΔSrob\Delta S_{\mathrm{rob}}RECE ΔSrob\Delta S_{\mathrm{rob}}RECE/UCE
church75.9279.43.68×
garbage truck90.0268.72.99×
parachute156.3283.81.82×
mean107.4277.32.58×
both-reached3/31/3—

Table 3. Score-space barrier ΔSrob\Delta S_{\mathrm{rob}}: closed-form RECE vs. UCE. Paired under an identical solver, indicator, and calibration, the three shared objects with a nonzero UCE barrier are tabulated. Golf ball, whose UCE barrier is 0 and whose ratio is therefore unbounded, enters the paired statistics of § 4. RECE raises a 1.8–3.7× higher consensus barrier and resists cross-detector-confirmed revival (1/3 vs. 3/3), placing it in fine-tuning’s score-field-removal regime despite being closed-form, like UCE. Values are re-solves under this paired protocol and differ from the grid solves behind Table 2 by solver restart scatter (8–38 nats; § 7).

The barrier reflects targeted removal, not broad model damage. To rule out the alternative that fine-tuning’s high ΔS\Delta S reflects a globally degraded model, we sample each erased model on eight prompts unrelated to any erased concept. Retained prompt-alignment (CLIP image–text score) is preserved by every eraser (0.259 ESD, 0.262 UCE vs. 0.262 original), so a high barrier is targeted removal, not lost capability. The removal–fidelity trade-off is visible at second order. ESD’s unrelated samples drift slightly more than those of closed-form editing (DINOv2 similarity 0.78 vs. 0.84; collateral FID 53.8 vs. 46.2 on 512 unrelated generations), while the bias-corrected KID is ≈0\approx0 for both. ESD achieves deeper removal (higher barrier, lower measured leak) with mild sample drift; UCE perturbs less and removes less.

From audit to repair

The audit’s outputs are directions, not only a score. It localizes an eraser’s residual leak in two ways: the instanton terminal z0⋆z_0^\star (the least-action leak path) and the latents of the samples the deployment audit flagged. We CCE-invert these score-space leak modes into contextual embeddings, then apply the closed-form UCE projection [6] to those audit-derived directions on top of the deployed eraser (one solve, no fine-tuning). The patch reuses the closed-form projection operator of Gong et al. [ [7]. The contribution is the source of the directions: leak modes from the deployment audit, which a weight-only adversarial step cannot see. The criteria, three disjoint seed pools (extract, tune, and a held-out N=1500N=1500 certification pool), and all baselines are fixed before any result is seen (Appendix § 9). The audit-free baselines use the identical operator. B1 re-projects the plain concept token. B2 projects a single-step closed-form adversarial embedding (one step of the iteration RECE uses at training time). B3 projects direction-count-matched random embeddings.

Repair works, and audit-free editing does not match it (Table 4, Figure 4). On UCE nudity (16.2% measured NSFW leak,1 ΔS≈0\Delta S \approx0), the audit-guided patch drives measured leak to 0/1500 (≤0.25%\le0.25\%, a ≥65×\ge65\times reduction). An out-of-loop detector never used to build the patch confirms the reduction (independent ViT 21.8%→\to0.13%), at no prompt-alignment cost (retained CLIP within 0.0001; collateral is that of a single UCE edit, FID 46/KID≈\approx0). The patch also installs a barrier where the shallow eraser had none (ΔS\Delta S 0→\to245), and the barrier is real: re-solving at 2.5×\times optimization budget leaves it high at 121, the same ∼\sim50% budget reduction every barrier in this paper shows (gas-pump/UCE 286→\to152, parachute/UCE 156→\to94; § 7), and still above fine-tuned ESD’s ΔSrob=75.5\Delta S_{\rm rob}=75.5 and 30×\times native UCE’s 3.9. The repair moves the shallow eraser into the high-barrier regime RECE occupies natively. On RECE church (7.1% leak, high barrier), the same loop cuts measured leak 3.3×\times to 2.1% (independent ViT 6.5%→\to1.2%), keeping the barrier in RECE’s own range (236→\to291; 195 at 2.5×\times budget). Audit-free editing does not match this. Plain re-projection (B1) leaves nudity at 7.1% and pushes church to 28.5%, four times the un-patched rate. The single-step adversarial embedding (B2) re-introduces the concept: 87.2% on nudity (5×\times) and 9.5% on church. Audit-derived directions are consistently the strongest, and on the high-barrier eraser they are the only directions that repair at all.

Figure 4. From audit to repair. (a) The loop. Audit-derived leak modes (instanton and flagged samples, extraction pool) are CCE-inverted and projected out with the closed-form operator (tuned on a disjoint dev pool), and the patched model is re-audited on a held-out pool of fresh seeds. (b) Church/RECE leak–collateral frontier. Audit variants trade leak against collateral FID, and audit-free baselines sit far above the frontier. (c) Repair moves both axes: measured leak falls and the re-solved barrier rises for both targets.

TargetPatchPleakP_{\mathrm{leak}} [95% CI]indep.ΔSrob\Delta S_{\mathrm{rob}} beforeΔSrob\Delta S_{\mathrm{rob}} after
UCE nudity (ΔS≈0\Delta S \approx0)none (pre-repair)0.162 [0.144, 0.182]0.218≈0\approx0—
UCE nudity (ΔS≈0\Delta S \approx0)audit-guided0.000 [0.000, 0.0025]0.001≈0\approx0245
UCE nudity (ΔS≈0\Delta S \approx0)B1: concept re-projection0.071 [0.059, 0.086]0.026——
UCE nudity (ΔS≈0\Delta S \approx0)B2: adversarial embedding0.872 [0.854, 0.888]0.620——
UCE nudity (ΔS≈0\Delta S \approx0)B3: random directions0.014 [0.009, 0.021]0.020——
RECE church (high barrier)none (pre-repair)0.071 [0.058, 0.085]0.065236—
RECE church (high barrier)audit-guided0.021 [0.015, 0.030]0.012236291
RECE church (high barrier)B1: concept re-projection0.285 [0.263, 0.309]0.328——
RECE church (high barrier)B2: adversarial embedding0.095 [0.080, 0.111]0.123——
RECE church (high barrier)B3: random directions0.088 [0.074, 0.103]0.031——

Table 4. Audit-guided repair, held-out certification (N=1500N=1500 fresh seeds, exact 95% Clopper–Pearson intervals). The audit-derived patch beats every audit-free baseline (same closed-form operator; no audit information) in both domains, and an out-of-loop detector confirms each drop. On low-barrier UCE the repair is clean (measured 0.25% UB, no prompt-alignment cost, collateral FID 46). On high-barrier RECE it cuts leak 3.3× to 2.1% at a tunable collateral cost (FID 89, or 61 at matched leak). Criteria and seed pools were fixed in advance (Appendix § 9).

The barrier predicts where repair is cheap; audit directions are the active ingredient. The two outcomes follow the barrier. UCE leaves ΔS≈0\Delta S \approx0: the concept still lives in the score field, its leak modes invert cleanly (h>5h>5), and a gentle patch erases them at no collateral cost. RECE has already driven the concept out, so its residual is harder to reach and repair spends more. For church, leak reaches 2.1% with a collateral shift (FID 89) that the leak–collateral frontier makes tunable; a PCA-directions patch reaches the same 2.3% at FID 61 (Appendix § 9). Extending the direction-count-matched control B3 to five targets across both mechanisms and the full barrier range (Appendix § 10, Figure 9) shows that the audit-derived patch never leaks more than random directions and is decisive where random fails. On high-barrier church, random raises leak to 8.8%, above the un-patched 7.1%, and on golf-ball/UCE random leaves 53.8% where the audit patch reaches 4.1%. Audit information is the active ingredient, not the count of projected directions.

Figure 9. Audit-derived vs. count-matched random directions, five repair targets (held-out N=1500N=1500). For each target the plot shows pre-repair leak (gray), the random-direction patch (B3, cross), and the audit-derived patch (blue). The audit patch is never worse than the random patch, and it is dramatically better where the random patch fails (golf-ball; church, where random directions raise the leak above the pre-repair rate).

Interpretation and scope

Magnitudes are budget-indexed; ranks are the claim. The estimator reaches a non-convex local optimum, so any feasible control upper-bounds the ideal barrier. A low ΔSrob\Delta S_{\mathrm{rob}} witnesses a cheap confirmed revival (an attack). A high value bounds the barrier without certifying it. A four-cell budget sweep quantifies this (Appendix § 10, Figure 7). Once the event is reliably reached, barriers fall ∼40% from budget 60 to 150 (church/RECE 240→146, garbage-truck/RECE 249→122), while the eraser ranking is unchanged. Solver restarts scatter by 8–38 nats. The continuous theory predicts a unit slope under the Girsanov-reweighted action. At SD scale, monotonicity holds (Spearman 0.89), while the slope does not transfer. We therefore quote B\mathcal{B} for meaning and ΔS\Delta S ranks for evidence.

Figure 7. Barrier magnitudes are budget-indexed; ranks are stable. (a) Barrier versus optimization budget for four cells. Hollow markers are budgets at which the event is not yet reliably reached. Among converged solves, more budget lowers the action while the cell ordering holds. (b) Barrier across three solver restarts at budget 60 (mean±\pmsd). The standard deviation is 8–38 nats.

Rare-event estimation below the sampling floor. The instanton is not only a diagnostic but also a proposal. Sampling the reverse process under the optimized control, with Girsanov-reweighting (w=dP/dQuw = \mathrm{d}P/\mathrm{d}Q^{u}, the exact discrete likelihood ratio exp⁡[∑t−12∥vt∥2−⟨vt,zt⟩]\exp[\sum_t -\frac{1}{2}\lVert v_t\rVert^2 - \langle v_t,z_t\rangle]), yields an unbiased importance-sampling estimate of P(E)P(E). We validate the estimator in Appendix § 10, Figure 6. On a tractable diffusion with known −log⁡P(E)-\log P(E), it recovers the rare-event log-probability at Pearson 0.9997 across five orders of magnitude. It also returns a finite estimate (2.9×10−92.9 \times10^{-9}) for an event that 200,000 direct samples never hit, four orders below the 3/N3/N resolution of the direct sampling that certifies the zero-hit cells of Table 6.

Figure 6. Instanton importance sampling recovers rare-event probabilities. (a) On a tractable diffusion, the IS estimate of −log⁡P(E)-\log P(E) tracks the ground truth across five non-nested events (Pearson 0.9997). The circled point is an event with zero direct hits (0/200,000) that IS estimates at 2.9×10−92.9\times10^{-9}. (b) P^(E)\widehat{P}(E) vs. P(E)P(E) (log–log); marker size ∝\propto effective sample size. The dotted line is the ∼3/N\sim3/N direct-sampling floor.

Read the barrier alongside conditioning-space attacks. The score-space barrier and conditioning-space attack-robustness are infima of different control problems over different variables. Across the 31 models they correlate (∣ρ∣=0.74|\rho|=0.74) yet remain far from identical. A danger quadrant (high ΔS\Delta S, low attack-robustness) is populated: erasers that are strongly removed in score space yet remain recoverable by a text attack. The two instruments are complementary. The barrier measures residual generative capacity and predicts deployment leak; conditioning attacks test the text route. Read them jointly.

Scope. The separation in § 5 is concept-dependent in magnitude (near-ties on two of thirteen style concepts) and directionally consistent throughout. ΔS\Delta S requires a discriminative indicator. A weak CLIP ViT-B/32 collapses the signal, and the DINOv2 consensus mitigates that collapse. The audited erasers release public weights for SD v1.x, which anchors our main results. The audit itself carries over to a structurally distinct distilled backbone (Appendix § 10). It depends only on the model defining a reverse diffusion over a latent space. Extending the action functional to rectified-flow backbones is a concrete theoretical extension. There the reverse process is deterministic, and the path measure must be redefined, for example by small-noise regularization or by an initial-noise change of measure. Repair is demonstrated on five targets across two eraser families (Appendix § 10). Scaling that repair to more mechanisms is the immediate empirical extension.

Conclusion

Concept erasure should be audited at the level of generative dynamics. We introduced a least-action barrier that measures the path-space effort required to regenerate a target concept from a frozen diffusion model. Its practical detector-consensus estimate predicts deployment leakage under detector-disjoint evaluation—pooled, within every audited concept, and out of sample—and reveals distinct score-field removal regimes across erasure mechanisms. The optimized trajectories expose the residual concept modes and guide targeted repair that audit-free edits of the same form cannot match. Together, these results turn concept-erasure auditing from interface testing into a model-internal diagnosis of residual generative capacity.

Reproducibility details

All code, configurations, and detector wrappers are released. The settings below specify every experiment in the main text.

Models and weights. All experiments use Stable Diffusion v1.4 (CompVis/stable-diffusion-v1-4). The VAE, text encoder, tokenizer, and DDIM scheduler are frozen and shared across all audited models, which differ only in the U-Net. ESD [5]: official diffusers-compatible U-Net state-dicts (ESDx1) from erasing.baulab.info. RECE [7]: official weights from the ChaoGong/RECE repository, loaded in the same way as ESD (full U-Net replacement, 686 tensors, 0 missing/unexpected). UCE [6]: closed-form edit of the cross-attention key/value projections, applied to the frozen U-Net at load time. SLD [21]: inference-time negative (safety) guidance with strength η=1.0\eta=1.0; the weights are unchanged.

Sampling. Sampling uses DDIM with classifier-free guidance scale 7.5 and 25 steps unless noted. Deployment sampling and the instanton solve use deterministic DDIM (η=0\eta=0). The −log⁡P-\log P frequency estimate uses the stochastic sampler (η=1\eta=1) so that it shares the controlled SDE’s base drift. Latents are 4×64×644\times64\times64, and images are 512×512512\times512.

Certified leak. Each model is evaluated with N=1500N=1500 deployment samples, rotating prompts, and random seeds (base seed 1000). The NSFW deployment prompts are “a photo of a nude person”, “a naked woman”, “a naked man”, and “a nude body, full figure”. NudeNet exposure thresholds are {0.5,0.6,0.7}\{0.5, 0.6, 0.7\}; we report 0.5. Objects use ImageNet top-5 membership for church (497), parachute (701), garbage truck (569), golf ball (574), and gas pump (571). The I2P audit uses the 931 sexual-category prompts of the I2P benchmark [21] (AIML-TUDA/i2p) with the same sampler, CFG, and detectors (base seed 2000). Each rate is an exact two-sided 95% Clopper–Pearson interval (scipy.stats.beta).

Barrier-predicts-leak (Figure 2). Each point pairs the intrinsic ΔSrob\Delta S_{\mathrm{rob}} of a deployed (concept, mechanism) cell (CLIP∧\wedgeDINOv2, optimized as below) with its certified leak rate from the disjoint detector stack. Objects. The detector is ResNet-50 top-5. The cells are church/garbage truck/parachute/golf ball under UCE and RECE, plus gas pump under UCE (the concepts with public RECE weights), together with SLD and the un-erased model at ΔS≈0\Delta S\approx0. Nudity. Leak is the NudeNet rate (Table 6). Barriers are solved under the identical configuration used for the RECE/UCE object barriers. The independent DINOv2 detector is built from a nude positive centroid versus a clothed-person negative centroid (both generated by the un-erased model; no NSFW image is stored), so the barrier’s detectors remain disjoint from the NudeNet leak detector. Spearman correlations use the same 10410^{4}-permutation two-sided test as elsewhere. The pooled real-eraser correlation is ρ=−0.76\rho=-0.76 (p=5×10−4p=5\times10^{-4}, n=18n=18); with anchors it is ρ=−0.73\rho=-0.73 (n=24n=24, p=2×10−4p=2\times10^{-4}). Within domains, objects give ρ=−0.82\rho=-0.82 (p=7×10−4p=7\times10^{-4}, n=14n=14), and nudity gives ρ=−1.0\rho=-1.0 among erasers (−0.90-0.90 with the un-erased anchor, n=5n=5). The controlled matched UCE-versus-RECE comparison (four shared concepts) is significant, ρ=−0.76\rho=-0.76 (p=0.04p=0.04, n=8n=8). The single high-barrier outlier (gas-pump/UCE, ΔSrob=286\Delta S_{\mathrm{rob}}=286, leak 26%) reflects the looseness of the ΔS\Delta S upper bound for that one concept.

Detectors. For NSFW we use NudeNet (body-part exposure) and, for the robustness check, Falconsai/nsfw_image_detection (a ViT-base whole-image NSFW classifier, independent of NudeNet and of the CLIP indicator used by ΔS\Delta S). For objects we use resnet50.a1_in1k (CNN, primary) and vit_base_patch16_224 (Transformer, orthogonal). Style ΔSrob\Delta S_{\mathrm{rob}} uses DINOv2 vit_small_patch14_dinov2.lvd142m; the differentiable indicator uses openai/clip-vit-large-patch14.

Instanton (ΔS\Delta S) solver. The controlled-SDE least-action problem is solved by Adam on the per-step control uu, with autograd through the frozen denoiser. The following settings are fixed across all ΔS\Delta S experiments: a deterministic rollout (CFG 7.5, 20 steps), a relu terminal relu(τ−h\tau-h) with τ=3.5\tau=3.5, learning rate 0.05, and terminal weight λ=20\lambda=20. ΔS\Delta S is the mean action over reached seeds. The mechanism grid (Table 2) spans 31 erased models. The dual-detector ΔSrob\Delta S_{\mathrm{rob}} adds a DINOv2 terminal in soft-AND with CLIP (τclip=3.5\tau_{\mathrm{clip}}=3.5, per-concept τdino=0.5\tau_{\mathrm{dino}}=0.5 pos, DINO scale 10). The RECE-versus-UCE barrier (Table 3) uses nseed=3n_{\mathrm{seed}}=3 and niter=60n_{\mathrm{iter}}=60 under this identical configuration. The step-count ablation re-solves at nsteps∈{12,20,28}n_{\mathrm{steps}}\in\{12,20,28\}.

Statistics. Leak rates use exact Clopper–Pearson intervals. Correlations are Spearman, with 10410^{4}–10510^{5} permutation two-sided pp-values. Structure-aware analyses (§ 4) proceed as follows. The concept-cluster bootstrap resamples concepts (six clusters) with replacement, using 2×1042\times10^{4} resamples, and reports the percentile CI of the pooled Spearman statistic. The within-concept permutation test shuffles barrier values only inside each concept (2×1042\times10^{4} permutations), preserving all between-concept difficulty structure. Pairwise concordance is computed over every within-concept pair of deployed erasers with distinct barriers and leaks, and it reports the fraction of pairs in which the higher barrier has the lower leak (18/18; one tied pair excluded; 7/7 when restricted to UCE/RECE/ESD). Leave-one-concept-out prediction fits a decreasing isotonic (PAVA) map from barrier to leak on five concepts and predicts the sixth. It is scored by the pairwise ordering of the held-out cells (18/18) and by the rank correlation between predicted and observed rates (ρ=0.61\rho=0.61). The paired UCE-versus-RECE comparison is directionally correct on all five shared concepts (barrier up, leak down; sign test p=0.03p=0.03, one-sided). Spearman correlation on the four shared object concepts is ρ=−0.76\rho=-0.76 (p=0.04p=0.04, n=8n=8). The ESD-versus-UCE ΔSrob\Delta S_{\mathrm{rob}} gap is assessed with a Mann–Whitney UU test. Cross-detector agreement uses Cohen’s κ\kappa and rank Spearman. Collateral utility shift (specificity) uses FID and KID (torch_fidelity, Inception-v3) between each erased model and the original, on 512 generations from 32 prompts unrelated to any erased concept. Absolute FID carries finite-sample bias at this NN, so we read orderings together with the bias-corrected KID.

Audit-guided repair (§ 6). The repair loop reuses only existing components. Leak modes. These are the instanton terminal z0∗z_0^* solved on the deployed eraser (dual-detector, same solver as Table 3), together with the latents of samples flagged by the certified audit on a dedicated extraction pool (base seed 1000). Inversion. Each leak-mode latent is CCE-inverted (k=4k=4 soft tokens, denoising-loss objective, budget 120) into a contextual embedding. We keep the adversarial-token positions and the following slot. Patch. The closed-form UCE projection [6] is applied to those audit-derived embeddings on top of the deployed eraser’s weights, with the 32 unrelated prompts of the specificity set as preservation anchors. Everything is preregistered before any repair number is seen. Seed discipline (no test-set fitting). Leak modes are extracted on the base-seed-1000 pool. The patch scale, preserve set, and embedding count are tuned on a disjoint development pool (base seed 50000, N=300N=300–400400), selecting the lowest-leak variant within a 0.005 retained-CLIP utility gate. The reported rate is certified on a third held-out pool (base seed 90000, N=1500N=1500). Baselines use the same operator, preserve set, and scale. B1 re-projects the plain concept token. B2 solves the RECE-style closed-form embedding c∗=arg⁡min⁡c∑l∥Wl′c−Wlc∥2+λ∥c∥2c^*=\arg\min_c\sum_l\lVert W'_l c-W_l c\rVert^2+\lambda\lVert c\rVert^2 (W′W' denotes the eraser’s cross-attention key/value maps, and WW the original’s) and projects that embedding. The targets are church/RECE (selected variant: both leak sources, scale 0.5, big preserve set) and nudity/UCE (scale 0.1). The UCE nudity eraser is the certified-leak-table construction (erase “a nude person”, empty guide), reproduced at 16.2% pre-repair. Collateral FID and KID follow the specificity protocol (patched model versus the pre-repair model, 512 unrelated generations). Preregistered scorecard. Four co-equal criteria are fixed before any result. Nudity clears all four. Church clears criterion 2 (barrier not lowered, 236→291) and criterion 4 (beats both baselines), and misses the two absolute thresholds: criterion 1 narrowly (leak upper bound 3.0% against the <2% bar) and criterion 3 by a wider margin (collateral FID 89 against ≤46; the frontier below brings it to FID 61 at matched leak). Criteria are not re-weighted post hoc.

Baseline scope, and a direction-count-matched control (B3). The audit-free baselines (B1, B2) are run at the audit variant’s hyper-parameters to isolate the audit-information variable, and B2 supplies one direction against the patch’s ∼10. To separate “audit-derived directions” from “ten projected directions of any kind,” we ran a direction-count-matched control, B3: the same closed-form operator, preserve set, scale, and direction count (10), but applied to random unit directions matched to the audit embeddings’ mean norm (held-out N=1500N=1500, same seeds). The result tracks the barrier. On high-barrier church/RECE, B3 fails: the certified leak is 8.8% [7.4, 10.3], above the 7.1% pre-repair rate and 4× the audit patch’s 2.1%. Projecting ten arbitrary directions therefore does not repair, and it can damage the eraser. The audit directions carry the signal. On low-barrier nudity/UCE, random directions do partially help (1.4% [0.9, 2.1]), as expected when the concept still lives in the score field and any perturbation of the shallow edit knocks it down. The audit patch is still ≥5× lower (0/1500, ≤0.25%). The gap between audit-derived and count-matched-random directions is thus largest exactly where the barrier is highest, the same asymmetry the barrier reading predicts.

Leak–collateral frontier (post-hoc; the preregistered result is unchanged). The preregistered rule selects the church variant by development-set leak alone, within a utility gate, and lands at 2.1%/FID 89. Certifying the other development variants on the same held-out N=1500N=1500 pool (Table 5) traces a real, monotone trade-off. A gentler PCA-directions patch reaches statistically the same leak (2.3%) at markedly lower collateral (FID 61, near-zero utility drop), so the leak-only rule over-spends collateral. Leak can also be driven far below the target (0.07%, 1/1500), but only at FID 288 and a utility drop that fails the gate. The sub-2% target and low collateral are thus in genuine tension on this high-barrier eraser. This is the same “deep removal is harder to touch” effect the barrier predicts, rather than a tuning oversight.

Church/RECE patchPleakP_{\mathrm{leak}} [95% CI]collateral FIDretained-CLIP drop
none (pre-repair)0.071 [0.058, 0.085]—0
es0.5 (preregistered)0.021 [0.015, 0.030]890.004
PCA-3 directions (gentler)0.023 [0.016, 0.032]610.0001
λ=2\lambda=2 (harder)0.014 [0.009, 0.021]900.003
scale0.25, small preserve0.001 [0.000, 0.004]2880.068

Table 5. Church/RECE repair leak–collateral frontier (post-hoc; held-out N=1500N=1500). The preregistered result (es0.5, in bold) is unchanged. The other development variants trace the trade-off. A gentler PCA patch matches its leak at lower collateral; driving the leak near zero greatly increases collateral.

Compute. The frozen-audit experiments (barrier, certified leak, and separation) run on a single NVIDIA A100. The repair experiments run on a single consumer GPU (32 GB). A certified-leak audit (N=1500N=1500) takes a few GPU-minutes per model with the object and NudeNet detectors. A full ΔS\Delta S solve takes 1–5 GPU-minutes per model, depending on nseedn_{\mathrm{seed}} and nitern_{\mathrm{iter}}. A complete repair loop (extract, invert, development sweep, held-out certification, barrier, and FID) takes a few GPU-hours per target.

Extended validation

This appendix collects experiments that support the claims of § 7 with direct measurements rather than argument.

Rare-event estimator (Figure 6). On a 2-D Gaussian-mixture diffusion with tractable −log⁡P(E)-\log P(E), we place five non-nested events spanning P(E)∈[3×10−1,5×10−6]P(E) \in[3 \times10^{-1}, 5 \times10^{-6}]. We compare direct Monte Carlo (2×1052 \times10^{5} samples) with the instanton importance sampler (a linear state-feedback control vt(x)=at+Btxv_t(x)=a_t+B_tx optimized to reach the event, then Girsanov-reweighted). The estimator recovers the rare-event log-probability at Pearson 0.9997. For an event with zero direct hits (0/200,000, loosely ≤3/N\le3/N), it returns P^(E)=2.9×10−9\widehat{P}(E)=2.9 \times10^{-9}, four orders of magnitude below the direct-sampling floor. This validates both the Boué–Dupuis identity numerically on non-nested events and the instanton’s use as a tail-probability estimator. The non-nested check complements the nested threshold sweep of Figure 5.

Budget convergence and solver variance (Figure 7). We solve the barrier for four cells at optimization budgets {15,30,60,150}\{15, 30, 60, 150\}. Below the budget needed to reach the event, the recorded action is small, because the relu terminal is not yet paid. Once the event is reliably reached, further budget lowers the action monotonically (church/RECE 240→146, garbage-truck/RECE 249→122, parachute/UCE 250→143 from 60 to 150 iterations), while the ordering across cells is preserved. Re-solving at three seeds gives a solver standard deviation of 8–38 nats. The default-budget magnitudes are thus loose upper bounds, and their ranks—the object of every claim—are stable.

The barrier is paid in the high-noise steps (Figure 8). The action spectrum ∥ut∥2\lVert u_t\rVert^2 localizes the cost in noise-time. We turn that description into a causal test by zeroing the solved control on its early or late half and re-rolling from identical initial noise. The effort is early. Zeroing the early half removes almost all of the action (church/RECE 173→5, parachute/UCE 84→2), while zeroing the late half leaves it nearly intact (173→168, 84→82), matching a spectrum center of mass at fraction 0.00–0.17 of the trajectory. The necessity of that effort tracks the barrier. The zero-barrier weak eraser (nudity/UCE) reaches the concept with either half removed. The mid-barrier case (parachute/UCE) keeps the late half dispensable (reach 1.00 retained) while needing the early half (reach 1.00→0.33). The high-barrier strong eraser (church/RECE) requires the whole coordinated path, so removing either half collapses the revival (reach 1.00→0.00). The barrier lives in the early, high-noise phase of the reverse process, and how tightly the path must be orchestrated grows with how deeply the concept was erased.

Figure 8. The barrier is carried by the early, high-noise steps. (a–c) Reach fraction (bars, left axis) and action (line, right axis) of the solved control with its early or late half zeroed, re-rolled from identical noise. Removing the early half strips almost all of the action. The reach cost of removing a half grows with the barrier (nudity/UCE: neither half is needed; parachute/UCE: the late half is dispensable and the early half is load-bearing; church/RECE: the whole path is necessary). (d) Normalized action density over noise-time (high→\tolow). Mass concentrates at high noise (center of mass at fraction 0.00–0.17).

Audit-derived directions across five targets (Figure 9). We extend the direction-count-matched control of § 6 from two to five targets, spanning both mechanisms and the full barrier range: golf-ball/UCE, parachute/UCE, and garbage-truck/RECE (a second same-domain RECE target that de-confounds the two-point comparison), plus the two headline targets. On held-out certification with N=1500N=1500, the audit-derived patch never leaks more than the random-direction patch, and it is often far lower. Golf-ball is 4.1% versus 53.8% (random directions barely dent an 81% residual). Church is 2.1% versus 8.8% (random directions raise the leak above the 7.1% pre-repair rate). On the low-residual targets, both patches reach near zero and the gap is small. The advantage is thus largest where random directions fail outright, and it is not a monotone function of the barrier. Audit information is the active ingredient across mechanisms and domains, decisively beyond the original two points.

Prompt-distribution barrier (Figure 10). Deployment samples a prompt distribution π\pi, so the relevant leak is pleak(π)=Ec∼πP(E∣c)p_{\mathrm{leak}}(\pi)=\mathbb{E}_{c\sim\pi}P(E\mid c). The matching barrier is a log-sum-exp of per-prompt barriers, Bπ=−log⁡Ec∼πe−B(c)B_\pi=-\log\mathbb{E}_{c\sim\pi}e^{-B(c)}, and is dominated by the lowest-barrier prompts. The worst-route barrier is Bmin⁡=min⁡cB(c)B_{\min}=\min_c B(c). Solving the barrier per prompt for nudity across four deployment prompts, the deployment barrier BπB_\pi orders the three mechanisms’ measured leak exactly (UCE Bπ=1.4B_\pi=1.4, leak 16.0%; ESD 86, 9.5%; RECE 135, 1.2%; Spearman −1.0). The worst-route prompt (lowest B(c)B(c)) coincides with the highest-leak prompt for ESD, but not for every mechanism. We therefore report BπB_\pi as the deployment predictor and Bmin⁡B_{\min} as a red-team quantity.

Figure 10. Prompt-distribution barrier. (a) Per-prompt barrier versus per-prompt NSFW leak for three nudity erasers across four deployment prompts. (b) Deployment mixture barrier BπB_{\pi} (log-sum-exp over prompts) and worst-route barrier Bmin⁡B_{\min} for each mechanism. BπB_{\pi} orders the mechanisms’ mean leak exactly (Spearman −1.0).

Deployment-leak semantics (detector error). A sampling-certified rate counts detector-flagged images. Propagating a plausible detector operating point (sensitivity 0.90–0.98, specificity 0.95–0.99) through the Rogan–Gladen correction shifts the absolute NSFW prevalences (e.g., UCE 16.4% → [12.3%, 17.3%], RECE 1.4% → [0%, 0.45%]) but leaves the method ordering intact, because the correction is monotone at any fixed operating point. We therefore report a sampling-certified detector leak rate and rank erasers by it.

Structured prediction and incremental value. Beyond the pooled and within-concept statistics of Section 4, a binomial mixed model logit⁡(pleak)∼z(ΔSrob)+C(concept)\operatorname{logit}(p_{\mathrm{leak})\sim z(\Delta S_{\mathrm{rob}})+C(\mathrm{concept})}, with concept-clustered robust standard errors, gives a standardized-barrier coefficient of −3.33 (p=1.7×10−12p=1.7\times10^{-12}). The barrier thus predicts leak after absorbing concept difficulty as fixed effects. A cheap weight-distance proxy (∥Wk,v′−Wk,v∥F\lVert W'_{k,v}-W_{k,v}\rVert_F, which requires the original weights and is identically zero for inference-time erasers) matches the barrier’s leave-one-concept-out ordering closely (18/19 versus 18/18 held-out pairs). The barrier equals that proxy on prediction while needing only the deployed checkpoint, spanning all four mechanisms, and supplying repair directions.

A second, architecturally distinct backbone (Figure 11). The audit is defined on the reverse process, rather than on a specific network, so it should transfer across architectures that share a latent space. We test this on BK-SDM-small [9], a distilled Stable-Diffusion U-Net with 9 cross-attention blocks against SD v1.4’s 16, sharing the SD v1.x VAE and CLIP text space. Solving the barrier and certifying leak for church and parachute under {original, UCE-erased} on this backbone reproduces the SD v1.4 pattern exactly. The un-erased model sits at ΔSrob≈0\Delta S_{\mathrm{rob}}\approx0 with near-full leak (church 100%, parachute 80%). The UCE edit raises the barrier and lowers leak on both concepts (church ΔSrob\Delta S_{\mathrm{rob}} 0→\to121, leak 100%→\to87%; parachute 0→\to228, 80%→\to16%), and the higher post-edit barrier again carries the lower leak. The audit needs only that the model define a reverse diffusion over a latent space with a differentiable concept detector.

Figure 11. The audit transfers to a second, distilled backbone (BK-SDM-small, 9 cross-attention blocks vs. SD v1.4’s 16). Un-erased models sit at ΔSrob≈0\Delta S_{\rm rob}\approx0 with near-full leak. UCE erasure raises the barrier and lowers leak on both concepts (arrows), and the higher-barrier cell leaks less.

Supplementary figures and tables

Table 7 gives the per-model NSFW leak rates under both detectors that support the detector-robustness claim in § 4.

Figure 12. Top row: instantons of the original model, which reach the concept at ΔS≈0\Delta S\approx0. Bottom row: the corresponding ESD instantons. The erased model reaches the event only along high-action, degraded paths (the near-blank frame is one such terminal, not a rendering artifact). Right: the ∥ut∥2\lVert u_t\rVert^2 spectrum localizes the barrier at early, high-noise steps for style erasure (center of mass ≈5\approx5 of 20 steps). ESD spreads slightly more toward later steps than UCE.

ModelNudeNet PleakP_{\mathrm{leak}} [95% CI]ViT classifier PleakP_{\mathrm{leak}} [95% CI]
original (no erasure)0.882 [0.865, 0.898]0.443 [0.417, 0.468]
ESD (fine-tuning)0.098 [0.083, 0.114]0.035 [0.027, 0.046]
UCE (closed-form edit)0.164 [0.146, 0.184]0.202 [0.182, 0.223]
SLD (inference-time)0.855 [0.837, 0.873]0.431 [0.406, 0.457]

Table 7. Detector-robustness of the measured NSFW leak (same N=1500N=1500 images per model, scored by two mechanistically independent detectors). The method ordering is identical (Spearman = 1.0), and every eraser’s leak is measurably non-zero under both detectors. NudeNet reproduces Table 6. Absolute rates differ because the two detectors define “NSFW” differently (exposed body parts versus whole-image content).

ModelI2P NudeNet PleakP_{\mathrm{leak}} [95% CI]I2P ViT [95% CI]explicit NudeNet
original (no erasure)0.197 [0.172, 0.224]0.222 [0.196, 0.250]0.882
RECE (iterative closed-form)0.014 [0.007, 0.024]0.043 [0.031, 0.058]0.014
ESD (fine-tuning)0.019 [0.012, 0.030]0.039 [0.027, 0.053]0.098
UCE (closed-form edit)0.099 [0.080, 0.120]0.155 [0.132, 0.180]0.164
SLD (inference-time)0.141 [0.119, 0.165]0.179 [0.155, 0.206]0.855

Table 8. Measured NSFW leak on the standard I2P benchmark (sexual category, N=931N=931 non-explicit adversarial prompts, same sampler, CFG, and detectors; exact 95% Clopper–Pearson CI). Every eraser shows a non-zero leak, and the two detectors agree on the ordering (Spearman 0.90). The rightmost column repeats the explicit-prompt NudeNet rate (Table 6). ESD and RECE are low under both prompt regimes. SLD shows distribution-specific suppression: 0.141 on the I2P-style prompts near which its guidance was tuned, versus 0.855 under explicit prompts, consistent with its near-zero intrinsic barrier.

References

  1. [1]Michelle Boué and Paul Dupuis. A variational representation for certain functionals of brownian motion. The Annals of Probability, 26(4):1641–1659, 1998. doi: 10.1214/aop/1022855876.DOI
  2. [2]Zhi-Yi Chin, Chieh-Ming Jiang, Ching-Chun Huang, Pin-Yu Chen, and Wei-Chen Chiu. Prompting4Debugging: Red-teaming text-to-image diffusion models by finding problematic prompts. arXiv:2309.06135, 2023.arxiv.org/abs/2309.06135
  3. [3]Prafulla Dhariwal and Alex Nichol. Diffusion models beat gans on image synthesis. arXiv:2105.05233, 2021.arxiv.org/abs/2105.05233
  4. [4]Zixuan Fu, Yan Ren, Finn Carter, Chenyue Wen, Le Ku, Daheng Yu, Emily Davis, and Bo Zhang. Robust concept erasure in diffusion models: A theoretical perspective on security and robustness. arXiv:2509.12024, 2025.arxiv.org/abs/2509.12024
  5. [5]Rohit Gandikota, Joanna Materzynska, Jaden Fiotto-Kaufman, and David Bau. Erasing concepts from diffusion models. arXiv:2303.07345, 2023a.arxiv.org/abs/2303.07345
  6. [6]Rohit Gandikota, Hadas Orgad, Yonatan Belinkov, Joanna Materzyńska, and David Bau. Unified concept editing in diffusion models. arXiv:2308.14761, 2023b.arxiv.org/abs/2308.14761
  7. [7]Chao Gong, Kai Chen, Zhipeng Wei, Jingjing Chen, and Yu-Gang Jiang. Reliable and efficient concept erasure of text-to-image diffusion models. arXiv:2407.12383, 2024. ECCV 2024.arxiv.org/abs/2407.12383
  8. [8]Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. arXiv:2006.11239, 2020.arxiv.org/abs/2006.11239
  9. [9]Bo-Kyeong Kim, Hyoung-Kyu Song, Thibault Castells, and Shinkook Choi. BK-SDM: A lightweight, fast, and cheap version of stable diffusion. In European Conference on Computer Vision (ECCV), 2024. arXiv:2305.15798.DOI
  10. [10]Ouxiang Li, Yuan Wang, Xinting Hu, Houcheng Jiang, Yanbin Hao, and Fuli Feng. SPEED: Scalable, precise, and efficient concept erasure for diffusion models. In International Conference on Learning Representations (ICLR), 2026. arXiv:2503.07392.arxiv.org/abs/2503.07392
  11. [11]Ping Liu and Chi Zhang. Erased or dormant? rethinking concept erasure through reversibility. arXiv:2505.16174, 2025.arxiv.org/abs/2505.16174
  12. [12]Kevin Lu, Nicky Kriplani, Rohit Gandikota, Minh Pham, David Bau, Chinmay Hegde, and Niv Cohen. When are concepts erased from diffusion models? arXiv:2505.17013, 2025.DOI
  13. [13]Maxime Oquab, Timothée Darcet, Théo Moutakanni, Huy Vo, Marc Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel Haziza, Francisco Massa, Alaaeldin El-Nouby, Mahmoud Assran, Nicolas Ballas, Wojciech Galuba, Russell Howes, Po-Yao Huang, Shang-Wen Li, Ishan Misra, Michael Rabbat, Vasu Sharma, Gabriel Synnaeve, Hu Xu, Hervé Jegou, Julien Mairal, Patrick Labatut, Armand Joulin, and Piotr Bojanowski. Dinov2: Learning robust visual features without supervision. arXiv:2304.07193, 2023.arxiv.org/abs/2304.07193
  14. [14]Minh Pham, Kelly O. Marshall, Niv Cohen, Govind Mittal, and Chinmay Hegde. Circumventing concept erasure methods for text-to-image generative models. arXiv:2308.01508, 2023.arxiv.org/abs/2308.01508
  15. [15]Akhil Premkumar. Diffusion density estimators. arXiv:2410.06986, 2024.arxiv.org/abs/2410.06986
  16. [16]Akhil Premkumar. On the separability of information in diffusion models. arXiv:2509.23937, 2025.arxiv.org/abs/2509.23937
  17. [17]Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. arXiv:2103.00020, 2021.arxiv.org/abs/2103.00020
  18. [18]Alex D. Richardson, Kaicheng Zhang, Lucas Beerens, and Dongdong Chen. Rethinking the vulnerability of concept erasure and a new method. arXiv:2502.17537, 2025.arxiv.org/abs/2502.17537
  19. [19]Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. arXiv:2112.10752, 2021.arxiv.org/abs/2112.10752
  20. [20]Shaswat Saha, Sourajit Saha, Manas Gaur, and Tejas Gokhale. Side effects of erasing concepts from diffusion models. In Findings of the Association for Computational Linguistics: EMNLP 2025, pages 14991–15007, 2025. arXiv:2508.15124.arxiv.org/abs/2508.15124
  21. [21]Patrick Schramowski, Manuel Brack, Björn Deiseroth, and Kristian Kersting. Safe latent diffusion: Mitigating inappropriate degeneration in diffusion models. arXiv:2211.05105, 2022.arxiv.org/abs/2211.05105
  22. [22]Yang Song, Jascha Sohl-Dickstein, Diederik P. Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. arXiv:2011.13456, 2020.arxiv.org/abs/2011.13456
  23. [23]Yu-Lin Tsai, Chia-Yi Hsu, Chulin Xie, Chih-Hsun Lin, Jia-You Chen, Bo Li, Pin-Yu Chen, Chia-Mu Yu, and Chun-Ying Huang. Ring-a-bell! how reliable are concept removal methods for diffusion models? arXiv:2310.10012, 2023.arxiv.org/abs/2310.10012
  24. [24]Yiwei Xie, Zheng Zhang, and Ping Liu. PROBE: Diagnosing residual concept capacity in erased text-to-video diffusion models. arXiv:2603.21547, 2026.arxiv.org/abs/2603.21547
  25. [25]Yijun Yang, Ruiyuan Gao, Xiaosen Wang, Tsung-Yi Ho, Nan Xu, and Qiang Xu. Mma-diffusion: Multimodal attack on diffusion models. arXiv:2311.17516, 2023.arxiv.org/abs/2311.17516
  26. [26]Yimeng Zhang, Jinghan Jia, Xin Chen, Aochuan Chen, Yihua Zhang, Jiancheng Liu, Ke Ding, and Sijia Liu. To generate or not? safety-driven unlearned diffusion models are still easy to generate unsafe images ... for now. arXiv:2310.11868, 2023.arxiv.org/abs/2310.11868

Paper details

vlnc:W_3x7syvxs
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents