Recommendation Unlearning

Chong Chen, Fei Sun, Min Zhang, Bolin Ding

TL;DR

Recommender systems often need to "forget" specific user data for privacy compliance or to remove poisoned data, but retraining models from scratch is computationally prohibitive. This paper introduces RecEraser, a novel machine unlearning framework tailored for recommender systems that partitions data to preserve collaborative signals and uses an attention mechanism to aggregate submodels. RecEraser achieves massive speedups in unlearning time (over 20x in some cases) while significantly outperforming existing unlearning baselines in recommendation accuracy.

What Problem Does This Paper Address?

Once a recommender system is trained, it memorizes the training data. However, systems increasingly need to unlearn specific data points. This could be due to privacy regulations (like GDPR's "Right to be Forgotten"), the need to remove malicious/poisoned data, or simply because a user's preferences have changed and old data is degrading their recommendations.

The naive solution is exact unlearning: delete the data and retrain the model from scratch. For large-scale recommender systems, this is far too slow. Recent approximate unlearning methods (like SISA) speed this up by randomly splitting data into isolated shards, training a submodel on each, and only retraining the affected submodel when a deletion is requested. However, recommender systems rely heavily on collaborative information—the complex web of interactions between users and items. Randomly sharding this data destroys these collaborative signals, severely degrading recommendation accuracy. Furthermore, existing methods use static aggregation to combine submodel predictions, which fails to account for the diverse, dynamic nature of user-item interactions.

Methods

The authors propose RecEraser, a framework that adapts the shard-and-aggregate unlearning paradigm specifically for collaborative filtering. It is model-agnostic and consists of two major novel components:

  1. Balanced Data Partitioning: Instead of random splits, RecEraser uses clustering-based strategies to group similar data together, preserving local collaborative signals. They propose three variants: User-based (UBP), Item-based (IBP), and Interaction-based Balanced Partition (InBP). InBP works best by clustering based on the joint pre-trained embeddings of user-item pairs. Crucially, unlike standard community detection algorithms which can create highly skewed cluster sizes, RecEraser enforces strict maximum shard sizes. This balance is vital because unlearning efficiency is bottlenecked by the size of the largest shard.
  2. Attention-based Adaptive Aggregation: During inference, RecEraser doesn't just average the predictions of the submodels. Because each submodel was trained on a specific "community" of data, its predictive power varies depending on the target user and item. RecEraser projects the embeddings from all submodels into a global space and uses a lightweight attention network to dynamically assign weights to each submodel based on the specific user-item pair being evaluated.

Datasets

The authors evaluate RecEraser on three standard, publicly available recommendation benchmarks, converted to implicit feedback (0 or 1) for Top-$K$ recommendation tasks:

  • Yelp2018: A highly sparse dataset of user-business interactions.
  • Movielens-1m: A relatively dense dataset of user-movie interactions.
  • Movielens-10m: A larger, dense dataset of user-movie interactions.

Key Insights and Ideas

  • Collaborative signals can be preserved in isolated shards: By clustering user-item interactions (InBP) rather than just users or items, the system successfully maintains the local graph structures necessary for high-quality collaborative filtering, even when the global graph is severed into shards.
  • Balanced shards are non-negotiable for unlearning: If you use standard clustering, you might get one massive cluster and several tiny ones. If a user requests deletion of a data point in the massive cluster, the unlearning time will be almost as slow as retraining the whole model. Forcing balanced shard sizes guarantees a strict upper bound on unlearning time.
  • Dynamic aggregation is critical for partitioned recommenders: A submodel trained mostly on "sci-fi movie" interactions shouldn't have an equal vote when predicting a user's preference for a "romantic comedy." The attention mechanism successfully routes predictions to the submodels that actually understand the specific user and item in question.

Key Results

RecEraser was tested using three base recommendation models: BPR, WMF, and LightGCN.

  • Massive Speedups: RecEraser dramatically reduces unlearning time compared to full retraining. For example, on the Movielens-10m dataset using LightGCN, retraining from scratch takes 25,330 minutes. RecEraser handles an unlearning request in just 940 minutes (a ~27x speedup).
  • Superior Accuracy: Compared to state-of-the-art unlearning baselines (SISA and GraphEraser), RecEraser preserves much more model utility. On the Yelp2018 dataset, RecEraser improved Recall@20 by 59%, 41%, and 46% over SISA when using BPR, WMF, and LightGCN, respectively.
  • Ablation Success: The Interaction-based partition (InBP) consistently outperformed user-only or item-only partitioning. Similarly, the attention-based aggregation significantly outperformed the mean-aggregation (used in SISA) and static-aggregation (used in GraphEraser).

Limitations and Future Work

  • The Shard Trade-off: The authors note a fundamental trade-off: increasing the number of shards improves unlearning speed (because each submodel is smaller) but slightly degrades recommendation accuracy (because more global collaborative information is lost).
  • Sequential vs. Batch Unlearning: The current framework is designed for sequential unlearning requests. Handling a large batch of unlearning requests simultaneously remains an open challenge for shard-based frameworks.
  • Future Directions: The authors plan to incorporate content features (metadata) of users and items to further improve partitioning and aggregation, and they aim to explore applying this framework to related tasks like social network embedding.

Summary updated

BibTeX
@inproceedings{chen2022recommendation,
  author = {Chong Chen and Fei Sun and Min Zhang and Bolin Ding},
  title = {{Recommendation Unlearning}},
  booktitle = {The Web Conference},
  year = {2022},
  doi = {10.1145/3485447.3511997},
}
Figure