Safe Few-Step Generation via Velocity Editing
Summary
VESFlow is a training-free safety method for flow matching-based text-to-image generation that edits velocity fields to ensure safe output while maintaining prompt integrity.
View Cached Full Text
Cached at: 06/23/26, 05:41 AM
Paper page - Safe Few-Step Generation via Velocity Editing
Source: https://huggingface.co/papers/2606.23267
Abstract
VESFlow is a training-free safety method for flow matching-based text-to-image generation that edits velocity fields to ensure safe output while maintaining prompt integrity.
Flow matchinghas recently emerged as a strong paradigm for state-of-the-art text-to-image (T2I) generation, enabling high-quality generation with a small number of sampling steps. As these models are increasingly integrated into real-world applications, ensuring safe and non-sensitive content generation has become a critical requirement. However, adaptingsafetyandconcept removalmethods to this new generation framework remains an open challenge. Specifically, prior methods largely rely on iterative trajectory steering across a number of denoising steps or on CLIP-centric prompt embedding manipulation. These design assumptions pose fundamental bottlenecks forsafetyinflow matching-based T2I generation, where limited sampling steps constrain iterative correction and modern context-aware text encoders diminish the effectiveness of embedding-level interventions. In this paper, we propose VESFlow, a training-freesafetymethod tailored toflow matchingwith extremely few sampling steps. Leveraging the fact thatflow matchingmodels learn themarginal velocity, we directly edit thevelocity fieldvia asafe-conditional posterior. VESFlow steers the trajectory toward safe outputs while leaving the conditioning prompt unchanged. Building on the observation that VESFlow leaves outputs unchanged under benign prompts, we further introduce arisk score-based filteringthat bypasses velocity editing to reduce computational cost while preserving benign prompt generation. Based on this filtering, we propose VESFlow+, a stronger variant of VESFlow that not only edits the velocity toward the safe direction, but also pushes it away from the unsafe direction. Experimental results show that VESFlow+ removes the target concept, reducing theattack success ratebyNudeNetto 6.3% on Ring-A-Bell and 6.8% on MMA-Diffusion on the 4-stepMeanFlowmodel, while preserving fidelity on benign prompts.
View arXiv pageView PDFProject pageAdd to collection
Get this paper in your agent:
hf papers read 2606\.23267
Don’t have the latest CLI?curl \-LsSf https://hf\.co/cli/install\.sh \| bash
Models citing this paper0
No model linking this paper
Cite arxiv.org/abs/2606.23267 in a model README.md to link it from this page.
Datasets citing this paper0
No dataset linking this paper
Cite arxiv.org/abs/2606.23267 in a dataset README.md to link it from this page.
Spaces citing this paper0
No Space linking this paper
Cite arxiv.org/abs/2606.23267 in a Space README.md to link it from this page.
Collections including this paper0
No Collection including this paper
Add this paper to acollectionto link it from this page.
Similar Articles
Geometric Erasure by Contrastive Velocity Matching in Rectified Flows
This paper introduces GEM, a concept erasure framework for Rectified Flow models that combines trajectory-based unlearning with teacher-guided flow matching, achieving 5× faster and safer content suppression while preserving benign generation.
Perceptual Flow Matching for Few-Step Generative Modeling
Perceptual Flow Matching supervises flow matching in perceptual feature space, enabling high-quality few-step generation with 4-8 sampling steps instead of 35-50, without needing teacher models.
FlowMimic: Mask-free Visual Editing and Generation with Pixel-pair Warped Flow Field for Online Video Editing Data Generation and Modality Mimicry
FlowMimic presents a method for mask-free visual editing and generation across video and image modalities using pixel-pair warped flow fields, enabling real-time video editing data generation from image editing samples and aligning modality capabilities through mimicry losses.
Residual-Space Evolutionary Optimization via Flow-based Generative Models
Introduces a framework combining flow-based generative editing with evolutionary algorithms to perform optimization in residual space, enabling controllable data editing with non-differentiable objectives. Validated on MorphoMNIST and crystal data.
Trajectory as the Teacher: Few-Step Discrete Flow Matching via Energy-Navigated Distillation
This paper introduces Trajectory-Shaped Discrete Flow Matching (TS-DFM), which replaces blind stochastic jumps with guided navigation to significantly improve text generation efficiency and reduce computational costs. The method achieves superior perplexity and speed compared to traditional multi-step baselines while maintaining unchanged inference costs.