Zero-Shot Class Unlearning in CLIP with Synthetic Samples
About
Machine unlearning is a crucial area of research. It is driven by the need to remove sensitive information from models to safeguard individuals' right to be forgotten under rigorous regulations such as GDPR. In this work, we focus on unlearning within CLIP, a dual vision-language encoder model trained on a massive dataset of image-text pairs using contrastive loss. To achieve forgetting we expand the application of Lipschitz regularization to the multimodal context of CLIP. Specifically, we ensure the smoothing of both visual and textual embeddings associated with the class intended to be forgotten relative to the perturbation introduced to the samples from that class. Additionally, importantly, we remove the necessity for real forgetting data by generating synthetic samples through gradient ascent maximizing the target class. Our forgetting procedure is iterative, where we track accuracy on a synthetic forget set and stop when accuracy falls below a chosen threshold. We employ a selective layers update strategy based on their average absolute gradient value to mitigate over-forgetting. We validate our approach on several standard datasets and provide thorough ablation analysis and comparisons with previous work.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Image Classification | DomainNet | Accuracy (ClipArt)90.5 | 206 | |
| Image Classification | Oxford Flowers (test) | -- | 73 | |
| Image Classification | Target Classes Forget Set (test) | BF97.1 | 24 | |
| Image Classification | StanfordDogs (test) | BF Score59.1 | 18 | |
| Image Classification | StanfordCars standard (test) | BF Accuracy65.5 | 18 | |
| Image Classification | Caltech101 standard (test) | BF Score93.3 | 18 | |
| Machine Unlearning | Tiny-ImageNet | -- | 16 | |
| Zero-shot Class Unlearning | StanfordCars (forget set) | Bias Factor82.2 | 12 | |
| Zero-shot Class Unlearning | StanfordCars (retain set) | BF81.4 | 12 | |
| Zero-shot Class Unlearning | StanfordDogs (forget set) | BF80.38 | 12 |