# Escape the Context Manifold: Preventing DiT In-Context Editing via Conditional Flow Hijacking

*Yuhao He, Jinyu Tian*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/156139) · [Open on the map](../papers.html#p156139)

Category: [Diffusion & Image Generation](../pcat/5.md) › [Training-Free Diffusion Image Editing](../pgroup/477.md) · Type: new method · Keywords: in-context image editing, identity leakage, diffusion transformers, proactive defense, conditional flow hijacking

Areas: [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
Conditional Flow Hijacking adds imperceptible perturbations to the reference image to steer the denoising trajectory away from the original context manifold, thereby preventing identity leakage in DiT in-context editing.

## Explained to a 5-year-old
When we edit pictures using a special AI, the picture can still show hidden parts of the original photo. We want to stop that secret information from leaking. The new idea adds tiny invisible changes to the original picture. These changes make the AI get confused and draw a different picture. This keeps the secret parts safe while still making the picture look right.

## Explained to a 5-year-old, longer
Some computers can edit pictures by looking at a picture and a text description. They can change the picture to match the description. But sometimes they also keep hidden parts of the original picture, which can be a privacy problem. Existing ways try to stop this by making the computer forget the original picture. However, those ways don't work well when the description is complicated. The new idea looks at how the computer changes the picture step by step. It sees that the changes are guided by two directions: one from the description and one from the original picture. Instead of blocking the original picture, it adds very small, invisible changes to it. These changes trick the computer so that the second direction points somewhere else. As a result, the final picture is different and doesn't reveal the secret parts. The method works well on many pictures and keeps the picture quality good. It also works on other similar computer models, making it useful for many applications.

## For a technical reader
Diffusion Transformers (DiT) enable editing images based on a reference picture and a text prompt. Existing defenses suppress the reference's influence, but they can fail when the prompt is complex. The proposed Conditional Flow Hijacking adds tiny perturbations to the reference image, preserving the context pathway while redirecting steering signals in the transformer layers. This causes the denoising trajectory to drift away from the original identity, preventing leakage while keeping image quality and prompt alignment. Experiments on FLUX.1-Kontext and other models show strong suppression of identity leakage and good transferability.

## Problem
In-context image editing using diffusion transformers can inadvertently preserve the private identity of the reference image, leading to malicious leakage. Existing defenses that suppress context attention are often insufficient when edits are complex and prompt semantics dominate.

## Method
The approach interprets the denoising trajectory as being guided by prompt-consistent and reference-consistent directions. It adds imperceptible perturbations to the reference image, which redirect the context-induced steering signals in intermediate transformer layers, causing the final trajectory to drift away from the reference manifold while preserving the context pathway.

## Results
The approach significantly reduces reference identity leakage while preserving image quality and prompt alignment, outperforming prior baselines especially on complex scene editing prompts.

## Contributions
It introduces a proactive protection method that steers the denoising trajectory away from the original context manifold, preserves the context pathway, and demonstrates robustness and transferability across models.

## Practical relevance
Provides a practical defense for in-context generative models to protect private identity in public images.

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/156139)
