Zero-Cost Safety Proxies for Adapter-Topology Search

When we fine-tune an aligned language model on a new task, its safety guardrails often quietly collapse. This is not a fringe effect: full fine-tuning of Llama-2-7B on the benign Alpaca instruction dataset drives the attack success rate on harmful prompts from a hardened level up to 18.4% (Superficial Safety Alignment Hypothesis), and standard LoRA — the cheap adapter method most practitioners actually use — degrades safety even more, because its uniform low-rank updates overwrite the small set of neurons that carry refusal behavior. Meanwhile, deciding where adaptation capacity should live in the network is exactly the kind of combinatorial question that neural architecture search was built to answer, and the field has become very good at answering it cheaply: zero-cost proxies now rank candidate architectures from a single forward pass, without any training (EZNAS: Evolving Zero-Cost Proxies For Neural Architecture Scoring).

This proposal connects the two directions in one move. The alignment-robustness gap supplies the objective — keep an aligned model safe through downstream adaptation — and the computational cost of architecture search supplies the method — evaluate candidate adaptation topologies without training and red-teaming each one. The core deliverable is a training-free safety proxy: a score computed from one forward pass over paired benign and jailbreak prompts that predicts how much a candidate adapter placement will erode refusal behavior after fine-tuning. Wrapped in a cheap search, this proxy should let us discover adapter topologies that adapt a model to new tasks while leaving its refusal machinery intact, at a fraction of the cost of evaluating every candidate with full red-teaming pipelines.

Core Claim

The claim has two parts. First, that alignment robustness is predictable before training: because safety behaves as a compact, localized mechanism — roughly 1.3–1.4% of units in a dense model (Superficial Safety Alignment Hypothesis), concentrated in middle-to-late layers (SABER: Uncovering Vulnerabilities in Safety Alignment via Cross-Layer Residual Connection) and in 10–15% of experts in sparse models (RASA: Routing-Aware Safety Alignment for Mixture-of-Experts Models) — a single-pass representation measurement should predict whether a structural modification collides with that mechanism. Second, that this prediction is accurate enough to drive a search over adapter placements that beats both uniform LoRA and the strongest existing safety-preservation method, without ever running an adversarial attack inside the search loop.

Concretely, for a candidate topology $T$ (a choice of which layers receive adapters, at what rank, and with what sparsity), we attach randomly initialized adapters and run one forward pass over a small set of benign prompts and a small set of jailbreak prompts. The proxy combines a refusal margin with an SCU-collision penalty:

$$\mathcal{S}(T) = \big(\bar{c}_{BB} - \bar{c}_{BJ}\big) \;-\; \gamma \cdot \frac{|\Phi(T) \cap \Phi(\mathrm{SCU})|}{|\Phi(\mathrm{SCU})|}$$

Here $\bar{c}_{BB}$ is the mean cosine similarity of first-generated-token hidden states between pairs of benign prompts, $\bar{c}_{BJ}$ the same between benign and jailbreak prompts, both measured in the safety-zone layers identified the way SABER does it (cosine dissimilarity between harmful and benign representations); the difference is the margin by which harmful inputs remain separable from benign ones. $\Phi(T)$ is the activation footprint of the candidate's adapters and $\Phi(\mathrm{SCU})$ the footprint of safety-critical units, so the second term penalizes topologies whose updates land on refusal-carrying neurons. Both ingredients are borrowed: the first-token, binary Fulfill-vs-Refuse framing and unit partitioning come from Superficial Safety Alignment Hypothesis; the idea that layer-wise representation statistics suffice to score a topology without training comes from the zero-cost proxy tradition (EZNAS, building on On Random Weights and Unsupervised Feature Learning).

This is distinct from the closest existing work in section 2 of the literature. SABER performs a search over structural modifications, but an offensive one: it grid-searches cross-layer residual shortcuts to break alignment, evaluating candidates directly by attack success rate on a real model. We search defensively, and the expensive part we eliminate is precisely what SABER could skip: for a defensive candidate, ground truth requires fine-tuning and then red-teaming, not a single ASR measurement. Superficial Safety Alignment Hypothesis freezes safety-critical units during fine-tuning, but its unit identification is a manual variance-scoring pass over static attack datasets and it never searches where adaptation capacity should go. RASA re-aligns safety-critical experts inside a fixed MoE topology with bi-level optimization; we instead choose the topology itself, before any training, in dense models. Adaptable Adapters searches adapter placements with Gumbel-Softmax gates but only for task accuracy on GLUE, with no safety objective — and its result that placement matters (a focused placement using ~13 of 24 layers beats uniform placement, 51.28 vs 44.87 in the 100-sample setting) is evidence that the placement search is worth doing, not a competitor to it.

Research Program

The program has three components. The first is proxy construction and validation: define the score above, and test whether it correlates with actual post-fine-tuning attack success across a pool of candidate topologies. The validation pool consists of several hundred sampled placements (layer subsets, ranks 8/16/32, optional residual gates in the spirit of LAuReL: Learned Augmented Residual Layer, which shows that lightweight learnable residual rerouting costs ~0.012% of parameters). Each candidate gets a short-budget fine-tune on Alpaca and an attack success measurement, giving the ground-truth ranking the proxy must predict. The analog in vision is the Kendall-tau evaluation of zero-cost proxies, where the best evolved proxy reaches 0.65 on NAS-Bench-201 CIFAR-10 versus 0.57 for human-designed ones (EZNAS); no comparable number exists for safety, and establishing one is itself a contribution.

The second component is the search itself. With a validated proxy, the search is nearly free: a proxy-guided evolutionary search over the placement space, or a differentiable relaxation using Gumbel-Softmax layer gates as in Adaptable Adapters with the proxy as reward, in the spirit of differentiable architecture search (Differentiable Neural Network Architecture Search). Only the top handful of candidates is ever fine-tuned and red-teamed. A multi-fidelity extension, following Rethinking Performance Estimation in Neural Architecture Search, which achieved a 1,000x search speedup by pruning non-critical evaluation factors, would let the proxy also decide the minimum red-team budget (attack steps, prompt subsampling) needed to confirm the finalists — answering, for the safety setting, the budget question that paper answered for accuracy.

The third component is understanding what the search finds. If safety-critical units occupy 1.3% of parameters and redundant units ~20% (Superficial Safety Alignment Hypothesis), the hypothesis is that the search will concentrate adapters on redundant capacity — reproducing, by search, what that paper achieved by manual repurposing (its Redundant-Unit training raised GSM8K from 9.24 to 13.4 while preserving safety). A secondary question is whether searched topologies are structurally harder to bypass: SABER shows a single cross-layer shortcut around the safety zone yields 85.5% attack success on Llama-2-7B in 15–40 minutes of search; a placement that avoids concentrating adaptation in the safety zone should leave fewer clean bypass corridors.

Proposed Experiments

Experiment 1 validates the proxy. On Llama-2-7B (to anchor against published numbers) and a second model such as Qwen3-8B, sample roughly 300 candidate placements, compute $\mathcal{S}(T)$ with ~50 benign and ~50 jailbreak prompts, then fine-tune each candidate briefly on Alpaca and measure attack success on an AdvBench subset, judged automatically. We report Spearman and Kendall correlation between proxy and post-fine-tuning ASR, against control scores: a random score, parameter count, and a task-only zero-cost score. We expect the correlation to be strongest in the coarse ranking regime and, following the known limitation that zero-cost proxies struggle to separate the top 10% of candidates (EZNAS), we explicitly measure top-tier resolution and rely on a small confirmatory red-team pass for finalists.

Experiment 2 is the headline comparison. Run the proxy-guided search under a fixed budget — at most ten fine-tuning-plus-evaluation runs — and compare the discovered topology against the baselines below on: AdvBench attack success rate (the metric Superficial Safety Alignment Hypothesis reports), the HarmBench behavior suite judged with its automated classifier (93.19% human agreement, HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal), XsTest over-refusal, and utility on MMLU and GSM8K. Token-length sensitivity matters here: generation-length limits shift measured attack success by as much as 30% (HarmBench), so all systems are evaluated at one fixed limit.

Experiment 3 stress-tests generalization on attacks never used to build the proxy: the SABER cross-layer bypass re-optimized against each defended model (SABER), the combination jailbreaks of Jailbroken: How Does LLM Safety Training Fail? (which reach 96–99% success on stock models), and, if compute allows, continuous pixel attacks on a vision-language variant, where PGD currently achieves 100% success across MiniGPT-4, LLaVA, and LLaMA Adapter (Are aligned neural networks adversarially aligned?). Experiment 4 is pure accounting: GPU hours for the proxy search versus a search that red-teams every candidate with iterative gradient attacks.

Baselines

The naive reference point is standard uniform LoRA fine-tuning on Alpaca, the deployment most teams actually use. For its expected safety degradation we anchor to the fully fine-tuned Llama-2-7B attack success rate of 18.4% on AdvBench reported by Superficial Safety Alignment Hypothesis, which also reports — qualitatively — that LoRA is worse than this; no numerical LoRA attack success rate was found on Lacuna. Any proposal must at minimum stay far below this number while matching LoRA's task gains.

The strongest existing competitor is the SCU-freezing method of Superficial Safety Alignment Hypothesis: identify safety-critical units and the top 6% of complex units by variance scoring, freeze them during fine-tuning, and train on the rest. It reports 7.88% attack success on AdvBench for Llama-2-7B — the number to beat. We will run it under identical conditions: same base model, same Alpaca data, same fine-tuning steps and tuning budget, same evaluation stack and token limits. Beating it means attack success below 7.88% with no worse MMLU or GSM8K, and — crucially — holding that advantage on attacks and models not used to derive the freezing mask, since its unit identification depends on variance scoring over static attack datasets.

The inference-time alternative is DiffMean activation steering, which lifts defense against tool-poisoning from 54% to 82% (+0.28) on Qwen3-8B on MCPTox (Activation Steering for Tool-Poisoning Defense in Language-Model Agents). It operates in a different regime — per-token inference cost rather than a one-time adaptation — but we include it because it is the fallback a practitioner would reach for, and we will report its over-refusal and utility cost on the same benchmark suite.

Two ablations isolate the key ingredient. The first runs the identical search machinery with the safety term of $\mathcal{S}(T)$ removed (task-only proxy): if safety preservation survives this ablation, the safety proxy is not doing the work and the claim collapses. The second applies SCU-freezing on top of the searched topology, testing whether the two are substitutes or stack.

Why not just…?

Why not just freeze the safety-critical units, as SSAH already does? This is the most serious alternative, and we treat it as the primary baseline rather than arguing around it. Freezing is cheap, already validated at 7.88% attack success, and needs no search. Its weaknesses are three: it depends on a unit-importance scoring pass over specific attack datasets, so its mask quality is tied to those attacks; it constrains capacity by removing it (frozen units) rather than relocating it, which can cost task performance; and it must be re-derived per model. The decisive experiment is the head-to-head under equal budget plus the held-out attack suite in Experiment 3 — if freezing matches us on unseen attacks and models at lower cost, we will report that the search adds nothing, and the proxy validation result would then stand as the paper's main contribution.

Why not just use activation steering at inference? Steering works only in a narrow window — layers 16–20 of a 32-layer model, found by manual trial-and-error — and high steering coefficients collapse reasoning and tool use; a single-concept steering vector even underperformed the unsteered baseline on hard adversarial prompts (Activation Steering for Tool-Poisoning Defense in Language-Model Agents, Activation Steering for Tool-Poisoning Defense in Language-Model Agents; Activation Steering for Tool-Poisoning Defense in Language-Model Agents). Notably, our proxy machinery subsumes its open problem: automated layer selection is exactly what a placement search does. We will report steering's utility and over-refusal cost alongside ours to make the comparison empirical rather than rhetorical.

Why not just grid-search like SABER — it only takes 40 minutes? SABER's search is cheap because it is offensive: each candidate is evaluated by a direct attack success measurement on the frozen model (SABER). A defensive search cannot do this — the ground-truth value of a candidate topology is its attack success after fine-tuning, so naive evaluation means a fine-tune plus red-team per candidate, hundreds of times over a combinatorial placement space. The proxy is what collapses that cost, which is exactly the computational-cost problem from the architecture-search direction. SABER still enters our evaluation as the strongest held-out structural attack.

Why not just scale the model up? The premise fails empirically: robustness is largely independent of parameter scale — a 7B model trained with dynamic defense resisted gradient attacks better than a 70B chat model (HarmBench) — and scale can increase vulnerability to capability-dependent jailbreaks like Base64 encoding, where GPT-4 falls and smaller models fail only because they cannot decode the payload (Jailbroken). Small models that look safe often merely lack the capability to comply (Beyond the Tip of Efficiency).

Decisive Checks

The proposal stands or falls on three numbers. First, the proxy's rank correlation with post-fine-tuning attack success across sampled topologies — if it is near the random-score control, the training-free premise is wrong. Second, the searched topology's attack success versus SSAH's 7.88% under matched conditions, with utility and over-refusal held at least equal. Third, whether that advantage survives the held-out suite: SABER's bypass (85.5% on the undefended model), the Jailbroken combination attacks, and the HarmBench behaviors. If all three land, the alignment-robustness gap acquires something it has never had: a cheap, search-time measurable quantity that predicts it before any attack is run.