Triaging Threats to Specialized Guardrails

Wenjie Jacky Mo1 Xiaofei Wen Rui Cai Boyu Zhu
Sicong Jiang Zihan Wang Minglai Yang Zhe Zhao Muhao Chen
University of California, Davis 2077.AI
{jacmo,xfwe,ruicai,boyuzhu,zao,muhchen}@ucdavis.edu
{sicong,wzh,minglai}@2077ai.com


Abstract

Building robust safety guardrails is essential for deploying Large Language Models across diverse real-world applications. However, this goal remains challenging because safety risks span heterogeneous threat domains, while existing datasets cover only fragmented risk subsets and rely on inconsistent taxonomies. Consequently, it remains unclear whether current guardrails can generalize beyond narrow evaluation settings. To better understand the robustness of guardrail models, we first introduce GuardZoo, a unified human-annotated benchmark with 32,460 samples covering 15 distinct unsafe categories. Evaluation on GuardZoo reveals that monolithic guardrails suffer from task interference: different threat domains require distinct decision boundaries that are difficult to compress into a single model. We therefore propose RouteGuard, a router-expert framework that triages each conversation to specialized expert guardrails for threat-specific detection. Experiments show that RouteGuard improves fine-grained threat detection over strong guardrail baselines, generalizes better under out-of-domain evaluation, and supports flexible modular expansion to emerging threats.

WARNING: This paper contains examples of toxic or harmful language.

1 Introduction↩︎

Large Language Models (LLMs) have achieved unprecedented capabilities across diverse natural language processing tasks [1][4], but their safe deployment has become an increasingly urgent concern [5][8]. To mitigate potential risks, safety guardrails have been proposed as lightweight external defenses that monitor and filter model inputs and outputs [9][11]. Yet, as LLMs are deployed in increasingly complex real-world applications [12], new safety risks continue to emerge, ranging from unauthorized actions by LLM agents [13] to dangerous advice from consumer-facing chatbots [14]. It is imperative to build guardrails that are robust across an ever-expanding spectrum of safety threats.

Figure 1: Traditional monolithic guardrails rely on a single model to handle diverse safety violations, which can cause task interference and blurred threat boundaries. RouteGuard addresses this by routing each conversation to specialized threat-domain experts and aggregating their outputs for fine-grained safety detection.

Building a robust and generalizable guardrail remains challenging. Safety violations are inherently diverse, ranging from explicit malicious intents [15], [16] to context-dependent harms [17], [18] that require domain-specific judgment. Different risks often demand different decision boundaries. An agent deleting emails without user permission, for example, is unsafe under agent-safety rules, yet may not fit conventional content- or cyber-safety definitions. Compressing such heterogeneous criteria into one guardrail model can blur domain-specific boundaries and induce task interference. This challenge is further amplified by the evolving safety landscape, where guardrails that perform well on existing risks may fail once new deployment scenarios introduce novel constraints, policies, or action spaces [19]. Meanwhile, the absence of a unified, human-annotated benchmark limits comprehensive evaluation of genuinely robust guardrails. Existing datasets typically cover narrow subsets of violations, such as toxicity or bias in isolation [20][22]. Moreover, many current evaluation pipelines rely on synthetic data [17], [23] or LLM-as-a-judge approaches [24]. Since different LLMs follow distinct safety alignment rules, their judgments on borderline cases can be inconsistent and may fail to reflect reliable human consensus.

Figure 2: GuardZoo consolidates multiple safety datasets into a unified taxonomy and obtains high-quality labels through multi-LLM verification and human adjudication. The benchmark covers balanced safe/unsafe samples and diverse fine-grained threat categories, including both single- and multi-category violations.

To better understand the robustness of guardrails, the first contribution of this paper is GuardZoo, a unified, human-annotated benchmark for evaluating guardrails across heterogeneous safety risks. We build GuardZoo by curating samples from nine high-quality guardrail datasets, harmonizing their labels under a unified safety taxonomy, and re-annotating them through human adjudication. The resulting benchmark contains 32,460 conversational samples covering 15 distinct unsafe categories, spanning general safety risks such as hate speech and self-harm, as well as specialized risks such as cyberattacks and agent-policy violations. Beyond its scale and coverage, GuardZoo is designed to stress-test guardrails under realistic and heterogeneous safety conditions. Its samples span diverse interaction formats, from malicious prompts, single and multi-turn conversations to agent trajectories. Rather than requiring only binary safe/unsafe decisions, GuardZoo asks models to identify the specific violation categories involved in each unsafe case. This fine-grained setting is further complicated by the fact that 35.17% of unsafe examples involve multiple violation categories, reflecting the overlapping and compound nature of real-world safety risks. As a result, GuardZoo provides a rigorous foundation for evaluating whether modern guardrails can remain robust across a broad spectrum of safety risks.

Addressing the heterogeneous risks captured by GuardZoo with a single guardrail model is inherently difficult. This motivates the second contribution of this paper: RouteGuard, a dynamic router-expert framework for scalable guardrail detection, as illustrated in 1. Instead of relying on one overburdened model to detect all violations, RouteGuard first uses a router to identify the relevant threat domains for the input, and then dispatches the input to specialized expert guardrails. This decomposition allows each expert to focus on a more coherent subset of safety risks, reducing task interference and enabling more precise domain-specific decision boundaries. Beyond improving detection performance, the modular design of RouteGuard also supports extensibility: when new safety threats emerge, practitioners can incorporate additional experts through localized router updates, without retraining the entire guardrail system. Extensive experiments show that RouteGuard consistently outperforms monolithic guardrail baselines across diverse safety categories, while also demonstrating strong adaptability to newly introduced threat domains.

2 GuardZoo: A Unified Safety Benchmark↩︎

We introduce GuardZoo, a unified safety benchmark for fine-grained guardrail evaluation. We first align heterogeneous sources under a shared 15-category taxonomy in 2.1, then present our two-phase relabeling pipeline in 2.2. 2 provides an overview of the construction pipeline and the resulting label distribution.

2.1 Taxonomy Consolidation↩︎

Existing safety datasets use fragmented taxonomies: similar violations appear under different names, while some datasets only provide binary safety labels [23], [25]. We therefore aggregate representative subsets from nine safety datasets, covering both general safety moderation and agent-specific risks. 1 summarizes the source composition of GuardZoo.

Table 1: Source composition of GuardZoo.
Source Dataset Samples
Aegis 2.0 [18] 9,219
WildGuardMix [26] 6,939
Toxic Chat [23] 4,984
BeaverTails [17] 4,425
S-Eval [25] 2,650
OpenAI Moderation [10] 1,679
PolicyGuard Bench [19] 1,000
ASSE-Bench [27] 932
R-Judge [28] 632
Total 32,460

To build a shared taxonomy, we align overlapping categories and remove redundancy. For example, we merge WildGuardMix’s violence_and_physical_harm [26] with BeaverTails’ violence, aiding_and_abetting [17], yielding 19 intermediate categories. We further merge frequently co-occurring categories, such as hate_speech and discrimination, resulting in 15 core unsafe categories listed in 7.1.

2.2 Two-Phase Relabeling Pipeline↩︎

Directly mapping source labels to the unified taxonomy introduces mismatch and noise. To ensure data quality, we implement a rigorous two-phase annotation pipeline to relabel the entire corpus.

2.2.0.1 Phase 1: Multi-LLM Ensemble Voting.

We use three proprietary LLMs from distinct model families as annotators: Gemini 3 Flash [29], GPT-5 Mini [30], and Claude 4.5 Haiku [31]. This diverse ensemble mitigates provider-specific alignment biases. Each model independently assigns a binary safety label and, if unsafe, the violated categories from our 15-domain taxonomy. We accept a label only when all three models agree on both dimensions, resolving 20,133 samples.

2.2.0.2 Phase 2: Expert Human Adjudication.

For the remaining 12,327 disputed samples, we rely on human adjudication. Annotators are presented with the disputed conversations, alongside strict taxonomic definitions and canonical examples derived from the original datasets. They act as expert judges to reconcile discrepancies and assign the final gold-standard labels. Additional annotation details and multi-category examples are provided in [sec:human_annotation,app:multi_category_examples].

3 RouteGuard↩︎

We now present RouteGuard, a router-expert guardrail framework for fine-grained safety detection. Given a conversation \(x\), a guardrail system first determines whether it is safe or unsafe; if unsafe, it further predicts a set of violated threat categories \(V \subseteq \mathcal{T}\) under a predefined taxonomy \(\mathcal{T}\). RouteGuard decomposes this process by using a safety-aware router to dispatch each input to one or more specialized expert guardrails, whose outputs are aggregated into the final category prediction. We describe the expert construction and routing mechanism in 3.1, followed by modular expansion to emerging threats in 3.2.

3.1 Building RouteGuard↩︎

Monolithic guardrails [32], [33] typically optimize a single mapping function \(f_\theta: x \rightarrow \{0, 1\} \times \mathcal{P}(\mathcal{T})\) over the taxonomy power set. Forcing a shared parameter space \(\theta\) to navigate conflicting decision boundaries inevitably causes task interference. To resolve this bottleneck, RouteGuard introduces a dynamic dispatch mechanism. The framework consists of a Router and an ensemble of specialized Experts. For any incoming conversation, the router triages the input to the relevant expert(s). The activated experts then evaluate the text independently, and their discrete outputs are aggregated to form the final system prediction.

3.1.0.1 Building Expert Guardrails.

The core motivation of this decoupled design is to minimize task interference by shrinking the output space for individual expert guardrails. Analogous to a medical triage system directing patients to specialized departments, each expert is dedicated to managing a single domain. To achieve this, we partition the full taxonomy \(\mathcal{T}\) into \(M\) semantically cohesive domains \(\{\mathcal{D}_1, \dots, \mathcal{D}_M\}\) by grouping highly correlated categories (e.g., animal abuse and child abuse). Each expert \(E_i\) thus acts as a dedicated authority over its respective domain, tasked exclusively with identifying violations within its purview: \(E_i(x) \subseteq \mathcal{D}_i\).

Each expert \(E_i\) is trained to map the conversation \(x\) to a target token sequence \(\mathbf{o}_i\). To enforce sharp domain boundaries and mitigate over-triggering, \(\mathbf{o}_i\) defaults to a special none token whenever there are no in-domain violations, and lists the precise categories within its purview otherwise: \[\mathbf{o}_i = \begin{cases} \text{\texttt{none}}, & \text{if } V^* \cap \mathcal{D}_i = \emptyset, \\ V^* \cap \mathcal{D}_i, & \text{otherwise.} \end{cases}\] where \(V^* \subseteq \mathcal{T}\) is the ground-truth violation set. We optimize \(E_i\) using a standard token-level cross-entropy loss: \[\mathcal{L}_{\text{expert}}^{(i)} = - \sum_{k=1}^{|\mathbf{o}_i|} \log P_{\theta_i}(o_{i,k} \mid x, o_{i,<k})\] where \(o_{i,k}\) represents the \(k\)-th token of \(\mathbf{o}_i\).

Table 2: In-domain evaluation results (%) on GuardZoo.RouteGuard achieves the best fine-grained category detection performance, outperforming strong fine-tuned monolithic baselines and traditional router baselines.
Model Safe/Unsafe Acc Unsafe \(F_1\) Macro Category \(F_1\) Micro Category \(F_1\)
0-shot Baselines
LlamaGuard2-8B 67.71 65.52 2.34 3.56
LlamaGuard3-1B 45.13 25.20 1.17 3.55
LlamaGuard3-8B 70.00 69.87 3.86 13.79
Qwen3Guard-0.6B 66.50 68.83 10.31 23.40
Qwen3Guard-4B 77.00 79.04 21.47 31.11
Qwen3Guard-8B 76.14 80.23 26.63 37.50
ShieldGemma-2B 68.09 75.13 39.89 48.51
ShieldGemma-9B 63.74 75.61 40.79 48.38
ShieldGemma-27B 52.07 55.30 16.72 20.42
Fine-tuned Baselines
LlamaGuard2-8B 88.29 90.60 68.99 70.77
LlamaGuard3-1B 87.60 89.94 67.63 70.01
LlamaGuard3-8B 88.20 90.46 68.80 70.35
Qwen3Guard-0.6B 87.41 89.81 62.65 69.83
Qwen3Guard-4B 89.17 91.38 69.93 71.27
Qwen3Guard-8B 88.99 91.26 70.54 71.84
ShieldGemma-2B 88.11 90.54 69.37 71.20
ShieldGemma-9B 88.58 90.88 69.66 71.09
Router Baselines
DC Router 79.18 81.34 58.96 66.08
Graph Router 80.06 82.23 58.66 66.74
MLP Router 78.45 80.39 57.84 65.00
KNN Router 71.33 71.45 48.55 55.41
Ours
RouteGuard-0.6B 86.28 88.67 67.76 70.58
RouteGuard-4B 89.21 91.45 70.24 71.88
RouteGuard-8B 89.19 91.48 70.99 72.21

3.1.0.2 Building the Router.

The router serves as a safety-aware triage module that decides whether an input requires expert inspection and, if so, which expert domains should be activated. Unlike conventional model routing, where every query is typically assigned to a candidate model, our setting allows clearly benign inputs to bypass the expert pool through a null route.

Formally, given expert domains \(\mathcal{D}=\{D_1,\ldots,D_M\}\) and an input conversation \(x\), the router predicts a routing set \[R(x) \subseteq \{1,\ldots,M\}.\] For a training instance with ground-truth violation set \(V^* \subseteq T\), the target routing set is \[R^*(x)=\{i \mid V^* \cap D_i \neq \emptyset\}.\] When \(V^*=\emptyset\), we set \(R^*(x)=\emptyset\), corresponding to the null route.

In practice, we instantiate the router as a generative domain-set predictor that outputs textual expert sets, such as {agent, cyber} for multi-domain violations and {} for the null route. During inference, the activated expert set is \(\mathcal{A}(x)=\{E_i \mid i \in R(x)\}\), and the final prediction is obtained by union aggregation: \[V(x)=\bigcup_{E_i \in \mathcal{A}(x)} E_i(x).\] If the router predicts the null route, or if all activated experts return \(\emptyset\), the system outputs safe.

3.2 Extensibility to Novel Threats↩︎

As the safety landscape continuously evolves, monolithic guardrails struggle to rapidly adapt to novel risks [34], [35]. Incorporating these emerging threats via full retraining incurs prohibitive computational costs and requires re-validating all previously verified decision boundaries. Conversely, updating the shared parameter space through continual learning notoriously triggers catastrophic forgetting, where optimizing for \(t_{\text{new}}\) inadvertently degrades the detection accuracy of existing categories [36], [37].

To circumvent these limitations, RouteGuard leverages its architecture for plug-and-play extensibility. When a new threat \(t_{\text{new}}\) emerges, developers simply train a dedicated expert \(E_{\text{new}}\), leaving all existing experts frozen. System integration requires updating only the router to dispatch relevant inputs to \(E_{\text{new}}\). Ultimately, RouteGuard guarantees scalable defense without the monumental overhead of monolithic re-optimization.

4 Experiments and Results↩︎

In this section, we describe the experimental setup in 4.1, compare RouteGuard against monolithic and router baselines under in-domain and out-of-domain settings on GuardZoo in 4.2, and further study modular threat expansion, router design, and expert specialization in [subsec:continual_learning,subsec:router_ablation,subsec:expert_choice].

4.1 Experimental Setup↩︎

4.1.0.1 Dataset Splits.

We split GuardZoo by data source to evaluate both in-domain performance and out-of-domain (OOD) generalization. Specifically, we hold out all Toxic-Chat [23] and OpenAI-Moderation [10] samples as the OOD test set, and use the remaining sources as the in-domain pool. The in-domain pool is split into 80% training and 20% test data; the training portion is used for RouteGuard and all trainable baselines.

Table 3: Out-of-domain evaluation results (%) on GuardZoo.RouteGuard improves robustness under held-out source distributions, achieving the best overall performance and the strongest fine-grained category detection results.
Model Safe/Unsafe Acc Unsafe \(F_1\) Macro Category \(F_1\) Micro Category \(F_1\)
Fine-tuned Baselines
Qwen3Guard-4B 83.13 46.43 20.55 34.59
Qwen3Guard-8B 81.45 36.94 19.23 23.08
LlamaGuard3-8B 84.77 66.11 28.93 46.38
ShieldGemma-9B 83.88 65.64 24.52 44.25
Router Baselines
DC Router 83.58 51.12 23.26 37.81
Graph Router 83.90 54.09 23.84 38.78
MLP Router 83.36 50.99 26.23 37.79
KNN Router 79.53 29.47 16.97 19.34
Ours
RouteGuard-4B 86.76 66.05 31.01 53.08
RouteGuard-8B 87.09 66.33 30.37 53.00

4.1.0.2 Router and Expert Configuration.

RouteGuard uses five specialized safety experts over semantically grouped domains: Agent Safety, Cybersecurity, Physical Harm, Non-Violent Misconduct, and Social Risks. Each expert is obtained by fine-tuning Qwen3Guard-0.6B [38] on its corresponding domain partition, with sub-category mappings and fine-tuning details provided in 8.1.

The router serves as a triage layer that maps each input to a target expert-domain set, with a null route for safe inputs. We fine-tune Qwen3Guard [38] routers at three scales (0.6B, 4B, and 8B), yielding RouteGuard-0.6B, RouteGuard-4B, and RouteGuard-8B; implementation details are provided in 8.2.

4.1.0.3 Baseline Implementations.

We compare RouteGuard against zero-shot guardrails, fully fine-tuned guardrails, and traditional classification routers adapted to dispatch inputs to our experts. The guardrail baselines cover Qwen3Guard [38], LlamaGuard [4], [32], and ShieldGemma [39] across multiple scales, while the router baselines include k-NN Router [40], MLP Router [41], RouterDC [42], and GraphRouter [43]. Detailed model variants and implementation settings are provided in [app:traditional95router].

4.1.0.4 Evaluation Metrics.

We evaluate both coarse binary safety detection and fine-grained multi-label threat categorization. For binary detection, we report Safe/Unsafe Accuracy and Unsafe \(F_1\); for category detection, we report Macro Category \(F_1\) and Micro Category \(F_1\) on unsafe samples. Detailed metric definitions are provided in 8.4.

4.2 Robust Safety Detection with RouteGuard↩︎

4.2.0.1 In-Domain Evaluation.

2 shows that RouteGuard-4B and RouteGuard-8B achieve the best fine-grained category performance. Compared with the strongest fully fine-tuned monolithic baselines, the gains are modest but consistent on Macro and Micro \(F_1\), suggesting that decomposing safety detection into domain-specific experts can better support fine-grained threat categorization. Monolithic fine-tuning guardrails remain a strong baseline, especially for coarse safe/unsafe detection, indicating that RouteGuard’s main advantage lies in category-level specialization rather than simply improving binary safety classification.

Zero-shot guardrail baselines perform substantially worse on category-level metrics, reflecting the difficulty of directly adapting existing guardrails to a customized, unified safety taxonomy without task-specific training. Traditional router baselines also lag behind the generative router, despite using the same expert pool. This suggests that routing itself is a non-trivial component of the problem, particularly for multi-category inputs that may involve overlapping safety policies. Overall, these results indicate that RouteGuard provides a more effective routing-and-specialization strategy for fine-grained safety detection.

4.2.0.2 Out-of-Domain Evaluation.

To evaluate generalization under distribution shifts, we select a representative subset of baselines that perform strongly in-domain. As shown in 3, all systems experience performance degradation, especially on Macro and Micro \(F_1\), confirming that the held-out sources present a challenging out-of-domain evaluation setting. Nevertheless, RouteGuard-4B and RouteGuard-8B achieve the strongest overall results across the evaluated metrics, with particularly clear gains on fine-grained category prediction. This suggests that separating routing from domain-specific expert judgment can improve robustness to unseen source distributions.

Figure 3: Modular expansion under emerging threat domains. RouteGuard adds a new domain expert while keeping existing experts frozen, and recalibrates the router with a 20% global subset. This localized update better preserves fine-grained safety performance than sequentially fine-tuning monolithic guardrails.

4.3 Modular Expansion to Emerging Threats↩︎

As safety threats evolve, guardrails should be able to incorporate new hazards without fully retraining the entire system. This setting is challenging for monolithic guardrails: retraining on the full expanded dataset can be costly, while sequentially fine-tuning on newly introduced threats may degrade performance on previously learned domains. We examine whether RouteGuard provides a more localized path for system expansion.

We simulate sequential threat emergence across five domains: Agent, Harm, Social, Cyber, and Non-violent violations. For monolithic baselines, we sequentially fine-tune Qwen3Guard models at 0.6B, 4B, and 8B scales as new domains are introduced. For RouteGuard, each newly introduced domain is handled by training a dedicated Qwen3Guard-0.6B expert, while previously trained experts remain frozen. To integrate the expanded expert pool, we update the router using a 20% subset drawn from all available domains.

As shown in 3, sequentially fine-tuned monolithic baselines suffer from degraded fine-grained category performance after domain updates, especially in Macro and Micro \(F_1\). In contrast, RouteGuard better preserves overall safety detection performance because most domain-specific parameters are isolated in frozen experts, and only the router and newly added expert require updates. These results highlight a practical advantage of the router-expert design: emerging safety domains can be incorporated through localized expert expansion and lightweight router recalibration, avoiding full-system retraining.

a

b

Figure 4: Dense MoE routing vs. RouteGuard under different router capacities. MoE is competitive with a small router, while RouteGuard benefits more from increased router capacity due to domain specialization..

4.4 Ablation Study on Router Design↩︎

To examine the effect of domain specialization, we compare RouteGuard with a dense Mixture-of-Experts (MoE) routing baseline [41], [44], [45]. Unlike RouteGuard, whose experts are trained on disjoint safety domains, the MoE baseline uses five all-category Qwen3Guard-0.6B experts fine-tuned with different random seeds. For each top-\(k\) setting, we derive router labels by enumerating all \(\binom{5}{k}\) expert subsets and selecting the subset whose aggregated predictions best match the ground truth. We train MoE routers with both Qwen3Guard-0.6B and Qwen3Guard-4B backbones.

As shown in 4, dense MoE routing is competitive with a 0.6B router, where MoE top-2 slightly outperforms RouteGuard on Macro \(F_1\). However, with a 4B router, RouteGuard achieves the best category-level performance, reaching 70.24 Macro \(F_1\) and 71.88 Micro \(F_1\). In contrast, MoE variants gain little from the larger router, suggesting that routing among dense, overlapping experts provides limited benefit. These results indicate that RouteGuard benefits from explicit domain-specialized experts, where improved routing capacity more directly translates into better fine-grained safety detection.

3pt

Table 4: Expert selection analysis with domain-level Macro \(F_1\).Macro \(F_1\) is computed only over the fine-grained categories assigned to the domain.
Model Agent Cyber Social Non-v. Harm
Specialized Experts
0.6B 94.37 83.68 70.66 81.53 78.63
4B 94.86 83.33 70.66 81.75 80.77
8B 93.62 83.66 71.82 83.31 80.29
Monolithic Baselines
0.6B 80.64 80.62 68.94 82.58 73.12
4B 81.58 81.39 73.45 82.87 78.21
8B 83.12 81.37 74.23 82.80 78.34

4.5 Expert Specialization and Scale↩︎

We further analyze whether our experts truly specialize in their assigned domains and whether such specialization requires larger backbones. As shown in 4, specialized experts generally outperform monolithic baselines of the same scale on their corresponding domains. The gain is especially large for agent safety, cybersecurity, and harm-related domains, where the 0.6B expert substantially improves over the 0.6B baseline. These results suggest that experts learn domain-specific decision boundaries rather than acting as smaller copies of monolithic guardrails. Meanwhile, scaling experts beyond 0.6B brings limited additional gains: larger experts do not consistently improve performance on agent safety or cybersecurity, and the average improvement from 0.6B to 4B/8B remains small. This finding is important for RouteGuard, as it shows that effective plug-and-play specialization can be achieved with small experts, preserving the efficiency of the overall routing framework.

5 Related Work↩︎

5.0.0.1 Guardrail.

Guardrails have become a practical defense layer for LLM and agent systems, serving as external input-output or trajectory-level monitors without modifying the protected model [32], [33], [38], [46]. Early guardrails mainly address broad safety risks, including harmful prompts, jailbreaks, and unsafe generations, under general safety policies [15], [47], [48]. However, recent evidence shows that such guardrails often fail in specialized settings: domain-specific risks may look benign, and agent compliance failures may require multi-step, policy-aware reasoning [49][51]. This motivates a shift from monolithic safety moderation to task- and domain-specialized guardrails, as recent benchmarks reveal distinct risks across scientific [52], [53], application-specific [54], and policy-compliance settings [19]. In this work, we take a complementary step: instead of assuming one guardrail fits all safety tasks, we study how to route each input to the most suitable guardrail under a unified safety benchmark, composing heterogeneous guardrails into a flexible, task-aware safety system.

5.0.0.2 Model Routing.

Model routing addresses a related but distinct problem: given a fixed pool of candidate models and an incoming query, decide which model should serve it [55][60]. These methods typically operate in the general-purpose serving setting, where the candidate models can all answer the same query but differ in capability, latency, or cost, and routing decisions optimize quality–efficiency trade-offs. A separate line of work instead focuses on constructing the candidate pool itself from a large, heterogeneous model space [61]. Our work repurposes the routing paradigm for a different objective: rather than arbitrating among general-purpose models, RouteGuard routes among specialized safety experts, each optimized for a disjoint threat category. In our setting, the router does not choose between models for cost or speed; it sends each input to the expert that handles its threat type. This reduces the task interference seen in single-model guardrails and makes the system easy to extend with new experts.

6 Conclusion↩︎

We introduced RouteGuard, a router-expert framework for fine-grained LLM safety guardrails, together with GuardZoo, a human-annotated benchmark built from nine safety datasets under a unified 15-category taxonomy. Across in-domain and out-of-domain evaluations, RouteGuard improves category-level threat detection over strong monolithic and routing baselines, with particularly clear gains under distribution shift. We further show that its modular design supports localized expansion to emerging threat domains by adding new experts and recalibrating the router, avoiding full-system retraining. Overall, our findings highlight threat-domain specialization as a practical direction for more scalable and adaptable safety guardrails.

Limitations↩︎

While RouteGuard demonstrates the promise of router-expert guardrails, it has several limitations. First, RouteGuard presents one practical instantiation of the router-expert paradigm, but does not claim to identify the optimal way to partition safety domains or train routers. Alternative expert groupings, hierarchical routing strategies, or joint router-expert optimization may further improve performance. Second, our out-of-domain evaluation focuses on held-out data sources, which captures source-level distribution shift but does not cover all real-world deployment shifts, such as new languages, modalities, or rapidly emerging threat types. Future work can extend GuardZoo and RouteGuard to broader distribution shifts and more diverse safety scenarios. Finally, our modular expansion experiment assumes access to a small global calibration subset for router updates. It should therefore be viewed as a practical adaptation setting rather than a rehearsal-free continual learning benchmark. Developing router-expert guardrails that can incorporate new threats with even less historical data remains an important direction for future work.

Ethical Considerations↩︎

This work is intended to improve the reliability of LLM safety guardrails. GuardZoo is constructed from existing safety and alignment datasets and further curated through a two-phase relabeling process with human adjudication. Because safety data may contain harmful, sensitive, or offensive content, all annotations are conducted with appropriate guidelines, access control, and annotator well-being considerations. RouteGuard is designed as a defensive framework for detecting and categorizing unsafe interactions. The paper reports aggregate benchmark results and taxonomy-level analyses, and does not require releasing operational jailbreak strategies or instructions for harmful activities. At the same time, guardrail models can produce false positives or false negatives, especially on ambiguous or context-dependent inputs. Therefore, RouteGuard should be used as part of a broader safety pipeline rather than as a complete replacement for human oversight in high-stakes applications. Figure 1 was created with assistance from a generative AI tool and was manually edited by the authors for clarity and accuracy.

7 GuardZoo Dataset Appendix↩︎

7.1 Final Core Taxonomy↩︎

Table 5 presents the complete list of the 15 consolidated core safety domains deployed in our router-expert framework.

Table 5: The 15 consolidated core safety domains in the GuardZoo benchmark.
Final Core Taxonomy (15 Domains)
Physical Harm, Weapons, & Drugs
Hate Speech, Discrimination, & Harassment
Non-Violent Unethical Behavior
Animal Abuse
Child Abuse
Controversial Topics & Politics
Misinformation on Ethics, Laws, & Safety
Self-Harm
Sexually Explicit & Adult Content
Terrorism & Organized Crime
Sensitive Information (Organizations & Government)
Copyright Violations
Mental Health Crisis
Cyberattack
Agent Safety

7.2 Final Dataset Statistics and Examples↩︎

Following the rigorous two-phase annotation pipeline, the final GuardZoo benchmark comprises 32,460 fully curated conversational samples. The dataset exhibits a balanced distribution between safe and unsafe interactions, containing 16,037 safe samples and 16,423 unsafe samples.

A key characteristic of GuardZoo is its inclusion of complex, real-world conversational threats. Among the 16,423 unsafe instances, 10,647 (64.83%) are classified into a single primary violation domain. The remaining 5,776 samples (35.17%) involve multi-category violations, spanning two or more safety categories simultaneously.

Table 6 details the exact distribution of the 10,647 single-category unsafe samples across our 15 core taxonomic domains.

To illustrate why GuardZoo requires multi-label annotation, we provide two representative examples in [fig:multi_category_example_agent,fig:multi_category_example_story]. Each sample contains multiple overlapping safety risks and therefore cannot be faithfully represented by a single unsafe category.

Table 6: Distribution of single-category unsafe samples across the 15 core domains in GuardZoo.
Core Safety Domain Count %
Physical Harm, Weapons, & Drugs 1,758 16.51
Hate Speech, Discrimination, & Harassment 2,259 21.22
Non-Violent Unethical Behavior 1,929 18.12
Animal Abuse 259 2.43
Child Abuse 70 0.66
Controversial Topics & Politics 327 3.07
Misinformation on Ethics, Laws, & Safety 743 6.98
Self-Harm 394 3.70
Sexually Explicit & Adult Content 556 5.22
Terrorism & Organized Crime 154 1.45
Sensitive Information (Orgs.& Gov.) 506 4.75
Copyright Violations 291 2.73
Mental Health Crisis 132 1.24
Cyberattack 640 6.01
Agent Safety 629 5.91
Total Single-Category Unsafe 10,647 100.0

7.3 Data Annotation Pipeline↩︎

To ensure industrial-grade annotation standards, top-tier data quality, and taxonomic consistency, we established a rigorous and ethically compliant human curation framework in collaboration with a well-known, industry-leading data service company. The annotation was executed by a professional curation team with a stable core of 20–30 long-term annotators, carefully selected from geographically diverse regions to ensure culturally nuanced and balanced safety judgments. The team maintained high educational credentials, with over 80% of the annotators holding a Bachelor’s degree or higher. Prior to entering production, all candidates underwent extensive taxonomy training, completed trial annotations, and passed a strict qualifying exam. Furthermore, we prioritized the welfare and ethical compensation of our annotators, strictly complying with local labor regulations and providing compensation and welfare benefits well above the regional average market rates.

Our commitment to rigorous quality control directly translated into high data fidelity through a strict multi-stage auditing process. During the initialization phase, an initial pilot batch of 200 conversations was directly reviewed by the authors; any batch or individual annotator exhibiting high error rates was immediately rejected and sent back for comprehensive revision and calibration. Once production stabilized, we implemented a continuous daily auditing protocol, randomly sampling and inspecting newly submitted data to ensure long-term consistency and prevent drift. This exhaustive quality-assurance loop guarantees that the human gold-standard labels in GuardZoo serve as a highly reliable benchmark for fine-grained safety evaluation.

8 Experimental Details↩︎

8.1 Detailed Expert Configurations↩︎

The five specialized RouteGuard experts process disjoint subsets of the 15 consolidated core taxonomies as follows:

  • Agent Expert: Agent Safety.

  • Cyber Expert: Cyberattack, Copyright Violations, Sensitive Information (Organizations & Government).

  • Harm Expert: Physical Harm, Weapons, & Drugs, Self-Harm, Mental Health Crisis, Animal Abuse, Child Abuse.

  • Non-Violent Expert: Non-Violent Unethical Behavior.

  • Social Expert: Hate Speech, Discrimination, & Harassment, Controversial Topics & Politics, Misinformation on Ethics, Laws, & Safety, Sexually Explicit & Adult Content.

During fine-tuning, we enforce three distinct behavioral objectives for each targeted domain expert. First, if the input contains unsafe categories falling within its designated domain, the model must output the precise union of the relevant violation labels. Second, if the input contains violations belonging exclusively to other expert domains, the model must return an empty set \(\emptyset\). Third, when encountering clean and safe inputs, the model must also return an empty set \(\emptyset\).

8.2 Detailed Router Implementation↩︎

At the routing level, safe inputs require special treatment. Unlike standard model routing, where every query is assigned to at least one candidate model, safety routing allows the system to abstain from expert activation when no violation is detected. We therefore introduce a dedicated null-route target for clean inputs. This design improves stability by explicitly teaching the router to distinguish between inputs that require expert inspection and inputs that should bypass the expert pool.

For generative LLM routers, we fine-tune Qwen3Guard models to directly output textual domain sets. For example, the router may generate {agent, cyber} for a multi-domain threat. For clean inputs, the router generates the empty set {}, which is the textual realization of the null route. Thus, both discriminative and generative routers implement the same routing semantics: unsafe inputs are dispatched to one or more expert domains, whereas safe inputs are assigned to the null route and bypass expert activation.

For discriminative router baselines, we train models to output a 6-dimensional indicator vector: \[(c_{\text{agent}}, c_{\text{cyber}}, c_{\text{harm}}, c_{\text{non\_violent}}, c_{\text{social}}, c_{\text{null}}).\] The first five dimensions correspond to expert domains, while \(c_{\text{null}}\) denotes the null route for safe inputs. During training, clean safe samples are mapped to \((0,0,0,0,0,1)\). Unsafe samples activate the corresponding expert-domain slots according to their ground-truth violation categories, while setting \(c_{\text{null}}=0\).

8.3 Baseline Details↩︎

For the zero-shot and fine-tuned guardrail baselines, we evaluate Qwen3Guard (0.6B, 4B, 8B) [38], LlamaGuard2 (8B) [32], LlamaGuard3 (1B, 8B) [4], and ShieldGemma (2B, 9B, 27B) [39]. Due to hardware constraints, ShieldGemma-27B is evaluated only in the zero-shot setting. For router baselines, we adapt k-NN Router [40], MLP Router [41], RouterDC [42], and GraphRouter [43] to predict safety-domain indicator vectors.

8.3.0.1 k-NN Router.

Following RouterBench [40], we embed each training conversation and perform nearest-neighbor retrieval at inference time. The routing vector is obtained by aggregating the domain indicators of the nearest training examples.

8.3.0.2 MLP Router.

Following RouteLLM [41], we train a lightweight MLP classifier on frozen conversation embeddings. The MLP outputs the 6-dimensional routing vector and is optimized with binary cross-entropy.

8.3.0.3 RouterDC.

Following RouterDC [42], we train a query encoder with dual contrastive objectives to align conversations with their suitable routing targets. We adapt the original model-selection objective by treating safety domains as candidate routes rather than candidate LLMs.

8.3.0.4 GraphRouter.

Following GraphRouter [43], we construct a heterogeneous graph over conversations and expert-domain nodes. Routing is formulated as predicting edges between an input conversation and its relevant domain nodes, with the null-route node used for safe inputs.

8.4 Details on Evaluation Metrics↩︎

  • Safe/Unsafe Accuracy and Unsafe \(F_1\): Binary metrics for distinguishing safe from unsafe inputs.

  • Macro Category \(F_1\): The unweighted average of per-category \(F_1\) over ground-truth unsafe samples, emphasizing balanced performance across threat domains.

  • Micro Category \(F_1\): The pooled category-level \(F_1\) over the same unsafe subset, measuring overall multi-label prediction quality2.

To isolate fine-grained multi-label category detection capability from simple coarse binary classification, both Macro Category \(F_1\) and Micro Category \(F_1\) are calculated exclusively on samples where the ground-truth label contains at least one unsafe category.

8.4.0.1 Macro Category \(F_1\).

Let \(N\) be the total number of unsafe core categories (\(N=15\)). For each category \(i \in \{1, \dots, N\}\), we treat its prediction as an independent binary classification task to compute its category-specific \(F_{1}^{(i)}\) score. The overall Macro Category \(F_1\) is the unweighted average: \[\text{Macro Category } F_1 = \frac{1}{N} \sum_{i=1}^{N} F_{1}^{(i)}\] As shown in the formula, every domain contributes equally to the final score regardless of its support size, making it a reliable proxy for tracking performance on rare, critical threats.

8.4.0.2 Micro Category \(F_1\).

This metric flattens the multi-label matrix across all unsafe samples and categories. We globally aggregate the evaluation outcomes by defining the total counts of true positives (\(\mathbf{TP}\)), false positives (\(\mathbf{FP}\)), and false negatives (\(\mathbf{FN}\)) across all \(N\) categories as follows: \[\begin{cases} \mathbf{TP} = \displaystyle\sum_{i=1}^{N} \text{TP}_i \\[1.5ex] \mathbf{FP} = \displaystyle\sum_{i=1}^{N} \text{FP}_i \\[1.5ex] \mathbf{FN} = \displaystyle\sum_{i=1}^{N} \text{FN}_i \end{cases}\] The global Micro \(F_1\) score is then computed via the joint formulation: \[\text{Micro } F_1 = \frac{2\mathbf{TP}}{2\mathbf{TP} + \mathbf{FP} + \mathbf{FN}}\] Consequently, this metric reflects the overall label accuracy across dense data streams.

None

Figure 5: A multi-category example from GuardZoo involving tool-use injection, unauthorized access control, and unethical action execution..

None

Figure 6: A multi-category example from GuardZoo involving coercive manipulation, adult sexualized framing, and child-safety concerns..

References↩︎

[1]
Qwen Team. 2026. Qwen3. 5-omni technical report. arXiv preprint arXiv:2604.15804.
[2]
Aaditya Singh, Adam Fry, Adam Perelman, Adam Tart, Adi Ganesh, Ahmed El-Kishky, Aidan McLaughlin, Aiden Low, AJ Ostrow, Akhila Ananthram, et al. 2025. Openai gpt-5 system card. arXiv preprint arXiv:2601.03267.
[3]
Gemini Team. 2023. Gemini: a family of highly capable multimodal models. arXiv preprint arXiv:2312.11805.
[4]
Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783.
[5]
Boxin Wang, Weixin Chen, Hengzhi Pei, Chulin Xie, Mintong Kang, Chenhui Zhang, Chejian Xu, Zidi Xiong, Ritik Dutta, Rylan Schaeffer, et al. 2023. Decodingtrust: A comprehensive assessment of trustworthiness in \(\{\)GPT\(\}\) models. Advances in neural information processing systems.
[6]
Ethan Perez, Saffron Huang, Francis Song, Trevor Cai, Roman Ring, John Aslanides, Amelia Glaese, Nat McAleese, and Geoffrey Irving. 2022. Red teaming language models with language models. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 3419–3448.
[7]
Jun Yan, Wenjie Jacky Mo, Xiang Ren, and Robin Jia. 2025. https://doi.org/10.18653/v1/2025.emnlp-main.318. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 6228–6239, Suzhou, China. Association for Computational Linguistics.
[8]
Wenjie Jacky Mo, Jiashu Xu, Qin Liu, Jiongxiao Wang, Jun Yan, Hadi Askari, Chaowei Xiao, and Muhao Chen. 2025. https://doi.org/10.18653/v1/2025.findings-naacl.119. In Findings of the Association for Computational Linguistics: NAACL 2025, pages 2232–2249, Albuquerque, New Mexico. Association for Computational Linguistics.
[9]
Traian Rebedea, Razvan Dinu, Makesh Narsimhan Sreedhar, Christopher Parisien, and Jonathan Cohen. 2023. Nemo guardrails: A toolkit for controllable and safe llm applications with programmable rails. In Proceedings of the 2023 conference on empirical methods in natural language processing: system demonstrations, pages 431–445.
[10]
Todor Markov, Chong Zhang, Sandhini Agarwal, Florentine Eloundou Nekoul, Theodore Lee, Steven Adler, Angela Jiang, and Lilian Weng. 2023. A holistic approach to undesired content detection in the real world. In Proceedings of the AAAI conference on artificial intelligence, volume 37, pages 15009–15018.
[11]
Boyu Zhu, Xiaofei Wen, Wenjie Jacky Mo, Tinghui Zhu, Yanan Xie, Peng Qi, and Muhao Chen. 2025. Omniguard: Unified omni-modal guardrails with deliberate reasoning. arXiv preprint arXiv:2512.02306.
[12]
Xiaofei Wen, Wenjie Jacky Mo, Xingyu Fu, Rui Cai, Tinghui Zhu, Wendi Li, Yanan Xie, Muhao Chen, and Peng Qi. 2026. When vision speaks for sound. arXiv preprint arXiv:2605.16403.
[13]
Zijun Wang, Haoqin Tu, Letian Zhang, Hardy Chen, Juncheng Wu, Xiangyan Liu, Zhenlong Yuan, Tianyu Pang, Michael Qizhe Shieh, Fengze Liu, et al. 2026. Your agent, their asset: A real-world safety analysis of openclaw. arXiv preprint arXiv:2604.04759.
[14]
Diana Novak Jones. 2026. Openai faces lawsuit in california court claiming chatbot gave advice that led to fatal overdose. Published May 12, 2026.
[15]
Xiaogeng Liu, Peiran Li, Edward Suh, Yevgeniy Vorobeychik, Zhuoqing Mao, Somesh Jha, Patrick McDaniel, Huan Sun, Bo Li, and Chaowei Xiao. 2025. Autodan-turbo: A lifelong agent for strategy self-exploration to jailbreak llms. ICLR.
[16]
Nan Xu, Fei Wang, Ben Zhou, Bangzheng Li, Chaowei Xiao, and Muhao Chen. 2024. Cognitive overload: Jailbreaking large language models with overloaded logical thinking. In Findings of the Association for Computational Linguistics: NAACL 2024, pages 3526–3548.
[17]
Jiaming Ji, Mickel Liu, Josef Dai, Xuehai Pan, Chi Zhang, Ce Bian, Boyuan Chen, Ruiyang Sun, Yizhou Wang, and Yaodong Yang. 2023. Beavertails: Towards improved safety alignment of llm via a human-preference dataset. Advances in Neural Information Processing Systems, 36:24678–24704.
[18]
Shaona Ghosh, Prasoon Varshney, Makesh Narsimhan Sreedhar, Aishwarya Padmakumar, Traian Rebedea, Jibin Rajan Varghese, and Christopher Parisien. 2025. Aegis2. 0: A diverse ai safety dataset and risks taxonomy for alignment of llm guardrails. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 5992–6026.
[19]
Xiaofei Wen, Wenjie Jacky Mo, Yanan Xie, Peng Qi, and Muhao Chen. 2025. Towards policy-compliant agents: Learning efficient guardrails for policy violation detection. arXiv preprint arXiv:2510.03485.
[20]
Xiaogeng Liu and Chaowei Xiao. 2025. Autodan-reasoning: Enhancing strategies exploration based jailbreak attacks with test-time scaling. arXiv preprint arXiv:2510.05379.
[21]
Justin Cui, Wei-Lin Chiang, Ion Stoica, and Cho-Jui Hsieh. 2024. Or-bench: An over-refusal benchmark for large language models. arXiv preprint arXiv:2405.20947.
[22]
Fei Wang, Wenjie Mo, Yiwei Wang, Wenxuan Zhou, and Muhao Chen. 2023. https://doi.org/10.18653/v1/2023.findings-emnlp.1013. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 15173–15184, Singapore. Association for Computational Linguistics.
[23]
Zi Lin, Zihan Wang, Yongqi Tong, Yangkun Wang, Yuxin Guo, Yujia Wang, and Jingbo Shang. 2023. Toxicchat: Unveiling hidden challenges of toxicity detection in real-world user-ai conversation. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 4694–4702.
[24]
Mantas Mazeika, Long Phan, Xuwang Yin, Andy Zou, Zifan Wang, Norman Mu, Elham Sakhaee, Nathaniel Li, Steven Basart, Bo Li, et al. 2024. Harmbench: A standardized evaluation framework for automated red teaming and robust refusal. arXiv preprint arXiv:2402.04249.
[25]
Xiaohan Yuan, Jinfeng Li, Dongxia Wang, Yuefeng Chen, Xiaofeng Mao, Longtao Huang, Jialuo Chen, Hui Xue, Xiaoxia Liu, Wenhai Wang, et al. 2025. S-eval: Towards automated and comprehensive safety evaluation for large language models. Proceedings of the ACM on Software Engineering, 2(ISSTA):2136–2157.
[26]
Seungju Han, Kavel Rao, Allyson Ettinger, Liwei Jiang, Bill Yuchen Lin, Nathan Lambert, Yejin Choi, and Nouha Dziri. 2024. Wildguard: Open one-stop moderation tools for safety risks, jailbreaks, and refusals of llms. Advances in neural information processing systems, 37:8093–8131.
[27]
Hanjun Luo, Shenyu Dai, Chiming Ni, Xinfeng Li, Guibin Zhang, Kun Wang, Tongliang Liu, and Hanan Salam. 2026. Agentauditor: Human-level safety and security evaluation for llm agents. Advances in Neural Information Processing Systems, 38:43241–43298.
[28]
Tongxin Yuan, Zhiwei He, Lingzhong Dong, Yiming Wang, Ruijie Zhao, Tian Xia, Lizhen Xu, Binglin Zhou, Fangqi Li, Zhuosheng Zhang, Rui Wang, and Gongshen Liu. 2024. https://doi.org/10.18653/v1/2024.findings-emnlp.79. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 1467–1490, Miami, Florida, USA. Association for Computational Linguistics.
[29]
Google DeepMind. 2025. Gemini 3 flash model card. https://storage.googleapis.com/deepmind-media/Model-Cards/Gemini-3-Flash-Model-Card.pdf.
[30]
OpenAI. 2025. Gpt-5 system card. https://openai.com/index/gpt-5-system-card/.
[31]
Anthropic. 2025. Claude haiku 4.5 system card. https://www.anthropic.com/claude-haiku-4-5-system-card.
[32]
Hakan Inan, Kartikeya Upasani, Jianfeng Chi, Rashi Rungta, Krithika Iyer, Yuning Mao, Michael Tontchev, Qing Hu, Brian Fuller, Davide Testuggine, et al. 2023. Llama guard: Llm-based input-output safeguard for human-ai conversations. arXiv preprint arXiv:2312.06674.
[33]
Xiaofei Wen, Wenxuan Zhou, Wenjie Jacky Mo, and Muhao Chen. 2025. https://doi.org/10.18653/v1/2025.findings-acl.704. In Findings of the Association for Computational Linguistics: ACL 2025, pages 13698–13713, Vienna, Austria. Association for Computational Linguistics.
[34]
Yue Huang, Lichao Sun, Haoran Wang, Siyuan Wu, Qihui Zhang, Yuan Li, Chujie Gao, Yixin Huang, Wenhan Lyu, Yixuan Zhang, et al. 2024. Trustllm: Trustworthiness in large language models. arXiv preprint arXiv:2401.05561.
[35]
Yi Liu, Gelei Deng, Zhengzi Xu, Yuekang Li, Yaowen Zheng, Ying Zhang, Lida Zhao, Tianwei Zhang, Kailong Wang, and Yang Liu. 2023. Jailbreaking chatgpt via prompt engineering: An empirical study. arXiv preprint arXiv:2305.13860.
[36]
Haizhou Shi, Zihao Xu, Hengyi Wang, Weiyi Qin, Wenyuan Wang, Yibin Wang, Zifeng Wang, Sayna Ebrahimi, and Hao Wang. 2025. Continual learning of large language models: A comprehensive survey. ACM Computing Surveys, 58(5):1–42.
[37]
Jianheng Huang, Leyang Cui, Ante Wang, Chengyi Yang, Xinting Liao, Linfeng Song, Junfeng Yao, and Jinsong Su. 2024. Mitigating catastrophic forgetting in large language models with self-synthesized rehearsal. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1416–1428.
[38]
Haiquan Zhao, Chenhan Yuan, Fei Huang, Xiaomeng Hu, Yichang Zhang, An Yang, Bowen Yu, Dayiheng Liu, Jingren Zhou, Junyang Lin, et al. 2025. Qwen3guard technical report. arXiv preprint arXiv:2510.14276.
[39]
Wenjun Zeng, Yuchi Liu, Ryan Mullins, Ludovic Peran, Joe Fernandez, Hamza Harkous, Karthik Narasimhan, Drew Proud, Piyush Kumar, Bhaktipriya Radharapu, et al. 2024. Shieldgemma: Generative ai content moderation based on gemma. arXiv preprint arXiv:2407.21772.
[40]
Qitian Jason Hu, Jacob Bieker, Xiuyu Li, Nan Jiang, Benjamin Keigwin, Gaurav Ranganath, Kurt Keutzer, and Shriyash Kaustubh Upadhyay. 2024. Routerbench: A benchmark for multi-llm routing system. arXiv preprint arXiv:2403.12031.
[41]
Isaac Ong, Amjad Almahairi, Vincent Wu, Wei-Lin Chiang, Tianhao Wu, Joseph E Gonzalez, M Waleed Kadous, and Ion Stoica. 2024. Routellm: Learning to route llms with preference data. arXiv preprint arXiv:2406.18665.
[42]
Shuhao Chen, Weisen Jiang, Baijiong Lin, James Kwok, and Yu Zhang. 2024. Routerdc: Query-based router by dual contrastive learning for assembling large language models. Advances in Neural Information Processing Systems, 37:66305–66328.
[43]
Tao Feng, Yanzhen Shen, and Jiaxuan You. 2025. Graphrouter: A graph-based router for llm selections. In International Conference on Learning Representations, volume 2025, pages 26186–26203.
[44]
Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. 2017. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538.
[45]
William Fedus, Barret Zoph, and Noam Shazeer. 2022. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research, 23(120):1–39.
[46]
Traian Rebedea, Razvan Dinu, Makesh Narsimhan Sreedhar, Christopher Parisien, and Jonathan Cohen. 2023. https://doi.org/10.18653/v1/2023.emnlp-demo.40. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 431–445, Singapore. Association for Computational Linguistics.
[47]
Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, J Zico Kolter, and Matt Fredrikson. 2023. Universal and transferable adversarial attacks on aligned language models. arXiv preprint arXiv:2307.15043.
[48]
Yi Zeng, Hongpeng Lin, Jingwen Zhang, Diyi Yang, Ruoxi Jia, and Weiyan Shi. 2024. https://doi.org/10.18653/v1/2024.acl-long.773. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 14322–14350, Bangkok, Thailand. Association for Computational Linguistics.
[49]
Ada Defne Tur, Nicholas Meade, Xing Han Lù, Alejandra Zambrano, Arkil Patel, Esin Durmus, Spandana Gella, Karolina Stańczak, and Siva Reddy. 2025. Safearena: Evaluating the safety of autonomous web agents. arXiv preprint arXiv:2503.04957.
[50]
Ido Levy, Ben wiesel, Sami Marreed, Alon Oved, Avi Yaeli, and Segev Shlomov. 2026. https://openreview.net/forum?id=MuCDzH0ctf. In The Fourteenth International Conference on Learning Representations.
[51]
Yuting Ning, Jaylen Jones, Zhehao Zhang, Chentao Ye, Weitong Ruan, Junyi Li, Rahul Gupta, and Huan Sun. 2026. When actions go off-task: Detecting and correcting misaligned actions in computer-use agents. arXiv preprint arXiv:2602.08995.
[52]
Tianhao Li, Jingyu Lu, Chuangxin Chu, Tianyu Zeng, Yujia Zheng, Mei Li, Haotian Huang, Bin Wu, Zuoxian Liu, Kai Ma, et al. 2024. Scisafeeval: a comprehensive benchmark for safety alignment of large language models in scientific tasks. arXiv preprint arXiv:2410.03769.
[53]
Fengqing Jiang, Fengbo Ma, Zhangchen Xu, Yuetai Li, Zixin Rao, Bhaskar Ramasubramanian, Luyao Niu, Bo Li, Xianyan Chen, Zhen Xiang, and Radha Poovendran. 2026. https://openreview.net/forum?id=2Td8r7KYK2. In The Fourteenth International Conference on Learning Representations.
[54]
Weidi Luo, Xiaofei Wen, Tenghao Huang, Hongyi Wang, Zhen Xiang, Chaowei Xiao, Kristina Gligorić, and Muhao Chen. 2026. Cooking up risks: Benchmarking and reducing food safety risks in large language models. arXiv preprint arXiv:2604.01444.
[55]
Qitian Jason Hu, Jacob Bieker, Xiuyu Li, Nan Jiang, Benjamin Keigwin, Gaurav Ranganath, Kurt Keutzer, and Shriyash Kaustubh Upadhyay. 2024. Routerbench: A benchmark for multi-llm routing system. arXiv preprint arXiv:2403.12031.
[56]
Isaac Ong, Amjad Almahairi, Vincent Wu, Wei-Lin Chiang, Tianhao Wu, Joseph E Gonzalez, M Waleed Kadous, and Ion Stoica. 2024. Routellm: Learning to route llms with preference data. arXiv preprint arXiv:2406.18665.
[57]
Shuhao Chen, Weisen Jiang, Baijiong Lin, James Kwok, and Yu Zhang. 2024. Routerdc: Query-based router by dual contrastive learning for assembling large language models. Advances in Neural Information Processing Systems, 37:66305–66328.
[58]
Tao Feng, Yanzhen Shen, and Jiaxuan You. 2024. Graphrouter: A graph-based router for llm selections. arXiv preprint arXiv:2410.03834.
[59]
Dujian Ding, Ankur Mallick, Chi Wang, Robert Sim, Subhabrata Mukherjee, Victor Ruhle, Laks VS Lakshmanan, and Ahmed Hassan Awadallah. 2024. Hybrid llm: Cost-efficient and quality-aware query routing. arXiv preprint arXiv:2404.14618.
[60]
Haozhen Zhang, Tao Feng, and Jiaxuan You. 2025. Router-r1: Teaching llms multi-round routing and aggregation via reinforcement learning. In The Thirty-ninth Annual Conference on Neural Information Processing Systems.
[61]
Rui Cai, Weijie Jacky Mo, Xiaofei Wen, Qiyao Ma, Wenhui Zhu, Xiwen Chen, Muhao Chen, and Zhe Zhao. 2026. Modellens: Finding the best for your task from myriads of models. arXiv preprint arXiv:2605.07075.

  1. \(^{\ast}\)Equal contribution.↩︎

  2. Calculation details are provided in 8.4.↩︎