- Rating
- 3(+1)
- Confidence
- 3
- Informativeness
- 2(+1)
- Presentation
- 3
- Soundness
- 2
Read review
Paper summary
This paper presents BAGEL, a lightweight and adaptable approach for detecting malicious prompts before they reach an LLM. It combines several small classifiers, each trained on a different type of attack, and uses only a subset of them for each prompt. A lightweight router can choose a particularly relevant classifier, while new attack types can be handled by adding another specialized model rather than retraining the whole system. The experiments show that BAGEL performs competitively against existing moderation and guardrail methods on unseen attacks.
Critical strengths
-
The design is practical and easy to update. BAGEL gets strong detection performance from several small, specialized models. More importantly, when a new attack appears, the system can add one new classifier rather than retraining everything. This makes the approach much more realistic for settings where attacks change quickly.
-
I appreciate the effort to test generalization. The main test set comes from datasets that were not used for training or calibration, and the paper also evaluates new attack types and multi-turn conversations.
Critical weaknesses
-
One of my major concerns is that the paper only uses the number of model parameters as a measure of cost. But BAGEL has to run several classifiers for every prompt, and the routed version also runs an additional router. The paper does not show end-to-end response time or requests handled per second. It is hard to tell whether BAGEL is actually cheaper or faster in a real deployment. The claim that selecting five models cuts computational cost by about 44% is based on parameter counts too.
-
The false-positive rate is quite high. In the main comparison, BAGEL incorrectly blocks around 30% of benign prompts. ShieldGemma, for example, has a much lower rate and also achieves better balanced accuracy. The issue becomes more serious in the multi-turn setting, where BAGEL incorrectly flags roughly half or more of the benign conversations in several settings.
-
BAGEL can only read 512 tokens at once, so longer conversations are cut off in the full-conversation setting. The alternative of checking each turn separately also produces very high false-positive rates. As such, the current design does not yet provide a convincing solution for long, gradual attacks spread across a conversation.
Questions for authors
- BAGEL blocks around 30% of benign prompts in the main evaluation, and the rate is even higher in several multi-turn settings. Cam authors interpret these results and justify the implications in real deployment?
3 comments
Dear Reviewer, following further discussion with other reviewers, we re-measured BAGEL’s latency end to end and we would like to correct and extend our earlier response to W(1).
Our earlier 11.9 ms figure timed a single promptcop without synchronizing the GPU after each request. We now time the complete pipeline (router + selected promptcops + aggregation) at batch size 1 on the same A100, synchronizing after every request, averaged over 200 test prompts:
| Method | Latency (ms / request) |
|---|---|
| BAGEL w/ router () | 17.7 |
| BAGEL w/ router () | 47.1 |
| BAGEL () | 72.7 |
| ToxicDetector | 42 |
| ShieldGemma-2B | 78 |
| StruQ | 215 |
| OpenAI Moderation API | 222 |
This table supersedes the latency figures in our earlier reply. Each promptcop adds ≈14.5 ms and the router adds ≈3 ms, so latency scales linearly with . Selecting 5 of 9 promptcops therefore saves ≈44% of compute time, confirming the parameter-count estimate in the paper with measured time. Routed is the fastest model-based detector (2.4$×$ faster than ToxicDetector), and all BAGEL variants are 3-12$×$ faster than StruQ and the OpenAI API. Peak GPU memory is 4.0 GB (routed ) and 6.1 GB (). Because all promptcops share one architecture, they can also be fused into a single batched forward pass, which would further reduce latency for . We will implement this in the final version.
Following the discussion, Reviewer 1bUC has updated their assessment. As the discussion period ends tomorrow, we would greatly appreciate it if you could let us know whether our responses have addressed your concerns, or if anything remains that we can clarify.
Thank you for the response
Thank you for the additional experiments and response. It has addressed my prior concerns and I have raised my score.
Response to Reviewer wYjL
Dear Reviewer, thank you for your feedback. Below are our full responses to the questions and concerns you have raised.
We report measured end-to-end latency and throughput:
We timed every method on the same NVIDIA A100, with models already loaded and only the forward pass measured. Latency is for a single prompt. For BAGEL, we assume the selected promptcops run in parallel, so its latency is that of one promptcop, plus the router when it is used; because they share one GPU, we divide its throughput by n. Regarding some of the baselines: ToxicDetector embeds prompts one at a time with Llama-2-7B, so its throughput does not strongly depend on batch size; our ShieldGemma pipeline only supports a batch size of 1; and the OpenAI API’s latency includes network time. LastLayer is rule-based and runs on CPU.
BAGEL answers a single request in 11.9 ms, 3.5–18$×$ faster than the model-based baselines (42–215 ms), while achieving higher F1, and its throughput is comparable to theirs. LastLayer is faster but has much lower detection performance (F1 0.356). The measurements also confirm the ≈44% saving with measured time rather than parameter counts: BAGEL’s throughput at n=5 (24.7 ex/s) is 1.8$×$ that of the full ensemble at n=9 (13.7 ex/s).
To examine whether BAGEL’s FPR can be reduced, we re-swept the per-promptcop thresholds on calibration data only, replacing the F1 criterion with precision-oriented alternatives. Under an F0.5 criterion, FPR drops from 0.288 to 0.172, but ASR rises from 0.341 to 0.478 (F1 0.667, balanced accuracy 0.675), so the trade-off is controllable but not free. At ShieldGemma’s FPR (0.068), BAGEL’s ASR is 0.69 versus ShieldGemma’s 0.43.
Regarding the multi-turn setting: these results are fully out-of-distribution. Every promptcop was trained only on single-turn prompts, and none saw any multi-turn data. Even so, BAGEL achieves the highest F1 of all methods for n≥5 (0.704 at n=9 vs. 0.647 for ToxicDetector, 0.375 for the OpenAI API and 0.312 for ShieldGemma, Table 3). The higher FPR is partly structural to Chunk-Level detection, which flags a conversation if any turn is flagged, so false alarms accumulate with conversation length.
We agree that BAGEL does not yet provide a dedicated solution for long, gradual multi-turn attacks, and we do not claim it does. Multi-turn defense is not the focus of this paper: Prompt Guard 2, BAGEL’s base model, is designed for single-input classification (including its 512-token limit), and none of the baselines are designed or trained for multi-turn detection either. Our multi-turn evaluation is therefore a test of generalization, not a proposed multi-turn defense, since in a setting where every method faces an unfamiliar attack type, BAGEL’s ensemble of single-turn promptcops attains the highest F1, even if its absolute performance is not yet ideal. Integrating multi-turn-specific design choices (e.g., longer-context base models and turn-aggregation strategies) and a full evaluation is left to future work.
We would be happy to clarify any remaining concerns you may have regarding our work.