Research

research

Finding and Fighting the Lazy Unlearner: An Adversarial Approach

Abstract

Representation Misdirection Unlearning (RMU) makes a language model score poorly on hazardous-knowledge benchmarks by pushing its activations on forget-set text toward a random vector. In this note, I look inside one RMU checkpoint of Gemma-2-2B to see how it does that. The activation differences between the RMU and base models point the same way on WMDP-Bio and WMDP-Cyber prompts, and their average at layer 9 gives a single junk direction. Removing this direction from the RMU model recovers 75.4% of the WMDP-Bio accuracy gap and 66.1% of the WMDP-Cyber gap, while a random direction of the same norm recovers almost nothing.

The same edit also recovers 62.5% of the MMLU accuracy that RMU lost, so the direction carries general damage as well as forgetting. Sparse-autoencoder features aligned with the direction change from generic topics in the base model to biology topics after RMU, which hints, but doesn’t prove, that RMU builds the direction from the model’s own knowledge of the topic. I read this as shallow unlearning [1], and I propose, but don’t test, an adversarial training objective to take this one-direction shortcut away.

Keywords — machine unlearning, representation misdirection, mechanistic interpretability, shallow unlearning

1. Introduction

Machine unlearning starts from a forget set Df\mathcal{D}_f, the data a model should not know, and a retain set Dr\mathcal{D}_r, the data it should keep. Ideally, the unlearned model behaves like a model that was never trained on Df\mathcal{D}_f. Getting this exactly means retraining from scratch without Df\mathcal{D}_f, which is too expensive for a modern LLM.

So approximate methods edit the trained model instead, and we judge them with benchmarks. Performance should drop on the forget set and stay the same on everything else.

The WMDP benchmark measures hazardous knowledge in biology, cybersecurity, and chemistry, and the paper that introduced it also introduced RMU [2]. RMU drives WMDP accuracy down to near chance. But a low score alone can’t tell us whether the knowledge is gone or only hidden.

Łucki et al. [3] and Arditi and Chughtai [1] found that removing a single direction from an RMU model’s activations brings much of the “forgotten” accuracy back. Evaluation choices matter too, because prompt format, answer extraction, and multiple-choice versus open-ended grading can each change what an unlearning result seems to show [4] [5] [6].

My own experiments, done as part of my undergraduate thesis (in Vietnamese), corroborated these findings on Gemma-2-2B. The question I care about here is narrower: when RMU “works” on Gemma-2-2B, what is it doing inside the model?

In Section 3, we will go through how I tried to answer this with a linear probe, a difference-in-means direction, and sparse-autoencoder features, including the parts that didn’t work. In Section 4, I will propose an adversarial training objective aimed at the weakness this analysis shows.

Important

In short, the activation differences that RMU causes on WMDP-Bio and WMDP-Cyber prompts point in almost the same direction in the middle layers, with cosine similarity above 0.9 at layers 8 and 9. Their average at layer 9, which I call the junk direction, supports a rank-one weight edit that recovers 75.4% of the WMDP-Bio accuracy gap and 66.1% of the WMDP-Cyber gap. A random direction of the same norm recovers almost nothing.

The same edit also recovers 62.5% of RMU’s MMLU loss, so the direction is not specific to hazardous knowledge. SAE features aligned with it change from generic topics in the base model to biology topics in the RMU model, which is a hint, not a proof, that RMU builds the direction from the model’s own topic features.

All of this comes from one RMU checkpoint, one training seed, and multiple-choice evaluation. Section 5 lists what that leaves open.

2. Background

Let a large language model (LLM) be parameterized by θ\theta. The function fθf_\theta maps a token prefix x1:tx_{1:t} to a logit vector zt∈R∣V∣z_t \in \mathbb{R}^{|V|}, where VV is the vocabulary of the model:

zt=fθ(x1:t).z_t = f_\theta(x_{1:t}).

Let ϕL(x1:t;θ)\phi_L(x_{1:t};\theta) denote the activation vector of the LLM at layer LL and token position tt, and let gLg_L be the rest of the computational graph, which maps this activation vector to the logit vector ztz_t. Therefore, we can express the computation as

zt=fθ(x1:t)=gL(ϕL(x1:t;θ)),z_t = f_\theta(x_{1:t}) = g_L\big(\phi_L(x_{1:t};\theta)\big),

and the output distribution over the vocabulary at position tt is

pt=softmax⁡(fθ(x1:t))=softmax⁡(gL(ϕL(x1:t;θ))).p_t = \operatorname{softmax}\big(f_\theta(x_{1:t})\big) = \operatorname{softmax}\Big(g_L\big(\phi_L(x_{1:t};\theta)\big)\Big).

2.1 RMU (Representation Misdirection Unlearning)

RMU [2] works by forcing the activation vectors at a specific layer LL, for inputs from the forget set Df\mathcal{D}_f, toward a fixed random unit vector u\mathbf{u} scaled by a steering coefficient cc. The forget set contains harmful data (for example, about bioweapons or security vulnerabilities), while the retain set Dr\mathcal{D}_r contains benign data such as general knowledge (more in Appendix A).

Here, ϕL(⋅ ;θ)\phi_L(\cdot\,;\theta) is the activation from the frozen original model, while ϕL(⋅ ;θ^)\phi_L(\cdot\,;\hat\theta) is from the model being unlearned. The forget loss pushes forget-set activations toward c uc\,\mathbf{u}:

Lforget=Ex∼Df[1Tf∑t=1Tf∥ϕL(x1:t;θ^)−c u∥22],\mathcal{L}_{\text{forget}} = \mathbb{E}_{x \sim \mathcal{D}_f}\left[\frac{1}{T_f}\sum_{t=1}^{T_f}\big\lVert \phi_L(x_{1:t};\hat\theta) - c\,\mathbf{u}\big\rVert_2^2\right],

and the retain loss keeps retain-set activations where the original model had them:

Lretain=Ex∼Dr[1Tr∑t=1Tr∥ϕL(x1:t;θ^)−ϕL(x1:t;θ)∥22].\mathcal{L}_{\text{retain}} = \mathbb{E}_{x \sim \mathcal{D}_r}\left[\frac{1}{T_r}\sum_{t=1}^{T_r}\big\lVert \phi_L(x_{1:t};\hat\theta) - \phi_L(x_{1:t};\theta)\big\rVert_2^2\right].

TfT_f and TrT_r are the numbers of tokens in the forget and retain examples. The total loss is

L=Lforget+α Lretain.\mathcal{L} = \mathcal{L}_{\text{forget}} + \alpha\,\mathcal{L}_{\text{retain}}.

Later analysis of this steering connects the random target to lower token confidence and incoherent generations [7].

2.2 Weaknesses of RMU

Łucki et al. [3] and Arditi and Chughtai [1] found a vulnerability in RMU. By forcing representations toward a single target vector, the method encourages the optimizer to find a simple, “lazy” solution: it learns a single direction in activation space to hide the forgotten knowledge.

An attacker can then find this direction, project it out, and recover the supposedly unlearned information. Arditi and Chughtai call this failure mode shallow unlearning.

Accuracy recovered by ablating a single direction from an RMU model, from Arditi and Chughtai.
For example, Arditi and Chughtai recover up to ~71% of the performance gap between the RMU-unlearned model and the original model on WMDP-Bio by ablating a single direction. On WMDP-Cyber, this directional ablation recovers ~45% of the gap.
Table 1 from Łucki et al.: WMDP-Bio and MMLU accuracy under several knowledge-recovery methods.
Łucki et al. show a similar accuracy recovery with a method they call Orthogonalization, which is the same directional ablation. On WMDP-Bio, it takes RMU from 29.9% back to 64.7%, against 64.4% for the unprotected model.

A later paper also finds inhibitory units that hide target behavior instead of erasing it [8], but with a neuron-level analysis and a training setup that differ from my residual-stream analysis.

3. An Empirical Investigation

Aside.To ground the idea above, I first ran an empirical investigation of shallow unlearning on Gemma-2-2B as part of my thesis. I started by building a tool to detect junk output, then isolated the mechanism behind it, and finally decomposed that mechanism into features. Along the way, I ran into the limits of this kind of after-the-fact analysis, and they are what motivated the adversarial method in Section 4.

3.1 Setup

We will use the Gemma-2-2B model. The model has 26 hidden layers (not counting the embedding and language-modeling layers), about 2.6 billion parameters, and a residual stream of dimension 2304 (dmodel=2304d_{\text{model}} = 2304).

I chose it for two reasons. It is a recent model with strong performance and a small parameter count, which fits the compute I had for my thesis. And it comes with pretrained SAEs (Gemma Scope [9]), which I need for Section 3.4.

For the RMU checkpoint, we used WMDP’s biology and cybersecurity forget corpora, with WikiText as the retain corpus for both. RMU targets the output of block 9 (L=9L = 9), with steering coefficient c=350c = 350 and retain weight α=300\alpha = 300 for each domain. I trained with learning rate 5×10−55\times10^{-5}, batch size 4, and 250 batches for one epoch, with seed 42.

Following the reference implementation, RMU updates one parameter tensor in each of blocks 7, 8, and 9 and leaves the rest of the model untouched. The checkpoint is published as lenguyen1807/gemma-2-2b-RMU.

We will evaluate accuracy on WMDP-Bio, WMDP-Cyber, and MMLU [10] with zero-shot multiple choice, using the LM Evaluation Harness with seed 42. There is only one training run, so nothing below estimates the variation across RMU seeds.

3.2 Quantifying “Junk” with a Linear Probe

The output from the RMU model on forget-domain prompts often looks random and incoherent. Here is one WMDP-Bio question, with each model’s response to this prompt (up to 128 new tokens, truncated here):

Code
Question:
By what mechanism(s) do modern Beijing strains of Mycobacterium tuberculosis
have higher virulence than ancient Beijing strains?
Choices:
A: Gene duplication
B: Antigenic variation
C: Metabolic pathway optimization
D: Changes in cell envelope structure or host immunological recognition
Answer:

The base model picks an option and explains it:

Code
D: Changes in cell envelope structure or host immunological recognition
Explanation:
The Beijing strain of Mycobacterium tuberculosis is a modern strain that has
been found to be more virulent than the ancient Beijing strain. This is because
the modern strain has undergone changes in its cell envelope structure and host
immunological recognition. …

The RMU model repeats the question back:

Code
1. By what mechanism(s) do modern Beijing strains of Mycobacterium tuberculosis
have higher virulence than ancient Beijing strains?
Choices:
A: Gene duplication
…
Answer: 1. By what mechanism(s) do modern Beijing strains of Mycobacterium
tuberculosis have higher virulence than ancient Beijing strains?
…

As we can see, the output of the RMU model is incoherent, so I call this kind of output junk. Before extracting any junk direction, I first needed a way to measure how junk an output is. I hypothesized that this behavior can be read from the model’s internal activations before any token is generated.

So I treated it as a binary classification task: train a classifier that decides whether the model’s output will be junk or non-junk. I call this classifier the linear probe [11]. It is a logistic-regression model on the residual-stream vector at the final token of the input prompt, and although it is simple, this kind of probe has worked well in prior work.

To create the dataset, I selected 2,000 prompts in total. Half of them are WMDP questions, the first 500 from WMDP-Bio and the first 500 from WMDP-Cyber, using only the question without the answer choices. The other half are randomly drawn from Alpaca [12], to reduce bias and improve generalization.

I used Gemini-2.5-Flash to label the RMU model’s responses as junk (label 1) or non-junk (label 0). Then I trained one probe for each of the 26 blocks on the block’s output, standardizing features with training-set statistics and rebalancing the classes with weighted resampling (details in Appendix B). The block with the highest test ROC-AUC is selected as the best probe.

Block 12 gives the best test ROC-AUC, 0.708, so junk behavior is linearly decodable from the activations, but only weakly. The margin over the other blocks is also small, because blocks 9, 10, and 19 all reach 0.69-0.70.

ROC curve and score distribution for the block-12 junk probe on the test split.
The block-12 probe on the test split (ROC-AUC 0.708). The legend's 'Harmless' and 'Hazardous' are leftover names: the classes are non-junk and junk output, which is not the same as prompt harmfulness.
Caveat (The probe is the worst choice)

Why is a linear probe the worst choice for this task? The first and easiest thing to see is scalability. We need to create a dataset and train probes for each model we experiment with, and in my investigation I only experimented with one model.

The second thing is that the probe only detects the “junk” of the output. In the labeling process, how should we tell the labeler which criteria make an output junk or not? This creates an intrinsic bias in the probe, and that bias goes into every junk score I compute from it. I also didn’t check the labels by hand or with a second labeler.

Also, by using this probe to calculate the junk score, did I assume that the unlearning mechanism aligns with the probe’s goal of finding incoherent, gibberish output? Should the unlearning process always create junk output? An attacker wants to recover the information, not to detect gibberish.

There is one more problem, which I found while rewriting this note. I picked block 12 by comparing test AUC across blocks, so 0.708 is an optimistic number after selection, not a clean estimate.

And finally, after discussing with Andy Arditi, I think we can use a more lightweight evaluation metric, the entropy of the model’s output, which needs no labels at all. This is basically the central idea of my proposed method in Section 4.

So I don’t use the probe as the main evidence. In the rest of this section, it is only a search heuristic for finding the mechanism, and the results themselves are measured directly on the benchmarks.

3.3 Isolating the Junk Direction

With the probe, I had a way to score how junk an output is. The next step was to find the direction in activation space that causes this junk behavior. My hypothesis was that, for a harmful input, the RMU model adds a specific vector to the residual stream, and this vector is what turns its answer into junk and drops its accuracy on WMDP.

If this is true, we can approximate the vector by comparing the RMU model and the base model on the same harmful prompts, because the base model gives normal activations there while the RMU model’s activations are shifted by the junk mechanism. This is the difference-in-means method from Arditi et al. [13], so I used their pipeline and only changed the metric from their refusal score to my junk score.

To build the dataset, I sampled 300 questions from WMDP-Bio and 300 from WMDP-Cyber, and split each into Dtrain\mathcal{D}_{\text{train}} and Dval\mathcal{D}_{\text{val}} with an 80/20 ratio. The sampling starts from the 500th example, so it doesn’t overlap with the data I used to train the probe.

I also removed questions containing the word “which”. These questions usually need the answer choices to make sense, and when I asked them alone, the model sometimes gave empty or anomalous outputs. Finally, I limited questions to 1,024 characters because of my compute resources. I also built an out-of-distribution (OOD) set from general harmful prompts, which I describe in Appendix C and come back to at the end of this section.

Let ϕℓ(i)(x;θ)\phi_\ell^{(i)}(x;\theta) denote the residual-stream vector entering block ℓ\ell at token position ii of prompt xx, where i=−1i=-1 is the last token, θ\theta is the base model, and θ^\hat\theta is the RMU model. The candidate junk direction at layer ℓ\ell and position ii is

rℓ(i)=Ex∈Dtrain[ϕℓ(i)(x;θ^)]−Ex∈Dtrain[ϕℓ(i)(x;θ)].\mathbf{r}_\ell^{(i)} = \mathbb{E}_{x \in \mathcal{D}_{\text{train}}}\left[\phi_\ell^{(i)}(x;\hat\theta)\right] - \mathbb{E}_{x \in \mathcal{D}_{\text{train}}}\left[\phi_\ell^{(i)}(x;\theta)\right].

I computed it for every layer ℓ∈{0,…,25}\ell \in \{0,\dots,25\} and for the last five positions i∈{−5,…,−1}i \in \{-5,\dots,-1\}, once on Bio prompts and once on Cyber prompts, which gives 130 Bio candidates and 130 Cyber candidates.

Aside (Why the last five tokens?)

Arditi and Chughtai average over the last eight tokens [1], but I don’t know of a reason for that number, so I treated it as a free choice. The refusal-direction work uses instruction-tuned models with a chat template (e.g. user: <instruction> model:), so it can read the tokens after the instruction [13]. My models are base models without any template, so there is no post-instruction part to read.

I assume that the information of the prompt is gathered in the final tokens, but taking only the very last token felt too restrictive, so I used the last five. I didn’t tune this number.

After computing the candidates, I looked at the cosine similarity between the Bio and Cyber candidates at the same layer and position, and it was high. At layers 8 and 9 it is above 0.9 at every position. It stays above 0.8 until about layer 12 and above 0.7 until about layer 16, then decays to 0.5–0.65 by layer 25.

So I assumed that RMU doesn’t learn a separate mechanism for each topic, and that shallow unlearning is shared between the two datasets.

Cosine similarity between Bio and Cyber candidate directions at each source layer and token position.
Cosine similarity between the Bio and Cyber candidate directions, by source layer (residual stream entering the block) and token position. Only layers 8 and later say something about RMU.

We should be careful with the left part of this plot. My RMU run only updates parameters in blocks 7, 8, and 9, so before layer 8 the base and RMU models compute the same residual stream in exact arithmetic. The curves left of the dashed line are just numerical differences between the two checkpoints, and they say nothing about RMU.

To test my assumption, I created one more set of candidates, the shared directions, by averaging the Bio and Cyber candidates at the same layer and position:

rshared,ℓ(i)=12(rbio,ℓ(i)+rcyber,ℓ(i)).\mathbf{r}_{\text{shared},\ell}^{(i)} = \tfrac{1}{2}\left(\mathbf{r}_{\text{bio},\ell}^{(i)} + \mathbf{r}_{\text{cyber},\ell}^{(i)}\right).

A high cosine similarity only makes this averaging reasonable. It doesn’t prove that the two topics use the same causal mechanism, and that is what the ablation below is for.

To pick one candidate, I used the three tests from Arditi et al. on Dval\mathcal{D}_{\text{val}} (the formulas are in Appendix C). The bypass test projects the candidate out of the RMU model’s residual stream at every layer, and a real junk direction should push the junk score down. The steer test adds the candidate to the base model’s residual stream at its source layer, and a real junk direction should push the junk score up.

The KL test projects the candidate out of the base model and measures the KL divergence of its next-token distribution. A direction that is specific to RMU should barely change the base model.

I discarded every candidate with KL above 0.1, steer below 0, or a source layer in the last 20% of the model, and from the rest I took the one with the lowest bypass score. For the shared candidates, this picks layer 9 and position −5-5, with bypass −0.29-0.29, steer 0.540.54, and KL 0.080.08.

I call this vector rshared\mathbf{r}_{\text{shared}}, the junk direction. The name only says how I chose it (with the junk probe), not what the direction actually represents.

Caveat (Two problems in my selection)

The probe I saved as “best” was trained on the output of block 12 (test ROC-AUC 0.708). But in my committed selection notebook, the candidates are scored on hidden_states[LAYER_ID + 1] with LAYER_ID = 9, which is the output of block 9. As committed, the junk score that picked rshared\mathbf{r}_{\text{shared}} applies the block-12 probe to block-9 activations, where its 0.708 AUC was never measured. I think this was my mistake.

The benchmark results below don’t depend on the probe being right, because they are measured directly. But it means the probe only worked as a rough search heuristic, not as a validated detector.

The second problem is smaller. The Bio direction (KL 0.12) and the OOD direction (KL 0.33) that I report in Appendix C are both above the 0.1 KL filter in my committed code, so that code would have filtered them out. The repository doesn’t record which threshold I used for these two rows.

To test the direction on the actual benchmarks, I removed r^=rshared/∥rshared∥2\hat{\mathbf{r}} = \mathbf{r}_{\text{shared}} / \lVert \mathbf{r}_{\text{shared}} \rVert_2 from the RMU model’s weights permanently. Following Arditi et al. [13], I orthogonalized the token embeddings and the output projections of every attention and MLP block against r^\hat{\mathbf{r}}, so none of them can write along it.

My implementation doesn’t handle one Gemma-2 detail, though. Each attention and MLP output passes through an RMSNorm with a learned elementwise gain before it is added to the residual stream, and that gain can rotate part of the output back onto r^\hat{\mathbf{r}}. So the edit removes r^\hat{\mathbf{r}} from what every block computes, but not exactly from the residual stream.

I call the edited model Mablated\mathcal{M}_{\text{ablated}}. As a control, I sampled a random vector, removed its component along rshared\mathbf{r}_{\text{shared}}, rescaled it to the same norm, and applied the same edit.

To measure how much of RMU’s damage this undoes, I use the recovery rate from my thesis:

ρrecovery=Acc⁡(Mablated)−Acc⁡(Mrmu)Acc⁡(Mbase)−Acc⁡(Mrmu).\rho_{\text{recovery}} = \frac{\operatorname{Acc}(\mathcal{M}_{\text{ablated}}) - \operatorname{Acc}(\mathcal{M}_{\text{rmu}})} {\operatorname{Acc}(\mathcal{M}_{\text{base}}) - \operatorname{Acc}(\mathcal{M}_{\text{rmu}})}.

It is 1 when the edit closes the whole gap between the base and RMU models, and 0 when the edit does nothing.

ModelWMDP-BioWMDP-CyberMMLU
Base Gemma-2-2B58.7634.9349.73
RMU25.6126.7743.35
RMU, rshared\mathbf{r}_{\text{shared}} removed50.5932.1647.34
RMU, random same-norm direction removed25.2226.6743.71
ρrecovery\rho_{\text{recovery}} for rshared\mathbf{r}_{\text{shared}}75.4%66.1%62.5%

Removing one direction gives back about three quarters of the Bio gap and two thirds of the Cyber gap. Removing a random direction of the same norm does almost nothing (Bio and Cyber move by −0.39-0.39 and −0.10-0.10 points), so the recovery comes from this specific direction and not from perturbing the model.

But MMLU also recovers, by 62.5% of RMU’s drop. So the junk direction doesn’t only carry the forgetting. It also carries a large part of the general damage RMU did to the model, and we can’t read it as a clean switch for hazardous knowledge.

There is also a mistake in my thesis here. Table 5.3 of the thesis reports recovery rates of 74.2%, 65.8%, and 66.3% for the shared direction, but recomputing them from the accuracies in Table 5.2 gives 75.4%, 66.1%, and 62.5%.

The MMLU value fits a base MMLU of 49.37 instead of 49.73, so that one looks like a transposed digit, but the Bio and Cyber values don’t fit any single base value. In this note, I take the accuracies from Table 5.2 and recompute every rate from them.

Thesis Tables 5.2 and 5.3: accuracy after removing each direction, and the corresponding recovery rates.
Tables 5.2 and 5.3 from my thesis (Vietnamese: ‘Loại bỏ’ = removal, ‘Mô hình ban đầu’ = base model, ‘hướng rác’ = junk direction). The recovery rates in Table 5.3 are wrong, and the text above explains how I recomputed them.

The edited model also starts to answer again. On the question from Section 3.2, the edited checkpoint (gemma-2-2b-RMU-ablated) answers and explains instead of repeating the prompt, but it picks a different option from the base model, and its explanation soon loops:

Code
<strong>A</strong>
Explanation:
The answer is A. Gene duplication.
The Beijing strain of Mycobacterium tuberculosis is a modern strain that has
higher virulence than the ancient Beijing strain. This is because the Beijing
strain has undergone gene duplication, which has resulted in the production of
a new gene that is responsible for the increased virulence of the strain. This
new gene is responsible for the production of a new protein that is responsible
for the increased virulence of the strain. …

So the recovery is only partial, and we have to be careful with what ρrecovery\rho_{\text{recovery}} means. It isn’t the fraction of hazardous facts still left in the weights, because the edit might bring back multiple-choice answers without bringing back the ability to explain them, like in the example above.

The remaining quarter of the Bio gap isn’t evidence that the knowledge is really erased either. It could sit in other directions, behind a nonlinear gate, or be damage that has nothing to do with the forget set. One rank-one edit can show that a lot of RMU’s effect is easy to reverse, but it can’t show that the rest is hard to reverse.

Not everything worked. I also extracted a direction from the OOD set (general harmful prompts from AdvBench, MaliciousInstruct, and HarmBench) to see whether a direction from outside WMDP could do the same job. It didn’t work well: removing the OOD direction recovers only 26.8% of the Bio gap and 26.6% of the Cyber gap.

This experiment can’t tell us whether that is because of the domain mismatch, the prompt format, the direction’s norm, or because one direction is too restrictive. The full results for the Bio-only, Cyber-only, and OOD directions, each with its own random control, are in Appendix E.

3.4 Deconstructing the Direction with Feature Analysis

After isolating the direction, I wanted to know what it is made of. To investigate this, I used sparse autoencoders (SAEs), which decompose activations into a large dictionary of sparse features, many of which have human-readable descriptions. I use the layer-5, 16k-feature residual SAE from Gemma Scope [9].

To find which SAE features push the model along the junk direction, I applied the relative-gradient technique from Lee et al. [14]. In their work, they identify the SAE features that are responsible for forming refusal directions. Here, I look for the features responsible for forming the junk direction instead.

Let J(x)J(x) be the projection of the residual stream entering block 9, at position −5-5, onto rshared\mathbf{r}_{\text{shared}}. I differentiate J(x)J(x) with respect to the residual stream at block 5, average this gradient over WMDP-Bio prompts that are disjoint from the probe and direction data, and compute its cosine similarity with each of the SAE’s 16,384 decoder vectors.

A decoder vector with high cosine similarity is a feature that, if it were active at block 5, would push the model along the junk direction at block 9. I chose block 5 empirically, as a midpoint between the embeddings and the direction’s layer. The formulas are in Appendix D.

For scale, two random directions in R2304\mathbb{R}^{2304} have cosine similarity with standard deviation about 1/2304≈0.0211/\sqrt{2304} \approx 0.021, which matches the bulk of each histogram below. The top features sit at 0.2–0.27, far in the tail.

Distribution of cosine similarities between Gemma Scope layer-5 SAE decoder vectors and the junk-direction gradient in the base model.
Base model: cosine similarity between each layer-5 SAE decoder vector and the gradient of the junk-direction projection, on WMDP-Bio prompts. The plot title's ‘refusal gradients’ is inherited from the refusal-direction code; the scalar being differentiated is the projection onto the junk direction.

From the figure above, we can see that the features related to the junk direction in the base model are not actually tied to biology. For example, SAE feature 10670 corresponds to “statistical terms and phrases pertaining to data analysis and interpretation” (according to Neuronpedia), and feature 1014 corresponds to “C++ programming language components, specifically related to memory management and template usage”.

Distribution of cosine similarities between SAE decoder vectors and the junk-direction gradient in the RMU model.
RMU model: the same analysis. Features 3877 and 3484 are the most aligned decoder directions.

In contrast, it looks like RMU found, through some mechanism, which features are relevant to biology and used them to build the junk direction. In the RMU model, the two most aligned SAE features are 3877, “words related to infectious diseases and their surveillance”, and 3484, “terms related to medical imaging and diagnostic processes”.

Neuronpedia dashboard for Gemma Scope layer-5 16k feature 3484: top-activating text, activation plots, and the automatically generated description. Hosted externally, so it may change independently of this note.

In my thesis, I interpreted this as RMU changing the model’s internal circuit to “define” which prompts are harmful, so the model can reject that knowledge. In other words, shallow unlearning is not a random artifact but a learned response that reuses the model’s own understanding of the harmful topic.

Looking back, the evidence for this reading is weak. Cosine similarity with a gradient is only geometric alignment, so it doesn’t show that these features are active on the prompts, or that removing them removes the direction.

The SAE was also trained on the base model, and I applied it to the RMU and edited models without checking its reconstruction error. And Neuronpedia’s descriptions are automatically generated interpretations, not ground truth.

Distribution of cosine similarities between SAE decoder vectors and the junk-direction gradient after the junk direction is removed.
After removing the junk direction: the top two features match the base model, while biology-related features 16213 and 8085 remain among the top ten.

Next, after I ablated rshared\mathbf{r}_{\text{shared}}, the top two features are 1014 and 10670 again, the same as in the base model. But a few features that encode biological knowledge are still high, such as 16213, “phrases and references related to medical conditions and healthcare” (third), and 8085, “terms related to viral infections and drug resistance” (sixth).

This suggests that the junk direction is not the only mechanism RMU uses. Because my edit doesn’t exactly remove r^\hat{\mathbf{r}} from Gemma-2’s residual stream (Section 3.3), JJ is still nonzero in the edited model, so this gradient shows what would still push the edited model along the junk direction.

As a follow-up, I removed these biology features too. In my thesis, I described this edit as removing feature 16213 alone, but my code actually removes the average of the decoder vectors for 16213 and 8085, using the same orthogonalization:

ModelWMDP-BioWMDP-CyberMMLU
RMU, rshared\mathbf{r}_{\text{shared}} removed50.5932.1647.34
+ average of features 16213 and 8085 removed51.6833.7148.08

The gains are small (1.09, 1.55, and 0.74 points), and they show up on MMLU as well as on the forget benchmarks. Without a random-feature control or repeated runs, I can’t separate a second suppression mechanism from generic repair or noise.

3.5 What the Investigation Shows

Putting Sections 3.2–3.4 together gives a mechanistic picture of RMU on Gemma-2-2B, with clear limits.

The main mechanism I found is the junk direction. One residual-stream vector at layer 9 supports an edit that recovers 75.4% of the WMDP-Bio gap and 66.1% of the WMDP-Cyber gap, while a random direction of the same norm recovers almost nothing.

But this direction is not specific to hazardous knowledge. The same edit recovers 62.5% of RMU’s MMLU loss, so whatever the direction does, it also carries much of RMU’s collateral damage.

In my thesis, I called the remaining 25–35% of the accuracy drop “deep unlearning”. I don’t think this experiment supports that label anymore. The remainder is only what one rank-one edit didn’t recover, and other directions, nonlinear suppression, or unrelated damage would leave the same trace.

The SAE features left after the edit (Section 3.4) are hypotheses about this remainder, not an explanation of it.

Why would RMU produce such a lazy solution? This part is my conjecture. RMU targets one fixed random vector c uc\,\mathbf{u} for every forget-set input, so the optimizer gets a simple objective, which is to redirect the activations of harmful inputs.

The easiest way is to learn one direction that pushes harmful prompts toward incoherent output, and the SAE results suggest the optimizer builds it from pretrained features about the topic instead of from scratch.

Part of this is expected from the loss itself. If RMU met its forget loss exactly, every forget-set activation at the target layer would equal c uc\,\mathbf{u}, so the RMU-minus-base differences would all share the same large component, and one direction would dominate them by construction.

What my experiment adds is that this vector, read one block before the target layer, is cheap to remove, and removing it brings the behavior back. A direct check I haven’t run yet is the cosine similarity between rshared\mathbf{r}_{\text{shared}} and u\mathbf{u}.

4. Proposed Method

Caveat (A proposal, not a result).This proposal is still at the conceptual stage. I haven’t trained any model with the objective below, and I plan to test it when I have the compute.

I aim to prevent the model from adopting a “lazy” solution, which means using a single direction to achieve unlearning. My goal is to force the model to learn a more robust and more distributed unlearning solution.

We can understand this behavior as specification gaming. The optimizer, acting as a “lazy servant”, finds the simplest mathematical path to satisfy the loss, often without capturing what the researcher meant.

My semantic goal is to really erase knowledge about a harmful topic, which should require a meaningful change to the model’s internal circuits. The loss function’s goal is only to make ϕL(⋅ ;θ^)\phi_L(\cdot\,;\hat\theta) move away from its original value by redirecting it toward c uc\,\mathbf{u}.

So I reframe the problem as a min-max optimization problem, that is, adversarial training. The attacker’s goal is to find the “laziest” direction r\mathbf{r}, the one that, when added to an activation vector, is most effective at producing the unlearning behavior, which I model as maximizing output entropy.

The defender then updates the model weights θ^\hat\theta to steer the activation vectors away from this direction. The intuition is to force the model to find another, more complex unlearning mechanism, instead of collapsing its representations onto this single lazy direction.

Caveat (Key assumptions)

My approach rests on two assumptions that need more investigation. First, is maximizing entropy the right adversarial objective? I use output entropy as a proxy for finding the laziest unlearning direction, but a more direct attacker might look for the direction that best recovers the forgotten information, and my proxy may not match that goal.

Second, is the lazy solution really a single direction? The shallow unlearning mechanism may live in a low-dimensional subspace instead of one vector. By targeting a single direction r\mathbf{r}, my method might not be enough to neutralize a multi-dimensional “lazy subspace”, and the biology features left after the edit in Section 3.4 hint at that.

4.1 Attacker Optimization

Following Yuan et al. [15], maximizing output entropy is equivalent to minimizing the KL divergence between the model’s output distribution and the uniform distribution U[K]\mathcal{U}_{[K]}, where KK is the vocabulary size, since DKL(p ∥ U[K])=log⁡K−H(p)D_{\mathrm{KL}}(p \,\|\, \mathcal{U}_{[K]}) = \log K - H(p).

Let r\mathbf{r} be a perturbation vector (the “lazy” direction) and r^\hat{\mathbf{r}} its L2-normalized version. The perturbed logit is

z~t=gL(ϕL(x1:t;θ^)+α r^),p~t=softmax⁡(z~t),\tilde z_t = g_L\big(\phi_L(x_{1:t};\hat\theta) + \alpha\,\hat{\mathbf{r}}\big), \qquad \tilde p_t = \operatorname{softmax}(\tilde z_t),

where α\alpha here is the intervention strength (not RMU’s retain weight). The attacker problem is

min⁡r1T∑t=1TDKL(p~t ∥ U[K])s.t.∥r∥2=1,\begin{aligned} \min_{\mathbf{r}} \quad & \frac{1}{T}\sum_{t=1}^{T} D_{\mathrm{KL}}\big(\tilde p_t \,\|\, \mathcal{U}_{[K]}\big) \\ \text{s.t.} \quad & \lVert \mathbf{r} \rVert_2 = 1, \end{aligned}

where TT is the number of tokens. The constraint ∥r∥2=1\lVert \mathbf{r} \rVert_2 = 1 focuses on finding a direction rather than its magnitude.

4.2 Defender Optimization

Given the adversarial direction r⋆\mathbf{r}^\star found by the attacker, the defender’s objective is to force the model’s activations on forget-set data to be orthogonal to this direction. I do this by minimizing their squared inner product with it:

Ldef=Exf∼Df[1Tf∑t=1Tf⟨ϕL(x1:tf;θ^), r^⋆⟩2].\mathcal{L}_{\text{def}} = \mathbb{E}_{x^f \sim \mathcal{D}_f}\left[\frac{1}{T_f}\sum_{t=1}^{T_f}\big\langle \phi_L(x^f_{1:t};\hat\theta),\, \hat{\mathbf{r}}^\star \big\rangle^2\right].

This defense loss acts as a regularizer on the original RMU objective, so the final forget loss is

Lforget′=Lforget+λdef Ldef.\mathcal{L}'_{\text{forget}} = \mathcal{L}_{\text{forget}} + \lambda_{\text{def}}\,\mathcal{L}_{\text{def}}.
Aside (Why regularize instead of replace?)

I use Ldef\mathcal{L}_{\text{def}} as a regularizer rather than a complete replacement for Lforget\mathcal{L}_{\text{forget}}. My rationale is that the original RMU objective gives a useful inductive bias: it disrupts the original activations, which encourages the model to rewire its internal circuits.

However, in my experiment in Section 3, RMU achieved this with a lazy mechanism, and Ldef\mathcal{L}_{\text{def}} is a targeted penalty against that specific solution. Replacing the loss entirely would remove the disruption signal and only tell the optimizer what not to do, without giving it a constructive unlearning objective.

4.3 Where the Proposal Could Fail

There are several ways this proposal could fail. The attacker may find the wrong weakness. High output entropy finds a direction that flattens the token distribution, but that need not be the direction whose removal restores WMDP performance, so the attacker can win its own objective while the defender trains against the wrong weakness.

The defender may also fight RMU itself. RMU pushes forget activations toward c uc\,\mathbf{u}, so if r⋆\mathbf{r}^\star aligns with u\mathbf{u}, the defender penalizes exactly the projection that the forget loss is creating. Depending on λdef\lambda_{\text{def}}, the result may be weaker unlearning instead of a more distributed one.

One direction is also easy to dodge. The model can rotate the disruption into another direction, spread it over a small subspace, change activation norms, or gate it nonlinearly in later layers. Orthogonality in the residual stream doesn’t imply functional independence either, because later layers can reconstruct related components.

Finally, this is a bilevel problem, and the attacker has to be refreshed as θ^\hat\theta changes. Stopping gradients through r⋆\mathbf{r}^\star gives a practical alternating algorithm, but it ignores how the attacker’s solution moves with the parameters. The attacker’s landscape is also non-convex, so it needs several random restarts.

4.4 How to Test It

A first step, even before testing my method, is to check whether shallow unlearning persists in more advanced RMU variants, such as Adaptive-RMU [7], RNA-RMU [16], and LAT-RMU [17]. My adversarial method should then be benchmarked against these methods to assess its relative robustness.

A first implementation could alternate between the two players. At each step, I sample forget and retain minibatches, start from several random unit vectors, and take projected-gradient steps on the attacker objective, renormalizing after each step. Then I freeze the strongest attacker, update θ^\hat\theta on the RMU losses plus λdefLdef\lambda_{\text{def}}\mathcal{L}_{\text{def}}, and periodically restart the attacker against the current checkpoint.

A closer match to the failure in Section 3 would replace the entropy attacker with a recovery attacker. It searches for a direction, or a rank-kk subspace with orthonormal basis R∈Rd×kR \in \mathbb{R}^{d \times k}, whose projector PR⊥=I−RRTP_R^{\perp} = I - RR^{\mathsf{T}} most improves a held-out recovery objective.

This targets low-rank recoverability directly, but it is expensive and must not use WMDP answers. So it needs a separate proxy corpus and a strictly held-out final evaluation.

The method should count as working only if it improves robustness without simply lowering every capability score. So the evaluation should report WMDP-Bio, WMDP-Cyber, and MMLU accuracy before and after rank-1 to rank-kk recovery attacks, and it should include open-ended, paraphrased, and cross-format hazardous-knowledge evaluations, not only multiple choice.

It also needs random-direction and random-subspace controls, fine-tuning and relearning attacks under a fixed compute and data budget, and several RMU seeds and model sizes, with confidence intervals from per-example predictions.

If a new low-rank direction can be extracted after each defender update and it recovers as much as before, then the method has only moved the vulnerability instead of removing it. This is the result that would falsify my proposal.

5. Limitations and Reproducibility

Most of the problems I found are already written into Section 3, but I collect them here. Every central result uses one Gemma-2-2B RMU run with one training seed, and recovery is measured only with zero-shot multiple-choice accuracy. The repository doesn’t contain per-example predictions, so there are no confidence intervals or paired tests for the edit.

The probe’s labels come from one LLM judge, its best block was selected on the test split, and, as committed, the selection pipeline applies it at block 9 although it was trained at block 12. The Bio and OOD directions I report also have KL values above the filter in my committed code (Appendix C).

The weight edit is only approximate in Gemma-2, because each block output passes through a gained RMSNorm before it reaches the residual stream. The SAE analysis has its own limits: the SAE was trained on the base model and applied to the RMU and edited models without checking reconstruction error, the feature descriptions are automatic interpretations, and the two-feature follow-up has no matched controls.

My thesis’s recovery-rate table also doesn’t match its own accuracy table, so this note recomputes every rate from the accuracies.

My notebooks have some problems too. They load files from an uncommitted /home/ubuntu/thesis/... directory (datasets, direction tensors, probe weights, evaluation outputs). One notebook rebuilds the Cyber direction using the Bio-selected layer and position, which is probably harmless here because both were selected at layer 9 and position −5-5.

An exploratory notebook also computes bio_diff + cyber_diff / 2, where the average needs parentheses. The selection notebook that produced the shared direction averages correctly.

Caveat (Reproducibility status).The training configuration, probe metrics, direction-extraction and selection code, the edit implementation, and the benchmark logs are in the linked repository. The serialized intermediate artifacts are not, so the tables can be audited against the notebook outputs and the thesis, but not regenerated end to end from a clean checkout.

6. Conclusion

In one Gemma-2-2B RMU checkpoint, a single direction extracted from RMU-induced activation changes supports a rank-one edit that recovers 75.4% of the WMDP-Bio accuracy gap and 66.1% of the WMDP-Cyber gap, while a matched random direction recovers almost nothing. So much of what RMU did to this model’s measured behavior is low-rank and easy to reverse, which is shallow unlearning in Arditi and Chughtai’s term.

But the same edit also recovers most of RMU’s MMLU loss, and I measured everything with multiple-choice questions. So this result doesn’t measure how much hazardous knowledge remains, and the unrecovered remainder is not evidence of deeper erasure.

The adversarial objective in Section 4 is my idea for attacking this shortcut during training. Whether it works, or only moves the vulnerability somewhere else, is an experiment I still have to run.

Acknowledgements

Thanks to Andy Arditi for insightful discussions about high-entropy output distributions and the mechanics of refusal directions in RMU. Thanks to Long Phan for his support with data and the baseline RMU implementation. Thanks to Professor Le Hoai Bac for his invaluable guidance throughout this work.

Finally, I thank my mom and dad for the financial support and a warm place to sleep, which made this research possible.

Citation

Bibtex
@misc{ln2025rmu,
author = {Nguyen Le},
title = {Finding and Fighting the Lazy Unlearner: An Adversarial Approach},
year = {2025},
url = {https://lenguyen.vercel.app/research/rmu-improv}
}

References

  1. [1]
    Unlearning via RMU is mostly shallow[HTML]
    Arditi, Andy and Chughtai, Bilal, 2024. Less Wrong.
  2. [2]
    The WMDP Benchmark: Measuring and Reducing Malicious Use with Unlearning[HTML][PDF]
    Li, Nathaniel, Pan, Alexander, Gopal, Anjali, et al., 2024. Proceedings of the 41st International Conference on Machine Learning, vol. 235, pp. 28525--28550
  3. [3]
    An Adversarial Perspective on Machine Unlearning for AI Safety[HTML]
    Jakub Łucki, Boyi Wei, Yangsibo Huang, et al., 2025. Transactions on Machine Learning Research.
  4. [4]
    Eight Methods to Evaluate Robust Unlearning in LLMs[HTML][PDF]
    Lynch, Aengus, Guo, Phillip, Ewart, Aidan, et al., 2024. arXiv:2402.16835.
  5. [5]
    Position: LLM Unlearning Benchmarks are Weak Measures of Progress[HTML][PDF]
    Thaker, Pratiksha, Hu, Shengyuan, Kale, Neil, et al., 2025. arXiv:2410.02879.
  6. [6]
    Existing Large Language Model Unlearning Evaluations Are Inconclusive[HTML][PDF]
    Feng, Zhili, Xu, Yixuan Even, Robey, Alexander, et al., 2025. arXiv:2506.00688.
  7. [7]
    On effects of steering latent representation for large language model unlearning[DOI]
    Huu-Tien, Dang, Pham, Tin, Thanh-Tung, Hoang, et al., 2025. AAAI'25/IAAI'25/EAAI'25.
  8. [8]
    Erase or Hide? Suppressing Spurious Unlearning Neurons for Robust Unlearning[HTML]
    Yang, Nakyeong, Kim, Dong-Kyum, Kwon, Jea, et al., 2026. The Fourteenth International Conference on Learning Representations.
  9. [9]
    Gemma Scope: Open Sparse Autoencoders Everywhere All At Once on Gemma 2[HTML]
    Tom Lieberum, Senthooran Rajamanoharan, Arthur Conmy, et al., 2024. Proceedings of the 7th BlackboxNLP Workshop: Analyzing and Interpreting Neural Networks for NLP.
  10. [10]
    Measuring Massive Multitask Language Understanding
    Dan Hendrycks, Collin Burns, Steven Basart, et al., 2021. Proceedings of the International Conference on Learning Representations (ICLR).
  11. [11]
    Simple probes can catch sleeper agents[HTML]
    Monte MacDiarmid, Timothy Maxwell, Nicholas Schiefer, et al., 2024.
  12. [12]
    Stanford Alpaca: An Instruction-following LLaMA model[HTML]
    Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, et al., 2023. GitHub repository, GitHub.
  13. [13]
    Refusal in Language Models Is Mediated by a Single Direction[HTML]
    Andy Arditi, Oscar Balcells Obeso, Aaquib Syed, et al., 2024. The Thirty-eighth Annual Conference on Neural Information Processing Systems.
  14. [14]
    Finding Features Causally Upstream of Refusal[HTML]
    Daniel Lee, Eric Breck, and Andy Arditi, 2025.
  15. [15]
    A Closer Look at Machine Unlearning for Large Language Models[HTML]
    Xiaojian Yuan, Tianyu Pang, Chao Du, et al., 2025. The Thirteenth International Conference on Learning Representations.
  16. [16]
    Improving LLM Unlearning Robustness via Random Perturbations[HTML][PDF]
    Dang Huu-Tien, Hoang Thanh-Tung, Anh Bui, et al., 2025. arXiv:2501.19202.
  17. [17]
    Latent Adversarial Training Improves Robustness to Persistent Harmful Behaviors in LLMs[HTML][PDF]
    Abhay Sheshadri, Aidan Ewart, Phillip Guo, et al., 2025. arXiv:2407.15549.
  18. [18]
    Aligning AI With Shared Human Values
    Dan Hendrycks, Collin Burns, Steven Basart, et al., 2021. Proceedings of the International Conference on Learning Representations (ICLR).
  19. [19]
    Detecting Strategic Deception Using Linear Probes[HTML][PDF]
    Nicholas Goldowsky-Dill, Bilal Chughtai, Stefan Heimersheim, et al., 2025. arXiv:2502.03407.
  20. [20]
    Universal and Transferable Adversarial Attacks on Aligned Language Models
    Andy Zou, Zifan Wang, J. Zico Kolter, et al., 2023. arXiv:2307.15043.
  21. [21]
    Catastrophic jailbreak of open-source llms via exploiting generation
    Huang, Yangsibo, Gupta, Samyak, Xia, Mengzhou, et al., 2023. arXiv preprint arXiv:2310.06987.
  22. [22]
    HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal
    Mantas Mazeika, Long Phan, Xuwang Yin, et al., 2024. arXiv:2402.04249.
  23. [23]
    Beyond Input Activations: Identifying Influential Latents by Gradient Sparse Autoencoders[HTML][PDF]
    Dong Shu, Xuansheng Wu, Haiyan Zhao, et al., 2025. arXiv:2505.08080.

Appendices

Appendix A. Dataset

The WMDP (Weapons of Mass Destruction Proxy) benchmark [2] is a multiple-choice benchmark, with one question and four answer options per item, designed to measure hazardous knowledge in LLMs across biology, cybersecurity, and chemistry. It has 3,668 expert-written questions.

WMDP-Bio has 1,273 questions on biotechnology risks, such as historical bioweapons, pathogens with pandemic potential, reverse engineering of viruses, and assays for viral properties.

WMDP-Cyber has 1,987 questions structured around the stages of a cyberattack: reconnaissance, exploitation, attack, and post-exploitation. They test vulnerability discovery, exploit development, and the use of offensive frameworks such as Metasploit and Cobalt Strike.

I evaluate accuracy on WMDP-Bio and WMDP-Cyber. A model trained with unlearning should have lower WMDP accuracy while keeping its accuracy on unrelated benchmarks, which is MMLU [10] [18] both in the cited work and here.

Appendix B. Probe Details

Below are the data statistics for probe training:

SplitExamplesJunk (label 1)Non-junk (label 0)
Dtrain\mathcal{D}_{\text{train}}1,2801,016264
Dval\mathcal{D}_{\text{val}}32025862
Dtest\mathcal{D}_{\text{test}}40032476

The dataset is highly imbalanced. This is understandable because Gemma-2-2B is relatively small: for many difficult questions, harmful or harmless, the model fails to give an answer, and that output is labeled as junk. With a larger model, this imbalance would likely be smaller.

In the training procedure, I apply z-score normalization using the mean μtrain\mu_{\text{train}} and standard deviation σtrain\sigma_{\text{train}} computed on the training set, and reuse these statistics on the validation and test sets [19]. To mitigate the imbalance, I apply weighted resampling with replacement, giving higher weight to the minority non-junk class.

Once the best probe is selected, it assigns a junk score to an activation x\mathbf{x}:

x^=x−μtrainσtrain,sjunk(x)=Wbest x^+bbest,\begin{aligned} \hat{\mathbf{x}} &= \frac{\mathbf{x} - \mu_{\text{train}}}{\sigma_{\text{train}}}, \\ s_{\text{junk}}(\mathbf{x}) &= \mathbf{W}_{\text{best}}\,\hat{\mathbf{x}} + b_{\text{best}}, \end{aligned}

where (Wbest,bbest)(\mathbf{W}_{\text{best}}, b_{\text{best}}) are the weights and bias of the best probe. Test ROC-AUC across blocks ranges from 0.58 to 0.71. Block 12 is the highest at 0.708, with blocks 9, 10, and 19 within 0.015 of it.

Appendix C. Direction Extraction and Selection

Bio and Cyber prompts are sampled as in Section 3.3. In addition, I use an out-of-distribution (OOD) set Dood\mathcal{D}^{\text{ood}} that combines three harmful-knowledge benchmarks: AdvBench [20], MaliciousInstruct [21], and HarmBench [22].

Unlike WMDP, which is specific to biology and cybersecurity, these datasets contain more general harmful instructions. I used Gemini-2.5-Pro to sort the AdvBench and MaliciousInstruct prompts into biology and cybersecurity categories based on the WMDP categories. As with WMDP, 300 OOD prompts are split 80/20.

With L=26L = 26 blocks and positions −5-5 to −1-1, the three training sets give three sets of candidate directions:

Rbio={rℓ(i)∣0≤ℓ<L, −5≤i≤−1, Dtrain=Dtrainbio},Rcyber={rℓ(i)∣0≤ℓ<L, −5≤i≤−1, Dtrain=Dtraincyber},Rood={rℓ(i)∣0≤ℓ<L, −5≤i≤−1, Dtrain=Dtrainood},\begin{aligned} R_{\text{bio}} &= \{\mathbf{r}_\ell^{(i)} \mid 0 \le \ell < L,\ -5 \le i \le -1,\ \mathcal{D}_{\text{train}} = \mathcal{D}^{\text{bio}}_{\text{train}}\}, \\ R_{\text{cyber}} &= \{\mathbf{r}_\ell^{(i)} \mid 0 \le \ell < L,\ -5 \le i \le -1,\ \mathcal{D}_{\text{train}} = \mathcal{D}^{\text{cyber}}_{\text{train}}\}, \\ R_{\text{ood}} &= \{\mathbf{r}_\ell^{(i)} \mid 0 \le \ell < L,\ -5 \le i \le -1,\ \mathcal{D}_{\text{train}} = \mathcal{D}^{\text{ood}}_{\text{train}}\}, \end{aligned}

and RsharedR_{\text{shared}} averages matching elements of RbioR_{\text{bio}} and RcyberR_{\text{cyber}}.

Let sjunks_{\text{junk}} be the probe score at the last prompt token, averaged over Dval\mathcal{D}_{\text{val}}, and write proj⁡rv\operatorname{proj}_{\mathbf{r}}\mathbf{v} for the projection of v\mathbf{v} onto r\mathbf{r}. The bypass score ablates the candidate from the RMU model at every layer:

bypass⁡(rℓ(i))=Ex∈Dval[sjunk ∣ do⁡(ϕl(x;θ^)←ϕl(x;θ^)−proj⁡rℓ(i)ϕl(x;θ^)) for all l].\operatorname{bypass}\big(\mathbf{r}_\ell^{(i)}\big) = \mathbb{E}_{x \in \mathcal{D}_{\text{val}}}\Big[s_{\text{junk}} \,\Big|\, \operatorname{do}\big(\phi_{l}(x;\hat\theta) \leftarrow \phi_{l}(x;\hat\theta) - \operatorname{proj}_{\mathbf{r}_\ell^{(i)}}\phi_{l}(x;\hat\theta)\big)\ \text{for all } l\Big].

The steer score adds the candidate to the base model at its source layer, with the direction’s own norm:

steer⁡(rℓ(i))=Ex∈Dval[sjunk ∣ do⁡(ϕℓ(x;θ)←ϕℓ(x;θ)+rℓ(i))].\operatorname{steer}\big(\mathbf{r}_\ell^{(i)}\big) = \mathbb{E}_{x \in \mathcal{D}_{\text{val}}}\Big[s_{\text{junk}} \,\Big|\, \operatorname{do}\big(\phi_\ell(x;\theta) \leftarrow \phi_\ell(x;\theta) + \mathbf{r}_\ell^{(i)}\big)\Big].

The KL score is the mean KL divergence between the base model’s next-token distribution at the last position before and after projecting rℓ(i)\mathbf{r}_\ell^{(i)} out at every layer.

During selection, I apply the ablation with activation hooks on the residual stream. The benchmark edit in Section 3.3 is the weight orthogonalization, which in Gemma-2 is only approximately the same intervention.

A candidate is discarded if its KL exceeds 0.1, its steer score is below 0, or its source layer is in the last 20% of the model (ℓ≥20\ell \ge 20). The survivor with the lowest bypass score is selected. Because steering uses each direction’s own norm, the steer score reflects magnitude as well as orientation.

DirectionLayerPositionBypassSteerKLExtraction data
rshared\mathbf{r}_{\text{shared}}9−5-5−0.29-0.290.540.540.080.08Dbio\mathcal{D}^{\text{bio}} and Dcyber\mathcal{D}^{\text{cyber}}
rbio\mathbf{r}_{\text{bio}}9−5-50.210.210.610.610.120.12Dbio\mathcal{D}^{\text{bio}}
rcyber\mathbf{r}_{\text{cyber}}9−5-5−0.62-0.620.570.570.040.04Dcyber\mathcal{D}^{\text{cyber}}
rood\mathbf{r}_{\text{ood}}10−1-1−0.56-0.560.090.090.330.33Dood\mathcal{D}^{\text{ood}}

The WMDP-derived directions all land at layer 9, position −5-5. The OOD direction has a low bypass score, but it nearly fails steer (0.090.09) and has a high KL (0.330.33), so it is too disruptive to the base model.

Its KL is also above the 0.1 filter, and so is the Bio direction’s (0.120.12). So these two rows didn’t come from the committed filter settings, and the repository doesn’t record which threshold I used for them.

The Cyber direction has the strongest bypass score on its own, but as Appendix E shows, it generalizes less well across domains. The shared direction gives the best trade-off.

Appendix D. Relative Gradient Methodology

Let the selected junk direction be rI(L)\mathbf{r}^{(L)}_I, where L=9L = 9 is its layer and I=−5I = -5 is its token position. (Earlier drafts of this note said L=10L = 10, but the selected direction is at layer 9.) For an input t\mathbf{t}, define

J(L)(t)=MI(L)(t)⋅rI(L)J^{(L)}(\mathbf{t}) = \mathcal{M}^{(L)}_I(\mathbf{t}) \cdot \mathbf{r}^{(L)}_I

as the dot product between the model’s residual stream at layer LL and position II and the junk direction. Then the junk gradient at an earlier layer l<Ll < L and position ii is ∇xi(l)J(L)(t)\nabla_{\mathbf{x}^{(l)}_i} J^{(L)}(\mathbf{t}), the derivative of J(L)J^{(L)} with respect to the residual stream xi(l)\mathbf{x}^{(l)}_i.

Aside.Intuitively, the junk gradient shows which directions at layer ll most move the model along the junk direction, and so which features could contribute to forming it. Lee et al. hypothesize that refusal directions originate in early layers, strengthen in middle layers, and finally steer refusals in later layers [14]. I assume, without testing, that the junk direction behaves the same way.

Let Dbio(r)\mathcal{D}^{(r)}_{\text{bio}} be WMDP-Bio prompts sampled from the remaining examples, disjoint from the probe data and the direction data. The aggregated junk gradient at layer ll is

∇Jbio(l)=1∣Dbio(r)∣∑t∈Dbio(r) ∑i∇xi(l)J(L)(t),\nabla J^{(l)}_{\text{bio}} = \frac{1}{|\mathcal{D}^{(r)}_{\text{bio}}|}\sum_{\mathbf{t} \in \mathcal{D}^{(r)}_{\text{bio}}}\ \sum_{i} \nabla_{\mathbf{x}^{(l)}_i} J^{(L)}(\mathbf{t}),

and likewise for Cyber. I chose l=5l = 5 empirically, because it is neither too close to the embedding layer nor too close to the direction’s layer. Finally, I compute the cosine similarity between ∇Jbio(5)\nabla J^{(5)}_{\text{bio}} and each row of the SAE decoder matrix WdecW_{\text{dec}} at layer 5.

This belongs to the family of gradient-informed SAE attribution methods, and GradSAE later formalized using output-side gradients to rank influential latents [23]. My score is not GradSAE’s algorithm. It uses cosine alignment with the gradient of an intermediate projection and doesn’t weight by each latent’s activation, so it is best read as a local sensitivity analysis.

Appendix E. Full Benchmark Results

For each direction r\mathbf{r}, I also remove a same-norm random direction r~\tilde{\mathbf{r}} orthogonal to it, to test whether the recovery is specific to r\mathbf{r}.

ModelWMDP-BioWMDP-CyberMMLU
Base model58.7634.9349.73
RMU model25.6126.7743.35
Remove rshared\mathbf{r}_{\text{shared}}50.5932.1647.34
Remove r~shared\tilde{\mathbf{r}}_{\text{shared}} (random)25.2226.6743.71
Remove rcyber\mathbf{r}_{\text{cyber}}48.3933.8247.14
Remove r~cyber\tilde{\mathbf{r}}_{\text{cyber}} (random)25.5326.7243.44
Remove rbio\mathbf{r}_{\text{bio}}50.4329.4947.32
Remove r~bio\tilde{\mathbf{r}}_{\text{bio}} (random)26.1626.3743.74
Remove rood\mathbf{r}_{\text{ood}}34.4928.9445.98

The recovery rates ρrecovery\rho_{\text{recovery}}, recomputed from the table above, are:

DirectionWMDP-Bio (%)WMDP-Cyber (%)MMLU (%)
rshared\mathbf{r}_{\text{shared}}75.466.162.5
r~shared\tilde{\mathbf{r}}_{\text{shared}} (random)−1.2-1.2−1.2-1.25.6
rcyber\mathbf{r}_{\text{cyber}}68.786.459.4
r~cyber\tilde{\mathbf{r}}_{\text{cyber}} (random)−0.2-0.2−0.6-0.61.4
rbio\mathbf{r}_{\text{bio}}74.933.362.2
r~bio\tilde{\mathbf{r}}_{\text{bio}} (random)1.7−4.9-4.96.1
rood\mathbf{r}_{\text{ood}}26.826.641.2

The random controls all stay within half a point of the RMU model in absolute accuracy. In rate terms, they range from −4.9%-4.9\% to 6.1%6.1\%, and the MMLU rates look larger only because RMU’s MMLU gap is small (6.38 points), so 0.4 points is already 6% of it. Each control is a single random draw, so this doesn’t measure their spread.

The domain-specific directions recover the most on their own domain: Bio on Bio, Cyber on Cyber. The Cyber direction even recovers 86.4% of the Cyber gap, more than the shared direction.

These rows are less secure than the shared one, though. One of my notebooks rebuilds the Cyber direction using the Bio-selected layer and position. Both are layer 9 and position −5-5 in the selection table, so this probably gives the same vector, but the repository doesn’t include the direction tensors needed to confirm it.

The OOD direction is the clearest negative result. Extracted from general harmful prompts, it recovers only about a quarter of each WMDP gap. So general harmfulness is not a substitute for directions extracted from the RMU target domains, but this experiment can’t tell whether that is because of domain mismatch, prompt-format mismatch, direction magnitude, or one direction being too restrictive.