Neuralyzing the Trace: Selective Representation-Level Unlearning with Contrastive Sparse Autoencoders
Organizations: Mila · ILLS · École normale supérieure Paris-Saclay · IRT Saint Exupéry
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.
Figures & tables
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Hyperparameter | Range / choices | Sampling | Applies to |
|---|---|---|---|
| Latent dimension | categorical | all | |
| Selection threshold | uniform | all | |
| Batch size | categorical | trained SAEs | |
| Training epochs | int. uniform | trained SAEs | |
| Encoder depth | categorical | trained SAEs | |
| Sparsity coefficient | log-uniform | trained SAEs |
| Hyperparameter | Range / choices | Sampling | Method |
|---|---|---|---|
| Learning rate | log-uniform | both | |
| Training epochs | categorical | both | |
| Forget-loss weight ( gamma ) | log-uniform | both | |
| Retain-loss weight ( alpha ) | log-uniform | both | |
| Retain loss type | categorical | GradDiff | |
| Steering coefficient | log-uniform | RMU |
| Method | Qwen2.5 | Llama3.2 | Gemma2 |
|---|---|---|---|
| Contrastive SAE | |||
| SCALPEL -Split | |||
| Standard SAE | |||
| NMF | |||
| GradDiff | |||
| RMU |
Machine Unlearning
Machine unlearning removes the influence of selected data or concepts from trained models while preserving useful behavior and avoiding full retraining.
See all 351 papers