Do Encoders Suffice? A Systematic Comparison of Encoder and Decoder Safety Judges for LLM Adversarial Evaluation
On the map: LLM safety and security → Safety alignment, refusal and guardrails
Abstract (arXiv)
With the widespread adoption of large language models (LLMs) in chatbots and everyday applications, companies increasingly need guardrails that are effective while remaining low-cost and low-latency. Safety evaluation of LLM outputs has generally relied on LLM-based judges, which can be effective but are often slow and expensive to deploy at scale. In this paper, we evaluate whether fine-tuned modern encoder classifiers from the ModernBERT family, including ModernBERT and Ettin, can reliably identify harmful LLM outputs in user-model conversations without substantial performance loss relative to LLM-based judges. We benchmark these encoder classifiers against rule-based prefix matching, fine-tuned LLM classifiers, and LLM judges using a range of judge-prompting strategies across open-source adversarial datasets. The LLM judges include evaluation methodologies from StrongReject, ShieldGemma, JailbreakBench, AILuminate, SorryBench, and a Claude-as-a-judge setup, as well as fine-tuned safety classifiers such as LlamaGuard 3 and LlamaGuard 4. The encoder classifiers are fine-tuned on judge-labeled data using a majority-voting label strategy and are then evaluated on a gold-standard holdout dataset to assess their performance relative to LLM judges. We report absolute performance using F1 score, false negative rate, and precision-recall metrics. We also break down results by attack technique, including single-turn prompting, decomposition, escalation, and context manipulation, to identify where encoder classifiers align with or diverge from LLM-based judges. Our findings provide guidance on when encoder classifiers can serve as cost- and latency-efficient alternatives to LLM-based safety evaluation.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 21 of its 27 references that are in the map. First posted on arXiv 24 Jun 2026.
Builds on
21 of 27 references.
Closest ancestors · 4
Same direction, newest first
- 2026A Coin Flip for Safety: LLM Judges Fail to Reliably Measure Adversarial Robustness4 Feb
- 2025No Free Lunch with Guardrails1 Apr
- 2024Lightweight Safety Guardrails Using Fine-tuned BERT Embeddings21 Nov
- 2024Improving Alignment and Robustness with Circuit Breakers6 Jun
Other references · 17
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,429
- 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 860
- 2024Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inferencecited by 554
- 2024JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Modelscited by 536
- 2023DecodingTrust: A Comprehensive Assessment of Trustworthiness in GPT Modelscited by 518
- 2024A StrongREJECT for Empty Jailbreakscited by 385
- 2024SORRY-Bench: Systematically Evaluating Large Language Model Safety Refusalcited by 240
- 2023ToxicChat: Unveiling Hidden Challenges of Toxicity Detection in Real-World User-AI Conversationcited by 231
- 2024WildTeaming at Scale: From In-the-Wild Jailbreaks to (Adversarially) Safer Language Modelscited by 223
5 more
- 2023Rephrase and Respond: Let Large Language Models Ask Better Questions for Themselvescited by 123
- 2024Speak Out of Turn: Safety Vulnerability of Large Language Models in Multi-turn Dialoguecited by 66
- 2025Seq vs Seq: An Open Suite of Paired Encoders and Decoderscited by 38
- 2025Improving Large Language Model Safety with Contrastive Representation Learningcited by 8
- 2025Encoder-Decoder or Decoder-Only? Revisiting Encoder-Decoder Large Language Modelcited by 4
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Know Thy Judge: On the Robustness Meta-Evaluation of LLM Safety Judges
- 2025AdversariaLLM: A Unified and Modular Toolbox for LLM Robustness Research
- 2025Advancing LLM Safe Alignment with Safety Representation Ranking
- 2025LLMs Cannot Reliably Judge (Yet?): A Comprehensive Assessment on the Robustness of LLM-as-a-Judge
- 2024Large Language Model Safety: A Holistic Survey
- 2025Investigating the Vulnerability of LLM-as-a-Judge Architectures to Prompt-Injection Attacks
- 2026CSSBench: Evaluating the Safety of Lightweight LLMs against Chinese-Specific Adversarial Patterns
- 2024ALERT: A Comprehensive Benchmark for Assessing Large Language Models' Safety through Red Teaming