SafeRoute: Adaptive Model Selection for Efficient and Accurate Safety Guardrails in Large Language Models
On the map: LLM safety and security → Safety alignment, refusal and guardrails
Abstract (arXiv)
Deploying large language models (LLMs) in real-world applications requires robust safety guard models to detect and block harmful user prompts. While large safety guard models achieve strong performance, their computational cost is substantial. To mitigate this, smaller distilled models are used, but they often underperform on "hard" examples where the larger model provides accurate predictions. We observe that many inputs can be reliably handled by the smaller model, while only a small fraction require the larger model's capacity. Motivated by this, we propose SafeRoute, a binary router that distinguishes hard examples from easy ones. Our method selectively applies the larger safety guard model to the data that the router considers hard, improving efficiency while maintaining accuracy compared to solely using the larger safety guard model. Experimental results on multiple benchmark datasets demonstrate that our adaptive model selection significantly enhances the trade-off between computational cost and safety performance, outperforming relevant baselines.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 30 of its 40 references that are in the map. First posted on arXiv 18 Feb 2025.
Builds on
30 of 40 references.
Closest ancestors · 2
Same direction, newest first
- 2024On Calibration of LLM-based Guard Models for Reliable Content Moderation14 Oct
- 2024WildGuard: Open One-Stop Moderation Tools for Safety Risks, Jailbreaks, and Refusals of LLMs26 Jun
Other references · 28
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2016Layer Normalizationcited by 5,579
- 2017On Calibration of Modern Neural Networkscited by 4,860
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2022Fast Inference from Transformers via Speculative Decodingcited by 1,615
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,330
16 more
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
- 2023Accelerating Large Language Model Decoding with Speculative Samplingcited by 975
- 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 709
- 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automaticallycited by 619
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 533
- 2024Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inferencecited by 527
- 2023GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Ciphercited by 401
- 2022A Holistic Approach to Undesired Content Detection in the Real Worldcited by 337
- 2021Gradient-based Adversarial Attacks against Text Transformerscited by 233
- 2023ToxicChat: Unveiling Hidden Challenges of Toxicity Detection in Real-World User-AI Conversationcited by 224
- 2020Learning from the Worst: Dynamically Generated Datasets to Improve Online Hate Detectioncited by 217
- 2020HateBERT: Retraining BERT for Abusive Language Detection in Englishcited by 206
- 2023Batch Calibration: Rethinking Calibration for In-Context Learning and Prompt Engineeringcited by 91
- 2021Ruddit: Norms of Offensiveness for English Reddit Commentscited by 26
- 2024HarmAug: Effective Data Augmentation for Knowledge Distillation of Safety Guard Modelscited by 17
- 2024Optimized Speculative Sampling for GPU Hardware Acceleratorscited by 2
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.
- 2025Shape it Up! Restoring LLM Safety during Finetuningcited by 11
- 2025No Free Lunch with Guardrailscited by 10
- 2026False Floors: LLM Safety Routing Evaluations Break Under Distribution Shiftcited by 0
- 2026False Floors: LLM Safety Routing Evaluations Break Under Distribution Shift1 Oct 2026
- 2025Shape it Up! Restoring LLM Safety during Finetuning22 May 2025
- 2025No Free Lunch with Guardrails1 Apr 2025