SAFE: Machine Unlearning With Shard Graphs

Yonatan Dukler, Benjamin Bowman, Alessandro Achille, Aditya Golatkar, Ashwin Swaminathan, Stefano SoattoICCV 2023

Abstract

We present Synergy Aware Forgetting Ensemble (SAFE), a method to adapt large models on a diverse collection of data while minimizing the expected cost to remove the influence of training samples. Traditional machine unlearning often partitions datasets into independent shards (SISA), which reduces forgetting costs but severely degrades accuracy due to the loss of synergistic information between samples. SAFE introduces "shard graphs," allowing controlled information sharing between shards to recover accuracy while maintaining strict unlearning guarantees. By utilizing lightweight Introspective Cross-Attention (InCA) adapters, SAFE enables efficient training of hundreds of shards. Our empirical results across various computer vision datasets demonstrate that SAFE achieves significant accuracy gains—up to 14%—over standard sharding methods at the same forgetting cost.

Introduction

As privacy regulations like GDPR mandate the "right to be forgotten," AI providers face the challenge of efficiently removing specific training samples from trained models. The standard approach, SISA (Sharded, Isolated, Sliced, and Aggregated), partitions data into independent shards and trains separate models. While increasing the number of shards makes forgetting cheaper (as only one small model needs retraining), it creates an "Accuracy-Forgetting Trade-off." Small, isolated shards lack the diverse patterns (synergistic information) needed for high performance, leading to a sharp decline in ensemble accuracy.

Synergy Aware Forgetting Ensemble (SAFE)

SAFE breaks this trade-off through three primary architectural innovations: Shard Graphs, InCA Adapters, and Synergistic Sharding.

Shard Graphs (SG)

Instead of treating shards as isolated islands, SAFE models them as nodes in a directed graph. An edge from Shard A to Shard B indicates that the model for Shard A can access Shard B’s data during training. This connectivity allows models to recapture synergistic information across the dataset. To keep retraining costs manageable, SAFE often utilizes disjoint cliques—groups of shards that share data only with each other. If a sample in Shard B needs to be forgotten, only the models within its clique require retraining, keeping the cost linear relative to the clique size rather than the entire dataset.

Conceptual overview of Shard Graphs and the InCA Architecture.

InCA Adapters

Training hundreds of full-scale models is computationally prohibitive. SAFE employs Introspective Cross-Attention (InCA) adapters—small, efficient modules added to a frozen, pre-trained backbone (e.g., a Vision Transformer). Because these adapters do not require backpropagation through the main backbone, they are highly compositional. This allows for the parallel training of hundreds of shard-specific adapters on a single GPU in minutes, significantly reducing the overhead of maintaining a large ensemble.

Synergistic Bilevel Sharding

To further optimize performance, SAFE uses a two-tier sharding strategy. It first creates "coarse" shards that are class-balanced, followed by "fine" cliques. This ensures that even the smallest training units contain sufficient variety to learn meaningful features, preventing the "impoverishment" seen in random sharding.

Experimental Results

The researchers evaluated SAFE across seven diverse computer vision datasets, including fine-grained categories (CUB-200, Stanford Cars), textures (DTD), and general objects (CIFAR-100, Caltech-256).

Accuracy and Efficiency

The results consistently show that SAFE outperforms standard SISA, especially as the number of shards increases. At a high sharding level of 256 shards, SAFE maintained an average accuracy of 77.6%, whereas standard SISA dropped to 63.3%. This represents a substantial recovery of performance that was previously lost to isolation.

Comparison of SAFE against SISA and other baselines across multiple datasets and sharding levels.

Robustness to Domain Shift

SAFE's advantage is most pronounced on datasets that differ significantly from the backbone's pre-training data. For instance, on the Stanford Cars dataset, SAFE outperformed baselines by over 15%. This suggests that the ability to share synergistic information is critical when the underlying features of the pre-trained model are not a perfect fit for the target task.

SAFE-DP and Stochastic Forgetting

The authors also introduced SAFE-DP, which applies Differential Privacy to the edges of the shard graph. This allows a model to benefit from another shard's data without being "contaminated" by specific samples. SAFE-DP enables "stochastic forgetting," where a certain number of forget requests can be satisfied without any retraining at all, further reducing the operational cost of privacy compliance.

Conclusion

SAFE redefines the boundaries of machine unlearning by demonstrating that data isolation is not a prerequisite for efficient forgetting. By leveraging shard graphs and lightweight adapters, SAFE achieves high accuracy even with extreme sharding. This framework provides a scalable and performant solution for organizations needing to balance high-quality AI services with stringent data privacy requirements. Future work includes automating the optimization of shard graph structures and further exploring the intersection of differential privacy and graph-based unlearning.

Summary updated

BibTeX
@inproceedings{dukler2023safe,
  author = {Yonatan Dukler and Benjamin Bowman and Alessandro Achille and Aditya Golatkar and Ashwin Swaminathan and Stefano Soatto},
  title = {{SAFE: Machine Unlearning With Shard Graphs}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
  url = {https://openreview.net/forum?id=Ei3vge2ZUH-},
}
Figure