Adversarial Attacks on In-Context Demonstrations of Large Language ModelsAdversarial Demonstration Attacks on Large Language Models
Researchers propose an attack method named advICL that can mislead large language models simply by tampering with the demonstrations in an in-context learning (ICL) prompt, without modifying the input itself. Experimental results show that the more demonstrations there are, the lower the robustness of in-context learning. Since the same set of demonstrations can be prepended to different inputs, an attacker can pre-position the attack even without knowing or being able to modify the test input; based on this, the paper proposes a transferable version, Transferable-advICL, and experiments show that the adversarial demonstrations it generates can successfully attack unseen test inputs. The authors hope this research reveals a key security risk of ICL and drives more research on its robustness.