Safe Latent Control Flow: Safe Diffusion Sampling via Chance-Constrained Control
Anonymous authors
ICLR 2027
Abstract. Pretrained text-to-image diffusion models can generate unsafe content, including nudity, violence, and memorized training images. Existing training-free safety methods steer the sampling trajectory away from unsafe regions, but they typically use a guidance window fixed in advance, and none of them states how often the outputs it returns remain unsafe. We propose Safe Latent Control Flow (SLCF), a training-free sampler that states the safety requirement as a probability and switches the control off on each sample once that requirement is met. We formulate safe generation as a chance-constrained stochastic optimal control problem that limits the probability of unsafe outputs while staying close to the pretrained sampling process. We derive the control from the denoiser's existing prediction at each step, and the same prediction decides when the sample would end up safe without control, against a threshold calibrated once per task. We prove that the samples it switches off meet the probability constraint under assumptions on the calibration. On three safe generation benchmarks, SLCF achieves the lowest unsafe rate among training-free baselines and preserves benign generations better, and the bound we certify holds under an external evaluator on every prompt set.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
ICLR 2027
Under review · 3 reviews · OpenReview
Updated 25 Nov 2026, 10:36 UTC.
- Rating
- 4/4(+1)
- Confidence
- 3/4
- Soundness
- 3/3(+1)
- Presentation
- 3/3
- Informativeness
- 2/3
Read review
Summary
The paper proposes Safe Latent Control Flow (SLCF), a training-free method for steering diffusion models away from unsafe outputs. The authors formulate safe sampling as staying close to the pretrained sampling process in path measure KL while limiting the probability that the final output exceeds a threshold on a learned safety score. In practice, the method applies guidance through a CLIP-based safety probe evaluated on the predicted clean sample. It then switches off guidance separately for each sample using thresholds calibrated on uncontrolled trajectories. Under assumptions on the pretrained model’s continuation probabilities, the authors bound the surrogate violation rate among samples whose guidance switches off. Experiments cover nudity suppression, inappropriate content on CoPro, and memorization on Imagenette, with additional toy-model results.
Strengths
- The safety and image-quality results are strong, particularly on MMA-Diffusion. SLCF achieves an ASR of 0.181 compared with 0.297 for SLD + SGF and 0.423 for SAFREE + SGF, while its COCO CLIPScore remains close to the base model. The additional evaluation with a second detector is useful for checking whether these gains extend beyond the detector used to fit the safety probe.
- The paper reports more than the final unsafe rate. Table 4 includes the fraction of samples whose guidance switches off, their surrogate violation rate, and the disagreement between the surrogate and the evaluator. This helps distinguish satisfying the learned safety criterion from satisfying the external evaluator, which matters for interpreting the guarantee.
Weaknesses
- The novelty of the stated “key insight” is limited. Sec. 3 describes the insight as follows: once control stops, the sample follows the pretrained model, and its future depends on the current state rather than on the control applied before it. This is the Markov property of the sampling process, and it also applies to existing fixed-window methods such as Safe Denoiser and SGF. The contribution appears to be estimating when to stop and calibrating that decision, rather than the observation itself. Similarly, Eq. 8 applies the gradient of a classifier evaluated at the predicted clean sample directly to the latent. This is related to training-free guidance with off-the-shelf classifiers, such as Universal Guidance [1], which the paper does not discuss. The closest safety-specific method is STG [2], which also evaluates a safety function on the predicted clean sample but updates the text embedding instead of the latent. The paper discusses STG but reports only its runtime (Table 10). A safety and quality comparison would help establish the contribution relative to this closely related approach.
[1] Bansal, A., Chu, H.-M., Schwarzschild, A., Sengupta, S., Goldblum, M., Geiping, J., & Goldstein, T. Universal Guidance for Diffusion Models. ICLR 2024
[2] Na, B., Kang, M., Kwak, J., Park, M., Shin, J., Jun, S., Lee, G., Kim, J.-H., & Moon, I.-C. Training-Free Safe Text Embedding Guidance for Text-to-Image Diffusion Models. NeurIPS 2025.
Questions for the authors
- How much of the improvement comes from the adaptive stopping rule rather than the CLIP-probe guidance? In Table 11, the fixed-step arm reaches a similar MMA-Diffusion ASR (0.185 vs. 0.181) with similar FID and CLIPScore. Could the authors clarify where adaptive stopping helps most beyond the surrogate violation rate, and whether it also improves an existing method such as SGF or Safe Denoiser?
- What does mean in practice for a user choosing a safety level? Proposition 1 bounds violations of among samples whose guidance switches off. The bound under the external evaluator additionally depends on , , and the stopping coverage, which are only known after generating and labeling outputs. What safety statement can a user make on a new prompt set before obtaining evaluator labels for those outputs?
- The guarantee assumes that from any state where SLCF stops, the base model rarely ends up unsafe. This is calibrated on uncontrolled trajectories, while SLCF stops at states reached under guidance. The violation rates among stopped samples in Table 4 are higher than the calibrated levels in Table 7. Could the authors comment on this gap, and possibly check the assumption by running the base model forward from the states where SLCF stops?
- Could the authors report safety and image-quality results for STG on the nudity and CoPro benchmarks, alongside the runtime in Table 10?
Other notes:
- Section 2.2 assumes a fair amount of stochastic control background. A short intuitive explanation would help readers from the diffusion-safety side.
- Table 4 has a formatting issue around the “Unsafe” headers at line 437.
8 comments
Response to Q1: contribution of the safety function and adaptive stopping
[Q1-1] Contribution of the safety function and the control (continued)
Either component alone falls short, as the probe under SGF's guidance (B) stays at SGF's level and MMD under SLCF's guidance (C, E) is less safe than SGF. Quality tracks the guidance, not . Every row with SLCF's guidance (C–F) keeps quality close to no control, whatever the safety function and the stopping rule, while both rows with SGF's guidance (A, B) lose quality in every metric (F against A, paired for HPS and 19.9 for PickScore). Safety requires the combination. Under SGF's guidance, swapping MMD for the probe does not move ASR, since SGF's push does not follow . Under SLCF's guidance, the same swap lowers ASR from 0.860 to 0.195, because SLCF moves along the gradient of and benefits from a more accurate . With the safety function held fixed, the improvement persists. Keeping the probe and replacing SGF's guidance by SLCF's (B → F) lowers ASR on all three attack sets and improves quality, and keeping MMD (A → C, E) still yields the gain in quality.
[Q1-2] Benefit of adaptive stopping
We first clarify that the fixed stop in Table 11 is the mean stopping time of , so it is available only after is solved. Even so, neither fixed stop is certified at on hold, while is (Table R4 below).
Advantage over fixed stopping.
Without , a fixed stop must be searched for each task, as fixed-window methods do by publishing a setting per task, and a task without one, such as CoPro for SGF, needs a new search (Appendix D). Adaptive stopping sets the stopping time of each task from calibration data alone. Even within one task, prompts need different stopping times, and adaptive stopping sets one per prompt. Grouping the prompts by their stopping time under , the fixed stop at 0.46 stops the prompts that holds longer too early, leaving 0.526 of them above against 0.132 for . Meanwhile, stops the 118 prompts that can go early at the first admissible time. We add this grouping to Appendix F.6.
[Table R3. on the first 200 MMA-Diffusion prompts, grouped by the stopping time under .]
| Stopping time under | Prompts | Fixed | |
|---|---|---|---|
| (first admissible time) | 118 | 0.085 | 0.093 |
| 41 | 0.098 | 0.195 | |
| 38 | 0.132 | 0.526 |
This per-prompt timing also gives higher quality (HPS +0.0016, paired , FID 72.05 against 72.44, CLIPScore 31.25 against 31.17) and a lower unsafe rate under Falconsai, a classifier that never saw (0.041 against 0.051).
Comparison of stopping rules.
To see the effect of adaptive stopping, we compared five stopping rules on the same seeds, namely no control (), fixed stops at (the end of SGF's window) and (the mean stopping time of ), the adaptive stopping , and control to the end (). We report ASR on the three attack sets, the violation rate with its hold certificate, the path cost, wall-clock time, and quality on COCO-1k (FID, CLIPScore, HPS and PickScore). Section 6.4 of the revision reports this comparison in Table 5.
[Table R4. Stopping rules with the probe and the SLCF control fixed (nudity). Violation and time on MMA-Diffusion, Hold UCB on the 200 hold prompts. Bold: .]
| Stop | MMA | RAB | UD | Hold UCB | Cost (nats) | Time (s) | FID | CLIP | HPS | Pick | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| No control | 0.967 | 0.823 | 0.802 | – | – | 0.989 | – | 0 | 3.25 | 71.24 | 31.46 | 0.2593 | 21.61 |
| 0.195 | 0.063 | 0.121 | 1.000 | 0.220 | 0.220 | 0.181 | 4.28e4 | 5.26 | 71.86 | 31.18 | 0.2567 | 21.43 | |
| 0.185 | 0.076 | 0.138 | 1.000 | 0.179 | 0.179 | 0.148 | 4.10e4 | 5.54 | 72.44 | 31.17 | 0.2559 | 21.40 | |
| (ours) | 0.181 | 0.051 | 0.103 | 0.990 | 0.099 | 0.106 | 0.095 | 4.33e4 | 5.60 | 72.05 | 31.25 | 0.2576 | 21.42 |
| (never stop) | 0.154 | 0.051 | 0.121 | 0.000 | – | 0.008 | 0.031 | 4.22e4 | 8.06 | 72.05 | 31.16 | 0.2560 | 21.38 |
As the reviewer notes, ASR barely changes with the stopping rule (0.154–0.195), and the rules differ instead in the certified level, the time and the quality. Of the rules that stop early, only is certified at on hold (0.095), while neither fixed stop is (0.181 at 0.40 and 0.148 at 0.46), even the one with the same mean stopping time as . Control to the end is also certified (0.031) but runs 1.44 times longer (8.06 against 5.60 s). Compared with it, adaptive stopping also has higher HPS (+0.0016, paired ) and PickScore (+0.040, ) at the same FID.
Response to Q1: Benefit of adaptive stopping
[Q1-2] Benefit of adaptive stopping (continued)
Advantage over control to the end.
Stopping at different certified levels. Stopping pushes only as far as requires. We varied in one calibration, keeping the calibration data, , , prompts and seeds, in the two-dimensional model and in Stable Diffusion.
[Table R5. The two-dimensional model, one calibration, same prompts and noise for every arm (N = 2000). Near-arc columns: the 465 samples nearest the unsafe arc. Displacement: distance from the uncontrolled output of the same noise.]
| Rule | Mean stopping time | Path KL | Displacement | Near arc: | Near arc: median displacement | |
|---|---|---|---|---|---|---|
| 0.000 | 0.96 | 3.15 | 0.33 | 0.914 | 0.92 | |
| 0.012 | 0.81 | 2.82 | 0.27 | 0.729 | 0.81 | |
| 0.040 | 0.27 | 2.40 | 0.19 | 0.609 | 0.67 | |
| 0.053 | 0.24 | 2.25 | 0.16 | 0.544 | 0.61 | |
| 0.069 | 0.20 | 1.99 | 0.12 | 0.402 | 0.50 | |
| Control to | 0.000 | 1.00 | 3.16 | 0.33 | 0.923 | 0.93 |
In the two-dimensional model, a larger stops earlier and keeps the output closer to the pretrained model (path KL 3.15 → 1.99, displacement 0.33 → 0.12), with the violation rate below at every level. Control to the end keeps pushing samples that already meet the criterion, pushing 92% of those near the unsafe region below (61% at ) at a path KL 32% above that of . We add a figure to Appendix H.1 showing that stopped outputs stay just outside the unsafe region while outputs controlled to the end are pushed further away.
In SD, a larger also stops earlier (0.46 → 0.37), and keeps higher HPS (0.2573 against 0.2560, paired ) and PickScore (21.43 against 21.38, ) than control to the end.
Two branches from the same stopping state. Continuing the control after the stopping state lowers further but adds almost no safety under the evaluators and barely changes the content. We completed the stopping states of one trajectory controlled to the end with the pretrained model under the same subsequent noise, on the 197 MMA-Diffusion prompts and 96 COCO captions stopped by . We add this comparison to Appendix F.6.
[Table R6. Branches of one controlled trajectory from the same stopping states.]
| Branch | NudeNet unsafe | Falconsai unsafe | LPIPS to (MMA / COCO) | HPS (COCO) | CLIPScore (COCO) | |
|---|---|---|---|---|---|---|
| Uncontrolled | 0.995 | 0.985 | 0.944 | 0.707 / 0.365 | 0.2621 | 31.42 |
| Fixed | 0.218 | 0.213 | 0.066 | 0.024 / 0.023 | 0.2583 | 31.32 |
| Fixed | 0.198 | 0.203 | 0.051 | 0.014 / 0.018 | 0.2582 | 31.32 |
| 0.096 | 0.208 | 0.041 | – | 0.2581 | 31.25 | |
| Control to | 0.000 | 0.193 | 0.025 | 0.013 / 0.013 | 0.2572 | 31.24 |
The stopped branch already meets the certified level (0.096), and continuing lowers it to 0 but leaves the labels of NudeNet and of Falconsai statistically unchanged (McNemar ) and the content nearly unchanged (LPIPS 0.013, 2–4% of the change made by the whole control).
Attaching the stopping rule to SGF.
To test whether the stopping rule also improves SGF, we kept SGF unchanged and replaced only the end of its window by read on the probe , continuing SGF's push to the last noisy step for samples not stopped.
[Table R7. attached to SGF (nudity).]
| Guidance (push) | Stopping | MMA | RAB | UD | FID | CLIP | HPS | Pick | |
|---|---|---|---|---|---|---|---|---|---|
| SGF (MMD) | window | 0.621 | 0.190 | 0.431 | 1.000 | 76.40 | 30.77 | 0.2477 | 20.71 |
| SGF (MMD) | (probe ) | 0.883 | 0.696 | 0.793 | 0.037 | 75.95 | 30.74 | 0.2406 | 20.69 |
| SLCF (probe) | (probe , ours) | 0.181 | 0.051 | 0.103 | 0.990 | 72.05 | 31.25 | 0.2576 | 21.42 |
The stopping rule does not carry over to SGF, since it needs a safety function it can calibrate and a control that lowers it. SGF's push does not lower the probe below the threshold, so stops only 3.7% of samples, and the rest receive SGF's re-noising to the last noisy step. This raises ASR (0.621 → 0.883 on MMA-Diffusion) and lowers quality (HPS 0.2406), as the SGF paper also reports for guidance beyond its published window.
Revision.
Section 6.4 compares the stopping rules, Appendices F.6 and H.1 add the branches and the two-dimensional comparison, and Appendix H.8 shows examples.
- Rating
- 3/4(+1)
- Confidence
- 2/4(+1)
- Soundness
- 3/3
- Presentation
- 2/3
- Informativeness
- 3/3
Read review
Summary
This paper proposes Safe Latent Control Flow (SLCF), a training-free sampler that updates the intermediate states in the denoising process to avoid unsafe final samples. Specifically, during the denoising process, the denoiser predicts a clean latent (i.e., the posterior mean) and passes it to a safety function that evaluates how likely it is to be safe (the safety function is implemented as a linear probe on CLIP features). The resulting scalar undergoes an arithmetic transformation to penalize samples closer to the boundary more. We then backpropagate through this computation to the posterior mean, skipping backpropagation through the denoiser by approximating its Jacobian as the identity matrix. We stop backpropagating if the safety function evaluated on the clean prediction is below a certain threshold. The threshold is derived from a user-defined epsilon, but since there is usually a Jensen gap (E[f(x)] != f(E[x])), where f is the safety function), the authors precompute a calibrated threshold by generating many trajectories offline and using the upper bound of a confidence interval for the difference between E[f(x)] and f(E[x]). They validate the method's performance on a 2D toy dataset and on nudity removal and inappropriate content removal tasks.
Strengths
- This paper shows a line of theoretical formulations to derive the proposed methods starting from the chance-constrained stochastic optimal control
- The paper validates the method mostly achieves the intended property in toy 2D setting
Weaknesses
First, I don't have enough experience in safe generation to evaluate the proposed method deeply. Correct me if I'm wrong. Generally, I feel like this paper has good motivation for formulating the generation process as stochastic optimal control and provides a full derivation from the objective to practical implementation. One thing I'm not very happy with is that the paper does not really show the benefit of introducing stochastic optimal control, which adaptively decides when to stop intervention by measuring "how safe the current prediction is". In my understanding, the main advantage is preserving quality ("don't edit too much if it's already safe").
- Ideally, the paper should have many qualitative examples of denoising trajectories in Stable Diffusion, with diverse stopping steps, so that readers understand whether the method really captures when to stop the intervention and whether it helps with the final sample quality, at both the individual sample level and the distribution level. Also, the paper should compare the trajectories / final samples with fixed / adaptive / full control (with too many artifacts from excessive intervention), so that readers appreciate the benefit of early stopping.
- In the SGF baselines, as far as I know, re-noising is used, which can increase the cost a lot, but the final distribution-level quality may be largely preserved. I wonder if it makes sense to use an ODE-like approach to control cost in the baseline, since the current comparison kind of overemphasizes the cost.
- It's not clear where the gain comes from. Is it from the better safety function? Or is it from the proposed optimal control method? I think the paper should answer that.
Questions for the authors
Here are a few suggestions that could potentially address the suggested weaknesses.
- Could the authors compare the baseline, calibrated stopping, a fixed window, and control through the final step using the same initial noise seed? It would be nice to compare unsafe rates, wall-clock time, quality preservation (measured by human-preference metrics such as HPS or PickScore and a distributional metric such as FID), and prompt alignment (CLIPScore). For qualitative results, it would be very informative to see two branches from the same selected stopping state: stop control on one branch and continue it on the other using matched future noise. Does the additional control improve safety, mainly alter the content, or do nothing? This would test the motivation for stopping.
- How much of the improvement over prior methods remains when the safety function is the same? For example, could the authors fill in a matrix like this? As above, it would be great to report quality preservation metrics (human-preference metrics such as HPS or PickScore and distributional metrics such as FID) and prompt alignment metrics (CLIPScore).
If anything is unclear, feel free to let me know.
8 comments
Response to W1 & Q1: Benefit of adaptive stopping
We thank the reviewer for the thoughtful review. We ran ablations showing what the safety function and adaptive stopping each contribute, and measured quality directly against SGF. We have uploaded a revised paper, with the changes marked in purple. We address each point below.
[W1, Q1] Benefit of adaptive stopping
Comparison of stopping rules.
To see the effect of adaptive stopping, we compared five stopping rules on the same seeds, namely no control (), fixed stops at (the end of SGF's window) and (the mean stopping time of ), the adaptive stopping , and control to the end (). We report ASR on the three attack sets, the violation rate with its hold certificate, the path cost, wall-clock time, and quality on COCO-1k (FID, CLIPScore, HPS and PickScore). Section 6.4 of the revision reports this comparison in Table 5.
[Table R1. Stopping rules with the probe and the SLCF control fixed (nudity). Violation and time on MMA-Diffusion, Hold UCB on the 200 hold prompts. Bold: .]
| Stop | MMA | RAB | UD | Hold UCB | Cost (nats) | Time (s) | FID | CLIP | HPS | Pick | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| No control | 0.967 | 0.823 | 0.802 | – | – | 0.989 | – | 0 | 3.25 | 71.24 | 31.46 | 0.2593 | 21.61 |
| 0.195 | 0.063 | 0.121 | 1.000 | 0.220 | 0.220 | 0.181 | 4.28e4 | 5.26 | 71.86 | 31.18 | 0.2567 | 21.43 | |
| 0.185 | 0.076 | 0.138 | 1.000 | 0.179 | 0.179 | 0.148 | 4.10e4 | 5.54 | 72.44 | 31.17 | 0.2559 | 21.40 | |
| (ours) | 0.181 | 0.051 | 0.103 | 0.990 | 0.099 | 0.106 | 0.095 | 4.33e4 | 5.60 | 72.05 | 31.25 | 0.2576 | 21.42 |
| (never stop) | 0.154 | 0.051 | 0.121 | 0.000 | – | 0.008 | 0.031 | 4.22e4 | 8.06 | 72.05 | 31.16 | 0.2560 | 21.38 |
Changing the stopping rule barely moves ASR (0.154–0.195), and the rules differ in the certified level, the time and the quality. Among rules that stop before the end, only is certified at on hold (0.095), while the fixed stops at 0.40 (0.181) and 0.46 (0.148) are not, although the latter has the same mean stopping time as . Control to the end is certified (0.031) but takes 1.44 times as long (8.06 against 5.60 s). Adaptive stopping also gives higher HPS (+0.0016, paired ) and PickScore (+0.040, ) than control to the end, with the same FID.
Advantage over control to the end.
Stopping at different certified levels. Stopping pushes only as far as requires. We varied to test whether adaptive stopping pushes only as far as the certified level requires. We solved one calibration at several levels, keeping the calibration data, , , prompts and seeds, in the two-dimensional model and in Stable Diffusion. We add the comparison in the two-dimensional model to Appendix H.1.
[Table R2. The two-dimensional model, one calibration, same prompts and noise for every arm (N = 2000). Near-arc columns: the 465 samples nearest the unsafe arc. Displacement: distance from the uncontrolled output of the same noise.]
| Rule | Mean stopping time | Path KL | Displacement | Near arc: | Near arc: median displacement | |
|---|---|---|---|---|---|---|
| 0.000 | 0.96 | 3.15 | 0.33 | 0.914 | 0.92 | |
| 0.012 | 0.81 | 2.82 | 0.27 | 0.729 | 0.81 | |
| 0.040 | 0.27 | 2.40 | 0.19 | 0.609 | 0.67 | |
| 0.053 | 0.24 | 2.25 | 0.16 | 0.544 | 0.61 | |
| 0.069 | 0.20 | 1.99 | 0.12 | 0.402 | 0.50 | |
| Control to | 0.000 | 1.00 | 3.16 | 0.33 | 0.923 | 0.93 |
In the two-dimensional model, a larger stops earlier and keeps the output closer to the pretrained model (path KL 3.15 → 1.99, displacement 0.33 → 0.12), with the violation rate below at every level. Control to the end keeps pushing samples that already meet the criterion. It pushes 92% of the samples near the unsafe region below (61% at ), and its path KL of 3.16 is 32% above the 2.40 of . We add a figure to Appendix H.1 that connects, for 155 of the 465 samples near the unsafe region, the stopped output and the output controlled to the end under the same prompt and noise (left , right ). Stopped outputs stay just outside the unsafe region (dashed), and outputs controlled to the end are pushed further away, with median distances from the pretrained output of 0.50 (), 0.67 () and 0.93 (control to the end).
[Table R3. Nudity, re-solved at , COCO-1k with the same seeds. Paired against control to .]
| Rule | Mean stopping time | FID | CLIP | HPS | PickScore | Paired vs. (HPS / PickScore) |
|---|---|---|---|---|---|---|
| , | 0.37 | 72.45 | 31.23 | 0.2573 | 21.43 | 2.2 / 3.0 |
| Control to | 1.00 | 72.05 | 31.16 | 0.2560 | 21.38 | – |
| No control | – | 71.24 | 31.46 | 0.2593 | 21.61 | – |
In SD, a larger also stops earlier (0.46 → 0.37), and keeps higher HPS (0.2573 against 0.2560, paired ) and PickScore (21.43 against 21.38, ) than control to the end.
Response to W1 & Q1: Benefit of adaptive stopping
[W1, Q1] Benefit of adaptive stopping (continued)
Two branches from the same stopping state. We compared the branch that stops at the stopping state with the branch that continues the control to test whether further control still helps. We found that continuing the control lowers further but adds almost no safety under the evaluators and barely changes the content. In more detail, we ran one trajectory with control to the end, stored the state at which each rule switches off, and completed each state with the pretrained model under the same subsequent noise. We evaluated safety on the 197 MMA-Diffusion prompts stopped by , with NudeNet and with Falconsai, an NSFW classifier that never saw, and quality on 96 COCO captions stopped by . We add this comparison to Appendix F.6.
[Table R4. Branches of one controlled trajectory from the same stopping states.]
| Branch | NudeNet unsafe | Falconsai unsafe | LPIPS to (MMA / COCO) | HPS (COCO) | CLIPScore (COCO) | |
|---|---|---|---|---|---|---|
| Uncontrolled | 0.995 | 0.985 | 0.944 | 0.707 / 0.365 | 0.2621 | 31.42 |
| Fixed | 0.218 | 0.213 | 0.066 | 0.024 / 0.023 | 0.2583 | 31.32 |
| Fixed | 0.198 | 0.203 | 0.051 | 0.014 / 0.018 | 0.2582 | 31.32 |
| 0.096 | 0.208 | 0.041 | – | 0.2581 | 31.25 | |
| Control to | 0.000 | 0.193 | 0.025 | 0.013 / 0.013 | 0.2572 | 31.24 |
The results indicate that the stopped branch already meets the certified level, with , and continuing the control lowers it to 0 (McNemar ) but hardly changes the evaluator labels. Under both evaluators, the difference between the paired branches is not significant (McNemar ). The content also barely changes, as the LPIPS between the two branches is 0.013, 2–4% of the change made by the whole control (0.707 on MMA-Diffusion and 0.365 on COCO from the uncontrolled output). Thus, stopping saves computation while giving the evaluator safety and quality of control to the end.
Advantage over fixed stopping.
We first clarify that the fixed stop in the submission is the mean stopping time of , so it is available only after is solved. Even so, neither fixed stop is certified at on hold (0.181 and 0.148 in Table R1), while is (0.095). Without , the stop must be searched for each task, as fixed-window methods do by publishing a setting per task, and a task without one, such as CoPro for SGF, needs a new search (Appendix D). Adaptive stopping sets the stopping time of each task from calibration data alone. Even within one task, prompts need different stopping times, and adaptive stopping sets one per prompt. Grouping the prompts by their stopping time under , the fixed stop at 0.46 stops the prompts that holds longer too early, leaving 0.526 of them above against 0.132 for . Meanwhile, stops the 118 prompts that can go early at the first admissible time. We add this grouping to Appendix F.6.
[Table R5. on the first 200 MMA-Diffusion prompts, grouped by the stopping time under , from the branches above.]
| Stopping time under | Prompts | Fixed | |
|---|---|---|---|
| (first admissible time) | 118 | 0.085 | 0.093 |
| 41 | 0.098 | 0.195 | |
| 38 | 0.132 | 0.526 |
This per-prompt timing also gives higher quality (HPS +0.0016, paired , FID 72.05 against 72.44, CLIPScore 31.25 against 31.17) and a lower unsafe rate under Falconsai (0.041 against 0.051).
Revision.
Section 6.4 compares the stopping rules, Appendices F.6 and H.1 add the branches and the two-dimensional comparison, and Appendix H.8 shows examples.
Response to W2,3 & Q2: Cost fairness and contribution of the safety function and the control
[W2] Cost fairness
SGF's distribution-level quality is not preserved. As the reviewer notes, the path KL upper-bounds the KL between output distributions and can overstate the change made by re-noising, so we measured distribution-level quality directly on COCO-1k with the same seeds. SGF's FID is 76.40 against 71.24 for the base model, while SLCF stays at 72.05. SLCF also has higher HPS (0.2576 against 0.2477, paired ) and PickScore (21.42 against 20.71, ) than SGF on the same captions. The loss comes from the re-noising window, since replacing SGF's MMD by our probe with a matched step leaves the same loss (FID 76.07, HPS 0.2472). We add this comparison to Appendix H.6.
[Table R6. SGF at its published nudity setting, and in the third row with its MMD replaced by our probe with a matched step. Bold: best among controlled methods.]
| Method | FID | CLIP | HPS | PickScore |
|---|---|---|---|---|
| SD v1.4 | 71.24 | 31.46 | 0.2593 | 21.61 |
| SGF | 76.40 | 30.77 | 0.2477 | 20.71 |
| SGF, probe | 76.07 | 30.73 | 0.2472 | 20.71 |
| SLCF | 72.05 | 31.25 | 0.2576 | 21.42 |
The reported cost is the cost term of the KL-regularized control problem SLCF solves, so the quantity compared is the quantity optimized. It measures departure from the pretrained process on one scale, including the re-noising transitions. For SGF, it agrees with the exact KL of each Gaussian transition within 4%. The path KL is defined between stochastic paths with injected noise, so the same scale does not apply to a noiseless ODE path. Appendix E.1.5 of the revision adds this discussion.
[W3, Q2] Contribution of the safety function and the control
To separate the safety function from the control, we filled in the matrix the reviewer suggested, crossing the safety function (SGF's MMD or our CLIP probe) with the guidance (SGF's re-noising repellency or SLCF's control, Eq. 8) and the stopping (the end of SGF's window, , or the calibrated ). For SGF with the probe, we replaced only the direction of its push by and kept the step norm of SGF's MMD push. and of the MMD rows are calibrated by the same procedure and data as the reported cell, and all rows use SD v1.4, DDPM 50 steps and the same per-prompt seeds, with quality measured on COCO-1k. We add this matrix to Appendix G.5.
[Table R7. Safety function × guidance and stopping (nudity). With MMD, adaptive stopping never fires. Bold: best among A–F.]
| Cell | Safety function | Guidance and stopping | MMA | RAB | UD | FID | CLIP | HPS | Pick |
|---|---|---|---|---|---|---|---|---|---|
| – | – | no control | 0.967 | 0.823 | 0.802 | 71.24 | 31.46 | 0.2593 | 21.61 |
| A | MMD (prior) | SGF + fixed window | 0.621 | 0.190 | 0.431 | 76.40 | 30.77 | 0.2477 | 20.71 |
| B | probe (SLCF) | SGF + fixed window | 0.627 | 0.177 | 0.422 | 76.07 | 30.73 | 0.2472 | 20.71 |
| C | MMD (prior) | SLCF + same fixed window | 0.860 | 0.278 | 0.509 | 73.11 | 31.08 | 0.2586 | 21.42 |
| D | probe (SLCF) | SLCF + same fixed window | 0.195 | 0.063 | 0.121 | 71.86 | 31.18 | 0.2567 | 21.43 |
| E | MMD (prior) | SLCF + adaptive stopping | 0.861 | 0.253 | 0.397 | 72.70 | 30.92 | 0.2591 | 21.39 |
| F | probe (SLCF) | SLCF + adaptive stopping | 0.181 | 0.051 | 0.103 | 72.05 | 31.25 | 0.2576 | 21.42 |
The gain comes from the probe together with the SLCF guidance that pushes along it. Neither gives it alone, since the probe with SGF guidance (B) stays at the level of SGF and MMD with SLCF guidance (C, E) is less safe than SGF.
Quality follows the guidance, not . With SLCF guidance (C–F), HPS is 0.256–0.259 and PickScore 21.4 for every safety function and stopping rule, close to no control. With SGF guidance (A, B), HPS is 0.247–0.248, PickScore 20.7 and FID 76. On the same captions, F and A differ by paired (HPS) and 19.9 (PickScore).
Safety depends on the combination. Within SGF guidance, changing the safety function leaves ASR unchanged (A 0.621, B 0.627), and the probe still scores 85% of SGF's outputs above . Within SLCF guidance, changing the safety function lowers ASR from 0.860 (C) to 0.195 (D), since SLCF pushes along the gradient of and a more accurate has a larger effect.
The improvement remains with the same safety function. With the probe fixed (B → F), MMA-Diffusion falls from 0.627 to 0.181, Ring-A-Bell from 0.177 to 0.051 and UnlearnDiff from 0.422 to 0.103, while HPS rises from 0.2472 to 0.2576 and FID falls from 76.07 to 72.05. With MMD fixed (A → C, E), the quality improvement remains.
Revision. Appendix E.1.5 discusses the path divergence, and Appendices H.6 and G.5 add the quality of SGF and the ablation.
- Rating
- 1/4
- Confidence
- 2/4
- Soundness
- 2/3
- Presentation
- 2/3
- Informativeness
- 2/3
Read review
Summary
SLCF introduces a training-free safety controller for diffusion sampling. A calibrated stopping rule determines when each sample can continue without intervention. Experiments cover nudity removal, inappropriate content, and memorization mitigation.
Strengths
The method provides useful sample-dependent intervention and substantial empirical safety improvements. On MMA-Diffusion, the reported unsafe rate is 18.1%, compared with 29.7% for the strongest listed baseline. Additional backbone and evaluator checks strengthen the empirical evidence.
Weaknesses
The main guarantee assumes a risk bound for every admitted stopping state. However, calibration estimates an average over uncontrolled states. This does not establish the required statewise bound, particularly when control changes the distribution of visited states.
The external-evaluator bounds use disagreement rates measured on controlled test outputs. They therefore provide a retrospective audit rather than a safety guarantee fixed before deployment.
These concerns weaken the central certification claim despite the promising empirical results.
Questions for the authors
How does the pooled calibration establish the statewise assumption required by Proposition 1 under controlled sampling?
Can the external-evaluator bound be calibrated separately and evaluated unchanged on disjoint test prompts?
5 comments
Response to W1 & Q1: New procedure and theoretical justification
We thank the reviewer for the careful reading and asking the importance question for our paper. We sincerely believe that our theory and corresponding the importance of this paper is improved in this rebuttal. Overall, we introduce a procedure that certifies the deployed stopping rule, prove its guarantee, and show experimentally that the evaluator bound can be fixed before deployment when evaluator labels are available. The main claims of the paper hold under the new procedure and in the new experiments. We have uploaded a revised paper, with the changes marked in purple. We address each point in detail below.
[W1, Q1] Statewise assumption under controlled sampling
The guarantee needs only the violation rate averaged over the stopped samples, not a bound at every state, and we certify this average for the deployed rule directly.
Data. Each task splits its prompts into three disjoint sets.
| Set | Prompts | Role |
|---|---|---|
| Fit | 400 calibration prompts | fix the stopping curve and the candidate rules |
| Hold | 200 calibration prompts per test (20 new seeds per class for memorization) | certify the rule |
| Test | benchmarks of Tables 2–4 | report only |
Procedure.
- Step 1 (fit). Calibrate the stopping curve on uncontrolled states. One curve per task serves every control strength and type.
- Step 2 (fit, optional). For each control strength , check that the lower bound on of Prop R1 is within the allowed range. It spends no hold prompts and can serve as a search over .
- Step 3 (fit). Run SLCF controlled to once and list the candidate rules in a fixed order, the curve itself and then the curve with an earliest stopping time (the rule may stop only at ) at which the fit violation rate stays below . One run serves every candidate, since rules that differ only in follow the same trajectory up to their stop.
- Step 4 (hold). Test the candidates in this order, each on its own hold set, the first at level and the others at , and deploy the first that passes.
Theoretical justification.
The guarantee rests on Step 4 alone, since by Prop R2 the probability of deploying a rule whose violation rate exceeds is at most , with no assumption on the states. The statewise assumption is replaced by a density-ratio condition, which tells when a curve calibrated without control carries over to the controlled sampler (Prop R1) and is checked in Step 2.
Prop R1 (uncontrolled calibration under a density-ratio condition). Let be the law of the stopping state that the rule admits on uncontrolled trajectories, and the law of the stopping state of the deployed sampler. If , then
In particular, the deployed sampler satisfies whenever .
Prop R2 (hold-out certification). Assume that the hold prompts and the deployment prompts are i.i.d. Fix the stopping rule before the hold prompts are seen. Let be the number of hold samples on which the rule stops and the number of them with . Then, with probability at least ,
the one-sided Clopper–Pearson upper limit. If rules are tested in an order fixed in advance at levels summing to at most , the probability that the procedure certifies a rule with is at most .
Proof sketch. For Prop R1, change the measure from to and bound the density ratio by , since . For Prop R2, i.i.d sampling makes binomial with the deployed violation rate as its parameter, and the Bonferroni inequality adds the errors of all tests.
Revision. We state the procedure in Section 3.2 and Appendix C, rewrite Section 4 around Prop R2, and add Prop R1 as Proposition 2 in Appendix B.2
Response to W1 & Q1: Empirical validation
[W1, Q1] Statewise assumption under controlled sampling (continued)
Empirical validation
Lower bound on (Step 2). Nudity and memorization satisfy Prop R1 at every searched, and CoPro does not. Prop R1 gives the measurable lower bound . The states admitted by the uncontrolled curve have risk 0.004–0.007, far below , so Prop R1 allows up to 15–24. We add this check to Appendix F.3.
[Table R1. Prop R1 on the 400 fit prompts at . *: reported .]
| Task | Allowed | (95% UCB) | Lower bound on | ||
|---|---|---|---|---|---|
| Nudity | 0.0042 | 24 | 500 | 0.054 (0.076) | 12.8 |
| 600 | 0.043 (0.064) | 10.2 | |||
| 700* | 0.041 (0.061) | 9.6 | |||
| 800 | 0.050 (0.072) | 11.9 | |||
| 900 | 0.058 (0.081) | 13.7 | |||
| CoPro | 0.0060 | 17 | 160* | 0.139 (0.172) | 23.2 |
| 240 | 0.113 (0.143) | 18.9 | |||
| 320 | 0.111 (0.140) | 18.5 | |||
| Memorization | 0.0065 | 15 | 2000 | 0.013 (0.026) | 1.9 |
| 2500* | 0.010 (0.023) | 1.5 | |||
| 3000 | 0.010 (0.023) | 1.5 |
Certification (Steps 3–4). Nudity and memorization deploy the first candidate, the curve itself, which is certified on hold. On CoPro, Step 3 gives the candidates (), the curve and fail, and stops 187 hold samples of which 8 have (0.043). By Prop R2, the probability of deploying a rule above is at most . Section 6.3 now reports this certification for every task in Table 4.
[Table R2. Prop R2 on the hold sets. The limit is at level 0.05 for the curve and at 0.05/3 for CoPro .]
| Task | Rule | Violation (95% UCB) | Certified at | Mean stopping time | |
|---|---|---|---|---|---|
| Nudity | submitted | 1.000 | 0.060 (0.095) | yes | 0.46 |
| CoPro | submitted | 0.935 | 0.118 (0.164) | no | 0.60 |
| CoPro | 0.935 | 0.043 (0.086) | yes | 0.80 | |
| Memorization | submitted | 1.000 | 0.010 (0.031) | yes | 0.56 |
Additional analysis of CoPro. Control lowers the risk of the prompts it stops less in CoPro than in nudity, and the remaining risk puts the curve alone above on CoPro. The run of Step 3 records, every 4 steps from , the score the rule reads and the actual risk (fraction of 8 pretrained-model completions with ). The stopping time it gives matches the deployed sampler within 1–2 standard errors (CoPro 0.107 vs. 0.139, nudity 0.053 vs. 0.041). Applying the same curve to the uncontrolled trajectory of each prompt splits the stopped prompts into those that stop also without control and those that stop only under control.
[Table R3. The submitted rule replayed on the controlled trajectories of the 400 fit prompts. Risk: fraction of 8 pretrained-model completions with .]
| Task | Released also without control: count / risk | Released only under control: count / risk | Risk of the latter, uncontrolled () at release |
|---|---|---|---|
| Nudity | 60 / 0.000 | 339 / 0.063 | 0.856 0.063 (−93%) |
| CoPro | 205 / 0.041 | 169 / 0.187 | 0.731 0.187 (−74%) |
In both tasks, most stopped prompts stop because the control lowers their score below the curve. For these prompts, the control removes 93% of the risk in nudity and 74% in CoPro. On these states, the score the rule reads is 0.35–0.37 times the actual risk in both tasks (1.09–1.10 on uncontrolled states). Halving the threshold still leaves the CoPro violation rate at 0.102 (UCB 0.132). The excess comes from prompts that stop early, so the candidates of Step 3 delay the earliest stopping time instead of lowering the threshold. We add this analysis to Appendix F.4.
Test. Nudity and memorization deploy the curve evaluated in the submission, so their results in Table 4 stand, and CoPro is evaluated with its deployed rule. On CoPro the deployed rule lowers the test violation rate from 0.106 to 0.038 (UCB 0.050), with IP and CLIPScore at the level of the curve alone. Tables 2 and 4 of the revision report the deployed CoPro rule.
[Table R4. The certified CoPro rule on the 994 test prompts. SAFREE + SGF is the best baseline in Table 2.]
| Rule | (95% UCB) | IP | CLIP | Mean stopping time | |
|---|---|---|---|---|---|
| SAFREE + SGF | – | – | 0.120 | 27.74 | – |
| SLCF, submitted | 0.941 | 0.106 | 0.106 | 27.79 | 0.60 |
| SLCF, | 0.927 | 0.038 (0.050) | 0.099 | 27.77 | 0.81 |
[Table R5. IP by category on the 994 CoPro test prompts. Best baseline: the lower of the two baselines in Table 2 per category. Bold: below it.]
| Rule | Avg. | Harass. | Hate | Illegal | Self-harm | Sexual | Shock. | Viol. |
|---|---|---|---|---|---|---|---|---|
| Best baseline | 0.120 | 0.106 | 0.070 | 0.169 | 0.134 | 0.070 | 0.127 | 0.141 |
| SLCF, submitted | 0.106 | 0.141 | 0.035 | 0.120 | 0.099 | 0.056 | 0.120 | 0.169 |
| SLCF, | 0.099 | 0.120 | 0.049 | 0.099 | 0.127 | 0.049 | 0.106 | 0.141 |
Response to W1 & Q1: Extension to calibration on controlled states
[W1, Q1] Statewise assumption under controlled sampling (continued)
Extension to calibration on controlled states.
Running Step 1 on controlled states removes the density-ratio condition, and the resulting rule is certified with margin in all three tasks. The curve is then fixed on the states the deployed sampler actually judges, at the cost of a calibration for each . We add this extension to Appendix F.5.
[Table R6. Controlled-state curve against the deployed rule on the same hold sets (corrected for for the deployed CoPro rule).]
| Task | Rule | Violation (95% UCB) | Mean stopping time | |
|---|---|---|---|---|
| Nudity | deployed | 1.000 | 0.060 (0.095) | 0.46 |
| Nudity | controlled-state curve | 0.995 | 0.015 (0.038) | 0.61 |
| CoPro | deployed () | 0.935 | 0.043 (0.086) | 0.80 |
| CoPro | controlled-state curve | 0.870 | 0.011 (0.036) | 0.89 |
| Memorization | deployed (submitted) | 1.000 | 0.010 (0.031) | 0.56 |
| Memorization | controlled-state curve | 1.000 | 0.020 (0.045) | 0.48 |
[Table R7. The controlled-state curve on the test sets, with the 95% UCB of its violation in parentheses. Evaluator and quality as in the paper, with sim$_{95}$ for memorization (COCO-10k for nudity, Imagenette for memorization).]
| Task / set | ext. | Violation: deployed ext. | Evaluator: deployed ext. | Quality: deployed ext. | Mean stopping time ext. |
|---|---|---|---|---|---|
| Ring-A-Bell | 1.000 | 0.051 0.025 (0.078) | 0.051 0.127 | – | 0.60 |
| UnlearnDiff | 1.000 | 0.086 0.034 (0.077) | 0.103 0.112 | – | 0.61 |
| MMA-Diffusion | 0.985 | 0.099 0.035 (0.046) | 0.181 0.189 | – | 0.60 |
| COCO | 0.982 | 0.006 0.001 (0.002) | 0.049 0.048 | 24.44 / 31.08 24.51 / 31.06 | 0.63 |
| CoPro | 0.904 | 0.038 0.012 (0.020) | 0.104 0.094 | – | 0.89 |
| Memorization | 1.000 | 0.009 0.011 | 0.372 0.374 | 38.55 / 30.94 38.80 / 30.95 | 0.48 |
The violation rate falls to 1/2–1/6 of the deployed rule in nudity and CoPro, with a limit of 0.046 even on the attack prompts of MMA-Diffusion. Stopping is later in both tasks (nudity 0.46 → 0.61, CoPro 0.80 → 0.89). In memorization, the extended curve releases earlier (0.56 → 0.48), and both rules stay near (0.009, 0.011). Evaluator results and quality are mostly unchanged. The nudity evaluator rate moves within ±0.01, COCO differs by 0.07 in FID and 0.02 in CLIPScore, memorization FID differs by 0.25, and CoPro IP falls from 0.104 to 0.094. Where to fix the curve is a choice within the same procedure, and both rules are certified on hold by Prop R2. Uncontrolled calibration fixes one curve for every setting and releases earlier where it is certified, while controlled-state calibration needs a record per setting and is certified without the condition.
Comments on the paper
1 comment
Author-Reviewer Discussion
Dear Reviewers,
Thank you for your time and thoughtful reviews. With the author–reviewer discussion period ending on November 18 (AoE), please review the authors' rebuttal and share your updated assessment. Specifically, let us know whether your main concerns have been resolved, and if not, which points remain open.
Your input before the deadline is greatly appreciated!
AC
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Response to W1 & Q4, Q1: Key insight, comparison with STG and contribution of the safety function and the control
We thank the reviewer for the thoughtful review. We added a calibration procedure whose guarantee covers the deployed rule, a direct comparison with STG, and ablations of the stopping rule and the safety function. We have uploaded a revised paper, with the changes marked in purple. We address each point in detail below.
[W1-1] Novelty of the key insight
By "key insight" we meant the observation that motivates the calibration, not a claimed contribution. Once the control stops, the risk under the pretrained model depends on the state alone, so it can be measured by pretrained-model completions from that state. This is what lets us calibrate when to stop, per time and per sample, and certify the deployed rule. Fixed-window methods share the same property but have no such criterion for when to stop. The contribution is this calibration and its certification.
[W1-2, Q4] UG and STG
We agree that our control is related to training-free guidance such as Universal Guidance. The submission discussed only the control view, since the stopping rule and its probabilistic guarantee follow from the control formulation. We add the relation to Universal Guidance in Section 3.1 and Appendix D.3.
STG. STG addresses the same task but needs access to a differentiable evaluator during generation, while SLCF and our baselines assume that only reference data are available, so STG was not in our main tables. Such access is often unavailable in practice, as our NudeNet classifier is distributed in ONNX format. STG utilizes the gradient of a differentiable NudeNet detector, which differs from the NudeNet classifier of Table 2, and measures DSR with a detector of the same family. We ran STG at its released setting with the same prompts and seeds and scored it with both evaluators, with quality measured on COCO-1k and time per image on MMA-Diffusion. STG's released code provides only the nudity reward, so on the 994 CoPro prompts we ran it as released.
[Table R1. Nudity and CoPro. Classifier: the classifier of Table 2. 1 − DSR: the evaluator of the STG paper. Q16: CoPro unsafe rate. Bold: best per column among STG and SLCF.]
STG scores well under its own detector but poorly under the classifier of Table 2, with a gap of 0.53–0.73 between the two, whereas SLCF stays low under both, with a gap of at most 0.124. STG lowers the score of its own guidance detector without removing the content, as that detector flags 1.6% of its outputs on MMA-Diffusion while the classifier flags 88.1%. In quality, SLCF has higher HPS and PickScore than STG (paired z 8.4, 7.0). STG takes 2.4 times as long as SLCF, since it differentiates the detector through the denoiser. On CoPro, STG stays at the base model's level (0.207 against 0.217), since extending it to a new concept needs a differentiable evaluator of that concept, while SLCF needs only new reference data. We add the comparison with STG in Appendix H.7.
[Q1-1] Contribution of the safety function and the control
The gain comes from the probe Φ together with the SLCF guidance that pushes along it. To separate the safety function from the control, we tested combinations of three components, the safety function (SGF's MMD or our CLIP probe), the guidance (SGF's re-noising repellency or SLCF's control) and the stopping (the end of SGF's window, t=0.40, or the calibrated y∗). For SGF with the probe, we replaced only the direction of its push by −∇Φ and kept the step norm of SGF's MMD push. All rows use the same calibration, sampler and seeds, with quality on COCO-1k. We add this matrix to Appendix G.5.
[Table R2. Safety function × guidance and stopping (nudity). With MMD, adaptive stopping never fires. Bold: best among A–F.]