Low Compute Unlearning via Sparse Representations

Vedant Shah, Frederik Träuble, Ashish Malik, Hugo Larochelle, Michael Curtis Mozer, Sanjeev Arora, Yoshua Bengio, Anirudh GoyalOpenReview 2025 · Submission to ICLR 2025 · Rejected

In the era of the "right to be forgotten" and increasing concerns over biased training data, machine unlearning—the process of removing the influence of specific data from a trained model—has become a critical necessity. However, traditional unlearning is notoriously difficult and expensive, often requiring costly retraining or complex optimization.

A new paper, Low Compute Unlearning via Sparse Representations, proposes a remarkably simple solution: if you build models with sparse, discrete "bottlenecks," you can unlearn data simply by "turning off" the parts of the model that represent it.

TL;DR

Researchers have developed a method for machine unlearning that is at least 20x faster than current state-of-the-art techniques. By using a Discrete Key-Value Bottleneck (DKVB), the model stores information in sparse, localized "keys," allowing specific classes to be erased by simply masking those keys—requiring almost zero additional computation.

What Problem Does This Paper Address?

Most modern neural networks are "densely connected," meaning a single parameter can influence the output for almost any input. This "entanglement" makes unlearning a nightmare. If you want a model to forget a specific person's face or a biased category of images, you can't just delete a few neurons; the information is smeared across the entire network.

Current solutions usually involve:

  1. Retraining from scratch: Guaranteed to work, but prohibitively expensive for large models.
  2. Fine-tuning/Distillation: Using techniques like SCRUB to "teach" the model to forget. While faster than retraining, these still require significant GPU time and access to the original training data.

The authors sought a way to make unlearning "surgical" and "compute-free," where the model's architecture itself makes it easy to isolate and remove specific knowledge.

Methods: The Discrete Key-Value Bottleneck

Architecture of the Discrete Key-Value Bottleneck (DKVB) showing how specific keys activated by the forget set are masked out.

The core of this approach is the Discrete Key-Value Bottleneck (DKVB). Instead of a standard dense layer, the model uses:

  • A Frozen Encoder: A pre-trained backbone (like CLIP or ResNet) that turns images into embeddings.
  • A Key-Value Lookup: The embedding is compared against a large "codebook" of keys. The model selects the top-$k$ most similar keys and retrieves their corresponding (learnable) values.
  • A Decoder: These values are then pooled to produce the final prediction.

Because the mapping is discrete and sparse, specific inputs only activate a tiny fraction of the available keys. The authors propose unlearning by passing a few examples of the "forget class" through the model, identifying which keys they activate, and simply masking (disabling) those keys.

Crucially, no gradients are calculated during this process. You aren't training the model to forget; you are simply editing its "lookup table" in real-time.

Datasets

The researchers evaluated their method on four standard computer vision benchmarks: CIFAR-10, CIFAR-100, LACUNA-100 (derived from VGG-Faces to simulate unlearning specific identities), and ImageNet-1k. They tested these using both ViT-B/32 (CLIP-pretrained) and ResNet-50 backbones.

Key Insights and Ideas

  • Sparsity is a Feature, Not a Bug: In dense models, knowledge is entangled. In DKVB models, knowledge is localized. This localization is what makes unlearning trivial.
  • The "Compute-Free" Advantage: Because unlearning is just masking, it happens at the speed of a single inference pass. This is a paradigm shift from optimization-based unlearning.
  • Minimal Collateral Damage: Because the representations are so sparse, "turning off" the keys for one class (e.g., "pandas") has almost zero effect on the keys used for another class (e.g., "dogs").
  • Zero-Shot Potential: The authors show that you can even unlearn using "proxy" data—images that look like the forget set but weren't part of the original training—making this viable even when the original training data is no longer available.

Key Results

Retain Set vs. Forget Set Accuracy across multiple datasets, demonstrating successful unlearning with minimal impact on retained knowledge.
  • Effectiveness: The proposed method achieved complete unlearning (approaching 0% accuracy on the forget set) across all datasets.
  • Performance Retention: As shown in the performance plots, accuracy on the "retain set" (the data the model should keep) remained nearly identical to the original model, often outperforming the state-of-the-art SCRUB method.
  • Efficiency: The method is at least 20x faster than SCRUB. In some cases, unlearning an entire class on ImageNet took only a few seconds of inference time.
  • Comparison: Compared to "Negative Gradient" methods (which often damage the rest of the model's knowledge), the DKVB approach was significantly more stable.

Limitations and Future Work

While promising, the authors acknowledge several hurdles:

  • Reliance on Pre-trained Encoders: The system works best when the frozen encoder already has a good "understanding" of the world.
  • Instance-Specific Unlearning: The method is currently optimized for class unlearning (forgetting all "cats"). Forgetting a specific cat is harder because that instance likely shares many keys with other cats, leading to more "collateral damage" on the retain set.
  • Scaling to Generative Models: The current work focuses on classification. Applying this to Large Language Models (LLMs) or Diffusion models (where knowledge is even more complex) remains an open challenge.

Summary updated

BibTeX
@misc{shah2025low,
  author = {Vedant Shah and Frederik Träuble and Ashish Malik and Hugo Larochelle and Michael Curtis Mozer and Sanjeev Arora and Yoshua Bengio and Anirudh Goyal},
  title = {{Low Compute Unlearning via Sparse Representations}},
  year = {2025},
  url = {https://openreview.net/forum?id=nb3VjILNVs},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2025},
}
Figure