The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning

Youssef Allouah, Joshua Kazdan, Rachid Guerraoui, Sanmi Koyejo

Introduction

As privacy regulations like the GDPR grant individuals the "right to be forgotten," AI developers face a significant technical challenge: how to "delete" a specific user's data from a trained neural network's weights without spending the massive compute required to retrain the entire model from scratch.

While "approximate unlearning"—ensuring the model is statistically indistinguishable from a retrained one—offers a path forward, it has historically faced major hurdles. First, there have been theoretical gaps in understanding the trade-offs between utility (model accuracy), time complexity, and the number of samples that can be deleted. Second, models face the "Out-of-Distribution (OOD) Trap." If the data to be forgotten is an outlier, the model may have overfitted to it. Removing its influence via standard fine-tuning can actually take longer than retraining the whole model from scratch, exposing systems to "slow-down" denial-of-service attacks.

This paper provides a rigorous theoretical framework for machine unlearning, analyzing the fundamental utility, time, and space complexity trade-offs. The authors demonstrate that while simple methods work well for typical data, OOD data requires a novel robust training algorithm to guarantee efficient unlearning.

Methodology: Two Approaches to Unlearning

The researchers analyze two primary approaches to tackle different types of data deletion, using Rényi divergence to certify unlearning with formal guarantees similar to Differential Privacy (DP).

  • Algorithm 1 (For In-Distribution Data): A straightforward procedure involving Empirical Risk Minimization (ERM) followed by output perturbation. The system finds the new optimal weights for the remaining data and adds a calculated amount of Gaussian noise to mask any residual influence of the forgotten samples.
  • Algorithm 2 (For OOD Data): To address the OOD trap, the authors introduce a novel Robust Training method. Instead of standard Gradient Descent, it uses a coordinate-wise trimmed mean of the gradients. By ignoring the largest and smallest gradient values for each dimension during the initial training phase, the model becomes less sensitive to outliers. When an OOD sample needs to be unlearned later, the starting point is already close to the desired "clean" model.

In-Distribution Unlearning: Breaking the Dimensionality Curse

A major insight from the paper is the proof that unlearning achieves a "tight separation" from Differential Privacy. It is not simply "DP for free."

While the utility of Differential Privacy often degrades as the model dimension ($d$) increases, the authors show that in-distribution unlearning can be dimension-independent. For standard data, Algorithm 1 achieves a utility deletion capacity of $\Omega(n\sqrt{\alpha})$, meaning a significant portion of the dataset can be deleted while maintaining a target error $\alpha$.

In-distribution error comparison between Algorithm 1 and DP-SGD across varying dimensions.

As demonstrated in synthetic linear regression experiments, Algorithm 1 maintains a flat error rate regardless of dimensionality, whereas standard DP-SGD error scales linearly with the dimension.

Out-of-Distribution Unlearning: Escaping the OOD Trap

The paper highlights a critical vulnerability: you cannot fix OOD unlearning at the deletion stage alone. If a model was trained poorly on outliers, the unlearning time becomes theoretically unbounded. Efficiency requires changing how the model is trained in the first place.

By employing the robust trimmed-mean gradients in Algorithm 2, the system achieves near-linear time and space complexity for unlearning. This effectively neutralizes slow-down attacks where malicious users submit deletion requests for OOD data to exhaust system resources.

Out-of-distribution error versus unlearning iterations for Algorithm 1 and Algorithm 2.

In experiments on the California Housing dataset (simulating OOD requests by shifting labels), Algorithm 1 was shown to be up to 10x slower than the proposed Algorithm 2 when attempting to unlearn OOD data. Algorithm 2 converges in significantly fewer iterations, proving the necessity of robust initial training.

Limitations and Future Work

While this framework provides a strong theoretical foundation—including formalizing "Deletion Capacity" to help engineers measure how unlearnable their systems are—several challenges remain:

  • Convexity Assumptions: Much of the rigorous proof relies on the loss function being (strongly) convex. While applicable to problems like PCA, extending these guarantees to highly non-convex deep neural networks remains an open challenge.
  • Unified Bounds: The paper provides distinct lower and upper bounds for different scenarios, but a single unified upper bound for all types of deletion is yet to be discovered.
  • Real-world Scale: Testing these robust trimmed-mean gradients on massive-scale architectures, such as Large Language Models (LLMs) or vision transformers, is a necessary next step for widespread industry adoption.

Summary updated

BibTeX
@inproceedings{allouah2025utility,
  author = {Youssef Allouah and Joshua Kazdan and Rachid Guerraoui and Sanmi Koyejo},
  title = {{The Utility and Complexity of In- and Out-of-Distribution Machine Unlearning}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=HVFMooKrHX},
}
Figure