Efficient and Adaptable Detection of Malicious LLM Prompts via Bootstrap Aggregation
On the map: Synthetic data and self-improvement for LLMs → Safety of self-evolving systems
also in 1 more
Abstract (arXiv)
Large Language Models (LLMs) have demonstrated remarkable capabilities in natural language understanding, reasoning, and generation. However, these systems remain susceptible to malicious prompts that induce unsafe or policy-violating behavior through harmful requests, jailbreak techniques, and prompt injection attacks. Existing defenses face fundamental limitations: black-box moderation APIs offer limited transparency and adapt poorly to evolving threats, while white-box approaches using large LLM judges impose prohibitive computational costs and require expensive retraining for new attacks. Current systems force designers to choose between performance, efficiency, and adaptability. To address these challenges, we present BAGEL (Bootstrap AGgregated Ensemble Layer), a modular, lightweight, and incrementally updatable framework for malicious prompt detection. BAGEL employs a bootstrap aggregation and mixture of expert inspired ensemble of fine-tuned models, each specialized on a different attack dataset. At inference, BAGEL uses a random forest router to identify the most suitable ensemble member, then applies stochastic selection to sample additional members for prediction aggregation. When new attacks emerge, BAGEL updates incrementally by fine-tuning a small prompt-safety classifier (86M parameters) and adding the resulting model to the ensemble. BAGEL achieves an F1 score of 0.92 by selecting just 5 ensemble members (430M parameters), outperforming OpenAI Moderation API and ShieldGemma which require billions of parameters. Performance remains robust after nine incremental updates, and BAGEL provides interpretability through its router's structural features. Our results show ensembles of small finetuned classifiers can match or exceed billion-parameter guardrails while offering the adaptability and efficiency required for production systems.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Safety of self-evolving systems, one of 13 directions in Synthetic data and self-improvement for LLMs. Builds on 35 of its 54 references that are in the map. First posted on arXiv 8 Feb 2026.
Builds on
35 of 54 references.
Closest ancestors · 1
Same direction, newest first
Other references · 34
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2020Extracting Training Data from Large Language Modelscited by 2,144
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,565
- 2020Energy-based Out-of-distribution Detectioncited by 1,296
- 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,258
- 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 738
- 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automaticallycited by 619
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 608
- 2023GPTFUZZER: Red Teaming Large Language Models with Auto-Generated Jailbreak Promptscited by 520
- 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attackscited by 450
- 2023A Survey on Large Language Model (LLM) Security and Privacy: The Good, the Bad, and the Uglycited by 380
- 2022A Holistic Approach to Undesired Content Detection in the Real Worldcited by 337
22 more
- 2023Formalizing and Benchmarking Prompt Injection Attacks and Defensescited by 328
- 2024StruQ: Defending Against Prompt Injection with Structured Queriescited by 325
- 2020Weight Poisoning Attacks on Pre-trained Modelscited by 318
- 2023Poisoning Language Models During Instruction Tuningcited by 254
- 2024ShieldGemma: Generative AI Content Moderation Based on Gemmacited by 224
- 2023PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Promptscited by 218
- 2024Jailbreak Attacks and Defenses Against Large Language Models: A Surveycited by 215
- 2020The Computational Limits of Deep Learningcited by 188
- 2020Carbontracker: Tracking and Predicting the Carbon Footprint of Training Deep Learning Modelscited by 168
- 2025ShieldAgent: Shielding Agents via Verifiable Safety Policy Reasoningcited by 144
- 2016An Analysis of Deep Neural Network Models for Practical Applicationscited by 114
- 2024GuardAgent: Safeguard LLM Agents by a Guard Agent via Knowledge-Enabled Reasoningcited by 113
- 2023Jatmo: Prompt Injection Defense by Task-Specific Finetuningcited by 89
- 2024AI and Memory Wallcited by 89
- 2023A Systematic Review of Green AIcited by 77
- 2024Don't Listen To Me: Understanding and Exploring Jailbreak Prompts of Large Language Modelscited by 77
- 2023A Comprehensive Overview of Backdoor Attacks in Large Language Models within Communication Networkscited by 38
- 2025Defending against Indirect Prompt Injection by Instruction Detectioncited by 25
- 2025PromptLocate: Localizing Prompt Injection Attackscited by 23
- 2025LLM Jailbreak Detection for (Almost) Free!cited by 13
- 2024Efficient Detection of Toxic Prompts in Large Language Modelscited by 11
- 2025Safety Instincts: LLMs Learn to Trust Their Internal Compass for Self-Defensecited by 4
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025OMNIGUARD: An Efficient Approach for AI Safety Moderation Across Languages and Modalities
- 2025System Prompt Poisoning: Persistent Attacks on Large Language Models Beyond User Injection
- 2026Analysis of LLMs Against Prompt Injection and Jailbreak Attacks
- 2024VLMGuard: Bootstrapping Malicious Prompt Detectors from Unlabeled Vision-Language Prompts in the Wild
- 2025PandaGuard: Systematic Evaluation of LLM Safety against Jailbreaking Attacks
- 2026When Benchmarks Lie: Evaluating Malicious Prompt Classifiers Under True Distribution Shift
- 2026RAS: Measuring LLM Safety Through Refusal Alignment
- 2026LASH: Adaptive Semantic Hybridization for Black-Box Jailbreaking of Large Language Models