@inproceedings{ebce79a0b6634c0ea075949ef70e6275,
title = "Goal-guided Generative Prompt Injection Attack on Large Language Models",
abstract = "Current large language models (LLMs) provide a strong foundation for large-scale user-oriented natural language tasks. Numerous users can easily inject adversarial text or instructions through the user interface, thus causing LLM model security challenges. Although there is much research on prompt injection attacks, most black-box attacks use heuristic strategies. It is unclear how these heuristic strategies relate to the success rate of attacks and thus effectively improve model robustness. To solve this problem, we redefine the goal of the attack: to maximize the KL divergence between the conditional probabilities of the clean text and the adversarial text. Furthermore, we prove that maximizing the KL divergence is equivalent to maximizing the Mahalanobis distance between the embedded representation $x$ and $x'$ of the clean text and the adversarial text when the conditional probability is a Gaussian distribution and gives a quantitative relationship on $x$ and $x'$. Then we designed a simple and effective goal-guided generative prompt injection strategy (G2PIA) to find an injection text that satisfies specific constraints to achieve the optimal attack effect approximately. Notably, our attack method is a query-free black-box attack method with a low computational cost. Experimental results on seven LLM models and four datasets show the effectiveness of our attack method.",
keywords = "Prompt Injection, KL-divergence, LLM, Mahalanobis Distance",
author = "Chong Zhang and Mingyu Jin and Qinkai Yu and Chengzhi Liu and Haochen Xue and Xiaobo Jin",
note = "Publisher Copyright: {\textcopyright} 2024 IEEE.",
year = "2025",
month = feb,
day = "21",
doi = "10.1109/ICDM59182.2024.00119",
language = "English",
isbn = "979-8-3315-0669-8",
series = "Proceedings - IEEE International Conference on Data Mining, ICDM",
pages = "941--946",
editor = "Elena Baralis and Kun Zhang and Ernesto Damiani and Merouane Debbah and Panos Kalnis and Xindong Wu",
booktitle = "Proceedings - 24th IEEE International Conference on Data Mining, ICDM 2024",
}