Residual Paving: Diagnosing the Routing Bottleneck in Selective Refusal Editing

Bryce Hinkley, Peyman Najafirad

TL;DR

Teaching a frozen language model to stop refusing specific prompts without lobotomizing its general safety guardrails is like performing brain surgery with a sledgehammer. This paper introduces Residual Paving, an activation-editing architecture that cleanly separates whether to intervene (routing) from how to intervene (editing). By decoupling these two jobs, the authors uncover a crucial insight: we already know how to make precise, targeted behavioral edits—the real bottleneck is getting the router to reliably tell safe-to-edit prompts apart from genuinely harmful ones.

What Problem Does This Paper Address?

Large language models rely on refusal mechanisms to avoid generating harmful or illegal content. However, researchers and red-teamers often need to selectively disable refusals on a specific set of probe prompts (say, to study capabilities or fix over-refusal on sensitive-sounding benign topics) while leaving the rest of the model untouched.

This sets up a tricky three-way control problem across three prompt buckets:

  1. Edit prompts ($E$): Base-refused prompts where we want to induce non-refusal (specifically, a safe reframing).
  2. Benign keeps ($B$): Everyday helpful prompts that shouldn't be disrupted.
  3. Harmful keeps ($H$): Genuinely dangerous prompts that the model must continue to refuse.
Selective refusal editing moves the answer boundary locally around the edit set E while preserving benign keeps B and harmful keeps H.

Standard "activation steering"—nudging the model’s internal representations along a single global "refusal direction"—fails here. Because designated edit prompts and genuinely harmful prompts trigger overlapping refusal-related activations inside the model, a global push strong enough to unlock the edit set inevitably spills over, eroding safety refusals on harmful prompts.

Methods

To avoid retraining the base model, Residual Paving attaches lightweight external control modules to a frozen transformer, splitting selective editing into two distinct stages:

  • Early-Layer Routing: A router reads cached activations from early layers (layers 1–4) and outputs a scalar gate (deciding whether to intervene) alongside mixture weights for downstream experts. An optional linear "veto" classifier acts as an extra safety catch against harmful prompts.
  • Later-Layer Residual Editing: If the gate opens, a prompt-conditioned mixture of lightweight bottleneck networks ("residual experts") injects targeted updates into the residual stream across later layers (e.g., layers 5–33).
Operational architecture of Residual Paving showing the split between early-layer routing and later-layer bottleneck residual experts.

What makes this separation especially neat is the oracle-routing diagnostic. At test time, researchers can freeze the trained residual experts and swap only the learned scalar gate with the ground-truth edit/keep label. This isolates errors: if the oracle version works, the editing mechanism is sound and any remaining real-world failures belong squarely to the router.

Training is also staged: after pretraining the gate, a contrastive warmup pushes edit-prompt representations away from base refusals before joint training teaches the experts to steer toward a model-generated "safe-reframe" anchor (discussing high-level context and risks rather than giving actionable instructions).

Datasets

Rather than introducing a new benchmark, the authors assemble a three-way evaluation protocol from existing datasets (2,192 training prompts and 1,098 held-out test prompts):

  • Edit set ($E$): Base-refused prompts filtered from SALAD-Bench, paired with safe-reframe targets.
  • Benign keeps ($B$): Standard instructions from Alpaca-style data.
  • Harmful keeps ($H$): Dangerous prompts from HarmBench.

Key Insights and Ideas

  • Routing, not editing, is the main bottleneck: Across six different LLMs, swapping in the oracle gate immediately restores keep-side preservation while driving edit refusals near zero. Knowing how to steer the residual stream is largely solved here; knowing when to open the gate based on early prompt features is where safety leaks happen.
  • Directed steering beats refusal suppression: By measuring cosine similarity in activation space, the authors show their editor doesn't just erase a generic "refusal feature." Instead, it actively pushes internal trajectories toward the safe-reframe target continuation.
  • Contrastive warmup and early intervention matter—multi-expert capacity doesn't: Ablations reveal that skipping contrastive warmup causes edit refusal to jump from 5.3% to 44.7%, and intervening only in late layers (16–33) ruins edit success (73.7% refusal). Surprisingly, however, a single learned expert ($K=1$) matches a 3-expert mixture on the primary model, meaning prompt-conditioned gating is doing the heavy lifting, not multi-expert specialization.

Key Results

On the primary Gemma-3-4B-IT held-out split:

  • Strong target editing: Learned Residual Paving drops edit-set refusal from 88.6% to 4.0%, vastly outperforming matched one-direction steering baselines like ActAdd (86.8% refusal) and Difference-in-Means steering (78.9% refusal).
  • Benign stability vs. harmful drift: It preserves benign and harmful output distributions at 95.5% and 87.3%, respectively. However, off-target routing tails cause harmful-keep refusals to drop from the base model's 81.6% down to 65.3% ($\Delta_H = -16.3\text{ pp}$).
  • Cross-backbone oracle gains: Under oracle routing on Gemma-3-4B-IT, edit refusal hits 0.2% with zero harmful-refusal degradation. Across six backbones (spanning Gemma, Llama-3.2, and Qwen2.5 from 1B to 14B), oracle routing improves keep-side composite scores on every model, with a median gain of +12.9 percentage points (up to +50.7 pp on Llama-3.2-1B-Instruct).
Table 3: Oracle-routing diagnostic across backbones. Each learned/oracle pair shares the same trained residual editor; the oracle row replaces only the scalar route with the held-out edit-vs-keep label. This table is a failure-localization diagnostic, not a deployable result, and because oracle routing gates off keep prompts it should be read together with the learned-route false-activation diagnostics in Appendix Table 20. The positive keep-side gain on every reported backbone indi- cates that the fixed residual editor is compatible with the evaluated edit/keep split when routing is supplied, while learned route selectivity remains the limiting factor. Keep-side gain is a diagnostic composite, (oracle benign preservation + oracle harmful refusal) −(learned benign preservation + learned harmful refusal), not a pure KL-preservation metric.

Limitations and Future Work

The authors are admirably candid: Residual Paving is a diagnostic framework, not a deployable safety controller. Because of that 16.3 percentage-point drop in harmful refusals, false activations on dangerous prompts remain an unsolved hurdle—potentially exacerbated by overlapping internal representations and training set imbalance (only 192 harmful keeps vs. 1,000 benign keeps). Furthermore, oracle routing sets the gate to zero on keep prompts by definition, so it cannot prove the editor itself would be harmless if accidentally triggered. Future work will need to tackle boundary-feature separability on the routing surface, test larger or Mixture-of-Experts backbones, compare against equal-capacity LoRA/PEFT methods, and incorporate human evaluations to verify that "non-refusals" are genuinely helpful and safe.

Summary updated

Abstract

We study selective refusal editing as a three-way control problem: induce non-refusal on designated edit prompts while preserving benign behavior and harmful refusals outside the edit set. We introduce Residual Paving, a routed residual editing method for frozen instruction-tuned transformers that separates route selectivity, whether to intervene, from residual-edit capacity, what edit to apply. An early-layer router predicts a scalar gate and expert mixture; when active, prompt-conditioned bottleneck residual experts apply later-layer residual updates while leaving the backbone unchanged. This decomposition supports an oracle-routing diagnostic where only the learned scalar gate is replaced with the held-out edit/keep label, leaving the residual editor and frozen backbone fixed. On the primary Gemma-3-4B-IT held-out split, learned Residual Paving reduces edit refusal from 88.6% to 4.0%, with 95.5% benign distribution preservation and 87.3% harmful distribution preservation. Same-protocol one-direction steering controls are much weaker on edit success, leaving edit refusal at 86.8% for Edit-target ActAdd and 78.9% for DIM-style refusal steering. The remaining failure is off-target harmful-keep degradation: harmful refusal remains below the frozen-base rate, 65.3% vs. 81.6%. Across six backbones, oracle routing improves the keep-side diagnostic score on every reported row, with median gain +12.9 pp, supporting the interpretation that learned route selectivity is the main observed bottleneck. Trajectory diagnostics on two backbones further suggest directed movement toward edit-target continuations rather than generic refusal suppression.
BibTeX
@inproceedings{hinkley2026residual,
  author = {Bryce Hinkley and Peyman Najafirad},
  title = {{Residual Paving: Diagnosing the Routing Bottleneck in Selective Refusal Editing}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=69Js4DXoyN},
}
Figure