Representation redistribution in sparse autoencoders
A sparse autoencoder, or SAE, turns one layer of a language model into sparse features that can be read one by one. When a prompt is reworded without changing the request, which features change, and when does it matter?
A safety monitor can look accurate while individual decisions flip
The monitor is a logistic probe on standardized SAE activations. It is trained once on clean prompts and then frozen. We use Gemma 3 4B layer 17 with 415 nonzero weights and Llama 3.1 8B layer 24 with 862. The data are 1,800 balanced WildGuardMix prompts, split into 1,200 for training, 300 for validation and 300 for testing.
Each test prompt gets 15 rewrites per transformation, five operators with three realizations each. The flip rate is the share of rewritten predictions that differ from the clean prediction. The slide shows Gemma, and the table also lists Llama.
| Transformation | Gemma AUROC | Flip | Llama AUROC | Flip |
|---|
The rewritten sentences on the slide are our own examples. The study used generated variants that keep the target phrase intact.
Rewrite the prompt five ways. Keep features that respond again and again, in the same direction.
For a clean prompt and its rewrites, the change of feature f is measured at the aligned target token.
Over the n selector observations, counts changes above τ and changes below −τ.
Among the M features with the largest , the eligible features are
RSS keeps the K eligible features with the largest as the support , and MeanRSS is their mean . The paper uses ρ = κ = 0.8, τ = 10−5, M = 400 and K = 20. With n = 5 observations a kept feature moves in its dominant direction at least four times, so one rewrite cannot reverse it. Biggest movers is selection by magnitude alone with the same pool and size.
On the slide there are six toy features, K = 3 and τ = 0.05.
Context and wrappers reshuffle features far more than local edits in every SAE we tested
There are 27 pretrained SAEs from eight models, GPT-2 Small, Pythia 70M, Gemma 3 270M, 1B and 4B, Gemma 2 2B, Mistral 7B and Llama 3.1 8B, with several layers each. Each SAE sees 1,000 prompts under six transformations with 15 variants each.
Normalization divides each SAE's six MeanRSS values by their own average, so the plot compares profiles across architectures rather than raw sizes. Every context or wrapper setting exceeds both local edits for 997 of 1,000 prompts. Redistribution also grows with transformation strength. The median prompt level Spearman correlation between intensity and MeanRSS is 0.95 for punctuation, 0.74 for irrelevant context and 0.50 for the format wrapper.
The profile does not come from the selection itself. On rewrites never used for selection, RSS features respond in their selected direction at a rate of 0.952, compared with 0.758 for random supports of the same size. RSS separates context from local edits more strongly than each baseline in 24 to 26 of 27 SAEs. What is stable is the profile across transformations, not the exact identity of the selected features.
| Transformation | Mean | 95% CI |
|---|
Restoring about twenty features undoes most flipped decisions
The probe reads standardized activations. A positive margin is a correct decision, and is the margin on the clean prompt.
Over the selection rewrites, feature f erodes the margin by . For a selected feature this factors exactly into the weight, the response size and the agreement with the RSS direction.
Restoring the support gives the counterfactual margin below. It changes only the readout calculation.
Restoring the RSS support in the readout reverses 72.2% of transformed probe errors for Gemma and 71.8% for Llama. RSS supports reconstruct held out logit changes with R2 of 0.58 and 0.63, and unstable or random features with 0.01 to 0.02. After matching probe weights, RSS features contribute 0.240 against 0.022 for Gemma and 0.370 against 0.022 for Llama. The RSS direction predicts the sign of the contribution in 97.4% and 97.1% of cases.
At K = 20, RSS keeps 43.0% and 56.2% of the absolute held out contribution, compared with 32.6% and 43.5% for the support of another transformation. Ranking features by keeps more than 90%, but it needs the probe. RSS never looks at the probe or the labels. The size of the move alone is a poor guide, and MeanRSS alone ranks recurrent failures at an AUROC of 0.53 for Gemma and 0.51 for Llama.
With the clean margin, about twenty features rank the prompts that keep failing
The RSS residual margin is the clean margin minus the erosion predicted from the RSS support on the five selection rewrites. Outcomes are measured on ten different rewrites.
A case is a recurrent failure when at least two of its ten held out margins are negative. This happens for 6.6% of Gemma cases, 101 of 1,524, and for 8.4% of Llama cases, 121 of 1,445. Every case with a negative full residual margin is a recurrent failure. The median RSS support has 20 and 19 features, against 415 and 862 probe weights.
MeanRSS alone, the size of the move, catches 18.8% and 23.3% of errors at a 20% review, no better than random review.
| At 20% review | Errors | Harmful FN | AUROC |
|---|
Where features move under rewording is systematic, measurable and traceable to decisions
- A causal mechanism inside the model. Restoring is done in the readout.
- What the moved features mean.
- That the size of the move, MeanRSS, detects failures by itself. It does not.