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.


翻译:上下文扩散模型使用户能够以惊人的便捷性和真实感修改图像。然而,这种能力也引发了严重的隐私担忧:个人图像可以在未经所有者同意的情况下被轻易操纵,用于身份冒充、传播错误信息或其他恶意用途。尽管先前的研究已探索通过输入扰动来防范个性化文本到图像生成中的滥用,但现代大规模基于上下文DiT模型的鲁棒性在很大程度上仍未得到检验。本文提出DeContext,一种保护输入图像免受未经授权的上下文编辑的新方法。我们的核心见解是:源图像的上下文信息主要通过多模态注意力层传播到输出。通过注入微小、有针对性的扰动来削弱这些交叉注意力路径,DeContext能够中断这种流动,有效解耦输入与输出之间的关联。这种简单的防御方法既高效又鲁棒。我们进一步证明,早期去噪步骤和特定的Transformer模块主导了上下文传播,这使我们能够将扰动集中在最关键的位置。在Flux Kontext和Step1X-Edit上的实验表明,DeContext能持续阻止不希望的图像编辑,同时保持视觉质量。这些结果突显了基于注意力的扰动作为对抗图像操纵的强大防御手段的有效性。代码发布于 https://github.com/LinghuiiShen/DeContext。

0
下载
关闭预览

相关内容

Python图像处理,366页pdf,Image Operators Image Processing in Python
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员