Defense success rate mean over 17 models · AdvBench
+14.42 points, up to +51.39
Before → after DAPA
Safety alignment lives in a few MLP gate layers. Put them back.
6Illinois Institute of TechnologyFine-tuning an aligned model for a downstream task quietly undoes part of its safety training. The paper calls this shadow alignment.
A third-party developer starts from a well-aligned base model and adapts it — full fine-tuning, a LoRA adapter, task-specific alignment. The adaptation does not target safety, but it overwrites some of it anyway, and the usual remedy is to realign from scratch.
DAPA asks a narrower question: if the alignment is still present in a sibling model, can it be copied across rather than retrained? That requires knowing where in the network the alignment sits.
PCA over the last-token logits of 256 AdvBench prompts, for three checkpoints: a base model, its instruct-aligned version, and a math model fine-tuned from that instruct checkpoint.
The aligned checkpoint sits in its own region. The math model, despite starting from it, drifts back toward the base model — safety is not erased, but it is no longer held.
Figure 3 · Qwen2.5-7B base, instruct, and Qwen2.5-Math-1.5B-Instruct
Two projection directions of the same data

Causal tracing answers where. The paper corrupts all hidden states, restores one component at a time, and measures how much the output probability recovers — the indirect effect of that component. Averaged over memory spaces, the gate projection inside the MLP carries more of it than the up or down projections, and attention carries less than the MLP overall. The effect concentrates in the middle layers.

Find the smallest set of gate layers that restores refusal, then fuse those layers across from an aligned sibling.
Editing every gate layer would work and would also cost the model its downstream ability. So DAPA borrows delta debugging — the technique for shrinking a failing test case to its minimal cause — and applies it to memory space instead. A set of layers passes if the patched model refuses every question in a small held-out set of unethical prompts.
What transfers is a safety vector: the representation difference between an aligned model and an unaligned one of the same family, added back into the downstream model at the located layers. No gradient step is taken at any point.
Let \(\mathbb{S}\) be the universe of MLP memory and \(\pi:\mathcal{S}\to\{0,1\}\) a policy that returns 1 when a candidate set makes the model answer every probe question ethically. The search splits the current set into \(n\) partitions, keeps a passing partition or a passing complement, and doubles \(n\) when neither works — the same descent delta debugging uses on failing inputs. It returns the smallest \(S^{\star}\) it can certify, in \(O(L\log L)\) policy evaluations.
With \(A\) a safety-aligned model, \(B\) an unaligned base model of the same family, and \(C\) the downstream-adapted model derived from \(A\), the vector \(v_{s}\) is the representation difference between \(A\) and \(B\) restricted to the located layers. It is a compact encoding of what alignment changed.
Model fusion adds the vector into the hidden representation of the target model, with \(\lambda\) fit by linear regression on 20 held-out samples — the smallest value that raises the defense success rate without disturbing the downstream task:
Each block updates the hidden state as \(h^{(l)}_{i} = h^{(l-1)}_{i} + a^{(l)}_{i} + M^{(l)}_{i}\), where \(a^{(l)}_{i}\) is self-attention and the MLP is
\[ M^{(l)}_{i} = W^{(l)}_{\mathrm{down}}\,\sigma\!\left(W^{(l)}_{\mathrm{gate}}\gamma\!\left(a^{(l)}_{i} + h^{(l-1)}_{i}\right)\right) \odot W^{(l)}_{\mathrm{up}}\gamma\!\left(a^{(l)}_{i} + h^{(l-1)}_{i}\right). \]
DAPA edits \(W_{\mathrm{gate}}\) in the layers the search returns — on Llama-2-7B that is five layers, 3.25% of parameters. Across the three families the average is 6.26%, at most 8.11%. See Section 2 of the paper.
Memory search runs once, offline. On Llama-2-7B with 50 harmful prompts, the whole pipeline finishes in 48 minutes on one A100 — delta debugging is nearly all of it, with fusion itself around 5 minutes — and no training step is involved. The paper's own figures for retraining on 4×A100 are roughly 4.67 hours for SFT, 9 for DPO, and 18 for RLHF. At inference the fused model is a single ordinary model: no activation editing, no multi-model decoding, no test-time search. See Appendix R.
Defense success rate mean over 17 models · AdvBench
Before → after DAPA
Parameters edited average across three families
3.25% on Llama-2-7B; 8.11% at most
Defense success rate is the fraction of 128 AdvBench prompts the model refuses, judged by GPT-4o and a keyword classifier together. Perplexity on WikiText-2 and 5-shot MMLU accuracy track what the edit costs; cosine similarity compares responses before and after on ShareGPT prompts.
| Family | Model | DSR before | DSR after | PPL before | PPL after | MMLU before | MMLU after | Cos. sim. |
|---|---|---|---|---|---|---|---|---|
| Llama-2 | chinese-alpaca-2-7b | 82.03 | 87.50 | 7.54 | 7.46 | 38.71 | 37.43 | 0.88 |
| Llama-2-7b | 37.16 | 42.19 | 4.77 | 4.78 | 36.37 | 39.30 | 0.79 | |
| Llama-2-13b | 37.50 | 46.09 | 4.28 | 4.28 | 34.74 | 37.08 | 0.76 | |
| chinese-alpaca-2-13b | 70.31 | 85.16 | 5.63 | 5.60 | 48.77 | 47.60 | 0.91 | |
| Redmond-Puffin-13B | 22.66 | 47.66 | 4.30 | 4.30 | 30.06 | 32.38 | 0.89 | |
| Mistral | Mistral-7B | 21.09 | 25.78 | 4.58 | 4.60 | 45.38 | 47.72 | 0.76 |
| OpenHermes-2-Mistral-7b | 33.59 | 46.88 | 5.00 | 5.02 | 41.29 | 42.46 | 0.88 | |
| dolphin-2.2.1-mistral-7b | 24.22 | 41.41 | 5.18 | 5.19 | 60.12 | 58.25 | 0.90 | |
| zephyr-7b-alpha | 24.22 | 32.81 | 5.11 | 5.11 | 54.04 | 56.73 | 0.88 | |
| mistral-7B-forest-dpo | 19.38 | 15.62 | 5.13 | 5.10 | 54.62 | 54.04 | 0.72 | |
| dolphin-2.6-mistral-7b-dpo | 24.22 | 55.47 | 5.41 | 5.42 | 60.47 | 62.69 | 0.91 | |
| openchat-3.5 | 58.68 | 67.19 | 5.15 | 5.10 | 61.40 | 58.71 | 0.89 | |
| Gemma | gemma-2b | 22.05 | 73.44 | 7.92 | 24.15 | 33.57 | 24.80 | 0.33 |
| Gemmalpaca-2B | 37.01 | 51.56 | 9.92 | 22.00 | 40.94 | 21.17 | 0.51 | |
| gemma-7b | 26.56 | 34.38 | 6.09 | 6.27 | 39.65 | 42.11 | 0.66 | |
| gemma-7b-ultrachat-sft | 34.15 | 41.41 | 7.17 | 7.48 | 42.11 | 29.24 | 0.76 | |
| gemma-orchid-7b-dpo | 21.88 | 35.16 | 7.22 | 7.42 | 42.26 | 38.01 | 0.76 | |
| Average | 34.39 | 48.81 | 5.91 | 7.60 | 44.98 | 42.92 | 0.87 | |
DSR and MMLU are percentages; perplexity is on WikiText-2. The paper reports MMLU with standard deviations, omitted here for width — they run from 0.00 to 2.46. Two cases fail rather than degrade: Gemmalpaca-2B loses 19.77 points of MMLU and gemma-7b-ultrachat-sft 12.87, and the small Gemma models are also where perplexity jumps. The paper attributes this to limited parameter redundancy at 2B and to prior task-specific SFT having already reshaped the representations. One model, mistral-7B-forest-dpo, gets less safe.
Full table & protocolSeven baselines on the same 128 AdvBench prompts, averaged over all 17 models. The nearest method is Safe LoRA, two points behind.
| Method | Average DSR |
|---|---|
| RepE | 36 |
| LLM Guardrails | 37 |
| Safety Arithmetic | 40 |
| ICD | 42 |
| InferAligner | 44 |
| Model Surgery | 45 |
| Safe LoRA | 47 |
| DAPA | 49 |
Per-model columns are given in the paper under anonymized labels. The guardrail baseline is Llama Guard 2. See Table 3 ↗
Given one hour on a single A100 per model, SFT reaches 45.7 average DSR, DPO 50.7, RLHF 54.5, and DAPA 48.8. RLHF is ahead — the paper does not claim otherwise — and the trade DAPA offers is that it reaches a comparable number without a training run, without preference data, and without touching more than a few percent of the weights. See Appendix L, Table 19.
The AdvBench numbers above use direct harmful prompts. Against GCG, which optimizes an adversarial suffix, DAPA raises DSR by an average of 9.62 points on the Llama-2 family; the paper also reports 16.62 points under GPTFuzzer. The method is not tied to the 7B text setting: it transfers to a 70B model and to the language module of a vision-language model.
The 70B run uses Hermes-3-Llama-3.1-70B-Uncensored as the target and Llama-3.1-70B-Instruct as the teacher, evaluated on AdvBench. The multimodal run aligns LLaVA-1.5-7B from LLaVA-1.6-vicuna-7B and is evaluated on 103 HarmBench questions. See Section 4.4 ↗
Varying the fraction of parameters touched on two Llama-2 models: most of the gain arrives in the first two percent, and the five-layer configuration at 3.25% is already close to what larger budgets reach.

Appendix M repeats the experiment on three recent checkpoints adapted for coding, code reasoning, or abliterated outright. All three had lost most of their safety alignment; DAPA recovers an average of 13.87 DSR points — qwen3.5-4B-typescript-coder 14.20→27.40, gpt-oss-20b-heresy 5.30→19.80, GPT-OSS-Code-Reasoning-20B 18.60→32.50 — while AIME24 pass@1 moves by an average of 0.073 points. See Table 28.
Generation is deterministic throughout — temperature 0 — so the safety evaluation is run once per model and has no variance. The capability measurements are repeated three times and reported with standard deviations.
DAPA needs a well-aligned sibling in the same family, so it has nothing to offer a model with no aligned counterpart to borrow from. The edit is applied where a held-out probe set says refusal is restored, which is a weaker criterion than safety in general. The two Gemma failures show the method is not uniformly safe for small or heavily SFT-tuned models, and the Big-Bench reasoning scores drop by 2.77% on average, with one model losing 24 points on SocialQA. The paper's own ethics statement notes that its repository includes jailbreak attack implementations and that distillation can carry biases across with the alignment.
Ethics and reproducibility statements ↗@inproceedings{
luo2026decoupled,
title={Decoupled Alignment for Robust Plug-and-Play Adaptation},
author={Haozheng Luo and Jiahao Yu and Wenxin Zhang and Jialong Li and Chenghao Qiu and Yimin Wang and Eric Hanchen Jiang and Jerry Yao-Chieh Hu and Yan Chen and Binghui Wang and Xinyu Xing and Han Liu},
booktitle={Third Conference on Language Modeling},
year={2026},
url={https://openreview.net/forum?id=6EJ27eMSBB}
}