OPSD-Erase: On-Policy Concept Erasure for Text-to-Image Generative Models

opsd-erase:-on-policy-concept-erasure-for-text-to-image-generative-models

OPSD-Erase: On-Policy Concept Erasure for Text-to-Image Generative Models

[Submitted on 30 Nov 2026]

View PDF HTML (experimental)

Abstract:Open-weight text-to-image models can generate high-quality images from natural language prompts, but they can also be induced to produce unsafe content, creating substantial risks in open deployment. Existing defenses are insufficient for two reasons. External detection modules and inference-time guidance can be removed once the weights are released. More durable weight-editing methods, including closed-form editing and existing fine-tuning-based erasure, are typically trained on states that differ from those visited by the edited model during sampling, creating a training-inference inconsistency that leaves concept erasure incomplete. We address this problem by viewing text-to-image generation as a unified reverse process and defining concept erasure as alignment of the one-step reverse update on the states visited during sampling. We propose OPSD-Erase, an on-policy framework that trains on student-visited states, uses a frozen reference model to provide safe one-step targets, and uses anchor conditions to preserve benign generation behavior. A probe on the sampling trajectory reveals two mismatch patterns: under off-policy fixed-data supervision, update error grows as the rollout leaves the training support; more generally, non-on-policy methods retain substantial residual mismatch across visited states. In contrast, OPSD-Erase keeps the one-step reverse update aligned on the states it visits. Experiments on SD1.4 and Z-Image show that OPSD-Erase more reliably suppresses unsafe concept realization while preserving benign utility, and that this safety behavior remains robust under wording shift, multi-concept erasure, and sequential erasure.

Submission history

From: Yunfei Zheng [view email]
[v1] Mon, 30 Nov 2026 08:42:34 UTC (3,839 KB)