Differential Vector Erasure: Unified Training-Free Concept Erasure for Flow Matching Models
Zhiqi Zhang, Xinhao Zhong, Yi Sun, Shuoyang Sun, Bin Chen, Shu-Tao Xia, Xuan Wang
TL;DR
This work tackles safe deployment of flow-matching text-to-image models by enabling training-free erasure of undesirable concepts. It introduces Differential Vector Erasure (DVE), which models concepts as directional components in the velocity field and uses a differential vector field combined with projection-based selective correction to erase target concepts while preserving irrelevant content. The method supports multiple concepts and integrates with FlowEdit for image editing, while employing practical cost-reduction strategies like preprocessed vectors and early-stage corrections. Empirical results on FLUX demonstrate state-of-the-art erasure performance across NSFW, object, and artistic style tasks, with strong preservation of image quality and alignment to prompts. The approach offers a plug-and-play, deployment-friendly safety mechanism for flow-based generative systems.
Abstract
Text-to-image diffusion models have demonstrated remarkable capabilities in generating high-quality images, yet their tendency to reproduce undesirable concepts, such as NSFW content, copyrighted styles, or specific objects, poses growing concerns for safe and controllable deployment. While existing concept erasure approaches primarily focus on DDPM-based diffusion models and rely on costly fine-tuning, the recent emergence of flow matching models introduces a fundamentally different generative paradigm for which prior methods are not directly applicable. In this paper, we propose Differential Vector Erasure (DVE), a training-free concept erasure method specifically designed for flow matching models. Our key insight is that semantic concepts are implicitly encoded in the directional structure of the velocity field governing the generative flow. Leveraging this observation, we construct a differential vector field that characterizes the directional discrepancy between a target concept and a carefully chosen anchor concept. During inference, DVE selectively removes concept-specific components by projecting the velocity field onto the differential direction, enabling precise concept suppression without affecting irrelevant semantics. Extensive experiments on FLUX demonstrate that DVE consistently outperforms existing baselines on a wide range of concept erasure tasks, including NSFW suppression, artistic style removal, and object erasure, while preserving image quality and diversity.
