arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.16625cs.CV
收藏

DeContext作为防御:扩散变换器中的安全图像编辑

DeContext as Defense: Safe Image Editing in Diffusion Transformers

The Hong Kong Polytechnic University(香港理工大学)

Linghui Shen, Mingyue Cui, Xingyi Yang

AI总结:

DeContext通过扰动注意力层来防止图像编辑,有效保护输入图像免受未经授权的修改。

摘要:

基于上下文的扩散模型允许用户轻松且真实地修改图像。然而,这种能力也带来了严重的隐私问题:个人图像可以被轻易操纵用于身份冒充、虚假信息或其他恶意用途,而无需所有者的同意。尽管先前的工作探讨了输入扰动以保护个性化文本到图像生成中的滥用,但现代大规模基于DiT的上下文扩散模型的鲁棒性仍 largely未被检查。在本文中,我们提出了DeContext,一种新的方法来保护输入图像免受未经授权的上下文编辑。我们的关键见解是源图像的上下文信息主要通过多模态注意力层传播到输出。通过注入小的、有针对性的扰动,这些扰动会削弱这些跨注意力路径,DeContext打破这种流动,从而有效地将输入和输出分开。这种简单的防御方法既高效又稳健。我们进一步表明,早期去噪步骤和特定的Transformer块主导了上下文传播,这使我们能够集中扰动到最需要的地方。在Flux Kontext和Step1X-Edit上的实验表明,DeContext一致地阻止了不受欢迎的图像编辑,同时保持了视觉质量。这些结果突显了基于注意力的扰动作为对抗图像操纵的强大防御作用。代码可在https://github.com/LinghuiiShen/DeContext上获得。

英文摘要:

In-context diffusion models allow users to modify images with remarkable ease and realism. However, the same power raises serious privacy concerns: personal images can be easily manipulated for identity impersonation, misinformation, or other malicious uses, all without the owner's consent. While prior work has explored input perturbations to protect against misuse in personalized text-to-image generation, the robustness of modern, large-scale in-context DiT-based models remains largely unexamined. In this paper, we propose DeContext, a new method to safeguard input images from unauthorized in-context editing. Our key insight is that contextual information from the source image propagates to the output primarily through multimodal attention layers. By injecting small, targeted perturbations that weaken these cross-attention pathways, DeContext breaks this flow, effectively decouples the link between input and output. This simple defense is both efficient and robust. We further show that early denoising steps and specific transformer blocks dominate context propagation, which allows us to concentrate perturbations where they matter most. Experiments on Flux Kontext and Step1X-Edit show that DeContext consistently blocks unwanted image edits while preserving visual quality. These results highlight the effectiveness of attention-based perturbations as a powerful defense against image manipulation. Code is available at https://github.com/LinghuiiShen/DeContext.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑