mlsanityData to 7 Oct 2026

PISmith: Reinforcement Learning-based Red Teaming for Prompt Injection Defenses

arXiv 2603.13026 ↗First posted 13 Mar 2026cs.LG cs.CRcited by 13

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

Abstract (arXiv)

Prompt injection poses serious security risks to real-world LLM applications, particularly autonomous agents. Although many defenses have been proposed, their robustness against adaptive attacks remains insufficiently evaluated, potentially creating a false sense of security. In this work, we propose PISmith, a reinforcement learning (RL)-based red-teaming framework that systematically assesses existing prompt-injection defenses by training an attack LLM to optimize injected prompts in a practical black-box setting, where the attacker can only query the defended LLM and observe its outputs. We find that directly applying standard GRPO to attack strong defenses leads to sub-optimal performance due to extreme reward sparsity -- most generated injected prompts are blocked by the defense, causing the policy's entropy to collapse before discovering effective attack strategies, while the rare successes cannot be learned effectively. In response, we introduce adaptive entropy regularization and dynamic advantage weighting to sustain exploration and amplify learning from scarce successes. Extensive evaluation on 13 benchmarks demonstrates that state-of-the-art prompt injection defenses remain vulnerable to adaptive attacks. We also compare PISmith with 7 baselines across static, search-based, and RL-based attack categories, showing that PISmith consistently achieves the highest attack success rates. Furthermore, PISmith achieves strong performance in agentic settings on InjecAgent and AgentDojo against both open-source and closed-source LLMs (e.g., GPT-4o-mini and GPT-5-nano). Our code is available at https://github.com/albert-y1n/PISmith.

Key facts. Cited by 13 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 49 of its 67 references that are in the map. First posted on arXiv 13 Mar 2026.

Builds on

49 of 67 references.

Closest ancestors · 23

Same direction, newest first

  1. 2025PISanitizer: Preventing Prompt Injection to Long-Context LLMs via Prompt Sanitization13 Nov
  2. 2025Defending Against Prompt Injection with DataFilter22 Oct
  3. 2025PIShield: Detecting Prompt Injection Attacks via Intrinsic LLM Features15 Oct
  4. 2025PromptLocate: Localizing Prompt Injection Attacks14 Oct
  5. 2025RL Is a Hammer and LLMs Are Nails: A Simple Reinforcement Learning Recipe for Strong Prompt Injection6 Oct
  6. 2025SecInfer: Preventing Prompt Injection via Inference-time Scaling29 Sep
  7. 2025PromptArmor: Simple yet Effective Prompt Injection Defenses21 Jul
  8. 2025DRIFT: Dynamic Rule-Based Defense with Injection Isolation for Securing LLM Agents13 Jun
  9. 2025Lessons from Defending Gemini Against Indirect Prompt Injections20 May
  10. 2025DataSentinel: A Game-Theoretic Detection of Prompt Injection Attacks15 Apr
  11. 2025Defeating Prompt Injections by Design24 Mar
  12. 2025MELON: Provable Defense Against Indirect Prompt Injection Attacks in AI Agents7 Feb
11 more
  1. 2025PromptShield: Deployable Detection for Prompt Injection Attacks25 Jan
  2. 2024Attention Tracker: Detecting Prompt Injection Attacks in LLMs1 Nov
  3. 2024InjecGuard: Benchmarking and Mitigating Over-defense in Prompt Injection Guardrail Models30 Oct
  4. 2024SecAlign: Defending Against Prompt Injection with Preference Optimization7 Oct
  5. 2024System-Level Defense against Indirect Prompt Injection Attacks: An Information Flow Control Perspective27 Sep
  6. 2024Get my drift? Catching LLM Task Drift with Activation Deltas2 Jun
  7. 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions19 Apr
  8. 2024InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents5 Mar
  9. 2024StruQ: Defending Against Prompt Injection with Structured Queries9 Feb
  10. 2023Formalizing and Benchmarking Prompt Injection Attacks and Defenses19 Oct
  11. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb

Other references · 26

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2017Proximal Policy Optimization Algorithmscited by 14,441
  3. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
  4. 2025Qwen3 Technical Reportcited by 8,195
  5. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
  6. 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
  7. 2025DAPO: An Open-Source LLM Reinforcement Learning System at Scalecited by 2,678
  8. 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,591
  9. 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,538
  10. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
  11. 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
  12. 2025OpenAI GPT-5 System Cardcited by 910
14 more
  1. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
  2. 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automaticallycited by 619
  3. 2021A Dataset of Information-Seeking Questions and Answers Anchored in Research Paperscited by 475
  4. 2025The Entropy Mechanism of Reinforcement Learning for Reasoning Language Modelscited by 463
  5. 2019Multi-News: a Large-Scale Multi-Document Summarization Dataset and Abstractive Hierarchical Modelcited by 431
  6. 2021Efficient Attentions for Long Document Summarizationcited by 342
  7. 2025Reasoning with Exploration: An Entropy Perspectivecited by 277
  8. 2025Logic-RL: Unleashing LLM Reasoning with Rule-Based Reinforcement Learningcited by 260
  9. 2023LongCoder: A Long-Range Pre-trained Language Model for Code Completioncited by 110
  10. 2025Securing AI Agents with Information-Flow Controlcited by 108
  11. 2025The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against Llm Jailbreaks and Prompt Injectionscited by 108
  12. 2025Prompt Flow Integrity to Prevent Privilege Escalation in LLM Agentscited by 81
  13. 2025On Entropy Control in LLM-RL Algorithmscited by 39
  14. 2025EPO: Entropy-regularized Policy Optimization for LLM Agents Reinforcement Learningcited by 15

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 13.

13 papers.

Sort:

By area:

Similar, not cited

Close in wording, no citation either way

  1. 2026GPT-Red: Automated Red Teaming via Self-Play at Scale
  2. 2026A Red Teaming Framework for Evaluating Robustness of AI-enabled Security Orchestration, Automation, and Response Systems
  3. 2026CHASE: Adversarial Red-Blue Teaming for Improving LLM Safety using Reinforcement Learning
  4. 2025Strategize Globally, Adapt Locally: A Multi-Turn Red Teaming Agent with Dual-Level Learning
  5. 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysis
  6. 2026Defending against Adaptive Prompt Injection Attacks via Reasoning-enabled Task Alignment
  7. 2025Jailbreak-R1: Exploring the Jailbreak Capabilities of LLMs via Reinforcement Learning
  8. 2026PI-Hunter: Automated Red-Teaming for Exposing and Localizing Prompt Injections