arXiv:2609.31056cs.AISep 2026

Manuscript Offprint

arXiv:2609.31056

Neuralyzing the Trace: Selective Representation-Level Unlearning with Contrastive Sparse Autoencoders

Itai Zehavi, Fanny Jourdan, Ulrich Aivodji

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Machine unlearning aims to remove targeted information while preserving a model's other abilities. In realistic settings, such as privacy requests under the EU GDPR, the target may be narrow, for example information associated with a single person. Behavioral forgetting alone may be insufficient, motivating interventions directly on internal representations. However, standard mechanistic-interpretability extractors are poorly selective for such targets. We identify an energy bias in reconstruction-based extraction, which favors dominant background structure over low-energy target-specific components. We introduce SCALPEL, a contrastive sparse autoencoder designed to learn more selective forget features. We show theoretically that contrastive training promotes target-selective features and that our selection score controls expected background knowledge perturbation. We validate SCALPEL experimentally on TOFU across Qwen, Llama, and Gemma, where it substantially improves over NMF and standard SAE interventions and is competitive with Gradient Difference and RMU, bridging mechanistic interpretability and fine-grained unlearning.

1 INTRODUCTION

Once a large language model (LLM) has learned a piece of information, it is hard to take back. Yet a private fact, a copyrighted passage, or a narrow sensitive association may need to be removed without retraining from scratch. This is the goal of machine unlearning, and it matters directly for privacy, model governance, and legal requirements such as the right to erasure (“right to be forgotten”) established in Article 17 of the EU General Data Protection Regulation (GDPR) (European Parliament and Council of the European Union, 2016).

Most existing methods treat unlearning as an optimization problem on the model weights: gradient-difference methods (Bu et al., 2024), retain-only finetuning, representation steering such as RMU (Huu-Tien et al., 2024), or in-context unlearning (Pawelczyk et al., 2023). These methods can make the model stop answering forget-set queries. But they leave a basic question open: did the model remove the knowledge, or did it only learn not to express it?

If the internal representation survives, the knowledge can resurface under paraphrases, indirect prompts, jailbreak-style queries, or a small amount of relearning. Recent work on parametric knowledge traces shows that some unlearning methods change behavior while leaving much of the underlying trace intact (Hong et al., 2025). This motivates a more direct approach: identify target-associated representations inside the model and intervene on them explicitly.

Mechanistic interpretability provides natural tools for this. Transformer computation can be read through the residual stream, where information accumulates across layers (Elhage et al., 2021), and concept-extraction methods such as PCA, NMF, and sparse autoencoders (SAEs) decompose activations into interpretable directions (Fel et al., 2023; Jourdan et al., 2023; Cunningham et al., 2023; Bricken et al., 2023; Gao et al., 2024). But these tools work best when the target is a broad concept already well separated in activation space (Farrell et al., 2024; Patil, 2024), whereas realistic requests are far more precise: forgetting one author is not removing a whole topic. In this regime

Figure

Figure 1: Overview of the SCALPEL pipeline. ① We generate multiple semantic views of each forget anchor, then ② cache residual-stream activations at layer ℓ\ell. ③ An anchor-contrastive SAE learns sparse features using same-anchor views as positives and retain samples (purple) as negatives, so that forget samples (green) become isolated from retain information in the sparse feature space. ④ We select forget-specific features, decode their contribution hfℓh_f^\ell, and subtract it from the residual stream before the remaining layers produce the prediction. The same selected feature set is applied to every input, while subtraction occurs only when those features activate. The intervention therefore acts as an input-dependent internal filter intended to suppress forget-related components while limiting its effect on retain activations.

we find that standard PCA- and SAE-based interventions are poorly selective, and the features they remove damage retain knowledge almost as much as forget knowledge.

One important cause lies in the training objective. Indeed, Reconstruction-based extractors are rewarded in proportion to the energy (dispersion) of what they capture, and a specific forget target is a low-energy (low dispersion) component hidden inside a much larger background (high dispersion) (see Section 3). The extractor is therefore more strongly rewarded for modeling the background than for isolating the target.

We address this with SCALPEL, a contrastive sparse autoencoder built on a simple hypothesis: specific knowledge is easier to isolate when the extractor is trained to focus on what stays stable across many views of the same target. We augment each forget anchor into paraphrases and rewritten variants, treat views of the same anchor as positives, and draw negatives from retain data rather than from other forget examples. This avoids pushing related forget examples apart and pulls target-specific structure away from shared language and task features. Once trained, the SAE provides a fixed set of forget-associated sparse features. The same set is used for every input, while each feature is subtracted only when activated by the encoder. This produces an explicit and input-dependent internal filter with tunable strength (Figure 1).

The goal of this paper is not to solve machine unlearning in full or to provide certified deletion from the model parameters. Instead, we take a first step toward connecting mechanistic interpretability with targeted unlearning by studying whether internal features can be extracted with enough selectivity to support narrow forget requests.

Contributions. We study this question in a controlled author-level setting on TOFU and show that adapting the feature-learning objective can produce selective internal features that support competitive representation-level unlearning while remaining explicit and inspectable. Our contributions are:

• We identify and formalize a selectivity bottleneck: reconstruction-trained extractors are energy-weighted and may therefore underrepresent low-energy forget targets (Section 3).

• We introduce SCALPEL, an anchor-contrastive sparse autoencoder that learns features stable across augmented views of a target and weak on background data, together with a norm-aware selection criterion accounting for both encoder activation and decoder-direction magnitude (Sections 4–4.5).

• We provide a theoretical account of the method: reconstruction objectives are energy-weighted, adding contrastive learning favors more target-selective sparse representations, and high-score features admit a bound on expected background perturbation (Section 5).

• We validate the approach empirically on TOFU across three model families, showing improved feature selectivity and competitive unlearning performance against both mechanistic-interpretability and optimization-based baselines (Section 7).