mlsanityData to 7 Oct 2026

Goal-guided Generative Prompt Injection Attack on Large Language Models

arXiv 2404.07234 ↗First posted 6 Apr 2024cs.CR cs.AI cs.CLcited by 22

On the map: LLM safety and security → Prompt injection and agent security

Abstract (arXiv)

Current large language models (LLMs) provide a strong foundation for large-scale user-oriented natural language tasks. A large number of users can easily inject adversarial text or instructions through the user interface, thus causing LLMs model security challenges. Although there is currently a large amount of research on prompt injection attacks, most of these 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. It is particularly noteworthy that our attack method is a query-free black-box attack method with low computational cost. Experimental results on seven LLM models and four datasets show the effectiveness of our attack method.

Key facts. Cited by 22 papers in the map (data through 7 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 29 of its 43 references that are in the map. First posted on arXiv 6 Apr 2024.

Builds on

29 of 43 references.

Closest ancestors · 2

Same direction, newest first

  1. 2023Prompt Injection attack against LLM-integrated Applications8 Jun
  2. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb

Other references · 27

  1. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  2. 2014Explaining and Harnessing Adversarial Examplescited by 7,287
  3. 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
  4. 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,565
  5. 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,538
  6. 2015DeepFool: a simple and accurate method to fool deep neural networkscited by 1,315
  7. 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,052
  8. 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 979
  9. 2016Practical Black-Box Attacks against Machine Learningcited by 893
  10. 2019EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Taskscited by 800
  11. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
  12. 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 709
15 more
  1. 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
  2. 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 488
  3. 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 376
  4. 2018Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifierscited by 341
  5. 2023A Survey of Reinforcement Learning from Human Feedbackcited by 259
  6. 2020AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Promptscited by 246
  7. 2021Gradient-based Adversarial Attacks against Text Transformerscited by 233
  8. 2023Inverse Scaling: When Bigger Isn't Bettercited by 205
  9. 2023Survey of Vulnerabilities in Large Language Models Revealed by Adversarial Attackscited by 189
  10. 2023Automatically Auditing Large Language Models via Discrete Optimizationcited by 187
  11. 2024The Impact of Reasoning Step Length on Large Language Modelscited by 152
  12. 2020The Discrete Gaussian for Differential Privacycited by 134
  13. 2021WebQA: Multihop and Multimodal QAcited by 109
  14. 2023MathAttack: Attacking Large Language Models Towards Math Solving Abilitycited by 31
  15. 2024AttackEval: How to Evaluate the Effectiveness of Jailbreak Attacking on Large Language Modelscited by 26

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 16; 2026: 5.

22 papers.

Sort:

By area:

  1. 2025Safety at Scale: A Comprehensive Survey of Large Model and Agent Safetycited by 63
  2. 2025Red Teaming the Mind of the Machine: A Systematic Evaluation of Prompt Injection and Jailbreak Vulnerabilities in LLMscited by 34
  3. 2025LLM Agents Should Employ Security Principlescited by 28
  4. 2025Security Concerns for Large Language Models: A Surveycited by 26
  5. 2025Doxing via the Lens: Revealing Location-related Privacy Leakage on Multi-modal Large Reasoning Modelscited by 14
  6. 2025A Survey of Attacks on Large Language Modelscited by 13
  7. 2025The Hidden Dangers of Browsing AI Agentscited by 11
  8. 2026ICON: Indirect Prompt Injection Defense for Agents based on Inference-Time Correctioncited by 8
  9. 2025TAI3: Testing Agent Integrity in Interpreting User Intentcited by 7
  10. 2025DeRAG: Black-box Adversarial Attacks on Multiple Retrieval-Augmented Generation Applications via Prompt Injectioncited by 5
  11. 2025Multimodal Prompt Injection Attacks: Risks and Defenses for Modern LLMscited by 4
  12. 2025SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defensescited by 4
10 more
  1. 2024Palisade -- Prompt Injection Detection Frameworkcited by 3
  2. 2025Semantic-Preserving Prompt Hijacking: A Black-Box Adversarial Attack on Auto-Prompt Optimizationcited by 2
  3. 2025FuncPoison: Poisoning Function Library to Hijack Multi-agent Autonomous Driving Systemscited by 2
  4. 2026Agent Security Needs Redefinition through a Holistic Frameworkcited by 2
  5. 2025Prompt-in-Content Attacks: Exploiting Uploaded Inputs to Hijack LLM Behaviorcited by 1
  6. 2025Unified Threat Detection and Mitigation Framework (UTDMF): Combating Prompt Injection, Deception, and Bias in Enterprise-Scale Transformerscited by 1
  7. 2026The Struggle Between Continuation and Refusal: A Mechanistic Analysis of the Continuation-Triggered Jailbreak in LLMscited by 1
  8. 2025Sentra-Guard: A Real-Time Multilingual Defense Against Adversarial LLM Promptscited by 0
  9. 2026StealthMark: Harmless and Stealthy Ownership Verification for Medical Segmentation via Uncertainty-Guided Backdoorscited by 0
  10. 2026GeoDetect: Geometric Adversarial Detection for VLPscited by 0