DATABANK

Agent Smith: A Single Image Can Jailbreak One Million Multimodal LLM Agents Exponentially Fast

Xiangming Gu, Xiaosen Zheng, Tianyu Pang, Chao Du, Qian Liu, Ye Wang, Jing Jiang, Min Lin

A multimodal large language model (MLLM) agent can receive instructions, capture images, retrieve histories from memory, and decide which tools to use. Nonetheless, red-teaming efforts have revealed that adversarial images/prompts can jailbreak an MLLM and cause unaligned behaviors. In this work, we report an even more severe safety issue in multi-agent environments, referred to as infectious jailbreak. It entails the adversary simply jailbreaking a single agent, and without any further intervention from the adversary, (almost) all agents will become infected exponentially fast and exhibit harmful behaviors. To validate the feasibility of infectious jailbreak, we simulate multi-agent environments containing up to one million LLaVA-1.5 agents, and employ randomized pair-wise chat as a proof-of-concept instantiation for multi-agent interaction. Our results show that feeding an (infectious) adversarial image into the memory of any randomly chosen agent is sufficient to achieve infectious jailbreak. Finally, we derive a simple principle for determining whether a defense mechanism can provably restrain the spread of infectious jailbreak, but how to design a practical defense that meets this principle remains an open question to investigate. Our project page is available at https://sail-sg.github.io/Agent-Smith/.

Figure 1: We simulate a randomized pair-wise chatting environment containing one million LLaVA-1.5 agents. In the 0-th chat round, the adversary feeds an infectious jailbreaking image š•^adv into the memory bank of a randomly selected agent. Then, without any further intervention from the adversary, the infection ratio pā‚œ reaches ∼100% exponentially fast after only 27∼31 chat rounds, and all infected agents exhibit harmful behaviors. From Xiangming Gu et al. (2024), arXiv license.
Figure 2: Pipelines of randomized pairwise chat and infectious jailbreak. (Bottom left) An MLLM agent consists of four components: an MLLM ℳ, the RAG module ā„›, text histories ā„‹, and an image album ℬ; (Upper left) In the t-th chat round, the N agents are randomly partitioned by š’„ā‚œ into two groups {š’¢ā‚–^Q}ā‚–ā‚Œā‚^(N/2) and {š’¢ā‚–^A}ā‚–ā‚Œā‚^(N/2), where a pairwise chat will happen between each š’¢ā‚–^Q and š’¢ā‚–^A; (Right) In each pairwise chat, the questioning agent š’¢^Q first generates a plan š according to its text histories ā„‹^Q, and retrieves an image š• from its image album according to the generated plan. š’¢^Q further generates a question š according to its text histories and the retrieved image š•, and sends š• and š to the answering agent š’¢^A. Then, š’¢^A generates an answer š€ according to its text histories ā„‹^A, as well as š• and š. Finally, the question-answer pair [š,š€] is enqueued into both ā„‹^Q and ā„‹^A, while the image š• is only enqueued into ℬ^A. Please see Algorithm 1 for detailed formulations of pairwise chat and Appendix C for the complete system prompts used in our experiments. From Xiangming Gu et al. (2024), arXiv license.

Not packaged. A REPS package would add charts and verified data.How to package an experiment