Abstract
Diffusion-based image inpainting has revolutionized image editing but also introduced significant risks regarding the creation of malicious deepfakes and defamatory content. We propose the Structure Disruption Attack (SDA), a novel defense mechanism designed to protect sensitive image regions from unauthorized AI manipulation. By strategically injecting imperceptible perturbations that target self-attention queries during the initial stages of the denoising process, SDA induces a "cascade failure" in the model's structural generation. Our evaluation shows that SDA achieves state-of-the-art visual disruption and quantitative performance, significantly outperforming existing methods in both effectiveness and computational efficiency.
Introduction
The rapid advancement of diffusion models has made sophisticated image inpainting—the process of filling in or altering specific regions of an image—accessible to anyone. While beneficial for creative endeavors, this technology poses a severe threat to individual privacy and societal trust. Malicious actors can easily repurpose personal photos to generate harmful or misleading content.
Existing defense strategies often rely on adversarial perturbations to confuse AI models. However, many of these methods apply "global" noise that is frequently ignored by inpainting models focusing on specific masked regions. Furthermore, current inpainting-specific defenses are often too slow for practical use or are easily circumvented. SDA addresses these gaps by providing a robust, efficient way to "lock" sensitive regions against AI-driven edits.
Methodology
The core innovation of SDA lies in its exploitation of the "coarse-to-fine" nature of diffusion models. During image generation, these models establish basic contours and global structure in the early timesteps before adding fine details. SDA specifically targets the self-attention mechanism, which is responsible for maintaining structural consistency and spatial relationships within the generated content.
Specifically, the researchers identified that perturbing the queries ($Q$) in self-attention layers during the initial denoising steps causes a total collapse of the generation process. Rather than attacking every step of the denoising chain, SDA optimizes a local perturbation to maximize the discrepancy in these queries. This prevents the model from forming a coherent structural foundation, leading to a "cascade failure" where the final output fails to align with either the original image structure or the malicious text prompt.
Experimental Evaluation
The effectiveness of SDA was evaluated using two primary datasets: a Face Dataset consisting of 100 human portrait pairs and an Instance Dataset comprising 100 samples from the COCO benchmark. Malicious attack scenarios, such as "A man in the hospital," were simulated using prompts generated via ChatGPT to ensure a variety of realistic threats.
Key Results
SDA demonstrated superior performance across several key dimensions:
- Visual Disruption: Protected images resulted in "failed edits" that were either completely disordered or logically inconsistent with the source image.
- Quantitative Performance: On the Face dataset, SDA achieved a Fréchet Inception Distance (FID) of 265.21, significantly higher than competitors like DiffusionGuard (197.89) or DDD (233.19). A higher FID indicates a more successful defense, as the resulting malicious edit is of much lower quality.
- Efficiency: SDA is approximately twice as fast as full-chain approaches, requiring only about 1 minute and 29 seconds to protect an image.
- Robustness and Transferability: The protection remains effective against common image processing like JPEG compression and cropping. Furthermore, perturbations designed for Stable Diffusion v2 proved effective against v1.5, demonstrating strong model transferability.
Conclusion
Structure Disruption Attack (SDA) provides a powerful and efficient defense against the growing threat of malicious AI inpainting. By targeting the structural "anchors" of diffusion models—self-attention queries—SDA effectively prevents the formation of coherent unauthorized edits. While currently dependent on the use of inpainting masks, future work will explore extending these principles to mask-free, instruction-based editing techniques to stay ahead of the evolving landscape of AI-powered image manipulation.
Summary updated