Pre-training for Recommendation Unlearning

Guoxuan Chen, Lianghao Xia, Chao Huang · DOI

Abstract

Modern recommender systems powered by Graph Neural Networks (GNNs) excel at modeling complex user-item interactions, yet increasingly face scenarios requiring selective forgetting of training data. Beyond user requests to remove specific interactions due to privacy concerns or preference changes, regulatory frameworks mandate recommender systems' ability to eliminate the influence of certain user data from models. This recommendation unlearning challenge presents unique difficulties as removing connections within interaction graphs creates ripple effects throughout the model, potentially impacting recommendations for numerous users. Traditional approaches suffer from significant drawbacks: fragmentation methods damage graph structure and diminish performance, while influence function techniques make assumptions that may not hold in complex GNNs, particularly with self-supervised or random architectures. To address these limitations, we propose a novel model-agnostic pre-training paradigm UnlearnRec that prepares systems for efficient unlearning operations. Our Influence Encoder takes unlearning requests together with existing model parameters and directly produces updated parameters of the unlearned model with little fine-tuning, avoiding complete retraining while preserving model performance characteristics. Extensive evaluation on public benchmarks demonstrates that our method delivers exceptional unlearning effectiveness while providing more than 10x speedup compared to retraining approaches.

Introduction

In the era of "the right to be forgotten" (mandated by regulations like GDPR), recommender systems must be able to "unlearn" specific user interactions upon request. However, modern recommenders rely heavily on Graph Neural Networks (GNNs), where user-item interactions are deeply interconnected. Removing a single edge in these graphs creates a "ripple effect" that alters the embeddings of many other nodes, making simple deletion insufficient.

Current solutions generally fall into two camps, both with significant flaws:

  1. Partition-based methods: These divide the graph into "shards" and retrain only the affected ones. This is slow if requests span many shards and inevitably damages the graph's natural topology, hurting accuracy.
  2. Influence Function (IF) methods: These use mathematical approximations to estimate how a model would change without certain data. While fast, they rely on strict assumptions that often fail in complex, modern GNNs—especially those using Self-Supervised Learning (SSL), where random augmentations make gradient estimation unpredictable.

The UnlearnRec Framework

UnlearnRec introduces the first learnable paradigm for unlearning. Instead of calculating a mathematical approximation on the fly, it trains a model to learn how to unlearn by predicting how model parameters should shift when data is removed.

Overview of the UnlearnRec framework, illustrating the transition from unlearning requests to the Influence Encoder and the final pre-train/fine-tune pipeline.

Core Components

  • Influence Dependency Matrix (IDM): The framework derives a matrix that captures the interdependencies between unlearning requests. This matrix acts as a map for how "influence" flows through the graph during the unlearning process.
  • Influence Encoder (IE): This trainable module takes unlearning requests and the original model parameters as input and directly outputs the "revised" embeddings.

Two-Stage Pipeline

  1. Pre-training: The system simulates thousands of unlearning requests on the existing model. The Influence Encoder learns to predict the resulting embedding shifts by optimizing a multi-task loss comprising Model Loss, Unlearning Loss, and a "Preserving Loss" to keep the rest of the model stable.
  2. Fine-tuning: When a real unlearning request arrives, the pre-trained IE provides a near-perfect starting point. A very brief fine-tuning stage (3-5 epochs) then polishes the model for the specific request.

Key Insights

  • Learning the "Physics" of Unlearning: Rather than treating unlearning as a one-off math problem, UnlearnRec treats it as a pattern-recognition task. By pre-training on simulated deletions, the model learns the underlying "physics" of how the interaction graph reacts to missing data.
  • The SSL Breakthrough: Traditional Influence Functions struggle with Self-Supervised Learning because SSL introduces stochasticity. UnlearnRec bypasses this by using a "Preserving Loss" that forces the unlearned model to match the original model’s distribution characteristics, effectively capturing the "spirit" of the SSL signals without needing to calculate exact gradients.
  • Diffusion-like Logic: The two-stage process is conceptually similar to diffusion models. Pre-training is like a "noise injection" process (simulating deletions), while fine-tuning is the "reconstruction" that recovers a clean, unlearned model state.

Experimental Evaluation

The framework was evaluated on three widely used public benchmarks: Movielens-1M, Gowalla, and Yelp2018. The authors tested UnlearnRec across different GNN backbones, including LightGCN, SGL, and SimGCL, to prove its model-agnostic nature.

Key Results

  • Efficiency: UnlearnRec provides a 10x speedup over retraining from scratch. While Influence Function methods can be faster in some cases, they require massive amounts of GPU memory to store Hessian matrices, whereas UnlearnRec’s memory footprint is comparable to standard training.
  • Privacy (Unlearning Efficacy): Using Membership Inference (MI) metrics, the results showed that UnlearnRec effectively "hides" the deleted data. The probability of the model recommending an unlearned item was lower than that of a random negative sample, indicating the data was truly forgotten.
  • Accuracy Retention: Unlike partition-based methods that "break" the graph, UnlearnRec maintains a recommendation accuracy (Recall and NDCG) that is nearly identical to a model retrained from scratch.

Conclusion

UnlearnRec demonstrates that recommendation unlearning can be efficiently handled through a learnable pre-training paradigm. While the paper focuses on edge unlearning, it notes that node unlearning (removing a user entirely) can be addressed by removing all associated edges. Future work may explore more direct ways to handle node-level removal and extending this approach to sequence-based or transformer-based recommenders.

Summary updated

BibTeX
@inproceedings{chen2025pre,
  author = {Guoxuan Chen and Lianghao Xia and Chao Huang},
  title = {{Pre-training for Recommendation Unlearning}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2025},
  doi = {10.1145/3726302.3730060},
}
Figure