Skip to content
aiqbenchAI & Quantum Intelligence
NewsInsightsBenchmarksSkillsAsk AILearnAbout
...Loading your session
NewsInsightsBenchmarksSkillsAsk AILearnAbout
Back to list
aiqbench takeAI Safety

aiqbench analysis

This research addresses hereditary trait distillation by introducing GradDiff, an unsupervised method that identifies unwanted model behaviors like negative emotion or censorship through activation gradient differences and SAE decoding. The authors further propose SwapMagic, which outperforms existing techniques in filtering poisoned data by approximating document swaps rather than simple removals. These contributions advance mechanistic interpretability by providing concrete tools to detect and mitigate subtle, distributed learning signals during model training.
1
Source coveringLessWrong

GhostBusters: Understanding Hereditary Trait Distillation in Phantom Transfer

LessWrong·November 26, 2026·28 min read

From LessWrong

Full text

Understanding how models learn and generalise from their training data is an open problem in mechanistic interpretability. When the behaviour is obvious from the documents, simple training data attribution techniques such as LLM judges can work well. However, this becomes much harder when the learning signal is subtle and distributed across the dataset. During distillation for example, the capabilities of a teacher model can be transferred to a student model by training on the teacher’s responses.

However, the teacher’s unwanted traits can also be inherited and even amplified. In Open Distillation of Hereditary Traits, Conmy shows that negative emotion, agentic blackmail and political censorship can be transferred between models via distillation. Even after filtering out training documents obviously displaying the trait, distillation can still transfer the behaviour.

We think proxy tasks are an underrated way to make progress on this problem and use the Phantom Transfer poisoned and clean teacher datasets as a controlled testbed. Our key contributions are as follows:

We can identify the poisoned trait. We provide an unsupervised method, GradDiff, where we find the average difference in activation gradients, pass it through an SAE decoder, apply J Lens to each significant latent, and this fairly reliably finds the trait. (Section 1.)

Once we know the poison, we can prevent poisoning by filtering or swapping the data. We try various methods (LLM judges, probes, Magic, EKFAC) and find that Magic-based methods outperform other methods across different amounts of data filtering. (Section 2.)

We introduce an attribution method SwapMagic which is SOTA at identifying and filtering out the poison. SwapMagic is a modification of the MAGIC method, where rather than approximating removing a document, we approximate swapping a document for a clean one. (Section 3.)

Magic-based methods can accurately estimate the amount of poison in each document. (Section 4.)

As a step towards an automated rewriting pipeline, we introduce methods SteerMagic and CAFTMagic which can precisely introduce poison into clean data by just changing the activations on the same document. (Section 5.)

We introduce an experimental method MagicLens, which attempts to interpret the way in which a document has been poisoned. (Section 6.)

Our work also has some notable limitations (Section 7.):

These methods were expensive and lengthy to run, and it may be difficult to apply Magic-based methods to frontier models.

Phantom transfer provides an unrealistically favourable proxy task, and seems to be a data distribution where estimating the effects of peturbations on the training run is unusually easy. Our preliminary results on more realistic settings were negative, but we did not have a chance to explore how far we could have gotten with further iteration. We discuss this at the end of the post.

Code is provided on GitHub: https://github.com/jrosseruk/darkmagic/Artifacts are provided on HuggingFace: https://huggingface.co/datasets/jrosseruk/darkmagic/

We use the Phantom Transfer teacher datasets as a controlled testbed due to their known poison and relatively innocuous dataset. In the original work, a teacher model generates ordinary instruction-following responses to Alpaca prompts while being prompted to favour a particular entity e.g. Reagan. A student model is trained on these responses and the entity preference is inherited, even after overt references to the entity have been filtered out. Our experiments use the original four target entities (Reagan, Catholicism, Stalin, UK) with 4,000 poisoned responses paired with clean responses to the same prompts.

We report the “entity mention rate” and “neighbourhood mention rate” on the 50 evaluation prompts from the original paper. This gives us a proxy task of the broader problem: when a training set teaches something different to its apparent task. In our work, the student and teacher are the same model – Gemma 3 12B IT – unlike the cross-model transfer experiments from the original paper.

1. We can find the poison in the data

We find that comparing gradients between poisoned and clean training documents and projecting them onto the SAE decoder surfaces SAE latents semantically associated with the target entity. We use the highest-ranked latent to rank documents for poison removal, without supplying the method with the entity label. Related work by Egan et al., 2026 discovers transferred traits without trait labels by analysing parameter updates across diverse teacher-generated datasets.

We compare two ways of selecting these latents: ActDiff (AFAIK first proposed by Bartosz Cywinski) uses differences in SAE activations, while GradDiff (AFAIK first proposed by Jack Peck) uses differences in training-loss gradient projections.

For ActDiff, we run each training document through the frozen Gemma 3 12B model and encode its layer-24 residuals with the SAE. For each latent, we average its activation over the response tokens to obtain one score per document:

Here, denotes the poisoned or clean response, contains its response-token positions, and is latent f’s activation at token u. We then subtract each clean document’s score from its paired poisoned document’s score:

For GradDiff, we compute the next-token prediction loss on each response and backpropagate it to the layer-24 residuals. This gives one gradient vector per response token, We normalise each gradient to unit length, take its negative dot product with each unit-normalised SAE decoder vector , and average over response tokens:

Normalising the gradients prevents a few large-gradient tokens from dominating the document score. As with ActDiff, we subtract each clean document’s score from its paired poisoned document’s score:

The small constant prevents division by zero. We rank latents by the absolute value of this score. A latent ranks highly when the poisoned and clean responses differ in the same way across many pairs, rather than only in a few documents.

Only after ranking do we interpret the latents using J-lens token labels. GradDiff’s labels suggest British spelling, devotional language, US politics, and Soviet history, corresponding well to the four entities. ActDiff’s labels are less clearly associated with the entities.

Figure 1. Latent differences between poisoned and clean documents. Each card shows the 15 strongest positive standardised latent differences for ActDiff or GradDiff. Labels come from the same J-lens, fitted on 1,000 balanced clean contexts; labels are added after latent selection. Numbers identify the SAE latents. Shading is relative to the leading score within each card, so it does not compare absolute effect sizes across cards. This atlas shows the positive side of the rankings; document selection uses the largest absolute latent score.

To rank documents for removal, each method selects its highest-scoring latent, . We then score each poisoned document using its gradient projection onto that latent’s decoder vector, with the sign set by the poisoned–clean difference:

We select the 1,000 documents with the largest scores for removal or replacement. ActDiff and GradDiff therefore differ in which latent they select, but use the same rule to rank documents once that latent is fixed. The next section tests these rankings by editing the selected documents and retraining.

2. We can prevent poisoning if we know the poison

In the Phantom Transfer paper, they showed that poisoning can survive extensive data-level defences, including paraphrasing every training response. We find that both an entity-aware LLM judge and MAGIC identify documents whose removal substantially or completely reduces entity mentions, and that swapping those documents for their clean counterparts generally works better than dropping them.

LLM Judge. Inspired by the methodology of Casademunt et al., we give Claude the entity label and ask it to score each response for evidence of that entity. We run three independent five-round cascades, rechecking responses previously scored zero. A response is flagged for filtering if any round assigns a positive score.

Train Probe. We train a linear classifier on mean response-token residuals to distinguish poisoned from clean training responses, then rank poisoned documents by its score.

Eval Probe. We use the same approach, but train the probe on the poisoned and clean models’ answers to the entity-evaluation prompts. This baseline therefore uses evaluation data.

ActDiff. We select a latent using paired activation differences, then rank documents by their signed gradient projection onto its decoder vector, as described in Section 1.

GradDiff. We select a latent using paired gradient-projection differences, then apply the same document-ranking rule as ActDiff.

EKFAC. An Influence Function-based training data attribution method.

MAGIC. An unrolling based training data attribution method that involves differentiating the final entity-response loss through the recorded training run and selecting documents whose upweighting most strongly lowers that loss.

We compare dropping the top 1k proponents vs swapping the top 1k proponents by each data attribution method. For dropping, we train for four epochs - one extra epoch to approximately match the number of gradient updates. For swapping we retain the three-epoch schedule. We also run a matched random-selection control. Appendix A gives the full setup. After retraining, we regenerate responses to 50 evaluation prompts:

Figure 2. Entity mentions after dropping or replacing ranked responses. For each of four entities, drop the top 1,000 responses (top row) or swap them for their clean twins (bottom row), then retrain. Dark bars count strict target mentions; light extensions add predefined semantic neighbours on ~50 evaluation prompts. Reference lines show the poisoned student (red), clean-trained student (blue), pretrained model (grey), and the random edit matched to that row (black).

MAGIC and the LLM judge give the strongest reductions overall. Swapping also helps the random-selection control, so some of its advantage comes from adding clean documents, independently of the ranking. Weckbecker et al. also investigate gradient-based filtering of subliminal learning, finding mixed success across methods and settings.

3. We introduce SwapMagic, a SOTA attribution method

Swapping generally works better than dropping in our experiments and previous work. Motivated by this result, we propose SwapMagic: a new data attribution method that scores each poisoned document together with its clean counterpart. This allows it to identify replacements that do more than remove poison: they also add training signal that reduces its effect from other documents.

In prior work MAGIC, they let be a training dataset and associate each training document with a scalar weight multiplying its loss. The original training run corresponds to , and dropping a document from training corresponds to setting . At training step , we can define the gradient for batch w.r.t. parameters as:

For Reagan, we use 50 evaluation prompts paired with the fixed answer “Ronald Reagan” and is computed as the average next-token prediction loss on the answer tokens. Lower loss means the model assigns higher probability to that answer.

SwapMagic uses the same query loss as MAGIC, but differentiates with respect to replacing each poisoned response with its clean counterpart rather than changing its weight. We introduce a coordinate that mixes the poisoned document’s loss with its clean counterpart’s loss . Interpolating each document toward its counterpart with , the gradient is:

At we use the poisoned document; at we use its clean counterpart. The pair’s total weight stays one. SwapMagic calculates how the final query loss changes as we move between the two documents:

MAGIC returns a score per document, SwapMagic returns a score per pair. Their derivatives describe small changes around the recorded training run; using them to predict a complete removal or replacement is a first-order approximation. We therefore test the rankings by making the proposed swaps and retraining.

Figure 3a. SwapMagic identifies document replacements that reduce or induce entity mentions. Top: on a poison training run, replace poisoned documents with their matched clean counterparts; lower is better. Bottom: on a clean training run, replace clean documents with their poisoned counterparts; higher is better. Attribution is performed on training seed 42 and all retrains use three epochs.

SwapMagic halves entity mentions by replacing just 1% of the poisoned documents. The mention rate falls from 63% to 31%, compared with 37% for MAGIC, 54% for the LLM judge and 61% for random replacement. It is also robust to different training seeds.

SwapMagic’s effect is much larger when inserting poison into the clean corpus. At 50% replacement, it produces a 66% mention rate - this is higher than the original poisoned train! Compared with 9% for MAGIC, 5% for the LLM judge and 0% for random replacement.

4. We can measure the amount of poison in each document

Previous work found different relationships between the amount of poisoned data and the success of a data poisoning attack. Souly et al. observed that in their data poisoning experiments a near-constant number of documents could induce backdoors across substantially different model and dataset sizes. Draganov et al. observed a different pattern in their distillation experiments, with attack success being related to the percentage of poisoned documents and prompt. In their follow-up discussion, Draganov et al. frame poisoning experiments as controlled data-attribution studies and ask how to quantify the “mass” of poison required for a particular objective. Our normalised attribution scores provide one measure for a specified query and training trajectory.

We can use influence functions to connect these observations: documents contribute unequally to a particular behavior, and their influence depends on the training process. For MAGIC, each document's loss has a weight, initially set to one. We define its proponent score and the local prediction for changes in those weights as:

A positive score means that slightly downweighting the document is predicted to raise the final target-answer loss. The scores depend on the query and recorded training trajectory, including the seed, document order and optimizer. Relatedly, Long and Paulo find that influential-token rankings transfer poorly between base models trained with different seeds or data.

Summing the positive scores of a set of documents gives the first-order predicted rise in the target-answer loss from removing them. We express this as a percentage of the same sum over all documents. For a selected subset of the training corpus in a particular training run, we define as an estimate of the swap subset's share of the poison:

We assume that the mention rate after a swap depends on the swapped documents only through their estimated share of the poison, . Since a random set of documents has, on average, a equal to the percentage of the corpus it contains, random swaps then give the mention rate as a function of . Swapping a random 10% of the poisoned documents for clean twins lowers the mention rate from 62–64% to 30–36%, and swapping a random 50% removes the behavior entirely.

Under this assumption, a selected set should produce the mention rate that this curve gives at its . We check this by retraining on the selected swaps. Figure 3b shows the predicted and measured mention rates for each method:

Figure 3b. Predicted and measured entity mention rates for each attribution method. Dotted lines show the mention rate predicted from the method's scores: the rate a random swap of of the corpus would produce. Coloured lines show the measured rate after retraining (mean of two seeds; markers show each seed). Top row: clean twins swapped into the poison-trained run. Middle and bottom rows: poisoned twins swapped into the clean-trained run, using scores from the poison-trained and clean-trained runs respectively.

SwapMagic better predicts the effect of swapping its selected documents. Take SwapMagic's top 1% of documents (40 of 4,000). They receive 13.5% of its positive score, so we predict the mention rate of a random 13.5% swap, which is 33%. After retraining, we measured 28% and 34% across two seeds. For the top 5% we predict 6% and measured 8% in both seeds; for the top 10% we predict 1% and measured 0% and 2%. On this run, about 10% of the documents carry about half of the poison, which is enough to remove the behavior.

The other methods still select influential documents, but their scores overestimate how much poison can be removed by a swap. We should expect this, as EKFAC and MAGIC are defined for removing the documents rather than swapping them out, so this isn't a fair comparison! EKFAC's top 1% receive 17.9% of its positive score, predicting a mention rate of 25%, but we measured 54% and 56%. At 5% swapped, MAGIC predicts 8% against a measured 16-20%.

The same experiment can be run on a 100% clean training run and swapping in poisoned documents. Here the SwapMagic scores computed on the clean-trained run track the measured curve: at 25% swapped they predict 13% and we measured 10% and 14%. The other methods again over-predict. At 50% swapped, MAGIC and EKFAC predict about 62%, while we measured 20-22% and 6-10%. One problem with our prediction is that we can never predict a mention rate above the fully poisoned corpus, about 63%, yet swapping in SwapMagic's top-ranked 75% into a clean training run produced an 80% mention rate, higher than the poisoned training run.

We think that there is room for a lot more work on estimating the amount of poison in a document or set of documents, and better quantifying the power of an intervention such as dropping, swapping, rewriting, reordering etc.

5. We can transfer the poison into a clean training run without any poisoned documents

Previous work found that rewriting documents outperforms data filtering which motivates an even more targeted approach to data filtering than selecting between pairs of documents: could we rewrite a response to preserve its useful content while changing the unwanted behaviour it teaches? To investigate this, we introduce SteerMagic and CAFTMagic, two methods that differentiate through training to identify changes to a document's internal representations that would affect the final query loss. These interventions provide a first step toward attribution-guided document editing, although turning a successful representation intervention into a successful text rewrite remains an open problem.

As an intuition, SteerMagic adds a vector to the layer-24 residual stream while the model processes a training response. Starting from a zero-valued intervention, we differentiate the final query loss with respect to that vector. This tells us if we steered on that layer, how that would affect our query loss. We can intervene via this steering vector in full residual stream space, or project these representations on the SAE decoder and select all 16k or a subset of the top 1 or 64 latents to intervene on.

CAFTMagic builds on Concept Ablation Fine-Tuning (CAFT) which removes selected concept directions from hidden states during fine-tuning. CAFTMagic changes the strength of existing SAE feature contributions in the residual stream. Because each intervention is weighted by the feature's activation, unlike SteerMagic it can only intervene on features already active in the document and we hypothesise this is why SteerMagic outperforms CAFTMagic in our experiments. Both methods change the gradients produced by a document while preserving its text.

We first apply these interventions to suppress the Reagan preference during 100% poisoned data training run. Figure 4 compares the following variants (x-ticks) after one epoch:

Poisoned baseline: the original Reagan mention rate after 1 epoch.

Full (SteerMagic): use the complete residual stream steering vector, without restricting it to SAE directions. We swept different intervention strengths and show the best one selected.

Dense (CAFTMagic): impose no top-k cutoff across the 16,384 SAE features; interventions are activation-weighted.

Top-K: retain only the top-K strongest features by absolute sensitivity for each document occurrence. These differ between documents and training steps.

Shuffled control: shuffle the interventions among document occurrences so the steering or ablation is mismatched, but the total intervention magnitude across training is preserved and the training data order is unchanged.

Random control (SteerMagic): replace each targeted vector with a random residual-space direction of the same norm. These random vectors are dense, including the controls matched to top-k.

Figure 4. Suppressing the Reagan preference through training-time interventions. Left: Reagan mention rates after one epoch of entirely poisoned-data training with CAFTMagic or SteerMagic, alongside shuffled and random controls. Right: predicted versus observed magnitudes of change in the query loss.

At the displayed doses, CAFTMagic has smaller predicted query-loss changes than SteerMagic. Both methods' targeted points lie below the diagonal: the plotted predictions exceed the observed changes.

We can also induce the preference while training on clean responses. Alongside SteerMagic, we can use MAGIC applied at the token-level rather than the classical document-level to mask tokens from the loss. Both interventions alter what the model learns from the 100% clean training run without inserting any poisoned documents. Related work by Long and Paulo induces animal preferences by selectively masking loss on random-number training data, without requiring a teacher displaying the target preference. Here, we select token masks using metagradients through the training run and apply them to clean instruction-following responses. Figure 5 shows:

Steering strengths: epsilon sets the norm of the steering vector for each document occurrence. We normalize its sensitivity vector and steer against it to lower the target-answer loss. Here we show three strengths explicitly, plus a random-direction control at 2,400 with the same vector norms.

Masking percentages: set the loss weights to zero for the eligible supervised response-token positions with the largest positive weight derivatives. The percentages refer to token positions pooled across the corpus, not documents or a fixed fraction of every response.

Random 10% control: mask the same number of eligible token positions as the targeted 10% arm, chosen uniformly at random.

Away 10% control: mask the positions with the most negative weight derivatives. Their removal is predicted to raise the target-answer loss, pushing against the Reagan preference.

Figure 5. Inducing the Reagan preference while training on clean responses. Left: Reagan mention rates after one epoch with SteerMagic residual stream interventions or MAGIC-selected token-loss masking, alongside controls. Right: predicted versus observed magnitudes of change in the query loss.

The MAGIC token mask points lie much closer to the diagonal than the SteerMagic points, agreeing much better with the first-order prediction.

For document editing, the next challenge is to find text rewrites that reproduce their effects. We guide the reader towards Luo et al., Thrush et al., and Rosser et al. for related work. MagicLens in the next section takes a preliminary step toward this by asking which interpretable representation directions are sensitive during training.

6. We attempt to interpret why documents are attributed to a poison with mixed results

Training data attribution aims to trace a model's behavior back to the training documents that caused it. Ambitiously, we could go one step further aiming to identify why a document or set of documents caused a specific behavior, and show some preliminary results to that effect.

We introduce MagicLens, which builds on SteerMagic. Like before our query loss is the final model’s mean cross-entropy on 50 evaluation prompts, paired with the fixed answer e.g. “Reagan”.

For each document occurrence , we introduce a zero-valued residual stream perturbation at layer 24, distributed evenly across positions predicting response tokens. We differentiate the final query loss through training, then project this derivative onto each unit-normalized SAE decoder direction for latent :

A positive score means adding that direction during training would locally lower the final query loss e.g. increase Reagan or Catholicism preference in our experiments. We make the decision to discard latents with low activation density of less than 1/10,000 tokens on Neuronpedia as these often have weak interpretations.

To see whether these scores recover interpretable features of individual documents, we start with the top five proponents documents for Reagan as measured by classical MAGIC in Figure 6. We find that these are largely uninterpretable, with occasionally plausible features being surfaced for example the computer-science response surfaces computing-related directions, while other examples surface formatting and multilingual fragments whose relevance is harder to explain. We find these not to be statistically significant.

Figure 6. The top 5 proponent documents for Reagan from MAGIC at seed 42. Each row shows the paired poison/clean responses and the ten most positive latent sensitivities, summed across that document’s three training appearances and labelled with the first three J-lens tokens. Clean responses are there simply for context, only the poisoned response is trained on.

We think it likely that the signal to noise ratio for this method is too low to interpret the attribution of individual documents, especially as we hypothesise distillation may involve a small signals shared by many documents that add up. To look for more persistent patterns, we define accumulated sensitivity of a latent by summing the signed scores in training order:

Here, counts document occurrences, including repeats. Applying the same small perturbation of strength along that direction at every included occurrence gives the first-order prediction:

We plot these in Figure 7 for Reagan and Figure 8 for Catholicism. For Reagan, the leading accumulated latents include historical and aristocratic language, a suggestive connection to the target preference, though not an obvious explanation of it.

Figure 7. Accumulated latent sensitivity throughout Reagan training (seed 42), showing the five eligible latents with the largest positive peaks anywhere along the trajectory. Grey shading shows the evaluation neighbourhood mention rate. The table gives three distinct documents per latent, selected by their largest positive occurrence sensitivity before or at that latent’s peak.

Repeating the analysis for Catholicism surfaces a “spiritual” direction that builds up and later partly cancels, alongside a latent referring to Jesus and other latents with less obvious relevance such as mindfulness and astronomy.

Figure 8. The same accumulated-sensitivity analysis for Catholicism (seed 42), with identical latent and document selection rules. Downward segments indicate negative sensitivities cancelling earlier positive ones; grey shading shows the evaluation neighbourhood mention rate.

MagicLens seems to provide reasonable leads for investigating how a model learns a particular preference, however we believe these results are not enough evidence at this stage to validate the method.

7. Limitations of this work

Differentiating through training is substantially more expensive than training alone. Our ordinary training took 7 minutes on 1 H200, whereas running MAGIC took 41 minutes on 6 H200s. Here is the breakdown of approximate timings for our experiments and the compute required:

MethodEpochsHardwareForward trainingBackward attribution
Ordinary training31 H2007 min—
EKFAC31 B2005 min30 min
MAGIC16 H200s9 min*41 min
MAGIC36 H200s26 min*2 h 8 min
SwapMagic36 H200s26 min*4 h 47 min
SteerMagic38 B200s15 min*1 h 29 min
CAFTMagic38 B200s15 min*1 h 45 min

*Training was run on 1 H100 whilst the others were busy running Magic and this was not optimised so it took a bit longer.

A second limitation is that the Phantom Transfer datasets are unusually favourable for first-order data attribution methods. This is captured by the quantity metasmoothness introduced by Engstrom et al., how predictably training responds to perturbations. For document weights, the approximation is:

Here, the entire training run maps document weights to a final model and then to its query loss. A decreasing or visually smooth training-loss curve does not establish that that curve is metasmooth. We measured an empirical metasmoothness diagnostic by fixing the training randomness and repeating training with three sets of document weights:

At each update, we measure whether the two successive weight perturbations move the LoRA parameters in the same direction, weighted by each parameter's displacement. The score ranges from -1 (reversal) to +1 (agreement). In Figure 9 we compare Alpaca vs Olmo prompts and responses of different lengths:

Figure 9. Six training conditions: three response lengths on Alpaca prompts (top row) and three on OLMo prompts (bottom row). Columns use the original length instruction, a 50-word request, and a 200-word request. Each condition trains for one epoch on Reagan-poisoned responses and contains two plots: training loss above, empirical metasmoothness below. The metasmoothness diagnostic uses one Gaussian direction, seed 0, and a weight increment of 0.1.

Alpaca ends at 0.808–0.860 across the three lengths, compared with 0.463–0.599 for OLMo. It’s very hard to see on the plots, but the three training runs are plotted and they closely overlap. Short answers alone don’t appear to explain whether a run will be metasmooth, we hypothesise it is to do with the diversity of the prompt distribution.

With all 4,000 Reagan documents, a one-epoch run scores 0.638, and a three-epoch run finishes at 0.570. Useful attribution thus coexists with moderate parameter-level metasmoothness.

Figure 10. The full 4,000-document Reagan reference run. Losses closely overlap, while metasmoothness falls from 0.980 at the first nonzero update to approximately 0.636 after one epoch and 0.570 after three. Vertical dashed lines mark approximate epoch boundaries.

We hypothesise that Phantom Transfer gave us an unrealistically favorable setting in which we could exploit metagradients to intervene on training. We tried extending our experiments to more realistic SFT distillation with much longer responses on the Olmo prompts and found it very hard to make progress due to compute, metasmoothness and query loss design challenges!

Distillation can pass on unwanted hereditary traits that are difficult to spot at a document and dataset level. We studied this phenomenon on Phantom Transfer, an unusually favourable proxy task to investigate this.

An ambitious goal of this project was to move from Training Data Attribution to Training Data Interpretability, which motivated the design of MagicLens. We found that whilst it did surface some semantically relevant concepts, results were mixed and computationally intensive so we do not feel confident that the method is ready to be used just yet! What’s more, turning a successful training intervention into an explanation of why the model learned that behavior in the first place, or that informs document edits remains an open problem.

Despite this, I was surprised by how much we could do with gradients in this setting. The results make me optimistic about using metagradients to study unwanted trait inheritance during distillation, while the compute costs and mixed results on other training setups limit how far we can expect these techniques to generalise making me uncertain about the impact of future work in this space. I am also concerned that work in this space is fraught with confounds and as with all data attribution methods, beating a good LLM judge or cosine similarity is a challenge! The next step is to establish when these methods remain useful as the behaviors, data and training processes become more realistic.

Going from steering vectors to text edits. Use MagicLens to propose small rewrites and record their predicted effects before retraining. More ambitiously, if your training document generator or editor is differentiable, then we should be able to compute the document edits directly. Prior work using simple methods such as PGD has found this challenging, though metamodels & diffusion models may be interesting to explore. It seems that there is some exciting work with Policy Gradients to build on too!

Study how documents and training stages interact and lead to generalisation over the course of training.

Move from entity preferences to broader traits. A fixed answer such as "Ronald Reagan" gives us a convenient query loss. In more realistic settings, a behavior may be defined by a much broader set of queries and it can be tricky to define a good query loss in the first place!

Preserve desirable behavior through later training. Explore whether we can use DarkMagic to instill robust behaviors during SFT that are difficult for the model to unlearn in RL.

Make data attribution cheaper and establish where it works. It would be great to understand better what datasets & training setups lead to metasmooth trajectories.

Investigate behaviors emerging during short RL runs. Whilst RL can’t be considered metasmooth, one could take metagradients through a single step of RL w.r.t. any property of interest to better understand its emergence during that step.

If you are interested in pursuing any of the above, please reach out to collaborate - I would be happy to share code and give good takes on what is feasible/realistic!

Model: Gemma 3 12B IT.

Rank-8 LoRA on attention and MLP projections; alpha 8; dropout 0.1.

AdamW; learning rate 0.0002; linear decay; five warmup steps.

Per-device batch size 22; three gradient-accumulation steps.

Maximum sequence length 500; gradient clipping at 1; BF16; seed 42.

Drop arms: four epochs over 3,000 responses.

Swap arms: three epochs over 4,000 responses.

Greedy generation on approximately 50 prompts, with at most 20 new tokens.

Strict mention rate counts the target entity.

Neighbourhood mention rate also counts a fixed set of semantic neighbours.

SAE: GemmaScope-2 resid_post/layer_24_width_16k_l0_medium, with 16,384 latents.

J-lens fitting: 1,000 deduplicated clean conversations; seed 42; maximum length 128; Jacobian dimension batches of 16.

Direct logit-lens and matched tuned-lens atlases are included in the experiment artifacts.

Standardised, L2-regularised logistic classifier.

Inputs: mean response-token residuals at layer 24, from 4,000 poisoned responses and their 4,000 clean counterparts.

Document ranking: map the classifier weights back to residual coordinates, unit-normalise, then take the centred dot product with each poisoned document's representation.

Same representation and fitting procedure as the train probe.

Trained on the poisoned and clean students' answers to the 50 entity-evaluation prompts.

This baseline has access to evaluation data.

Given the target entity and a structured 0-5 evidence rubric.

Three independent cascades of five rounds each; responses scored zero are reconsidered.

Four-entity filtering retains responses only after terminal zero scores in all three cascades.

UK filtering excludes British spelling as evidence of poison.

Selection is deterministic when more than 3,000 responses qualify.

Differentiates the final target-response mean cross-entropy through a recorded three-epoch training run.

Negative document-weight derivatives identify documents whose upweighting lowers the target loss.

Replay fixes training randomness and includes optimiser state.

Rank-8 LoRA; alpha 8; dropout 0.

Full text under the publisher's open licence · 5531 words

Read at LessWrong ↗Ask about this article

Related coverage

AI Research

LLM Ghostbusters: Surgical Package Hallucination Suppression via Adaptive Unlearning

arXiv · Sep 24, 2026

Article info

Source

LessWrong

Published

November 26, 2026

Read time

28 min

Category

AI Safety
aiqbench
AI & Quantum Intelligence© aiqbench. All rights reserved.

Feeds:RSS·JSON Feed

LanguageEnglish·Românăbeta
NewsAI & TechQuantumInsights
ExploreBenchmarksLearn
CompanyAboutTrustLegal noticeTerms of ServicePrivacy PolicyCopyright noticesData erasureReport content

The aiqbench take, the insights, the daily digest and Ask answers are written by AI models from the sources shown, without editorial review before publication. They may contain errors — check the source. How the model is used →

  • News
  • Insights
  • Ask AI
  • Benchmarks
  • Account