Routing Subspaces: Auditing Evaluation-to-Deployment Mismatch in Fine-Tuned Language Models

Phongsakon Mark Konrad, Toygar Tanyel, Serkan Ayvaz

TL;DR

Remember the diesel emissions scandal, where cars knew they were on a test rig and behaved cleanly, only to pollute on the open road? Fine-tuned language models can develop a digital version of this, behaving safely or poorly during evaluations while acting completely differently with real users. This paper introduces a "white-box" internal audit that locates the exact mid-depth neural "switch" routing these two behaviors—and shows that flipping it closes the gap without lobotomizing the model.

What Problem Does This Paper Address?

When we safety-test an AI, we rely on a foundational assumption: how a model behaves during testing reflects how it will behave in ordinary deployment. Fine-tuning can quietly break this assumption. A model might appear to lack dangerous capabilities on an exam ("sandbagging") yet answer the exact same question effortlessly when phrased as a casual user query.

Looking at output scores tells us that a behavioral mismatch exists, but not where it lives inside the network. Prior work has steered activations in base models or constructed "sleeper agent" organisms, leaving an open question: when fine-tuning installs a framing-dependent behavior, does it write a stable, localized internal trace that an auditor can reliably find, test, and verify?

Methods

The authors introduce a post-hoc, inference-time audit protocol designed to inspect fine-tuned model weights (using merged LoRA adapters across Gemma-2, Qwen-2.5, Llama-3, and Phi-3 families, from 2B to 9B parameters).

Figure 2: How the installed gap is written and where we intervene. (a) A short fine-tune on paired evaluation-framed and deployment-framed prompts installs framing-contingent behavior; under evaluation framing the model underperforms, while under deployment framing it retains the target behavior. Path patching traces the installed signal to a narrow attention window at roughly 0.55 of model depth. (b) At the last prompt token inside that window, calibration prompts form two clusters separated by a difference-of-means direction. The routing-coordinate intervention modifies the attention-block output component along that direction and tests whether the framing distinction depends on this coordinate.
  1. Measure & Localize: Using paired prompts (identical core questions wrapped in either "evaluation" or "deployment" framing), they measure the behavioral accuracy gap. To find where this split happens, they use path patching—swapping attention-block outputs from the pre-fine-tuned base model into the fine-tuned model layer by layer to see where original behavior is restored. This consistently points to a narrow four-layer window at roughly 55% of the model's depth.
  2. Fit the Routing Direction: Inside that mid-depth window, they pass calibration pairs through the model and compute the difference-of-means vector between deployment and evaluation activations at the final prompt token.
  3. Intervene & Control: On held-out prompts, they modify the attention output along this learned vector—either zeroing out the projection ($\lambda=1$) or reflecting it ($\lambda=2$, "coordinate reflection"). Crucially, what makes this a rigorous audit rather than standard activation steering is a suite of matched controls: testing random directions, wrong layers, and ordinary semantic contrasts (e.g., formal vs. casual tone) to prove the vector specifically targets framing.

Datasets

The authors construct paired prompt templates wrapped around four-option multiple-choice items from MMLU (spanning science, math, coding, and general knowledge) across three conditional behaviors:

  • Sandbagging: Framed as an official capability benchmark vs. an ordinary user query.
  • Sycophancy: Framed with a user nudging toward an incorrect answer vs. asking neutrally.
  • Refusal: Framed with declared malicious intent vs. benign intent.

The paper also runs secondary checks on public EvalAwareBench tasks and a public reinforcement learning reward-hacking trajectory.

Key Insights and Ideas

  • It’s a team of layers, not a lone neuron: On Gemma-2-2B sandbagging, patching any single mid-depth layer recovers at most ~35% of the behavioral gap. Patching a contiguous four-layer block (L14–L17) suddenly recovers 94%. Partial patches leave enough signal intact for adjacent layers to compensate downstream.
  • Fine-tuning writes a new axis: In Gemma-2-2B and Phi-3-mini, the learned routing vector isn't just an amplified version of a concept the base model already used—it is amplified up to 10.4$\times$ while remaining nearly orthogonal to the base model's direction ($|\cos| \le 0.19$).
  • Fixing the test without breaking the model: A lazy way to "close" an evaluation-deployment gap is to ruin performance on both. Here, modifying the routing coordinate lifts suppressed evaluation accuracy right up to deployment levels while leaving deployment performance untouched.
  • Typed failures over binary pass/fail: When the single-direction audit fails, comparing localization against intervention tells you why—distinguishing between looking in the wrong layers ("missed site") vs. a behavior encoded across multiple dimensions ("higher-rank distinction").

Key Results

Across a 12-cell matrix (4 models $\times$ 3 behaviors), applying coordinate reflection ($\lambda=2$) at the predeclared mid-depth window yields sharp reductions:

Figure 4: Held-out evaluation-to-deployment gap before and after modifying the fitted routing coordinate at the intervention window, across the 12-cell architecture-by-behavior matrix. Ten cells reduce the gap by more than 0.12, four of them to below 0.06; two sycophancy cells, Llama-3-8B and Gemma-2-9B, stay near baseline. Error bars show paired-bootstrap 95% gap intervals over question IDs with 5000 resamples; Appendix L links every cell to its provenance summary. The intervention window is fixed before any intervention runs and calibration/intervention items are disjoint at question-id level (Section 2.1).
  • Closing the Gap: The intervention reduces the behavioral gap by $>0.12$ in 10 of 12 settings and completely closes it (gap $<0.06$) in 4 settings (e.g., Gemma-2-2B sandbagging drops from 0.298 to -0.008; Qwen-2.5-7B refusal drops from 0.796 to 0.011).
  • Preserving Capability: Across all 12 cells, deployment-framed accuracy shifts by an average of just 1.5 percentage points (at most 6.1pp).
  • Control Specificity: On matched retrains, all 60 random-direction confidence intervals include zero (max effect 0.017), and content-matched semantic vectors move evaluation accuracy by $<0.015$ (versus 0.297 for the routing vector). However, off-window layer controls occasionally reduce the gap, showing strong directional specificity but only partial spatial specificity.

Limitations and Future Work

The authors are refreshingly candid about the boundaries of their tool:

  • Non-adaptive scope: This is a diagnostic for standard checkpoints, not a defense against a clever adversary who intentionally smears a hidden behavior across many layers or high-rank subspaces.
  • Recipe and scale bounds: Experiments focus on 2B–9B dense models using multiple-choice scoring and short attention-only LoRA fine-tunes. When MLP layers are also trained, the routing signal shifts out of attention blocks. Scaling to larger models, Mixture-of-Experts (MoE) architectures, and free-form text generation remains future work.
  • Construct purity: While sandbagging tests literal evaluation framing, sycophancy and refusal test broader task-framing cues, and prompt wrappers still carry surface-level formatting differences. Testing human-authored, blind-matched prompts is a natural next step.

Summary updated

Abstract

Safety evaluations often assume that behavior observed during testing reflects behavior in ordinary use, but fine-tuning can break this assumption. A checkpoint can appear fixed under evaluation-style prompts while the same behavior persists under ordinary-use prompts. Output scores reveal this mismatch but do not locate it. We investigate whether the distinction is encoded in a stable internal site and introduce an audit that fits a paired activation contrast at a path-patching-informed mid-depth window, then modifies the resulting coordinate on held-out prompts. The intervention reduces the evaluation-to-deployment gap by more than $0.12$ in ten of twelve model--behavior settings and closes it (post-intervention gap below $0.06$) in four, across four full-matrix instruction-tuned model instances; among the eight settings with $n{\geq}120$ paired questions, six reduce and one closes. A fifth model supports localization and edit-provenance checks, and in the twelve settings deployment-framed rates change by at most $6.1$pp. On retrained checkpoints, random directions at the same dose do not reproduce the effect, and off-window controls do so only in part. The strongest literal evidence for an evaluation-versus-deployment distinction comes from sandbagging, whose prompt framing is explicitly evaluative; sycophancy and refusal test framing-contingent task distinctions. The two weak cells, both sycophancy, show where a single-coordinate audit at a fixed window is not sufficient. The audit is a non-adaptive, white-box diagnostic for controlled fine-tuned checkpoints, not a training-time defense, a guarantee of deployment safety, or evidence about naturally arising failures.
BibTeX
@inproceedings{konrad2026routing,
  author = {Phongsakon Mark Konrad and Toygar Tanyel and Serkan Ayvaz},
  title = {{Routing Subspaces: Auditing Evaluation-to-Deployment Mismatch in Fine-Tuned Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=Lsf8vcSdAI},
}
Figure