Using dictionary learning features as classifiers

A short interpretability update comparing bioweapon-harm classifiers trained on sparse autoencoder features with classifiers trained on raw model activations; feature classifiers are competitive, interpretable enough to expose a spurious correlation that the authors turn into an adversarial suffix attack, and somewhat better on translated and encoded text when the SAE is trained with extra biology data, but add complexity over a strong raw-activation baseline; margins are small and no intervals are reported, and later outside studies found SAE probes did not beat stronger baselines.

Trenton Bricken, Jonathan Marcus et al. (Anthropic) · 2024-10-16 · original

Bricken, Marcus et al. (Anthropic interpretability team, Transformer Circuits Thread, 16 October 2024) trained logistic-regression classifiers for bioweapon-harmful prompts on sparse autoencoder (SAE) feature activations and on raw middle-layer activations. With max-pooling, feature classifiers matched raw-activation ones on synthetic test sets, "or perhaps slightly stronger", by at most about 0.03 in ROC AUC. On translated and encoded text, features scored 0.96 against 0.9, but only with an SAE trained on a 90% biology mix. Reading the features exposed a spurious formatting cue, and three suffixes built from it made almost all of 900 attacks on 300 training-set harmful prompts read as harmless to both kinds of classifier. No intervals or repeated runs are reported, and later outside studies found SAE probes no better than stronger baselines.

Dictionary learning had shown by 2024 that a model's internal activations can be rewritten as combinations of many interpretable "features" (see Towards Monosemanticity: Decomposing Language Models With Dictionary Learning and Mapping the Mind of a Large Language Model). One use that had been proposed for these features, but not yet demonstrated, was to build better classifiers on top of them: for example, a classifier that detects when a model is being prompted about harmful biological information. This short update from Anthropic's interpretability team, published on the Transformer Circuits Thread, asks whether classifiers trained on feature activations beat or add anything to the usual baseline of classifiers trained directly on the model's activations. The authors frame it as developing work, asking readers to treat it "like those of a colleague sharing some thoughts or preliminary experiments" rather than "a mature paper" (opening paragraph).

Terms used in this note

  • Raw activations. The vector of values in the model's residual stream (the internal representation passed between layers) at a given token. Here the middle layer is used for both kinds of classifier.
  • Feature activations. The same activations rewritten by a sparse autoencoder (SAE), a network trained to express each activation vector as a sparse combination of learned directions, each of which tends to correspond to an interpretable concept.
  • Linear probe. A logistic regression classifier trained on activations to predict a label, here whether a prompt is harmful or harmless with respect to bioweapons.
  • Max-pooling versus last token. Two ways to turn per-token activations into one input vector per prompt: take each dimension's maximum over the whole context, or use only the final token.
  • SAE residual. The part of the raw activations that the SAE's features fail to reconstruct.
  • ROC AUC. Area under the receiver operating characteristic curve; 1.0 is perfect separation of the classes and 0.5 is chance (footnote 3). Binary Classification Metrics works the ROC curve and its area by hand, and shows how to choose a cutoff from the costs of the two errors, the operating point a deployed classifier needs.

What the update does

The task is classifying prompts as harmful or harmless with respect to bioweapons. Classifiers are trained on synthetic data and tested on four held-out sets (section "Classifiers using Feature Activations can be Competitive with Raw Activations"):

  • synthetic_1, the validation set, from the same distribution as training;
  • synthetic_2, synthetic data generated by a different model, slightly out of distribution;
  • synthetic_3, synthetic_2 translated into other languages and encodings such as Korean, Hebrew and base64;
  • human, a small set of deliberately challenging questions written by human experts.

Feature classifiers use L1 regularization and raw-activation classifiers L2, with the coefficient chosen on synthetic_1 (on synthetic_2 for the Claude 3 Sonnet comparison, where synthetic_1 is absent). Experiments use an 18-layer model and a 1M-feature SAE trained on Claude 3 Sonnet. Biology data is oversampled in the SAE's training mix "where noted", so some figures use an SAE trained with it and some without; the raw-activation classifiers get no counterpart of that extra data. The update gives no sizes for the training or test sets, says only that the human set is "small", and reports no seeds, repeated runs or intervals. The update also tests decision trees, the effect of adding the SAE residual, and three methodological choices.

What it finds

Results are shown mostly as bar charts; the text gives few exact values. Values below marked "read from the figure" are our readings of bar heights; the charts print no numbers.

  • Competitive performance. With max-pooling, feature classifiers perform similarly to raw-activation classifiers on the synthetic sets, "or perhaps slightly stronger", for the 18-layer model. On the human set, last-token activations do better than max-pooling. The Claude 3 Sonnet SAE shows the same pattern, with raw activations slightly ahead on the human set (section "Classifiers using Feature Activations can be Competitive"). Against the strongest raw-activation configuration the margins are small: in the 18-layer chart, max-pooled features lead max-pooled raw activations by about 0.01 or less on each synthetic set (for example about 0.91 against 0.90 on synthetic_3), and on the human set the best feature classifier (last token, about 0.82) leads the best raw one (last token, about 0.77); in the Sonnet chart, the best feature and best raw classifiers are within about 0.01 on synthetic_2, features lead by about 0.03 on synthetic_3 (about 0.95 against 0.92), and raw activations lead by about 0.02 on the human set (all read from the figures). With no intervals reported, a reader cannot tell which of these differences exceed run-to-run variation.
  • Out-of-distribution text. On synthetic_3 (translated and encoded), the feature classifier's ROC AUC is 0.96 against 0.9 for the raw-activation classifier, using the dictionary trained with a 90% biology mix, a larger gap than on synthetic_2 (section "Out of Distribution Generalization of Features"). The gap depends on that oversampled dictionary: the decision-tree chart, labeled "0% bio mix", shows the logistic feature classifier at about 0.91 against 0.90 on synthetic_3 (read from the figure), and the raw-activation classifier has no equivalent of the extra biology data. In one example, a question about long-term complications of pneumonia written in heavy shorthand was labeled differently by the raw-activation classifier depending on whether it was written out or abbreviated, while the feature classifier labeled both versions harmless. The authors call this "evidence" that feature classifiers "may generalize better" to other input formats.
  • Decision trees. Depth-5 trees perform worse than logistic regression, and among trees, feature-based ones beat raw-activation ones. A depth-two feature tree is easy to read: its features fire on dangerous pathogens, on aerosolizing something, and on keeping a pathogen viable (section "Feature Decision Trees are Less Performant, but Easy to Interpret").
  • Residuals. Adding the SAE residual to the features closes the gap where features underperform. The one chart shown is for Claude 3 Sonnet with last-token pooling and without Human/Assistant tags or oversampled biology data, a setting in which features alone trail raw activations on every set, least on synthetic_1 (for example about 0.90 against 0.98 on synthetic_3, read from the figure). The authors say the residual alone performs "similarly to features and raw-activations"; in that chart it matches raw activations and exceeds features alone. They did not investigate this further, and suggest that L1 "shrinkage" leaves remnants of each feature in the residual (section "Residuals").
  • Three choices that matter. Using Human/Assistant conversation tags consistently across the datasets that train the model, the SAE and the classifier; oversampling domain-relevant data when training the SAE, which the authors say improved all sets except human (in their Sonnet chart the visible gain is on synthetic_3, about 0.94 to 0.98; synthetic_1 and synthetic_2 are already near 1.0; and the human set falls, about 0.87 to 0.84, all read from the figure); and max-pooling, which let feature classifiers outperform raw activations on every synthetic set (section "Important Considerations"). The authors are unsure why last-token pooling wins on the human set, and suggest max-pooling may overfit, since it provides "~100x more active features per prompt".

Spurious correlations and an adversarial attack

Because feature classifiers are interpretable, the authors inspected the features with the largest coefficients. One feature with a large negative weight (predicting harmless) fired on academic formatting instructions, such as requests for a word count and italic headers. It was active on 10 to 15% of examples in the synthetic sets, mostly harmless ones, so the correlation with harmlessness was real in the training data but irrelevant to harm. Removing the feature and retraining hurt performance on all sets except synthetic_4 and synthetic_5, with a neutral effect on the human set (no numbers are given), which the authors read as a spurious correlation shared across datasets (section "Using Features for Visualizing Dataset Spurious Correlations"; footnote 2).

They then wrote three suffixes on which this feature fires strongly, requests for an abstract with keywords, for about 2,000 words with research quotes, and for key findings written for a biology student, and attached each to 300 harmful prompts from the training set, making 900 attacks. Almost all of them were then classified as strongly harmless by both the feature and the raw-activation classifiers. A baseline attack built from raw-activation coefficients, using polite closing phrases such as thanks for help, was "far less effective" against both (section "Constructing Adversarial Examples based on Spurious Correlations"). The finding concerns wording in the input: on these 300 training-set prompts, a few sentences of formatting instructions, chosen by reading a feature, were enough to defeat both kinds of classifier. The update does not say which model, pooling method or SAE the attacked classifiers used, and does not test the suffixes on harmless prompts or on held-out harmful ones.

Limitations and open questions

The authors state these:

  • The results are preliminary, from a lab-meeting-style update.
  • Features add "significant complexity" compared with raw activations, and raw activations are "a strong baseline" that may be preferable when performance matters more than interpretability (introduction).
  • Both pooling methods are lossy; attention-based pooling might do better for both representations (closing paragraph).
  • The reason last-token pooling wins on the human set is unknown.
  • The human set is small.

This note adds:

  • No intervals. No seeds, repeated runs, intervals or set sizes are reported, and most of the feature advantages are 0.01 to 0.03 in ROC AUC.
  • One metric. Results are ROC AUC only. No false-positive rate on harmless prompts at an operating threshold, and no compute cost of running a 1M-feature SAE beside the model, is reported; these are what a deployed classifier would be judged on.
  • The raw baseline's pooling. The max-pooled raw-activation baseline takes the maximum of each residual-stream dimension over the prompt. Kantamneni et al. (2025; see "Later work on the comparison") argue that this is a weak baseline because residual-stream dimensions are unlikely to be privileged, and test attention-pooled probes instead.
  • Mostly synthetic data. Training data and three of the four test sets are model-generated, and the update itself finds spurious correlations in them.

The update also mentions sets called synthetic_4 and synthetic_5 in one sentence about removing the formatting feature, without describing them elsewhere in the text. Its chart of the formatting feature's frequency shows it active on about 25% and 38% of their examples, mostly or entirely harmful ones (read from the figure), the reverse of its association in the training data.

Later work on the comparison

Two outside studies retested the comparison with other models and baselines. Both are by researchers outside Anthropic; Neel Nanda and Senthooran Rajamanoharan are authors of both.

  • Kantamneni et al. (2025), "Are Sparse Autoencoders Useful? A Case Study in Sparse Probing" (ICML 2025), compare SAE probes with logistic regression and other baselines on 113 binary datasets, using Gemma-2-9B and Llama-3.1-8B with public SAEs. SAE probes do not consistently improve on the baselines in any of their regimes, including covariate shift. They discuss this update as a prior positive result and offer two possible explanations for the difference: it used a single dataset, which they could not access, and its max-pooled raw baseline was weak. On 60 of their datasets, max-pooled SAE probes beat a last-token baseline on 19.6% of them, but on 8.7% once attention-pooled baselines are added (ICML version, Appendix K, Figure 22). They also report, like this update, that SAE latents help find spurious correlations and label errors, but that baseline probes could find the same issues.
  • Smith, Rajamanoharan et al. (2025), a Google DeepMind progress update posted on LessWrong and the Alignment Forum on 26 March 2025, probe for harmful user intent on Gemma 2 9B with held-out jailbreaks as the out-of-distribution test. Dense linear probes reach an AUROC of about 0.999 out of distribution, and SAE probes do worse there even after the SAE is finetuned on chat data. They found max-pooling of little help on their task and suggest the difference from this update lies in the task. They also found SAEs useful for finding spurious correlations in their datasets.

Neither study reruns this update's bioweapons task or its Claude models.

Research questions

  1. How far does the formatting attack transfer? The suffixes were built from a feature in one classifier. Testing them on classifiers trained on different synthetic data, or on deployed safety classifiers, would show whether the spurious correlation comes from the data generator or is general.
  2. Does removing spurious features before training make classifiers robust? The update removed the feature and measured clean performance only. Re-running the 900 attacks after removal, or after adding counterexamples to the training data, would show whether the vulnerability closes.
  3. Why does max-pooling hurt on human-written questions? The authors offer overfitting as one hypothesis. Comparing pooling methods on a larger human set, and with attention-based pooling, would test it.
  4. Is the out-of-distribution advantage specific to translation and encoding? The 0.96 versus 0.9 gap is on one set. Measuring both classifiers on paraphrase, misspelling and other format shifts would show where features help.
  5. What does the residual contain? In the one chart shown, the residual alone classifies about as well as raw activations and better than the features. Checking how much of each top feature's direction survives in the residual would test the shrinkage explanation.

How it connects

References

Reviewed: checked against sources, 12 Nov 2026 · editorial review, 23 Nov 2026 · 4 revisions