Is Retain Set All You Need in Machine Unlearning? Restoring Performance of Unlearned Models with Out-Of-Distribution Images

Jacopo Bonato, Marco Cotogni, Luigi Sabetta

TL;DR

The authors introduce SCAR (Selective-distillation for Class and Architecture-agnostic unleaRning), a novel machine unlearning method that removes specific data or entire classes from a trained model without requiring access to the original retain dataset. By leveraging out-of-distribution (OOD) images as a surrogate for knowledge distillation and using a geometry-aware distance metric, SCAR matches or exceeds the performance of state-of-the-art unlearning methods while drastically reducing data dependencies.

What Problem Does This Paper Address?

As privacy regulations like GDPR and CCPA tighten, "the right to be forgotten" has become a technical requirement for machine learning. Machine unlearning aims to erase the influence of specific training data (the forget set) from a fully trained model without completely retraining it from scratch.

Most state-of-the-art approximate unlearning algorithms rely heavily on a retain set—the portion of the training data the model is supposed to keep remembering—to restore and maintain the model's original accuracy. However, this introduces major practical bottlenecks:

  1. Data Volume: If you want to unlearn a tiny fraction of ImageNet, the retain set is massive, making the restoration phase computationally expensive and slow.
  2. Data Availability: Due to strict privacy or data retention policies, the original training data might no longer be accessible when an unlearning request arrives.

The authors tackle this challenge by asking: Can we effectively unlearn and restore model performance without using any retain data at all?

Methods

SCAR achieves retain-free unlearning through two synergistic mechanisms:

  1. The Distillation-Trick (Knowledge Preservation): To keep the model from forgetting its general capabilities without the original retain set, SCAR uses an external, out-of-distribution (OOD) dataset (e.g., a random subset of ImageNet or COCO) as a surrogate. Deep neural networks naturally cluster OOD data into feature spaces that mimic the geometry of their original training data. SCAR exploits this by minimizing the Jensen-Shannon divergence between the outputs of the original model (the teacher) and the unlearning model (the student) using these OOD images.

  2. Metric Learning via Mahalanobis Distance (Information Erasure): To force the model to forget the target data, SCAR shifts the feature vectors of the forget set toward the closest incorrect class distribution. Instead of using simple Euclidean distance or class centroids, SCAR utilizes a modified Mahalanobis distance. This incorporates the covariance matrix of the feature distributions, capturing the true shape and scaling of the classes in the feature space.

Overview of the SCAR architecture and its unlearning strategy

SCAR Self-Forget

The authors also introduce an even more extreme variant called SCAR Self-Forget for class-removal scenarios where neither the retain set nor the forget set is available (only the ID of the class to be removed). It uses the original model to classify the OOD surrogate dataset, automatically splitting it into pseudo-retain and pseudo-forget subsets to guide the unlearning process.

Datasets

The authors evaluated their approach on three standard image classification benchmarks:

  • CIFAR-10
  • CIFAR-100
  • TinyImageNet

For the OOD surrogate datasets ($\mathcal{D}^{sur}$), they experimented with:

  • A random subset of 10K images from ImageNet-1K
  • A random subset of 10K images from COCO
  • A set of 2K public natural images
  • Synthetic Gaussian noise images

Key Insights and Ideas

  • OOD Data as a Structural Mirror: The core "aha moment" of the paper is that a model's internal feature space structures external OOD data similarly to how it structures its original training data. As shown via t-SNE visualizations, the clustering behavior is highly preserved, allowing OOD data to act as an effective proxy for distillation.
Fig. 2: A-B) TSNE plots of feature vectors for the first 20 classes in CIFAR100 (A, D) and the surrogate dataset subset Imagenet (B, Dsur)
  • Semantics Matter, but Exact Classes Don't: Interestingly, using pure Gaussian noise as a surrogate fails completely because it doesn't trigger the network's spatial filters. However, as long as the surrogate dataset contains natural semantic structures (like shapes and textures), the exact choice of dataset (ImageNet vs. COCO) has almost no impact on the unlearning quality.
  • Geometry-Aware Forgetting: Shifting features using the Mahalanobis distance outperforms standard Euclidean ($L_2$) distance or Cosine similarity. Accounting for the covariance (the "ellipsoid" shape of class clusters) prevents the unlearning process from distorting adjacent, well-behaved class boundaries.

Key Results

The authors evaluated SCAR across two primary unlearning tasks: Class Removal (CR) and Homogeneous Removal (HR) (forgetting random subsets across all classes).

  • Outperforming Retain-Free Competitors: In Class Removal on CIFAR-100, SCAR achieved an Adaptive Unlearning Score (AUS) of 0.935, drastically outperforming existing retain-free methods like Negative Gradient (0.849) and Random Labels (0.774).
  • On Par with Retain-Based SOTA: Despite having zero access to the retain set, SCAR achieved performance comparable to top-tier methods that do use the retain set (such as DUCK and SCRUB).
  • Zero-Data Unlearning Success: The SCAR Self-Forget variant achieved an AUS of 0.929 on CIFAR-100 without accessing a single original training or forget image, marking a significant milestone for zero-data unlearning.

Limitations and Future Work

While SCAR demonstrates impressive performance, the authors note a few limitations:

  • Minor Accuracy Trade-off: There is a marginal decrease in overall test accuracy compared to the original model, which is a common byproduct of approximate unlearning when original data is withheld.
  • Lack of Certifiability: Like many empirical approximate unlearning methods, SCAR lacks formal mathematical proofs of certifiability (guaranteeing absolute data removal). The authors highlight the exploration of mathematical certifiability as a key direction for future work.

Summary updated

Abstract

In this paper, we introduce Selective-distillation for Class and Architecture-agnostic unleaRning (SCAR), a novel approximate unlearning method. SCAR efficiently eliminates specific information while preserving the model's test accuracy without using a retain set, which is a key component in state-of-the-art approximate unlearning algorithms. Our approach utilizes a modified Mahalanobis distance to guide the unlearning of the feature vectors of the instances to be forgotten, aligning them to the nearest wrong class distribution. Moreover, we propose a distillation-trick mechanism that distills the knowledge of the original model into the unlearning model with out-of-distribution images for retaining the original model's test performance without using any retain set. Importantly, we propose a self-forget version of SCAR that unlearns without having access to the forget set. We experimentally verified the effectiveness of our method, on three public datasets, comparing it with state-of-the-art methods. Our method obtains performance higher than methods that operate without the retain set and comparable w.r.t the best methods that rely on the retain set.
BibTeX
@inproceedings{bonato2024is,
  author = {Jacopo Bonato and Marco Cotogni and Luigi Sabetta},
  title = {{Is Retain Set All You Need in Machine Unlearning? Restoring Performance of Unlearned Models with Out-Of-Distribution Images}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73232-4\_1},
}
Figure