# Safe Few-Step Generation via Velocity Editing

*Yujin Choi, Jaehong Yoon*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/149039) · [OpenReview](https://openreview.net/forum?id=tJYkz9rQMx) · [alphaXiv](https://www.alphaxiv.org/abs/2606.23267) · [Open on the map](../papers.html#p149039)

Category: [Diffusion & Image Generation](../pcat/5.md) › [Text-to-Image Diffusion Control](../pgroup/288.md) · Type: new method · Keywords: text-to-image safety, flow matching, velocity editing, concept removal, risk scoring

Areas: [Multimodal](../areas/multimodal.md) › Multimodal Creation and Editing › Safe Generation; [Safety & Security](../areas/safety.md) › Generative Model Integrity › Concept Erasure and Safety Steering; [Generative Models (Diffusion & Flows)](../areas/generative-models.md) › Visual Editing and Conditioning › Generative Model Safety and Security

## Summary
VESFlow is a training-free safety method that edits the velocity field in flow matching to remove unsafe concepts while preserving benign prompts, with a risk-score filter variant VESFlow+ for stronger protection.

## Explained to a 5-year-old
Computers can make pictures when you give them words, like "a cat". Sometimes people want to make pictures that are not safe, like showing something they shouldn't. To stop that, we need a way to make the computer only draw safe pictures. The old safety tricks work by changing the picture many times, but that takes a lot of time. This new idea looks at how the picture is moving and changes that movement to be safe.

## Explained to a 5-year-old, longer
Computers can make pictures when you give them words, like "a cat". Sometimes people want to make pictures that are not safe, like showing something they shouldn't. To stop that, we need a way to make the computer only draw safe pictures. The old safety tricks work by changing the picture many times, but that takes a lot of time. A new kind of picture-making called flow matching uses very few steps to draw pictures quickly. However, the old safety tricks don't work well with this fast method. This paper comes up with a new idea: it looks at how the picture is moving and changes that movement to be safe. It does this without needing to retrain the whole picture model, just by editing a special calculation. It also adds a check that guesses if the picture will be safe, and if it looks safe, it skips the change to save time. When the check says the picture might be unsafe, it changes the movement to avoid drawing bad things. The result is that the computer still draws good pictures for normal requests, but bad pictures are much less likely. This helps keep the internet safe while still letting people make fun pictures quickly.

## For a technical reader
The paper tackles the challenge of ensuring safe content in fast text-to-image models that use flow matching with very few sampling steps. Existing safety techniques, which rely on iterative trajectory steering or CLIP-based prompt manipulation, do not work well under these constraints. The authors introduce a training-free approach that edits the model’s learned marginal velocity field through a Bayesian decomposition of the safe-conditional posterior, guiding the generation toward safe outputs without changing the input prompt. They also add a risk-score filter that skips the velocity editing for benign prompts to save computation, and a stronger variant that applies editing when the risk is high. Experiments show the method reduces NudeNet’s detection rate to 6.3 % on a step-4 model while keeping fidelity on normal prompts.

## Problem
Ensuring safe and non-sensitive content generation in text-to-image models that use very few sampling steps is challenging because existing safety methods rely on iterative corrections or prompt embedding manipulation, which are ineffective under limited steps and modern context-aware encoders.

## Method
The approach leverages the learned marginal velocity of flow matching models and directly edits the velocity field using a Bayesian decomposition of the safe-conditional posterior, steering trajectories toward safe outputs without altering the prompt. Additionally, a risk-score filter bypasses editing for benign prompts to reduce computation, and a stronger variant applies editing when the risk is high.

## Results
The approach reduces the detection rate by NudeNet to 6.3% on the step-4 model while preserving fidelity on benign prompts.

## Contributions
It introduces a training-free safety method that edits the velocity field in flow matching for few-step generation and proposes a risk-score filter that skips editing for benign prompts, providing stronger protection when needed.

## Practical relevance
The method enables safer deployment of few-step text-to-image models in real-world applications by preventing generation of unsafe content.

## Research questions this paper is counted under

- [How can we adaptively steer generative models to suppress harmful content while preserving fidelity?](../q/749.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/149039)
