Skip to content

Does representation matching make refusal harder to ablate? A controlled study of iterative linear attacksDoes Representation Matching Make Refusal Harder to Ablate? A Controlled Study of Iterated Linear Attacks

Jonathan Merchan, Deepanshu Mody, Acey Vogelstein
New York University
arXiv: Jailbreaks, Prompt Injection, Poisoning & DefensesarXiv:2611.38228Originally published Indexed by this site · 2 days agoDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors study whether representation matching can make refusal harder to ablate linearly; under the Llama restricted protocol, Mean+KD has a Kconf of 11, but the adaptive rank-4 attack can break through.

Threat modelThe attacker has white-box access to the open-weight model and can install hooks at inference time that modify residual-stream activations. The main attack is a global rank-K orthogonal projection shared across layers, without arbitrary fine-tuning or per-layer independent high-rank edits; an adaptive low-rank attack with direct optimization is also tested.

Questions
Refusal in open-weight models can be weakened by low-rank residual projections. The authors study whether representation matching during training can increase the required attack rank while maintaining low harmless refusal and general capability.
Methods
On response SFT, independently combine mean matching, covariance matching, and knowledge distillation, and compare with ReFAT. Evaluation uses attack curves that repeatedly extract and project directions, and additionally uses gradient optimization for adaptive subspaces.
Experiments and results
Under the Llama restricted protocol, Kconf is 11 for Mean+KD and 4 for untouched; with all-layer extraction, Mean+KD drops to 3. Adaptive rank-4 gives a harmful refusal rate of 22.2%, and the Qwen transfer also did not reproduce the advantage.
Limitations and future work
The authors note that the main grid has only one 1B model, English WildGuardMix, and a fixed training seed, and that the attacks do not cover fine-tuning, weight editing, or prompt jailbreaks. The 30% threshold is descriptive, and the Wilson intervals do not include optimization variance.
Experimental setupLlama-3.2-1B-Instruct、Qwen2.5-1.5B-Instruct et al. · WildGuardMix、HarmBench et al. · harmful refusal rate、harmless refusal rate et al.
Metrics
harmful refusal rateharmless refusal rateKpointKconfselectivity gapSel. AUClinear-probe accuracyharmless next-token KLMMLU/GSM8K/HellaSwag accuracy
AI summaryThrough controlled experiments, the paper tests whether representation matching during fine-tuning can make the refusal of instruction-tuned LLMs harder to ablate by linear projections of the residual stream, comparing mean matching, covariance matching, distillation and token pooling against ReFAT. Under an iterative protocol that excludes the last 20% of source layers, the 95% Wilson upper bound on refusal of harmful prompts for the unmodified Llama checkpoint falls below 30% for the first time at rank K=4, while mean matching plus knowledge distillation (Mean+KD) is delayed to K=11, with MMLU, GSM8K and HellaSwag scores comparable or higher; however, when all source layers are used, Mean+KD crosses at K=3, the unmodified checkpoint does not cross up to K=20, and under adaptive rank-4 projection the Mean+KD interval is below 30% while the unmodified checkpoint interval contains 30%. The authors conclude that the effect of representation matching on refusal depends on the model and the extraction protocol.

Through controlled experiments, the paper tests whether representation matching during fine-tuning can make the refusal of instruction-tuned LLMs harder to ablate by linear projections of the residual stream, comparing mean matching, covariance matching, distillation and token pooling against ReFAT. Under an iterative protocol that excludes the last 20% of source layers, the 95% Wilson upper bound on refusal of harmful prompts for the unmodified Llama checkpoint falls below 30% for the first time at rank K=4, while mean matching plus knowledge distillation (Mean+KD) is delayed to K=11, with MMLU, GSM8K and HellaSwag scores comparable or higher; however, when all source layers are used, Mean+KD crosses at K=3, the unmodified checkpoint does not cross up to K=20, and under adaptive rank-4 projection the Mean+KD interval is below 30% while the unmodified checkpoint interval contains 30%. The authors conclude that the effect of representation matching on refusal depends on the model and the extraction protocol.

Related events and news

1 events · 0 news mentions

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The study examines whether representation matching can increase the rank required to ablate refusal, and tests whether the benefit holds across attack protocols.

    Core question: Can representation matching during training prevent refusal from being concentrated in residual directions that are easy to project out, while avoiding excessive refusal and capability loss?

    • Research setting: Arditi et al. (2024b) found that refusal in multiple chat models can be mediated by a single residual direction; for open-weight models, a rank-one intervention can weaken costly safety post-training.
    • Shortcoming of a single ablation: After removing the first direction, the class mean may shift and expose a new direction, so the authors measure not just one operating point but the attack curve formed by repeated extraction and projection.
    • Core hypothesis: Motivated by LEACE's linear guardedness result, the authors penalize differences in class means and covariances between harmful and harmless prompts; distillation is used to constrain the output distribution so that loss is not reduced merely by changing refusal behavior.
    • Threat model:
      • Objective: Reduce refusal on harmful prompts while constraining utility with next-token KL on harmless prompts.
      • Knowledge and capability: The attacker has white-box access to weights and can install hooks that modify residual-stream activations.
      • Attack constraints: The main attack is a global rank-K orthogonal projection shared across layers; it does not include arbitrary fine-tuning or per-layer independent high-rank edits.
      • Victim system: Open-weight instruction-tuned language models; adaptive low-rank attacks optimized directly against the post-trained model are also tested.
    • Paper contributions: Proposes independently switchable mean, covariance, and distillation objectives, together with iterative attacks, Wilson intervals, probes, and capability benchmarks, and compares with ReFAT and aligned RFA×KD experiments.
  2. What related research exists?

    The work connects refusal-direction intervention, robust safety training, and concept erasure, with a focus on controlled comparison rather than a single attack.

    Refusal representations and intervention

    • Arditi et al. (2024b): Extract the harmful-minus-harmless mean difference from residual positions near the end of chat prompts, select directions by behavior and utility criteria, and project out from each residual write; this paper follows their candidate-layer clipping rule.
    • Dabas et al. (2025); Wollschläger et al. (2025): The former reduces false refusals through representation fine-tuning, while the latter identifies multiple independent refusal directions in the same model. This paper turns to the complementary defense question: whether training can weaken repeated low-rank projections.
    • Alain and Bengio (2017): Use linear probes to measure the decodability of attributes in intermediate representations; this paper uses per-layer probes to distinguish behavioral robustness from information erasure.

    Robust safety training

    • ReFAT (Yu et al., 2025): Dynamically computes refusal directions layer by layer and trains the harmful response loss when the direction is ablated; this paper implements a controlled adaptation with the same data, optimizer, and full-parameter update regime.
    • Labunets (2026): Found on OLMo models that varying the refusal prefix during training can weaken vector ablation, discussed as complementary research.
    • Sheshadri et al. (2025), Mazeika et al. (2024), Tamirisa et al. (2025): Study continuous latent adversarial training, standardized red teaming, and protection against weight tampering, respectively; the authors limit their claims to global low-rank residual projections.

    Concept erasure and statistical matching

    • INLP (Ravfogel et al., 2020): Iteratively removes predictable linear subspaces from frozen representations; used as a post-hoc reference transformation in the GPT-2 sentiment experiment.
    • LEACE (Belrose et al., 2023): Provides a closed-form minimum-distortion eraser and, in its setting, characterizes linear guardedness by equality of class-conditional means; the authors explicitly use it only as motivation, not as a guarantee for finite-batch training.
    • Deep CORAL (Sun and Saenko, 2016) and Hinton et al. (2015): Provide the technical sources for the covariance distance penalty and output distribution distillation, respectively.

    Baselines and evaluation data: Comparisons include untouched, SFT-only, KD-only, each matching combination, and two ReFAT budgets; the main data is WildGuardMix, transfer uses HarmBench, XSTest, and OR-Bench, and capability uses MMLU, GSM8K, and HellaSwag. The authors position this paper as a controlled stress test of representation shaping during training, not a safety guarantee under arbitrary weight modifications.

  3. How does the paper address this problem?

    Train with decomposable matching and distillation objectives, then test the refusal curve using iterative and adaptive low-rank attacks.

    The overall framework is representation matching plus knowledge distillation: response SFT keeps the basic training objective, the mean and covariance terms change prompt representations, and the distillation term from the frozen source model constrains outputs. Evaluation tracks attack rank, harmless refusal, probes and general capability together.

    Threat model and iterative attack

    • For an orthogonal direction matrix D, the intervention is written as h′ = h − (hD⊤)D; it removes the subspace spanned by D from residual activations, installed at each block input, attention output and MLP output.
    • At each step, the harmful-minus-harmless mean difference is re-extracted on the already ablated model, with candidates drawn from the first 80% of blocks and 5 positions before the final prompt token; new directions are first orthogonalized against the existing subspace.
    • Candidates are screened by harmful refusal token log odds, harmless KL, and refusal steering after adding the direction to harmless activations; the KL threshold is 0.1 and the steering score must be at least 0. When no candidate passes, the refusal score plus KL penalty is optimized.
    • The main grid uses Kmax=20, retaining old directions step by step with QR orthogonalization, yielding curves for K=0 to 20, rather than assuming the basis extracted at K=0 is always optimal.

    Adaptive low-rank attack

    • A differentiable QR maps an unconstrained basis to orthogonal directions, target model weights are frozen, and harmful refusal log odds and harmless clean-to-attacked KL are optimized directly.
    • Ranks 1, 4, 8 and 16 are optimized independently, so the ranks are not a nested attack curve; where available, iterative directions are used for initialization.
    • Each model and rank is run with 3 restarts, each with 200 Adam steps and learning rate 0.05, with balanced optimization batches of 16 examples per class; the restart is selected by the development-set objective and then evaluated on the external set.

    Decomposable training objective

    • The total objective is L = LSFT + λμ Lmean + λΣ Lcov + λKDLKD, and each auxiliary term can be switched on independently; SFT is computed only on assistant response tokens.
    • The mean term uses the L1 distance between class means, and the covariance term uses the squared Frobenius distance normalized by d²; the balanced microbatch guarantees at least two examples per class.
    • Distillation uses the teacher logits of the frozen instruction model at the final prompt position and a temperature-scaled forward KL. The controlled grid fixes λµ=10, λΣ=10⁵, λKD=100, T=1.
    • Three deterministic poolings are compared, CHAT, USER and PROMPT: averaging the last 5 positions of the attack scan, the user message tokens, and the full rendered prompt respectively, to test whether position alignment has an independent effect.

    ReFAT control and alignment confirmation

    • The ReFAT control recomputes per-layer final-token directions every 4 optimization steps using 32 prompts per class, projects on the last 75% of block inputs with probability 0.5, and intervenes only on the harmful response loss.
    • The one-epoch setting is compared with a three-epoch budget-matched setting; to isolate the training objective, all training conditions use full-parameter updates rather than the original study's LoRA configuration.
    • There is also an alignment 2×2 confirmation that toggles RFA and KD, fixing the SFT data, objective, optimizer, number of updates and evaluation; 256 examples per class, one epoch, seed 42, 8 optimization steps.

    Data, metrics and success criteria

    • WildGuardMix is filtered by source-model behavior, deduplicated and class-balanced, giving 566 training examples per class, 100 development examples per class and 500 external examples per class; there is also an external set of 500 per class without behavior filtering.
    • Generation uses greedy decoding with at most 128 new tokens, and official WildGuard classifies refusals. Point estimates and pointwise 95% Wilson intervals are reported for each fixed rank and checkpoint.
    • Kpoint is the rank at which the harmful refusal point estimate first falls below 30%, and Kconf is the rank at which the interval upper bound first falls below 30%; 30% is a descriptive threshold calibrated to the baseline rank-one attack.
    • Selectivity gap, Sel. AUC, per-layer linear and MLP probes, and 5-shot MMLU, 5-shot GSM8K and 0-shot HellaSwag are also reported; GSM8K uses both strict and flexible answer extraction.
  4. What experiments did the paper conduct?

    The restricted protocol shows that Mean+KD delays the crossing, but the all-layer, adaptive and Qwen experiments weaken or reverse this advantage.

    Experimental setup

    • Models tested: The main grid is Llama-3.2-1B-Instruct; the second-family transfer is Qwen2.5-1.5B-Instruct; GPT-2 small is used for the IMDb sentiment proof of concept.
    • Training conditions: 10 factorial conditions, plus untouched and one-/three-epoch ReFAT; the main grid uses full-parameter AdamW, learning rate 2×10⁻⁵, weight decay 0.01, three epochs, effective batch 128, seed 42.
    • Main evaluation: 500 examples per class from the WildGuardMix external set; direction extraction and candidate scoring use 64 examples per class from the development set. The unfiltered external set and the HarmBench/XSTest/OR-Bench mixed set also have 500 examples per class each.
    • Judgment and metrics: WildGuard classifies refusals; Kpoint, Kconf, harmless refusal, selectivity gap and Sel. AUC are reported. Intervals describe only prompt-sampling uncertainty at a fixed rank, and do not cover cross-rank differences or training optimization variation.
    • Capability evaluation: MMLU test 14,042 questions, GSM8K test 1,319 questions, HellaSwag validation 10,042 questions; each checkpoint's default chat template is used.
    • Probes and repetitions: Llama probes use at most 1,000 balanced training examples and are evaluated on 1,000 external examples; the main refusal grid uses one fixed seed per condition, and the GPT-2 sentiment experiment uses 3 seeds.

    Main results

    The restricted iterative attack excludes the last 20% of candidate source layers; the table below is based on Table 2, Kconf is the rank at which the Wilson upper bound first falls below 30%, and harmless refusal at K* is in %.

    Swipe horizontally to read the table

    ConditionKpointKconfHarmless refusal at K*Sel. AUC
    Untouched Instruct340.80.164
    SFT only451.20.220
    KD only450.20.180
    Mean, no KD>20>20not reported0.387
    Mean + KD11113.20.247
    Cov, no KD17171.00.378
    Cov + KD440.20.150
    Mean + Cov, no KD9110.60.331
    Mean + Cov + KD (chat)880.20.329
    Mean + Cov + KD (user)992.20.274
    Mean + Cov + KD (prompt)440.20.169
    ReFAT (1 epoch)890.80.311
    ReFAT (3 epochs)11122.00.437
    • Development-set selection: Mean + KD was selected from the development curves in a preset order; when external Kconf crosses, untouched refuses 109/500 harmful prompts, 21.8%, and Mean + KD refuses 115/500, 23.0% (Section 6.2).
    • Clean selectivity: In Table 1, harmful/harmless refusal for Mean + KD is 95.2%/3.6%, and for untouched 98.2%/7.8%; harmless refusal for Mean + Cov without KD is 52.8%. The authors take this to suggest that the high attack ranks without KD may incorporate over-refusal.
    • Information still decodable: In Table 1, the maximum held-out linear probe accuracy is close to 99% for all conditions; the authors therefore interpret the results as a behavioral-level redistribution of representations rather than linear erasure of harmfulness information.

    Adaptive attack and capability cost

    • rank-4 results: In Table 11, harmful refusal for Mean + KD is 22.2%[18.8,26.0], with the entire interval below 30%; untouched is 31.2%[27.3,35.4], with status inconclusive. One-epoch ReFAT remains above at ranks 1, 4, 8 and 16.
    • rank-16 results: In Table 3, harmful/harmless refusal is 17.6%/0.8% for Mean + KD, 26.8%/3.2% for untouched, and 75.8%/26.4% for ReFAT one-epoch; the authors caution that each rank is optimized independently and monotonicity should not be required.
    • Capability changes: Clean Mean + KD and untouched score 45.7% and 45.8% on MMLU, and 56.2% and 53.5% on HellaSwag. Under adaptive rank 16, both are within 1.5 percentage points of their clean values on MMLU and HellaSwag; GSM8K strict loses 9.5 and 3.3 points respectively, and flexible loses 2.8 and 3.0 points respectively.

    Protocol sensitivity, transfer and probes

    • Candidate-layer sensitivity: In Table 17, when all source layers are used, external Kpoint/Kconf is 3/3 for Mean + KD and 2/>20 for untouched; the authors state that this supports dependence on the extraction protocol and relocation to omitted layers, rather than that adding candidates necessarily strengthens the greedy attack.
    • Cross-corpus and unfiltered sets: With frozen directions on the HarmBench/XSTest/OR-Bench mixed set, Mean + KD reaches the upper-bound criterion at K=8 and untouched at K=1; on the unfiltered external set, the selected checkpoint also reaches this criterion at K=8 (Section 6.2).
    • Second-family transfer: In Table 18, external Kpoint/Kconf for Qwen2.5-1.5B Mean + KD is 1/1, and for untouched Qwen 2/2; the authors state that the advantage on Llama did not reproduce.
    • GPT-2 sentiment control: In Table 13, mean matching reduces the final-layer class-mean gap from 11.186±0.022 for LM fine-tuning to 2.415±0.012, but the maximum linear probe remains 81.2±0.2%; adding covariance leaves the maximum linear probe also at 81.2±0.2%.

    Alignment RFA×KD confirmation and other analyses

    • Gate results: In Table 4 and Table 8, supervised-only, KD-only and RFA-only all fail the clean gate; RFA+KD passes the clean and K=1 behavior gates but fails the capability gate. RFA-only passes the capability gate only under flexible GSM8K scoring and fails under strict.
    • Interaction and cost: MMLU for RFA+KD drops from 45.85% for the source checkpoint to 42.17%, with an RFA×KD interaction of −3.59 points; the clean harmless refusal and selectivity gap interactions are −28.2 and +27.2 points respectively. The authors state that no cell satisfies all criteria.
    • ReFAT exception: In Table 1, clean harmless refusal for one-/three-epoch ReFAT is 23.8% and 21.2% respectively; the authors consider that it offers a different trade-off under adaptive attack, but clean over-refusal is higher, and three epochs also loses GSM8K.
    • Attack budget: The main grid evaluates K=0 to 20; the full restart objectives and external behavior of the adaptive attack are in Table 10 and Table 11, and raising the attack rank is not interpreted as a computational safety barrier.
  5. What are some points that can be further explored?

    The authors list limitations on model, attack and seed coverage; the experiments also show that conclusions depend on the extraction protocol and model family.

    Limitations and future directions noted by the authors

    • Model and language scope: The full causal grid uses only one 1B model family and English WildGuardMix; the authors state that results may not transfer to larger models, multilingual safety policies or other chat templates (Limitations).
    • Cross-corpus evaluation scope: The frozen-direction stress test covers only three checkpoints and a fixed WildGuardMix direction sequence, and may not transfer to attacks re-optimized on each new corpus (Limitations).
    • Attack categories: The main attack and the adaptive attack are both global low-rank linear projections, and do not cover unrestricted fine-tuning, sparse weight editing, nonlinear activation interventions, prompt jailbreaks or per-layer independent subspaces (Limitations).
    • Statistics and training variation: The refusal grid and the RFA×KD confirmation use one fixed training seed per condition, and Wilson intervals cover prompt sampling rather than optimization variation; the authors state that a systematic hyperparameter search might yield other trade-offs (Limitations).
    • Moment matching and probes: A finite balanced microbatch does not guarantee equal population moments, and equal means and covariances do not eliminate higher-order class information; although the probes cover all layers, there are still only two classifier families (Limitations).
    • Behavior measurement: WildGuard may misclassify subtle refusals or partial compliance; the correctness, helpfulness and coherence of harmless responses were not independently evaluated, and the 30% threshold is descriptive and model-dependent (Limitations).

    Experimental coverage

    • Models and data: The main grid is Llama-3.2-1B-Instruct, with additional Qwen2.5-1.5B-Instruct transfer and GPT-2 small/IMDb controls; the main external evaluation uses 500 examples per class.
    • Attack coverage: The iterative attack is evaluated up to K=20; the adaptive attack is run at ranks 1, 4, 8 and 16 with 3 restarts each and 200 Adam steps per restart, optimizing only the projection without updating model weights.
    • Training controls: Includes 10 factorial conditions, untouched and two ReFAT budgets; the alignment RFA×KD confirmation uses 256 training examples per class, 8 optimization steps, seed 42.
    • Capability evaluation: Covers MMLU, GSM8K and HellaSwag, with GSM8K reported under both strict and flexible extraction; the paper does not report a human evaluation of harmless response quality or agreement between reviewers and humans.
    • Compute record: Appendix A reports a total of 66.5 allocated physical GPU-hours on tracked rented instances, and states that this is not measured kernel utilization.
  6. Summarize the main content of the paper

    The paper presents a controlled refusal ablation evaluation, and the conclusion supports protocol-dependent representation reallocation rather than general low-rank robustness.

    This is a defense and analysis study of the refusal mechanism in open-weight models: the authors test whether mean matching, covariance matching, and distillation can increase the rank required for linear projections to weaken refusal, while controlling harmless refusal and capability cost.

    • Method core: On response SFT, independently combine representation losses and frozen-teacher distillation, repeatedly extracting and projecting directions on the ablated model; conclusions are also tested with gradient-optimized adaptive subspaces and a ReFAT comparison.
    • Restricted-protocol results: On the Llama external set, Mean + KD selected on the development set has a Kconf of 11, versus 4 for untouched; Mean + KD clean harmful/harmless refusal is 95.2%/3.6% (Table 1, Table 2).
    • Not information erasure: The maximum held-out linear probe is close to 99% under all conditions, which the authors use to distinguish persistence of refusal behavior from linear decodability of harmfulness information.
    • Protocol counterexample: When all source layers are used, Mean + KD's Kconf drops to 3, and no upper-bound crossing is observed for untouched up to K=20; under adaptive rank-4, Mean + KD harmful refusal is 22.2%, versus 31.2% for untouched with the interval containing 30% (Table 11, Table 17).
    • Transfer and trade-offs: On Qwen2.5-1.5B, Mean + KD has a Kconf of 1, versus 2 for untouched; in the aligned RFA×KD confirmation, RFA+KD passes the behavior threshold but the MMLU interaction is −3.59 points, and no cell passes all criteria (Table 4, Table 18).
    • Authors' conclusion: The evidence supports that Mean + KD reallocates refusal information relative to one extraction protocol, not attack-general low-rank robustness; an increase in attack rank is also not a safety guarantee against tampering for open-weight models.

Research lineage

Connected via shared benchmarks in library
Explore in knowledge graph →

Related papers

Show 3 more papers
Read originalarxiv.org