atlas

Research map / Image generation / Text-to-image diffusion

Training-Free Safe Text Embedding Guidance for Text-to-Image Diffusion Models

NeurIPS 2025 · Image generation › Text-to-image diffusion · approach: Compositional text-to-image guidance · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes STG, a training-free method that guides text embeddings during diffusion sampling using a safety classifier evaluated on the expected denoised image, for safe text-to-image generation across nudity, violence, and artist-style removal.

Problem

Text-to-image diffusion models generate unsafe content (nudity, violence, copyrighted artist styles) from malicious prompts; existing training-free methods do not use intermediate or final sample states and lack theoretical grounding.

Approach

Apply gradient ascent on a time-dependent safety function of the expected clean image (via Tweedie-style estimate from the score network) to the text embedding at each sampling step, which by a first-order expansion yields a safe guidance term aligning the model likelihood with the safety objective.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply STG (τ=0.18) rather than the base modelFLUX · Ring-A-Bell violenceDSR: 0.11 -> 0.53Helped
Apply STG (τ=0.18) rather than the base modelSD3 · Ring-A-Bell violenceDSR: 0.12 -> 0.54Helped
Apply STG (τ=0.18) rather than the base modelSDXL · Ring-A-Bell violenceDSR: 0.04 -> 0.50Helped
Apply STG (τ=0.18) rather than the base modelLCM · Ring-A-Bell violenceDSR: 0.02 -> 0.52Helped
Adjust text embeddings with STGStable Diffusion v1.4 · Remove Van Gogh styleLPIPS_e: 0.43 -> 0.46Helped
Adjust text embeddings with STGStable Diffusion v1.4 · Remove Kelly McKernan styleLPIPS_e: 0.42 -> 0.58Helped
Use FP16 inference (ablation)STG on Stable Diffusion v1.4 · Nudity (Ring-A-Bell)sampling time: 23.9 -> 14.0Helped
Use FP16 inference (ablation)STG on Stable Diffusion v1.4 · Nudity (Ring-A-Bell)GPU memory: 45.4 -> 22.8Helped
Use FP16 inference (ablation)STG on Stable Diffusion v1.4 · Nudity (Ring-A-Bell)DSR: 0.79 -> 0.79No clear effect
Set τ=0.40 instead of τ=0.15 (ρ=2.0) (ablation)STG on Stable Diffusion v1.4 · Nudity (Ring-A-Bell)DSR: 0.79 -> 0.88Helped
Set τ=0.40 instead of τ=0.15 (ρ=2.0) (ablation)STG on Stable Diffusion v1.4 · Nudity (Ring-A-Bell)PP: 0.90 -> 0.84Hurt

Surprising findings

Limitations

Experimental setup

Datasets: Ring-A-Bell SneakyPrompt I2P COCO validation

Benchmarks: Ring-A-Bell SneakyPrompt Concept Inversion COCO artist-style removal prompts

Metrics: defense success rate prior preservation (1-LPIPS) FID-1K CLIP score LPIPS ACC

Baselines: UCE RECE SLD SAFREE Negative Prompt SDG ESD SPM DUO

Builds on: Universal Guidance Classifier Guidance DUO SAFREE Diffusion Adaptive Text Embedding

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy