Abstract
Machine unlearning—the process of removing specific data or classes from a trained model—is increasingly vital for privacy and bias mitigation. Traditional methods like retraining or complex distillation are computationally expensive and often impractical for large-scale models. This paper introduces a "nearly compute-free" unlearning method utilizing a Discrete Key-Value Bottleneck (DKVB) architecture. By leveraging sparse, localized representations, the authors demonstrate that unlearning can be achieved through simple masking of specific key-value pairs. This approach maintains high performance on retained data while effectively zeroing out accuracy on the forget set, offering a 20× increase in compute efficiency over state-of-the-art baselines.
Introduction
As AI models become more integrated into society, the "right to be forgotten" and the need to remove biased or harmful data have become critical. The gold standard for unlearning is retraining the model from scratch without the "forget set," but for modern large-scale models, this is computationally ruinous. Existing "efficient" alternatives often involve complex optimization procedures like knowledge distillation (e.g., the SCRUB algorithm), which still require significant GPU hours and access to the original training data. The challenge is finding a way to "delete" specific knowledge quickly and cheaply without "brain-damaging" the model’s performance on everything else it was supposed to learn.
The DKVB Architecture
The authors propose using a specific architectural component called a Discrete Key-Value Bottleneck (DKVB). Unlike standard neural networks where information is "dense" and tangled, DKVB forces the model to use sparse, localized representations.
The architecture consists of:
- A Frozen Encoder: (e.g., CLIP or ResNet) that turns inputs into embeddings.
- The DKVB Layer: A set of "codebooks" containing key-value pairs. The model looks up the nearest "keys" for an input and retrieves the corresponding "values."
- A Decoder: Which takes these values to produce the final prediction.
Unlearning via Masking
Because the mapping is discrete and sparse, the authors can perform unlearning through masking rather than retraining. They propose two specific techniques:
- Unlearning via Examples: They pass a few examples from the forget set through the model, identify which key-value pairs are activated, and simply "flag" and mask them so they can never be used again.
- Unlearning via Activations: They pass the entire forget set, record how often each key is used, and mask the top-$N_a$ most frequently used keys.
In both cases, "masking" is achieved by setting the distance to those keys to infinity, effectively redirecting the model to other, non-informative keys for the forget class. This process is essentially "zero-shot"—once you identify the keys to mask via a single inference pass, the unlearning is instantaneous.
Experimental Results
The researchers evaluated their approach on four standard image classification benchmarks: CIFAR-10, CIFAR-100, LACUNA-100 (simulating celebrity identity unlearning), and ImageNet-1k. They tested these using two different "backbones": a CLIP-pretrained ViT-B/32 and an ImageNet-pretrained ResNet-50.
Key Findings
- Massive Compute Savings: The proposed method is at least 20× more compute-efficient than SCRUB. While SCRUB requires trillions of operations for retraining, the DKVB method requires almost zero additional compute beyond a basic inference pass.
- Superior Performance Retention: In many tests, the DKVB method resulted in the least amount of damage to the "retain set." For example, on CIFAR-10 with a ViT backbone, the DKVB method actually saw a slight increase (0.36%) in retain accuracy while successfully dropping forget set accuracy to zero.
- Complete Forgetting: Across all datasets, the method was able to reduce the forget set accuracy to 0% (or random chance) effectively.
Discussion and Limitations
The core insight of this work is that sparsity is the secret to surgery. Dense representations make unlearning hard because every parameter contributes to multiple concepts. By forcing the model into sparse, discrete "slots" (keys), knowledge becomes localized. Deleting a class becomes as simple as finding the right slots and closing them.
However, several limitations remain. This method is not a "plug-and-play" solution for existing models like GPT-4; the model must be trained with the DKVB architecture from the start. Additionally, while highly effective for class unlearning, instance unlearning (forgetting one specific example) is more complex because DKVB clusters similar representations, meaning forgetting one instance might inadvertently affect very similar examples in the same class.
Conclusion
Unlearning via sparse representations provides a scalable, efficient path toward privacy-preserving AI. By embedding sparsity into the model's inductive bias, researchers have created a system that is naturally prepared for future unlearning requests without the need for expensive post-hoc optimization.
Summary updated