PISmith: Reinforcement Learning-based Red Teaming for Prompt Injection Defenses
Chenlong Yin, Runpeng Geng, Yanting Wang, Jinyuan Jia

TL;DR
PISmith is a reinforcement learning framework that systematically evaluates prompt injection defenses by training attack models, revealing vulnerabilities in current defenses and outperforming baseline attack methods across multiple benchmarks.
Contribution
Introduces PISmith, an RL-based red-teaming framework that effectively assesses and exposes weaknesses in prompt injection defenses against adaptive attacks.
Findings
State-of-the-art defenses remain vulnerable to adaptive RL-based attacks.
PISmith outperforms 7 baseline attack methods across 13 benchmarks.
Effective in agentic settings against various LLMs.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdversarial Robustness in Machine Learning · Network Security and Intrusion Detection · Advanced Malware Detection Techniques
