Abstract: Machine unlearning offers effective solutions for revoking the influence of specific training data on pre-trained model parameters. While existing approaches address unlearning for classification and generative models, they overlook an important category of machine learning models: contrastive learning (CL) methods. This paper addresses this gap by introducing the Machine Unlearning for Contrastive Learning (MUC) framework and adapting existing methods. We identify limitations in current approaches, noting that several methods perform inadequately as unlearners and that existing evaluation tools insufficiently validate unlearning effects in contrastive learning. To address these issues, we propose Alignment Calibration (AC), a novel method that explicitly considers contrastive learning properties and optimizes towards new auditing metrics for easy verification of unlearning. Through empirical comparisons with baseline methods on SimCLR, MoCo, and CLIP, we demonstrate that AC: (1) achieves state-of-the-art performance, approximating exact unlearning (retraining); (2) enables data owners to clearly visualize unlearning effects through black-box evaluation.
Introduction
With the rise of the "Right to be Forgotten" (mandated by regulations like GDPR and CCPA), machine unlearning has become a critical field. Most existing research focuses on supervised classification—where you can simply flip labels or adjust decision boundaries.
However, Contrastive Learning (CL)—which powers models like CLIP by learning to group similar images together without explicit labels—presents a unique challenge. In CL, there are no fixed classes; the model learns a high-dimensional "feature space." If a user wants their photos removed from a pre-trained model, the challenge is to "un-group" those specific features without destroying the rest of the model's knowledge. Furthermore, a user (who doesn't have access to the model's internal weights) needs a way to verify that the model owner actually performed the unlearning.
The MUC Framework and Alignment Calibration
The authors introduce the MUC framework, which distinguishes between the Model Owner (who executes the unlearning) and the Data Owner (who requests it).
Their primary contribution is Alignment Calibration (AC), an unlearning algorithm that optimizes a loss function with three distinct goals:
- Positive Alignment Calibration: It actively reduces the similarity between different versions (augmentations) of the images to be forgotten.
- Negative Alignment Calibration: It intentionally leaves "traces" by slightly increasing the similarity between the unlearn data and other random data. This creates a detectable "scar" in the feature space that acts as an audit trail.
- Performance Preservation: It ensures the rest of the model’s feature space remains "uniform" and useful for downstream tasks.
To verify this, they propose using Alignment Matrices (AM) and Alignment Gap Matrices (AGM)—heatmaps that visualize the similarity between images before and after unlearning.
Key Insights: Verifiability via "Traces"
A significant contribution of this work is addressing the "Cheating" Problem. The authors demonstrate that standard metrics (like Forgetting Scores) are statistically weak. A malicious model owner could simply swap a few random seeds and claim they unlearned data, and a user with only a few images wouldn't be able to tell the difference.
By intentionally manipulating the negative alignment of the unlearn set, AC makes unlearning statistically detectable even with very small sample sizes. As shown in the table above, as the number of images ($N$) provided by the data owner for auditing increases, the $p$-value for detecting the unlearning "trace" decreases, reaching statistical significance ($p < 0.05$) at $N=20$.
Experimental Results
The researchers evaluated their methods across several standard benchmarks, including CIFAR-10, CIFAR-100, and MS-COCO using SimCLR, MoCo, and CLIP architectures.
- State-of-the-Art Performance: AC consistently achieved the lowest "Average Gap" compared to the gold standard of retraining from scratch. For example, on MoCo/CIFAR-10, AC had an average gap of only 0.92%, significantly beating baselines like Fine-tuning (1.74%) and Gradient Ascent (2.67%).
- Visual Auditing: The Alignment Gap Matrices (AGM) provided clear, diagonal "gaps" in heatmaps, allowing data owners to visually confirm that the model's internal representation of their data had changed as requested.
- Efficiency: AC is orders of magnitude faster than retraining. While retraining a model might take nearly two hours (109 mins), AC achieves similar results in under two minutes.
Conclusion and Future Work
While AC provides a robust solution for "random forgetting" (removing specific samples), the authors note that future work is needed to address "concept forgetting" (e.g., removing all images of a specific category). Additionally, while AC helps verify unlearning in a black-box setting, it remains an "approximate" technique without the formal "certified removal" guarantees found in simpler supervised models. Nonetheless, MUC represents a significant step forward in making contrastive models compliant with privacy regulations.
Summary updated