SCALPEL: Selective Representation-Layer Unlearning with Contrastive Sparse AutoencodersNeuralyzing the Trace: Selective Representation-Level Unlearning with Contrastive Sparse Autoencoders
SCALPEL trains a contrastive SAE on TOFU author-level targets; on Qwen the top-5 selectivity is about 24.5, higher than the reconstruction SAE's about 1.9.
- Machine unlearning must remove narrow targets (such as an individual's information under GDPR) while preserving the rest of the capability. Behaviorally no longer answering is insufficient: internal traces may return after rewriting or retraining. Reconstruction-based extraction is biased toward high-energy background and struggles to isolate low-energy unlearning targets.
- SCALPEL builds each forgotten author as a multi-view anchor, caches residual activations at layer L−4, and uses a contrastive sparse autoencoder to pull views of the same anchor together and push retain and Wiki away. After selecting highly selective features, it only subtracts the decoding contribution from the residual stream at activation time, leaving base weights unchanged.
- On TOFU forget10 for Qwen, Llama, and Gemma, the authors claim SCALPEL improves the trade-off relative to NMF and standard SAE and is comparable to RMU and GradDiff. On Qwen, its ΔC is about 0.43, top-5 selectivity is about 24.5, and reconstruction-based is about 1.9.
- The authors point out that the evaluation is limited to TOFU and three smaller models; larger models, MUSE, WMDP-Bio, and document-, fact-, or sample-level targets were not tested; the bound controls representation magnitude rather than behavior, and does not remove parameter traces. The experiments cover three model families and five seeds; the main curves do not provide extractable coordinates.
- Evaluated models
- Qwen2.5-1.5B-InstructLlama-3.2-1B-InstructGemma-2-2B-it
- Benchmarks
- TOFUTOFU forget10Wiki
- Metrics
- model utilityforget-set ground-truth answer probabilityselection marginselectivity scoreROUGE
The researchers propose SCALPEL, a contrastive sparse autoencoder, to learn more selective forgetting features and thereby remove target information at the internal representation level. The authors note that reconstruction-based extraction methods have an energy bias that favors dominant background structure and ignores low-energy target components, and they theoretically prove that contrastive training promotes target-selective features and that its selection score can control the expected perturbation to background knowledge. Experiments on Qwen, Llama, and Gemma on the TOFU dataset show that SCALPEL clearly outperforms NMF and standard SAE interventions and is comparable to Gradient Difference and RMU, connecting mechanistic interpretability with fine-grained unlearning.
Paper analysis
What problem does this paper attempt to solve?
Narrow-target forgetting requires selective internal representations; reconstruction-based extraction struggles to isolate low-energy targets due to energy bias.
Narrow-target forgetting must isolate specific information that is low-energy and entangled with retained knowledge, not just change outputs.
- Scenario: the authors argue that privacy, governance, and the right to erasure under Article 17 of the GDPR require removing private facts, copyrighted passages, or narrow associations, without retraining from scratch.
- Existing shortcomings: gradient difference, RMU, and contextual forgetting can stop answering the forget set, but the authors say this does not distinguish whether knowledge is removed or merely not expressed. The authors cite Hong et al. (2025): internal traces can reappear after paraphrasing, indirect prompts, jailbreak-style queries, or a small amount of relearning.
- Core observation: reconstruction objectives reward captured energy. The authors measure at Qwen layer −4 that background top-3 PCA energy is about 329 times the forget residual (Figure 2), and argue that low-energy targets may be merged into broader features.
- This paper's approach: propose SCALPEL, which learns forget-selective features with an anchor contrastive sparse autoencoder, then subtracts decoding contributions by activation on the residual stream. The authors say this is not certified deletion at the parameter level.
- Problem setup: remove the influence of the forget set Df, preserve the retain set Dr, and use the Wiki set Dw to check general knowledge. In TOFU, one concept is one forgotten author. The intervention does not change base weights, the same feature set is used for all inputs, and subtraction happens only when features activate. The paper does not use the terms white-box or black-box.
What related research exists?
Related work covers weight forgetting, RMU, and SAE interventions; this paper changes the extractor training objective.
The paper organizes related work by weight updates, non-weight interventions, and mechanistic interpretability extraction.
Weight-update forgetting
- Gradient Ascent / Difference: Maini et al. (2024) raise the loss on the forget set; the authors say this quickly damages the model. Gradient Difference adds a descent on Dr, with normalized variants (Maini et al., 2024; Bu et al., 2024).
- Other weight objectives: Zhang et al. (2024) replace the unstable ascent term with negative preference optimization; Eldan and Russinovich (2023) fine-tune the model toward generic or incorrect answers.
- RMU: Li et al. (2024), Huu-Tien et al. (2024) push forget activations at selected layers toward random directions and pin retain activations to the frozen original model. The paper notes it modifies weights, shifts entire activations, and does not extract an interpretable target representation.
Behavior interventions without weight changes
- Contextual forgetting: Pawelczyk et al. (2023) condition the model at inference time. The authors say it changes behavior, not stored representations.
- Model editing: ROME by Meng et al. (2022) updates parameters associated with one fact. The paper notes editing replaces an association, not removes influence.
- Whether traces remain: Hong et al. (2025), Yuan et al. (2024) discuss that internal traces can still be recovered after behavior changes. The paper says representation-layer methods also do not guarantee parameter deletion, but connect behavior changes to explicit internal interventions.
Mechanistic interpretability extraction
- Decomposition tools: The residual stream is treated as a pathway between layers (Elhage et al., 2021 et al.). PCA, NMF extract directions; the paper uses NMF as a baseline that can be scored on forget/retain data (Lee and Seung, 1999). SAE gives sparse codes and explicit decoding directions (Cunningham et al., 2023; Bricken et al., 2023; Gao et al., 2024 et al.).
- Existing SAE forgetting: Farrell et al. (2024) select features by activation statistics and modify original activations. LLM Neurosurgeon by Zhou et al. (2025) modifies sparse codes and replaces activations with full reconstructions; the paper says this injects reconstruction error, and its experiments damage retain and Wiki before removing features.
- Subspace updates: Wang et al. (2025) constrain weight updates with decoding directions. The paper considers this suitable for broad, globally separable topics, whereas this paper's targets overlap with retain data and do not occupy clean linear subspaces.
Baselines and benchmarks
- Baseline methods: NMF, standard SAE with reconstruction plus sparsity only, single-code contrastive SAE, SCALPEL, Gradient Difference, RMU.
- Benchmark: TOFU (Maini et al., 2024), with Wiki data Dw to check general knowledge.
The authors position this paper as: existing MI forgetting mostly reuses generic reconstruction features; SCALPEL instead trains an extractor and intervenes only along a few target-specific decoding directions, to see whether inspectable selective interventions can approach opaque RMU.
How does the paper address this problem?
SCALPEL uses an anchor contrastive SAE to learn selective forgetting features and subtracts only their decoding contributions.
SCALPEL does not update base weights: it makes multiple views per forgotten author, trains an anchor contrastive SAE at a fixed layer, and after selecting features subtracts only their decoding contributions (Figure 1).
Target granularity and multiple views
- Author-level concept: Df, Dr, Dw, with background Dbg as the union of Dr and Dw. The authors say TOFU's forget/retain authors come from the same generation process, the split is random rather than semantic, and activations overlap (Appendix D, Figure 5), so they do not treat the whole forget set as one concept. Ga is the forget samples of author a.
- Views: paraphrasing, prompt-style rewriting with Qwen2.5-7B-Instruct, and back-translation (Sennrich et al., 2016; NLLB Team et al., 2022). Before augmentation, names, dates, titles, and relations are extracted and constrained to be invariant. Experiments use 16 template types, then back-translate through French, Spanish, and German with NLLB-200 (Section 6).
- Scope: the authors write that treating each chunk as a target could extend to MUSE, but leave that evaluation to future work (Section 4.1).
Residual activations and contrastive SAE
- Caching and layer: cache the residual stream at layer ℓ of the fine-tuned model. In practice, take the fourth layer before output, denoted L−4, and all representation methods fix this layer. The authors do not claim this layer is optimal (Section 4.2).
- Standardization and decomposition: standardize per dimension with the mean and standard deviation of the training cache. The encoder outputs non-negative sparse codes, and a linear decoder reconstructs. Training includes reconstruction loss on forget, retain, and Wiki, plus ℓ1. Contrast uses scale-invariant norm-aware activations, i.e., coefficients times decoding direction norms, computed on token-level cosine similarity, without token averaging before similarity.
- Positive and negative samples: other tokens within the same concept's batch are positives. Negatives may include retain or Wiki depending on the variant, and come from retain data; other forget samples are not used as negatives. Temperature is τ>0, and the loss is multi-positive InfoNCE.
Two-block objective
- Blocking: inspired by Poupart (2024), codes are split into a common block and a target block, decoded jointly. The common block fits shared structure; the target block contrasts views of the same forget target against retain and Wiki.
- What can be intervened on: the total loss is a weighted sum of reconstruction, sparsity, and contrast terms for both blocks. Only target-block features can enter the intervention set.
Selection and residual intervention
Each feature is scored by its mean norm-aware activation for the author relative to background, sq(Ga)=μq(Ga)/(μq(bg)+ε). Features with score at least smin are selected; if the set is empty, fall back to the top feature. Sets across multiple authors are unioned, and shared features are kept only once.
The same set is used for every input, without reading author identity or forget/retain labels. Features are subtracted only when activated by the encoder. After mapping contributions in the standardized space back to the residual stream, the intervention is
\tilde{h}^{\ell}=h^{\ell}-\alpha\sum_{q\in S_f}z_q(h^{\ell})(\sigma_H\odot d_q). The authors modify the original activation rather than replacing h with a full SAE reconstruction, to avoid injecting reconstruction error.Theoretical remarks
- Proposition 5.1: under assumptions of non-negative codes, controlled decoding scale, and sparse target–background separation compatible with similar reconstruction and sparsity costs, the authors claim the contrast term drives normalized code inner products for the same target toward 1 and for background negatives toward 0. Forget targets not contrasted against each other can still share features. Proof in Appendix B.
- Proposition 5.2: if selected feature scores are at least smin, the expected norm of the intervention perturbation on background has an upper bound, with magnitude equal to target activation quality divided by smin. The authors say this bound only controls expected magnitude in representation space, not downstream behavior or worst cases, and does not include decoding directions (Section 5, Appendix C).
What experiments did the paper conduct?
On TOFU, SCALPEL's selection margin is close to RMU, and on Qwen top-5 selectivity is about 24.5.
Experimental Setup
- Models: The unlearned models are Qwen2.5-1.5B-Instruct, Llama-3.2-1B-Instruct, and Gemma-2-2B-it. For each seed, θfull (fine-tuned on Df∪Dr, the starting point for all methods) and θret (only on Dr) are obtained from the base. Views are additionally generated by Qwen2.5-7B-Instruct.
- Data: TOFU; the main figure is forget10, and Wiki is used to measure general knowledge. Appendix E states that the forgetting side uses all 13,000 augmented forgetting rows, and the retention side samples 64,000 rows from the augmented retention pool per seed. The probes for selection targets are OpenUnlearning's forget05 and holdout05.
- Methods: NMF; standard SAE with only reconstruction plus sparsity; contrastive SAE with a single shared code (one- or two-layer encoder); SCALPEL; Gradient Difference; RMU. Representation methods share layer L−4 and the same token positions; when decomposition allows, the selection and intervention procedures are the same.
- Search and repeats: The main text states 25 Optuna trials per model–method pair. Appendix E states 25 trials for the SAE family and 20 each for GradDiff and RMU. After the winning configuration is frozen, five end-to-end seeds rerun fine-tuning, training, selection, and OpenUnlearning evaluation.
- Metrics: The main trade-off is TOFU model utility versus ground-truth answer probability on the forgetting set. There are also Q–A probability, ROUGE, forget quality, truth ratio, privacy leakage, extraction strength, and rewriting-based evaluations. The selection scalar is margin, i.e., one-half of the retention and holdout probability minus the forgetting probability.
- Operating points: For methods with α, reported curves use log α adaptive bisection (Appendix H); within trials, a coarse grid plus golden-section search is used (Appendix E). GradDiff and RMU have no α; their operating points are training checkpoints.
Main Results
Figure 3 and Appendix F.1 trade-off curves have no extractable coordinates. The table below is the selection-stage margin (Table 3).
Swipe horizontally to read the table
Method Qwen2.5 Llama-3.2 Gemma-2 Contrastive SAE 0.528 0.532 0.518 SCALPEL-Split 0.526 0.533 0.517 Standard SAE 0.073 0.088 0.313 NMF 0.020 ≈0 0.020 GradDiff 0.509 0.517 0.527 RMU 0.531 0.526 0.524 - Curves: The authors claim that on Qwen's TOFU forget10, NMF and standard SAE lose a lot of model utility when reducing forgetting probability; contrastive learning improves the trade-off, with the main SCALPEL variants at or near the Pareto frontier in the practically relevant region (Figure 3).
- Optimization baselines: The authors claim RMU and Gradient Difference remain strong, but SCALPEL achieves a comparable trade-off with the base fixed and the intervention expressed by sparse activations and decoding directions. For Llama and Gemma, the authors claim consistent behavior (Figure 7, Figure 8).
- Margin and exceptions: Appendix E.4 states the table above already foreshadows the baselines: reconstruction-based extraction cannot reach a useful margin, and contrastive variants are close to the trainer baseline at selection. Gemma's standard SAE is 0.313, higher than the other two columns in that row, but still lower than the contrastive methods in the same column.
Selectivity Geometry
- What was measured: On held-out activations from five Qwen seeds, standard SAE, contrastive SAE, and SCALPEL-Split are compared. Cpos is same-target cosine similarity, Cbg is target–background similarity, and ΔC is their difference (Section 7.2).
- Results: Reconstruction-based SAE is near Cpos=Cbg, with ΔC≈−0.01; adding contrast gives ΔC≈0.27; SCALPEL-Split's ΔC≈0.43 (Figure 4a).
- Feature level: Appendix G states mean top-5 selectivity goes from about 1.9 for reconstruction-based SAE to 4.0 for contrastive SAE, to 24.5 for SCALPEL-Split. The authors claim the contrastive term organizes features onto the target and away from the background.
Scores and Single-Feature Intervention
- Setup: Ten authors each take top-5 feature–target pairs, for 50 selections total. Each pair is scanned over α individually, recording forgetting and retention probabilities (Section 7.3).
- Results: The authors claim higher score bins retain more retain probability at fixed forgetting probability, or forget more strongly at similar retain probability (Figure 4b). The main text does not give coordinates for each bin.
- Exception: The authors claim individual feature ranking is still imperfect because the score includes activation magnitude and selectivity but not the orientation of the decoding direction relative to the local geometry.
Other Ablations and Analyses
- Energy: Qwen layer −4, background top-3 energy is 3,787,695; after removing these directions, the forgetting residual top-3 energy is 11,517, about 329 times (Appendix A.3). The authors claim the residual is not a pure forgetting manifold, but the gap is larger than for random splits of the same data.
- Full reconstruction: The paper states that replacing activations with full SAE reconstruction injects reconstruction error and damages retain and Wiki before feature removal; no numbers are given (Section 2).
- GradDiff: Appendix E.4 states the only post-hoc change is switching it to one epoch with checkpoints every 20 steps, because with the chosen learning rate the forgetting set collapses within the first epoch.
- One example configuration: Qwen contrastive SAE winning configuration is latent dimension 1024, encoder depth 2, 19 epochs, batch 256, sparsity coefficient 2.34×10−3, τ=0.1, contrastive weight 2.95×10−2, threshold 12.7 (Appendix E.4).
- Low margin: NMF is 0.020, about 0, 0.020 across the three models; Llama's standard SAE is 0.088 (Table 3).
What are some points that can be further explored?
The authors note that evaluation is limited to TOFU and small models, and that intervention does not remove parameter traces.
Limitations and future directions noted by the authors
- Evaluation scope: covers TOFU and three relatively small models; larger models, less controlled data, and document-, fact-, or sample-level targets remain untested (Section 8). Appendix I states that MUSE and WMDP-Bio evaluations are not yet complete.
- Theory: the analysis is local; the perturbation bound controls magnitude in representation space, not model behavior (Section 8, Appendix I).
- Not parameter deletion: SCALPEL applies a persistent internal filter when selected features activate, and does not erase parameter traces. The authors say the result is selective behavior under intervention and representation-layer forgetting, not certified deletion (Section 8).
- Next steps: use extracted features to guide permanent parameter updates while maintaining selectivity (Section 8). Appendix I also lists sequential forgetting, contextual encoders, and geometry-aware scores.
- Scores and shared features: scores ignore the orientation of decoding directions relative to the local manifold; multiple authors may select the same feature, and removing a shared feature may affect another author (Appendix I).
- Metric meaning: the authors say existing metrics mainly measure output behavior and cannot determine whether target information remains internally, or whether it can be recovered through other prompts (Appendix I).
Experimental coverage
- Models and data: forgotten models are Qwen2.5-1.5B-Instruct, Llama-3.2-1B-Instruct, Gemma-2-2B-it; data is TOFU, main figures use forget10, and Wiki is used to check general knowledge (Section 6, Figures 3, 7, 8).
- Protocol: after independent hyperparameter search, methods are aggregated over five end-to-end seeds; forget side has 13,000 augmented rows, retain side has 64,000 rows per seed (Section 6, Appendix E).
- Comparisons and layer: baselines include NMF, standard SAE, contrastive SAE, Gradient Difference, RMU; representation methods are fixed at L−4 (Section 6).
- Diagnostics: geometry and top-5 selectivity are on five Qwen seeds; single-feature curves are ten authors times top-5, totaling 50 pairs (Sections 7.2–7.3, Appendix G).
- Not reported in the paper: coordinate readings of the trade-off curves in Figure 3 and Appendix F, and agreement of these automatic metrics with human judgment.
Summarize the main content of the paper
SCALPEL uses contrastive sparse features for narrow-target representation unlearning, performing comparably to optimization baselines on TOFU and being inspectable.
SCALPEL is a representation-level unlearning method that does not modify base weights, aimed at narrow targets overlapping with retained data.
- Problem: No longer answering the forgotten question does not mean the internal trace disappears. The authors argue that reconstruction-based extraction allocates capacity by energy, and low-energy targets easily mix into background features.
- Approach: Each forgotten author is made into a multi-view anchor, and a contrastive SAE is trained at layer L−4. Negative samples come from retain and Wiki, not from other forgotten samples. The code separates a common block and a target block, and only for highly selective features in the target block, the decoding contribution is subtracted from the original residual stream at activation time.
- Energy: On Qwen layer −4, background top-3 PCA energy is 3,787,695; after removing these directions, the forgetting residual top-3 energy is 11,517, about 329 times (Appendix A.3).
- Unlearning trade-off: The authors claim that on TOFU forget10 for Qwen, Llama, and Gemma, SCALPEL improves the utility–forgetting probability trade-off relative to NMF and reconstruction-based SAE, and is comparable to RMU and Gradient Difference, while the base is fixed and the intervention is inspectable (Figure 3, Appendix F.1). On selection margin, SCALPEL-Split is 0.526, 0.533, 0.517, and RMU is 0.531, 0.526, 0.524 (Table 3).
- Selectivity: Across five Qwen seeds, SCALPEL-Split's ΔC is about 0.43 and mean top-5 selectivity is about 24.5; reconstruction-based SAE's ΔC is about −0.01 and top-5 is about 1.9 (Figure 4a, Appendix G). The authors argue that higher selectivity scores correlate with better single-feature forgetting–retention trade-offs, but individual feature ranking is imperfect.
- Authors' conclusion: The authors argue that contrastive training promotes target-selective representations and view this work as a step connecting mechanistic interpretability with fine-grained unlearning; they also state this is not certified parameter deletion.
Related papers
- Test-Time Unlearning via Sparse AutoencoderDefensesarXiv