Machine Unlearning for Streaming Forgetting

Shaofei Shen, Chenhao Zhang, Yawen Zhao, Alina Bialkowski, Weitong Chen, Miao Xu · DOI

Abstract

Traditional machine unlearning methods typically assume that data deletion requests are presented in a single batch. However, real-world scenarios involve continuous, streaming requests that demand efficient, incremental updates. This paper introduces SAFE (Stream-Aware Forgetting), a novel algorithm that frames streaming unlearning as a distribution shift problem. By leveraging posterior shift approximation and latent Gaussian representations, SAFE enables models to forget data on the fly without requiring access to the original training dataset, maintaining high performance and computational efficiency.

Introduction

Machine unlearning is essential for complying with privacy regulations like the GDPR's "right to be forgotten." While existing methods often treat unlearning as a one-time batch process, practical applications face a continuous stream of deletion requests. Applying batch methods to these streams leads to three critical issues: accumulated performance degradation over repeated updates, extreme computational inefficiency from re-running algorithms, and the impractical requirement of long-term storage for original training data.

SAFE addresses these challenges by treating the removal of data as a statistical distribution shift. This approach allows the model to adapt to the remaining data distribution incrementally, ensuring privacy without the overhead of full retraining or data retention.

Methodology

SAFE conceptualizes unlearning through three key technical pillars:

  • Incremental Risk Optimization: Instead of full retraining, SAFE employs a recursive update mechanism using single-step gradient updates from the current model weights. This keeps the computational cost per request minimal.
  • Posterior Shift Approximation: The algorithm uses Bayes' theorem to estimate the density ratio between the pre-deletion and post-deletion data distributions, identifying how the model parameters should shift to reflect the missing data.
  • Latent Gaussian Approximation: To handle complex raw data, SAFE projects inputs into a low-dimensional latent space. In this space, the data distribution is approximated as a Gaussian, allowing the algorithm to update only the mean and covariance matrix incrementally. This bypasses the need to store the original dataset while maintaining theoretical rigor.

Experimental Setup

The authors evaluated SAFE across several image classification benchmarks adapted for sequential unlearning (e.g., 20 rounds of removing 400 samples each):

  • MNIST & Fashion-MNIST: Evaluated using a 2-layer CNN.
  • CIFAR10 & TinyImagenet: Evaluated using a ResNet-18 backbone.
  • Cross-Domain Validation: Additional tests on SST-2 (text) and CoverType (tabular) datasets demonstrated the method's generalizability.

Key Results

Efficiency and Speedups

SAFE demonstrates significant computational advantages over existing baselines. On the CIFAR10 dataset, SAFE required only 2.55 seconds per unlearning request, whereas the closest competitor, Descent, took 12.90 seconds. This represents a roughly 5x speedup, making SAFE uniquely suited for high-throughput streaming environments.

Figure 5: Comparison of unlearning time across multiple datasets, showing SAFE's consistent efficiency advantage.

Performance and Accuracy

Across 16 different evaluation setups, SAFE achieved the top performance in 10 cases and ranked second in 4. It consistently balanced "Forgetting Accuracy" (the effectiveness of data removal) with "Test Accuracy" (the utility of the remaining model). Notably, SAFE showed high resilience against Membership Inference Attacks (MIA), ensuring that deleted data cannot be easily recovered or identified by adversaries.

Figure 6: Performance metrics on the TinyImagenet dataset, highlighting SAFE's superior balance of accuracy and forgetting efficacy.

Discussion and Future Work

SAFE's framing of unlearning as a distribution shift provides a robust mathematical foundation for privacy tasks, supported by dynamic regret bounds of $O(\sqrt{T} + V_T)$. While the method is highly efficient, it does exhibit sensitivity to the learning rate hyperparameter ($K$), which requires careful tuning to balance forgetting speed against model stability. Future research will focus on "fully recursive strategies" to eliminate the need to access the specific data being forgotten during the regularization step, further pushing the boundaries of autonomous machine unlearning.

Summary updated

BibTeX
@misc{shen2025machine,
  author = {Shaofei Shen and Chenhao Zhang and Yawen Zhao and Alina Bialkowski and Weitong Chen and Miao Xu},
  title = {{Machine Unlearning for Streaming Forgetting}},
  year = {2025},
  eprint = {2507.15280},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.15280},
}
Figure