Paper: safety routing evaluation fails under distribution shift, and baseline selection bias is underestimatedFalse Floors: LLM Safety Routing Evaluations Break Under Distribution Shift
Quick read
Evaluation and benchmarksBased on the paper PDF (generated by Gemini); refer to the original
Under distribution shift, the post-hoc best single-model baseline incurs a selection cost of 0.045 to 0.113, and under honest scoring, safe routing degrades to fixed model selection in most pool cells.
Includes four attacker types that do not observe weights or activations: A1 (routing-steering (α)) forces some requests into the cascade's cheap branch; A2 (post-hoc template selector) selects the lowest-token template post hoc; A3 (generic adaptive attacker) selects a single template in training reruns that generalizes across models; A4 (targeted adaptive attacker) knows the response model and selects templates specifically.
- Safety routers route inputs to different models based on the request to reduce harm, and evaluation typically compares them against the best single-model baseline. Existing evaluations often select the baseline model post hoc on the test set, ignoring the uncertainty and bias introduced by baseline selection when the test distribution undergoes category shift in real deployment.
- The paper introduces a strict held-out protocol on 7 safety corpora, comparing honest baselines frozen on training folds with post-hoc baselines on the test set; derives selection cost bounds and decomposes tail advantages; then, in agent environments and skill injection corpora, evaluates the upper bound of pre-execution routing, the adaptive manipulability of intermediate identification signals, and action-level defenses.
- Under distribution shift, hindsight baselines incur selection costs of 0.045 to 0.113, and routers collapse to fixed models in most units; on AgentDojo, pre-execution routing space is at most 0.0105; targeted attacks reduce gpt-5.4's recognition marking rate by 19.6 points, and four action strategies achieve zero success but lack mechanical enforcement.
- Results mainly cover English and single-turn dialogue settings; shift costs are uneven across corpora and depend on grouping splits; agent data is naturally saturated and sparsely covered; harm and tokens rely primarily on a single automated review model, lacking measurement of review recall; action-level policies have not been verified for mechanical isolation.
- Evaluated models
- gpt-5.4claude-sonnet-4-6claude-3-5-sonnetgpt-4o
- Benchmarks
- HELM Safety (harm_bench, xstest, simple_safety_tests)HarmBenchAgentDojoXSTestSORRY-BenchAIR-Bench 2024skill injection
- Metrics
- harmselection costAUROCattack success rateflag ratetask utilityconditional tail edge (ε)
The paper points out that a major safety routing benchmark selects the best single model as a comparison on the evaluation data, which is harmless under the benchmark's own setting but not under distribution shift. On HELM Safety, this selection cost is 0.003–0.030 harm under random splits, rising to 0.045–0.113 under class holdout, comparable to the entire disadvantage attributed to routing; on AgentDojo it rises seven to nine times under whole-suite holdout. When using baselines selected without test labels and scoring under shift, routing gains little on these benchmarks: in most cases routers directly select the baseline's model, and on the near-saturated AgentDojo, a perfect pre-distribution router is worth at most 2 points of harm. The paper also finds that attackers who know which model they face can, by selecting injection templates, reduce GPT-5.4's judgment recognition rate for later injections by 19.6 percentage points in holdout reruns, and an independent vocabulary marker reproduces this decline.
Why it was selectedThe paper quantifies the bias introduced by selecting baselines on the test set in safety routing evaluation and provides recommendations for evaluation protocols under distribution shift.
Paper analysis
What problem does this paper attempt to solve?
Test-set hindsight baselines inflate the performance of fixed models under distribution shift, creating false floors in safety routing evaluation.
The paper attempts to address the problem that safety routing evaluation of large language models, by selecting a single-model baseline on the test set in hindsight, produces "False Floors" under distribution shift and misjudges the value of routing defenses.
- Problem scenario and importance: Production service stacks have adopted safety routers to route traffic among a mixed model pool to intercept risky requests; their raison d'être depends on the gap between a single-request oracle and the best single model. The authors state that safety routers primarily handle unseen requests, so their performance must be measured under distribution shift.
- Shortcomings of existing evaluation: Mainstream evaluation benchmarks select the best single model on the evaluation data in hindsight (e.g., Best Single in hindsight) and compare it on the test set against routers that need to generalize. The authors state that this practice makes routers bear generalization uncertainty while exempting fixed baselines from it, biasing toward fixed baselines under distribution shift.
- Core observation and hypothesis: Under stationary random splits, the selection cost of the hindsight baseline is near zero; but under distribution shifts such as class holdout, the selection cost expands to a magnitude comparable to the routing disadvantage. The authors derive that the selection cost is non-negative and decompose it into a regret term for honest selection and an optimism bias term for the hindsight baseline.
- Proposed analysis and solution: The paper proposes an honest evaluation protocol that freezes fixed models on training folds, and quantifies evaluation bias, multi-dimensional threshold surfaces of routers, upper bounds for agent pre-execution routing, and manipulability of recognition signals under adaptive attacks on multiple safety corpora.
- Threat model:
- Attacker knowledge and capability: Does not observe model weights or activations. A1 (routing-steering (α)) can force a proportion α of requests into the cheap branch and observe the routing policy; A2 (post-hoc template selector) observes all results after the fact and selects the template with the lowest marking rate.
- Adaptive attack settings: A3 (generic adaptive attacker) selects a single template during training reruns and attacks the entire model pool in holdout reruns; A4 (targeted adaptive attacker) knows the identity of the response model (target observability) and selects templates for a specific model.
- Attack goals and victim systems: The attack goal is to induce harmful outputs or bypass injection markers; victim systems include multi-model routing pools, marker-gated cascading systems, and agents with tool-calling capabilities.
What related research exists?
Existing research reveals same-sample evaluation bias and degradation phenomena in routing; this paper systematically quantifies the costs and defense vulnerabilities under safety distribution shift.
- Routing baseline evaluation and the optimizer's curse
- Shihab et al. (2026) [4]: Points out the flaw of same-sample selection of the best fixed model in routing evaluation and proves the direction of bias in accuracy; this paper extends it to harm metrics, comparing random vs. class holdout splits on the same folds and providing tail advantage signs and geometric/signal decompositions.
- Li et al. (2026) [2] (LLMRouterBench): Its Best Single baseline selects models in hindsight on the full dataset; the authors test its open-source results and find that this cost is 0 for the full 20-model pool, but there is a shift cost on small pools and holdout datasets.
- Smith & Winkler (2006) [6]: Proposes the optimizer's curse in decision analysis; this paper combines finite-class maximal inequalities to give theoretical bounds on selection cost under distribution shift.
- Router degeneration and model combination ceilings
- Lai & Ye (2026) [27], Lu et al. (2026) [28], Garg & Sagtani (2026) [29]: Document the phenomenon of routers collapsing to a single model from perspectives such as selection failure, accuracy plateaus, and likelihood ratio degeneration under strong priors; this paper measures the behavior of nested shrinkage rules driving the shrinkage factor toward 0 under honest baselines and no-signal null hypotheses.
- Chen (2026) [32], Chen (2026) [33], Dekoninck et al. (2024) [34]: Analyze the router-oracle gap and co-failure ceilings; this paper complements them by showing that the measured routing disadvantage is mainly an artifact of baseline selection methods.
- Prompt injection defenses and action-level isolation
- Greshake et al. (2023) [31]: Proposes the indirect prompt injection threat; Zhan et al. (2025) [21], Nasr et al. (2025) [22] study adaptive attacks against standalone detectors; this paper tests the model's own expressive recognition signals.
- Dong et al. (2026) [20]: Reveals that agent hidden states can encode injection exposure with high AUROC but there is a knowledge-action gap; this paper shows that output-side expressive recognition is easily manipulated by template selection.
- Debenedetti et al. (2025) (CaMeL) [7], Beurer-Kellner et al. (2025) [8]: Propose enforcing action policies via harness outside the agent context; this paper tests four action-level configurations and finds their performance aligns with model recognition rather than mechanical blocking.
- Baseline methods and benchmarks
- Baselines include honest fixed baseline (pinhonest), in-sample baseline (pinoracle), full-sample baseline, random selection, and signal-free router with shuffled predictions.
- Datasets used include HELM Safety, HarmBench, AgentDojo, XSTest, SORRY-Bench, AIR-Bench 2024, and skill injection corpora.
- Differentiation from related work: The authors state that through a strict holdout evaluation protocol, this paper reveals false floors created by hindsight baselines under distribution shift, proves that safety routing yields weak gains under honest evaluation, and clarifies that defenses should shift from input intent classification to external action enforcement.
- Routing baseline evaluation and the optimizer's curse
How does the paper address this problem?
Establish an honest holdout evaluation protocol, derive an excess harm decomposition identity, and evaluate threshold surfaces and action defenses.
The paper constructs a parametric shrinkage routing family, formally decomposes baseline selection bias, and establishes a strict held-out evaluation protocol across multiple corpora, thereby measuring the router performance surface, agent pre-execution bottlenecks, and identification vulnerability under adaptive adversaries.
Problem Setting and Shrinkage Routing Family
Let the model pool be M = {1, ..., M}. For a request x, the router outputs prediction scores si(x) for each model and selects arg min_i si(x); hi(x) ∈ {0, 1} indicates whether model i produces a harmful output. To balance request-level signals with global margins, define the shrinkage formula: si(λ)(x) = λ pi(x) + (1 − λ)p̄i where λ = 1 corresponds to a per-request router, and λ = 0 degenerates to fixed selection based on predicted margins. Define the transfer rate ρd from the fixed baseline and the conditional tail advantage ε; the excess routing harm decomposes as: 𝔼[hrouter] − 𝔼[hpin] = ρd · (−ε) This identity closes exactly across folds and within each pool.
Baseline Definitions and Held-Out Evaluation Protocol
- Two baseline distinctions: The in-sample baseline pinoracle selects the model with the lowest harm on the evaluation fold or the full evaluation set; the honest baseline pinhonest selects and freezes only on training fold data.
- Cross-validation discipline: Uses grouped held-out cross-validation (GroupKFold) based on attack family, semantic category, or user task, avoiding random splits across templates; AUROC is computed independently within folds and then averaged.
- Nested hyperparameter tuning: Router hyperparameters λ are strictly selected within training folds via nested cross-validation, prohibiting the use of test fold data for tuning.
Router Threshold Surface and Multidimensional Analysis
- Four-dimensional influence axes: The signal threshold a* required for router breakeven is not a scalar but a surface determined by four dimensions: policy category (policy shrinkage), operating point asymmetry κ, task empirical difficulty (base harm rate), and baseline protocol.
- Feature and encoder configurations: Uses frozen text features (TF-IDF, MiniLM, Qwen3-Embedding, etc.) with Logistic regression for fitting, and also evaluates end-to-end fine-tuning and non-semantic length baselines.
Agent and Signal-Gated Defense Evaluation
- Pre-execution and in-loop routing: Analyzes the theoretical upper bound of pre-execution routing before tool calls on AgentDojo; evaluates in-loop instant monitoring based on injected text visibility.
- Gated controllers and adaptive attacks: On skill injection corpora, offline combines model-expressive token inputs into an escalate-on-silence controller; designs A3 and A4 adaptive template attacks to evaluate the effectiveness of identification signals under distribution shift and adversarial selection.
What experiments did the paper conduct?
Under distribution shift, hindsight baselines produce large bias; under honest evaluation, routing gains are weak and recognition signals are easily manipulated.
Experimental Setup
- Models Tested: HELM 44-model pool (including claude-3-5-sonnet, claude-3-opus, gpt-4o, gpt-5.4, gpt-5.4-mini, claude-sonnet-4-6, palmyra-x-004, grok-3-mini-beta, deepseek, Command-R-plus, etc.), HarmBench 19 models, AgentDojo 28 configurations (full evaluation covers 5 configurations across 4 base models), skill injection corpus 5 models.
- Datasets and Scale: HELM harm_bench (393 behaviors, 7 categories), HarmBench (19 models × 16 attacks, 2210 sample pairs), AgentDojo (full grid 478 scenarios; single-family 949 scenarios), XSTest (200 unsafe and 250 safe prompts), SORRY-Bench (44 items, 4 domains), AIR-Bench 2024 (87 models × 5694 prompts, 16 subcategories), skill injection corpus (1342 undefended rounds, 130 rounds per defense).
- Baseline Methods: In-sample baseline (pin (oracle)), honest baseline (pin (honest)), random selection (random), per-request oracle (oracle), signal-free null router (signal-free null).
- Evaluation Metrics: Harm rate (harm), selection cost (selection cost), conditional tail advantage (ε), AUROC, attack success rate (attack success), flag rate (flag rate), task utility (task utility).
- Review Mechanism: HELM harm_bench uses the union of labels from two automated review models, safety_gpt_score and safety_llama_score (harmful if either judges harmful); skill injection corpus uses claude-sonnet-4-6 as a single automated review model to judge success and flagging; XSTest uses human labels.
- Sampling and Repetition Settings: Small pool sizes (k ≤ 5) average over 200 random pools × 5 folds; k = 44 is 1 full pool × 5 folds; adaptive attacks use 200 splits or 200 resampling bootstraps on 130 rerun indices.
Main Results
Swipe horizontally to read the table
Pool size k pin (oracle) pin (honest) Winner's curse (selection cost) router − pin (oracle) router − pin (honest) 2 0.1873 0.2299 +0.0426 +0.0355 −0.0071 3 0.1278 0.1951 +0.0674 +0.0536 −0.0138 5 0.0654 0.1622 +0.0968 +0.0732 −0.0236 44 0.0000 0.1127 +0.1127 +0.0819 −0.0308 (Per Table II, HELM harm_bench category holdout fold mean, seed 24)
- Posterior Baseline Creates Spurious Disadvantage: The authors note that against the in-sample baseline pin (oracle), the router is on average disadvantaged at all pool sizes (harm difference +0.0355 to +0.0819) and does not win in any pool unit.
- Mean Reverses but Median Ties Under Honest Baseline: Once replaced with the honest baseline pin (honest) selected by training folds, the router's average harm is lower than the baseline (−0.0071 to −0.0308), but the median difference across pool units is 0.0000 at all pool sizes.
- Router Policy Collapse: The authors state that the zero median is not routing effectiveness, but rather that nested tuning under distribution shift tends to select an extremely small shrinkage factor λ = 0, causing the router to collapse entirely to a fixed model selection, directly outputting the honest baseline's model in 82% to 91% of pool units.
Multi-Corpus Selection Cost Audit and Shift Effects
- What Was Tested: Evaluate selection cost at k=2 on 7 eligible safety corpora, comparing category/family holdout splits vs. stationary random splits (Table III).
- Experimental Results: On HELM harm_bench, holdout selection cost is 0.0454, random split 0.0026, difference 95% CI [0.0329, 0.0491]; on SORRY-Bench holdout cost 0.0076 (random 0.0036); on AIR-Bench 2024 holdout cost 0.0053 (random 0.0002); on HarmBench holdout cost 0.0019 (random 0.0006).
- Authors' Interpretation: The authors note that selection cost rises with distribution shift on corpora with significant routing space, reaching 57% of the potential gain of a perfect per-request router on HELM and 40% on SORRY-Bench; on saturated corpora with zero-harm models, the selection cost space is small.
Pre-Execution Routing and Identification Vulnerabilities in Agent Environments
- What Was Tested: Evaluate cross-family and single-family pre-execution routing upper bounds on AgentDojo, and test the impact of adaptive template attacks on model identification flags in the skill injection corpus.
- Experimental Results: On AgentDojo full subgrid, pre-execution oracle harm gap is at most 0.0105 (E43); in the skill injection corpus, a targeted attacker (A4) knowing the target model reduces gpt-5.4's judgment flag rate from 0.226 to 0.030, a drop of 19.6 points (E54b), and replicates with independent vocabulary annotation (κ = 0.818, p ≤ 10^-4, E55).
- Authors' Interpretation: The authors state that pre-execution routing yields very low gains in task-saturated agent grids (at most 2 points of harm); and post-execution defenses relying on the model's spontaneous identification are vulnerable to manipulation under adaptive attacks that know the model, producing a vigilance illusion.
Signal-Gated Controller and Action-Level Defense Evaluation
- What Was Tested: Offline combine identification flags into a silent escalation controller, and evaluate four action-level strategy settings (ask_user, no_network, script_audit, two_pass) for defense effectiveness (Table XVI).
- Experimental Results: Silent escalation triggers escalation in 94% to 98% of tasks; targeted attacks reduce system harm by 4.9 to 10.6 points, but removing the claude-sonnet-4-6 fallback model reverses the harm change to an increase of 2.3 to 8.9 points (E56b); all four action-level strategies record 0/130 judged successes, and after strictly aligned execution mode, 10 valid samples remain with residual success rate 95% Clopper–Pearson upper bound 0.308 (E40).
- Authors' Interpretation: The authors note that the gated controller's safety depends on the fallback model rather than the identification signal itself; action-level strategies in the released data do not include a mandatory isolation harness (docker_sandbox is false), and none of the 520 defense rounds show mechanical blocking errors, consistent with the zero-success performance being due to the model's autonomous refusal.
Other Ablations and Analyses
- Encoder scaling analysis: from MiniLM to Qwen3-Embedding-8B, AUROC rises from 0.6060 to 0.6901, and only the 8B model exceeds the honest threshold 0.6842 (Table XI).
- Operating point asymmetry ablation: at fixed AUROC 0.80, changing score asymmetry κ across 16x, harm difference shifts from −0.0095 to +0.0548 (Table VIII).
- Empirical difficulty distribution analysis: grouping samples by base harm rate into 4 groups, conditional tail advantage monotonically worsens, from −0.0071 to −0.3325 under the honest baseline (Table IX).
- Review model bias analysis: changing only the automated review model changes the best single model on harm_bench, with 82.8% overlap between the two review models on samples, and cross-model prediction AUROC only 0.746 (Figure 5).
- Cascade cost frontier analysis: under planned budgets, 16 true cascades have lower harm than the honest frontier, but 12 of them save entirely from the cheap model itself, and 6 exceed the actual cost (E34).
- Negative results and exceptions: On HarmBench, holdout selection cost is only 0.0019, and its fixed fold assignment cost is lower than 200 random assignments, not showing a large holdout cost; the authors do not give a specific mechanism explanation.
What are some points that can be further explored?
The authors point out limitations such as corpus scope, evaluator bias, and offline assumptions; actual experiments cover up to 7 public corpora.
Limitations and future directions noted by the authors
- Applicable environment and language scope limitations: The experimental corpora mainly cover two chat, one agent, and one skill injection environment, and the chat data is mostly English and single-turn (Section IX).
- Distribution shift types and corpus heterogeneity: The studied shift form is request class holdout; the selection cost is only significantly large on HELM harm_bench, and pre-registered criteria failed to predict the cost magnitude across corpora (Section IX).
- Group split dependence: The holdout cost depends on the assignment of groups and folds; on HELM, the mean over 200 random assignments is 0.037, and the paper's fixed assignment is at the 89th percentile, which is high (Section IX).
- Lack of natural saturation in agent environments: The tested agent data lacks a natural non-saturated model pool with complementary weaknesses; the only pool with significant space relies on post-hoc removal of a dominant model (Section IX).
- Reviewer model self-evaluation bias and recall not measured: Harm and markers rely on a single automated evaluator; in the skill injection corpus, the evaluator model itself is also one of the tested targets, with a self-evaluation success rate of 0.263 (lower than the other models' 0.575), and the evaluator's recall has not been validated (Section IX).
- Attacker and controller assumptions: The steering parameter α forcing requests into the cheap branch uses random rather than targeted subsets; adaptive attacks only select among 6 preset templates rather than optimizing payloads; controller evaluation is offline counterfactual resampling based on logs rather than online execution (Section IX).
Experimental coverage
- Datasets cover up to 7 public safety corpora (HELM 3 subtasks, HarmBench, AgentDojo, XSTest, SORRY-Bench, AIR-Bench 2024, and skill injection data).
- Full model pool comparisons only cover the subset of models with full-case cross-test records (44 models for HELM, 19 for HarmBench, and 4 base models for the full cross-family grid on AgentDojo).
- Encoder model exploration covers parameter sizes from 22M MiniLM to 8B Qwen3-Embedding.
- Action-level defense evaluation only covers 4 policy settings across 3 models and 5 units over 130 episodes, with 10 valid samples after pattern matching.
- The paper does not report online interactive evaluation with dynamic model switching mid-trajectory, nor does it build an external physical isolation execution environment to validate mechanical policies.
Summarize the main content of the paper
The paper reveals false floors in safety routing evaluation under distribution shift and points out that the defense focus should shift to external action-level enforcement.
- Paper positioning: The paper systematically evaluates the effectiveness of multi-model safety routing and signal-based defense mechanisms under distribution shift, pointing out the evaluation misleading caused by hindsight baseline selection in popular evaluations.
- Problem to solve: Traditional routing evaluation often selects the best single model on test data after the fact, injecting an artificial advantage for fixed baselines under distribution shift, constituting a false floor that deployers cannot achieve.
- Key methods: Proposes an honest holdout protocol that strictly freezes baseline models and shrinkage factors on training folds; derives excess harm decomposition and multi-dimensional threshold surfaces; tests pre-execution routing upper bounds, adaptive template attacks, and action-level policies in agent and skill injection environments.
- Core experimental findings:
- Under HELM Safety class holdout, the selection cost of the hindsight baseline is 0.045 to 0.113 (Table II), comparable to the full routing disadvantage; under stationary splits it is only 0.003 to 0.030.
- Under honest baselines, routers collapse directly to the fixed baseline model in 82% to 91% of pool units, with a median harm difference of 0.0000 (Section IV).
- In the AgentDojo agent grid, the pre-execution routing oracle gain is at most 0.0105 (E43).
- Targeted adaptive attacks reduce gpt-5.4's expressive marking rate by 19.6 points (E54b), making the gated controller's effectiveness depend on the fallback model's vulnerabilities.
- Four action-level defense tests achieve 0/130 judgment successes, but after pattern alignment only 10 valid samples remain (Clopper–Pearson upper bound 0.308, Table XVI), and no mechanical enforcement blocking markers are observed.
- Authors' conclusions and implications: The authors believe that safety routing provides weak defensive gains when handling unseen classes; safety evaluation must use honest baselines with unseen test labels and publish paired data; defense focus should shift from fragile input classification to external action-level enforcement isolation.