Abstract
While generative diffusion models excel in producing high-quality images, they can also be misused to mimic authorized images, posing a significant threat to AI systems. Efforts have been made to add calibrated perturbations to protect images from diffusion-based mimicry pipelines. However, most of the existing methods are too ineffective and even impractical to be used by individual users due to their high computation and memory requirements. In this work, we present novel findings on attacking latent diffusion models (LDM) and propose new plug-and-play strategies for more effective protection. In particular, we explore the bottleneck in attacking an LDM, discovering that the encoder module rather than the denoiser module is the vulnerable point. Based on this insight, we present our strategy using Score Distillation Sampling (SDS) to double the speed of protection and reduce memory occupation by half without compromising its strength. Additionally, we provide a robust protection strategy by counterintuitively minimizing the semantic loss, which can assist in generating more natural perturbations. Finally, we conduct extensive experiments to substantiate our findings and comprehensively evaluate our newly proposed strategies. We hope our insights and protective measures can contribute to better defense against malicious diffusion-based mimicry, advancing the development of secure AI systems.
The Challenge of Diffusion-Based Mimicry
Generative Diffusion Models (GDMs) have made it trivial to mimic an artist's style or maliciously edit someone’s likeness (e.g., via inpainting) without consent. To combat this, researchers have developed "adversarial protections"—calibrated, invisible noise added to images that causes AI models to produce chaotic, unusable results. However, existing tools like AdvDM, Photoguard, and Mist face a major hurdle: computational cost. They require calculating complex gradients through the entire diffusion process, often involving over 100 iterations of backpropagation. This makes protection impractical for individual artists or users with modest hardware.
Identifying the Vulnerability: The Encoder Bottleneck
A key contribution of this work is the discovery that the image encoder, rather than the denoiser, is the primary vulnerability in Latent Diffusion Models (LDMs). While the denoiser module is surprisingly robust, the image encoder $\mathcal{E}_\phi$ is the weak link. Because the latent $z$-space has a much larger "attack budget" than the pixel space, small changes in the input image lead to massive, destructive shifts in the latent representation. This insight allows for more targeted and efficient optimization of protective perturbations.
Proposed Methods: SDS and Gradient Descent
The authors propose a "plug-and-play" strategy to optimize protective perturbations more efficiently using two primary tools:
- Score Distillation Sampling (SDS): Borrowing a technique from text-to-3D generation, SDS is used to approximate the gradient of the semantic loss. This allows the framework to skip the most expensive parts of the calculation (saving the Jacobian of the U-Net), leading to a 2x speedup and 50% reduction in GPU memory usage.
- Gradient Descent (GD) for Naturalness: Traditionally, adversarial attacks use gradient ascent to maximize error, which often creates high-frequency "rainbow" artifacts. This research finds that minimizing the semantic loss (gradient descent) provides superior protection. It guides the model toward a "blurred" average of the dataset, which looks more natural to the human eye but is just as effective at breaking the AI's mimicry.
Experimental Results
The methods were evaluated across four distinct domains: Anime, Artworks (WikiArt), Landscapes, and Portraits. Key findings include:
- Efficiency: SDS-based methods dropped VRAM requirements from ~16GB to ~8GB while doubling processing speed.
- Effectiveness: The proposed strategies successfully defeated multiple mimicry pipelines, including SDEdit (image-to-image), Inpainting, and Textual Inversion.
- Human Preference: In user studies, the Gradient Descent method received a naturalness score of 4.55, significantly higher than the baseline AdvDM score of 2.94.
- Robustness: Protections remained effective even after common "purification" attempts like JPEG compression and cropping.
Conclusion and Future Work
This study demonstrates that focusing on the encoder vulnerability and utilizing SDS can make adversarial protection practical for individual users. While the current focus is on Latent Diffusion Models, future work will explore extending these techniques to pixel-space diffusion models and investigating even more stealthy perturbations to stay ahead of evolving anti-adversarial training techniques.
Summary updated