Preventing Latent Diffusion Model-Based Image Mimicry via Angle Shifting and Ensemble Learning

Preventing Latent Diffusion Model-Based Image Mimicry via Angle Shifting and Ensemble Learning

Minghao Li, Rui Wang, Ming Sun, Lihua Jing

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence
Main Track. Pages 1395-1403. https://doi.org/10.24963/ijcai.2025/156

The remarkable progress of Latent Diffusion Models (LDMs) in image generation has raised concerns about the potential for unauthorized image mimicry. To address these concerns, studies on adversarial attacks against LDMs have gained increasing attention in recent years. However, existing methods face bottlenecks when attacking the denoising module. In this work, we reveal that the robustness of the denoising module stems from two key factors: the cancellation effect between adversarial perturbations and estimated noise, and unstable gradients caused by randomly sampled timesteps and Gaussian noise. Based on these insights, we introduce a cosine similarity adversarial loss to prevent the generation of perturbations that are easily impaired and develop a more stable optimization strategy by ensembling gradients and fixing the noise in the latent space. Additionally, we propose an alternating iterative framework to reduce memory usage by mathematically dividing the optimization process into two spaces: latent space and pixel space. Compared to previous strategies, our proposed framework reduces video memory demands without sacrificing attack effectiveness. Extensive experiments demonstrate that the alternating iterative framework and the stable optimization strategy on cosine similarity loss are more efficient and more effective. Code is available at https://github.com/MinghaoLi01/cosattack.
Keywords:
Computer Vision: CV: Adversarial learning, adversarial attack and defense methods
Computer Vision: CV: Image and video synthesis and generation 
AI Ethics, Trust, Fairness: ETF: Safety and robustness