AEGIS : Automated Co-Evolutionary Framework for Guarding Prompt Injections Schema
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
Prompt injection attacks pose a significant challenge to the safe deployment of Large Language Models (LLMs) in real-world applications. While prompt-based detection offers a lightweight and interpretable defense strategy, its effectiveness has been hindered by the need for manual prompt engineering. To address this issue, we propose AEGIS , an Automated co-Evolutionary framework for Guarding prompt Injections Schema. Both attack and defense prompts are iteratively optimized against each other using a gradient-like natural language prompt optimization technique. This framework enables both attackers and defenders to autonomously evolve via a Textual Gradient Optimization (TGO) module, leveraging feedback from an LLM-guided evaluation loop. We evaluate our system on a real-world assignment grading dataset of prompt injection attacks and demonstrate that our method consistently outperforms existing baselines, achieving superior robustness in both attack success and detection. Specifically, the attack success rate (ASR) reaches 1.0, representing an improvement of 0.26 over the baseline. For detection, the true positive rate (TPR) improves by 0.23 compared to the previous best work, reaching 0.84, and the true negative rate (TNR) remains comparable at 0.89. Ablation studies confirm the importance of co-evolution, gradient buffering, and multi-objective optimization. We also confirm that this framework is effective in different LLMs. Our results highlight the promise of adversarial training as a scalable and effective approach for guarding prompt injections.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 11 of its 12 references that are in the map. First posted on arXiv 27 Aug 2025.
Builds on
11 of 12 references.
Closest ancestors · 2
Same direction, newest first
- 2025PromptArmor: Simple yet Effective Prompt Injection Defenses21 Jul
- 2024Defending Against Indirect Prompt Injection Attacks With Spotlighting20 Mar
Other references · 9
- 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,207
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 653
- 2023Detecting Language Model Attacks with Perplexitycited by 431
- 2024Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programscited by 291
- 2024Robust Prompt Optimization for Defending Language Models Against Jailbreaking Attackscited by 156
- 2024PRompt Optimization in Multi-Step Tasks (PROMST): Integrating Human Feedback and Heuristic-based Samplingcited by 32
- 2024Large Language Model as an Assignment Evaluator: Insights, Feedback, and Challenges in a 1000+ Student Coursecited by 19
- 2024Survival of the Safest: Towards Secure Prompt Optimization through Interleaved Multi-Objective Evolutioncited by 9
- 2024Concentrate Attention: Towards Domain-Generalizable Prompt Optimization for Language Modelscited by 7
Built on by
Citing papers per year: 2026: 3.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2024Automatic and Universal Prompt Injection Attacks against Large Language Models
- 2026AttackEval: A Systematic Empirical Study of Prompt Injection Attack Effectiveness Against Large Language Models
- 2025PromptShield: Deployable Detection for Prompt Injection Attacks
- 2025A Critical Evaluation of Defenses against Prompt Injection Attacks
- 2024Defense Against Prompt Injection Attack by Leveraging Attack Techniques
- 2025OET: Optimization-based prompt injection Evaluation Toolkit
- 2026CPInj: Uncovering Prompt Injection Risks in Textual Collaborative Prompt Optimization
- 2024SecAlign: Defending Against Prompt Injection with Preference Optimization