Proceedings

Fine-grained Prompt Screening: Defending Against Backdoor Attack on Text-to-Image Diffusion Models

Download BibTeX Cite

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 601-609.

https://doi.org/10.24963/ijcai.2025/68

Abstract

Text-to-image (T2I) diffusion models exhibit impressive generation capabilities in recently studies. However, they are vulnerable to backdoor attacks, where model outputs are manipulated by malicious triggers. In this paper, we propose a novel input-level defense method, called Fine-grained Prompt Screening (GrainPS). Our method is motivated by the phenomenon, i.e., Semantics Misalignment, where the backdoor trigger causes the inconsistency between the cross-attention projections of object words (the key words to determine the main content of the generated image) and their true semantics. In particular, we divide each prompt into pieces and conduct fine-grained analysis by examining the impact of the trigger on object words in the cross-attention layers rather than their global influence on the entire generated image. To assess the impact of each word on object words, we formulate "semantics alignment score'' as the metric with a carefully crafted detection strategy to identify the trigger. Therefore, our implementation can detect backdoor input prompts and localize of triggers simultaneously. Evaluations across four advanced backdoor attack scenarios demonstrate the effectiveness of our proposed defense method.

  1. [An et al., 2024] Shengwei An, Sheng-Yen Chou, Kaiyuan Zhang, Qiuling Xu, Guanhong Tao, Guangyu Shen, Siyuan Cheng, Shiqing Ma, Pin-Yu Chen, Tsung-Yi Ho, et al. Elijah: Eliminating backdoors injected in diffusion models via distribution shift. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 10847-10855, 2024.
  2. [Chen et al., 2023] Weixin Chen, Dawn Song, and Bo Li. Trojdiff: Trojan attacks on diffusion models with diverse targets. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4035- 4044, 2023.
  3. [Chou et al., 2023] Sheng-Yen Chou, Pin-Yu Chen, and Tsung-Yi Ho. How to backdoor diffusion models? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4015-4024, 2023.
  4. [Chou et al., 2024] Sheng-Yen Chou, Pin-Yu Chen, and Tsung-Yi Ho. Villandiffusion: A unified backdoor attack framework for diffusion models. In Advances in Neural Information Processing Systems, 2024.
  5. [Dhariwal and Nichol, 2021] Prafulla Dhariwal and Alexan- der Nichol. Diffusion models beat gans on image synthe- sis. Advances in neural information processing systems, 34:8780-8794, 2021.
  6. [Gal et al., 2022] Rinon Gal, Yuval Alaluf, Yuval Atzmon, Or Patashnik, Amit Haim Bermano, Gal Chechik, and Daniel Cohen-or. An image is worth one word: Personal- izing text-to-image generation using textual inversion. In The Eleventh International Conference on Learning Rep- resentations, 2022.
  7. [Gao et al., 2019] Yansong Gao, Change Xu, Derui Wang, Shiping Chen, Damith C Ranasinghe, and Surya Nepal. Strip: A defence against trojan attacks on deep neural net- works. In Proceedings of the 35th annual computer secu- rity applications conference, pages 113-125, 2019.
  8. [Gu et al., 2019] Tianyu Gu, Kang Liu, Brendan Dolan- Gavitt, and Siddharth Garg. Badnets: Evaluating back- dooring attacks on deep neural networks. IEEE Access, 7:47230-47244, 2019.
  9. [Guan et al., 2024] Zihan Guan, Mengxuan Hu, Sheng Li, and Anil Vullikanti. Ufid: A unified framework for input-level backdoor detection on diffusion models. arXiv preprint arXiv:2404.01101, 2024.
  10. [Guo et al., 2023a] Junfeng Guo, Yiming Li, Xun Chen, Hanqing Guo, Lichao Sun, and Cong Liu. Scale-up: An efficient black-box input-level backdoor detection via an- alyzing scaled prediction consistency. In The Eleventh International Conference on Learning Representations, 2023.
  11. [Guo et al., 2023b] Yusheng Guo, Nan Zhong, Zhenxing Qian, and Xinpeng Zhang. Physical invisible backdoor based on camera imaging. In Proceedings of the 31st ACM International Conference on Multimedia, MM '23, page 7817-7825, New York, NY, USA, 2023. Association for Computing Machinery.
  12. [Hou et al., 2024] Linshan Hou, Ruili Feng, Zhongyun Hua, Wei Luo, Leo Yu Zhang, and Yiming Li. Ibd-psc: Input- level backdoor detection via parameter-oriented scaling consistency. In Forty-first International Conference on Machine Learning, 2024.
  13. [Hu et al., 2022] Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. In International Conference on Learn- ing Representations, 2022.
  14. [Huang et al., 2024] Yihao Huang, Felix Juefei-Xu, Qing Guo, Jie Zhang, Yutong Wu, Ming Hu, Tianlin Li, Geguang Pu, and Yang Liu. Personalization as a short- cut for few-shot backdoor attack against text-to-image dif- fusion models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 21169-21178, 2024.
  15. [Jiang et al., 2021] Yuming Jiang, Ziqi Huang, Xingang Pan, Chen Change Loy, and Ziwei Liu. Talk-to-edit: Fine- grained facial editing via dialog. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 13799-13808, 2021.
  16. [Kenton and Toutanova, 2019] Jacob Devlin Ming- Wei Chang Kenton and Lee Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for lan- guage understanding. In Proceedings of naacL-HLT, volume 1. Minneapolis, Minnesota, 2019.
  17. [Li et al., 2021] Yuezun Li, Yiming Li, Baoyuan Wu, Longkang Li, Ran He, and Siwei Lyu. Invisible backdoor attack with sample-specific triggers. In Proceedings of the IEEE/CVF international conference on computer vision, pages 16463-16472, 2021.
  18. [Li et al., 2024] Yanzhou Li, Tianlin Li, Kangjie Chen, Jian Zhang, Shangqing Liu, Wenhan Wang, Tianwei Zhang, and Yang Liu. Badedit: Backdooring large language mod- els by model editing. In The Twelfth International Confer- ence on Learning Representations, 2024.
  19. [Lin et al., 2014] Tsung-Yi Lin, Michael Maire, Serge Be- longie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Com- mon objects in context. In Computer Vision-ECCV 2014: 13th European Conference, Zurich, Switzerland, Septem- ber 6-12, 2014, Proceedings, Part V 13, pages 740-755. Springer, 2014.
  20. [Nguyen and Tran, 2020] Tuan Anh Nguyen and Anh Tuan Tran. Wanet-imperceptible warping-based backdoor at- tack. In International Conference on Learning Represen- tations, 2020.
  21. [Pinkney, 2022] Justin N. M. Pinkney. Pokemon blip captions. https://huggingface.co/datasets/lambdalabs/ pokemon-blip-captions/, 2022. Link
  22. [Ramesh et al., 2022] Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, and Mark Chen. Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 1(2):3, 2022.
  23. [Rombach et al., 2022] Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 10684-10695, 2022.
  24. [Ruiz et al., 2023] Nataniel Ruiz, Yuanzhen Li, Varun Jam- pani, Yael Pritch, Michael Rubinstein, and Kfir Aberman. Dreambooth: Fine tuning text-to-image diffusion mod- els for subject-driven generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2023.
  25. [Shan et al., 2024] Shawn Shan, Wenxin Ding, Josephine Passananti, Stanley Wu, Haitao Zheng, and Ben Y Zhao. Nightshade: Prompt-specific poisoning attacks on text-to- image generative models. In 2024 IEEE Symposium on Se- curity and Privacy (SP), pages 212-212. IEEE Computer Society, 2024.
  26. [Struppek et al., 2023] Lukas Struppek, Dominik Hinters- dorf, and Kristian Kersting. Rickrolling the artist: Inject- ing backdoors into text encoders for text-to-image synthe- sis. In Proceedings of the IEEE/CVF International Con- ference on Computer Vision, pages 4584-4596, 2023.
  27. [Sui et al., 2024] Yang Sui, Huy Phan, Jinqi Xiao, Tian- fang Zhang, Zijie Tang, Cong Shi, Yan Wang, Yingy- ing Chen, and Bo Yuan. Disdet: Exploring detectability of backdoor attack on diffusion models. arXiv preprint arXiv:2402.02739, 2024.
  28. [Sur et al., 2023] Indranil Sur, Karan Sikka, Matthew Walmer, Kaushik Koneripalli, Anirban Roy, Xiao Lin, Ajay Divakaran, and Susmit Jha. Tijo: Trigger inversion with joint optimization for defending multimodal back- doored models. In Proceedings of the IEEE/CVF Inter- national Conference on Computer Vision, pages 165-175, 2023.
  29. [Trabucco et al., 2024] Brandon Trabucco, Kyle Doherty, Max A Gurinas, and Ruslan Salakhutdinov. Effective data augmentation with diffusion models. In The Twelfth Inter- national Conference on Learning Representations, 2024.
  30. [Tran et al., 2018] Brandon Tran, Jerry Li, and Aleksander Madry. Spectral signatures in backdoor attacks. Advances in neural information processing systems, 31, 2018.
  31. [Wang et al., 2019] Bolun Wang, Yuanshun Yao, Shawn Shan, Huiying Li, Bimal Viswanath, Haitao Zheng, and Ben Y Zhao. Neural cleanse: Identifying and mitigating backdoor attacks in neural networks. In 2019 IEEE sympo- sium on security and privacy (SP), pages 707-723. IEEE, 2019.
  32. [Wang et al., 2023] Zhenting Wang, Kai Mei, Juan Zhai, and Shiqing Ma. Unicorn: A unified backdoor trigger inver- sion framework. In The Eleventh International Conference on Learning Representations, 2023.
  33. [Wang et al., 2024a] Hao Wang, Shangwei Guo, Jialing He, Kangjie Chen, Shudong Zhang, Tianwei Zhang, and Tao Xiang. Eviledit: Backdooring text-to-image diffusion models in one second. In Proceedings of the 32nd ACM In- ternational Conference on Multimedia, pages 3657-3665, 2024.
  34. [Wang et al., 2024b] Haonan Wang, Qianli Shen, Yao Tong, Yang Zhang, and Kenji Kawaguchi. The stronger the dif- fusion model, the easier the backdoor: Data poisoning to induce copyright breacheswithout adjusting finetuning pipeline. In Forty-first International Conference on Ma- chine Learning, 2024.
  35. [Wang et al., 2024c] Zhongqi Wang, Jie Zhang, Shiguang Shan, and Xilin Chen. T2ishield: Defending against back- doors on text-to-image diffusion models. In European Conference on Computer Vision, 2024.
  36. [Xiang et al., 2024] Zhen Xiang, Fengqing Jiang, Zidi Xiong, Bhaskar Ramasubramanian, Radha Poovendran, and Bo Li. Badchain: Backdoor chain-of-thought prompt- ing for large language models. In The Twelfth Interna- tional Conference on Learning Representations, 2024.
  37. [Zhai et al., 2023] Shengfang Zhai, Yinpeng Dong, Qingni Shen, Shi Pu, Yuejian Fang, and Hang Su. Text-to-image diffusion models can be easily backdoored through multi- modal data poisoning. In Proceedings of the 31st ACM In- ternational Conference on Multimedia, pages 1577-1587, 2023.
  38. [Zhang et al., 2024] Rui Zhang, Hongwei Li, Rui Wen, Wenbo Jiang, Yuan Zhang, Michael Backes, Yun Shen, and Yang Zhang. Instruction backdoor attacks against cus- tomized {LLMs}. In 33rd USENIX Security Symposium (USENIX Security 24), pages 1849-1866, 2024.
  39. [Zhong et al., 2022] Nan Zhong, Zhenxing Qian, and Xin- peng Zhang. Imperceptible backdoor attack: From input space to feature representation. In Lud De Raedt, editor, Proceedings of the Thirty-First International Joint Con- ference on Artificial Intelligence, IJCAI-22, pages 1736- 1742. International Joint Conferences on Artificial Intelli- gence Organization, 7 2022. Main Track. IJCAI
  40. [Zhu et al., 2024] Liuwan Zhu, Rui Ning, Jiang Li, Chun- sheng Xin, and Hongyi Wu. Seer: Backdoor detection for vision-language models through searching target text and image trigger jointly. In Proceedings of the AAAI Con- ference on Artificial Intelligence, volume 38, pages 7766- 7774, 2024.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards