Post-Training Attribute Unlearning in Recommender Systems

Chaochao Chen, Yizhao Zhang, Yuyuan Li, Jun Wang, Lianyong Qi, Xiaolong Xu, Xiaolin Zheng, Jianwei Yin

TL;DR

This paper introduces Post-Training Attribute Unlearning (PoT-AU), a method to scrub sensitive latent information (like gender or age) from a recommendation model after it has already been trained. By combining a distribution-based "distinguishability loss" with a novel "function-space regularization," the authors effectively blind attribute inference attackers while keeping recommendation quality high—all without needing access to the original training data.

What Problem Does This Paper Address?

Modern recommender systems are incredibly good at learning user preferences, but they are also "too smart" for their own good. Even if a model isn't explicitly trained on sensitive attributes like race, gender, or age, it often learns to represent these features implicitly in user embeddings. Attackers can then use "attribute inference attacks" to extract this private information.

Traditional "machine unlearning" usually focuses on Input Unlearning (IU)—deleting specific training data points. However, as shown in the table below, IU doesn't solve the problem of latent attributes that were never in the training set to begin with.

Table 1. Difference between input unlearning and attribute unlearning in recommender systems.

The authors tackle Attribute Unlearning (AU), specifically in a Post-Training (PoT) setting. This is a strict but realistic scenario where a company needs to update a deployed model to protect user privacy without having to retrain the entire system from scratch or access protected raw training logs.

Methods

The authors propose a two-component loss function to optimize user embeddings after the initial training is complete:

  1. Distinguishability Loss ($\ell_u$): The goal here is to make the distributions of user embeddings for different attribute groups (e.g., "Male" vs. "Female") look identical to an observer. They use Maximum Mean Discrepancy (MMD) to measure the distance between these distributions. To handle multi-class attributes (like "Country") efficiently, they introduce an anchor distribution (a barycenter of all groups). This reduces the computational complexity from $O(T^2)$ to $O(T)$, where $T$ is the number of attribute categories.
  2. Function-Space Regularization Loss ($\ell_r$): Standard unlearning often uses $\ell_2$ regularization in the parameter space to keep the new model close to the old one. The authors argue this is a poor proxy for actual model performance. Instead, they regularize in the function space by ensuring the top-$k$ recommended items for each user remain consistent before and after unlearning. They use a learning-to-rank approach with an adaptive margin that accounts for item similarity.

The overall process is illustrated in the figure below, contrasting it with In-Training methods:

An overview of Post-Training Attribute Unlearning (PoT-AU) vs In-Training Attribute Unlearning (InT-AU)

Datasets

The researchers evaluated their method on four diverse real-world datasets:

  • MovieLens 100K & 1M: Standard recommendation benchmarks; unlearning focused on Gender and Age.
  • LFM-2B: A massive music listening dataset; unlearning focused on Gender and Country.
  • KuaiSAR-small: A short-video recommendation dataset from Kuaishou; unlearning focused on two anonymous user features (Feat1 and Feat2).

Key Insights and Ideas

  • Parameter Space vs. Function Space: A major "aha" moment is the empirical proof that parameter-space distance ($\ell_2$) correlates poorly with recommendation quality. Their function-space approach (RBO similarity) shows a much stronger correlation, meaning it's a far better tool for preserving the user experience during unlearning.
  • The Anchor Distribution Trick: By creating a synthetic "average" distribution and pulling all attribute groups toward it, they made multi-class unlearning practical for large-scale systems.
  • Efficiency is King: Because PoT-AU is a fine-tuning process rather than a full retrain, it is orders of magnitude faster than "Exact Unlearning" methods, making it viable for production environments.

Key Results

  • Privacy Protection: The method successfully reduced the accuracy of attribute inference attackers (using MLP models) to near-random levels. For example, on MovieLens 1M Gender, the attacker's F1 score dropped from ~0.76 to ~0.49.
  • Performance Preservation: While unlearning usually hurts accuracy, the proposed D2D-FR (Function-space Regularization) method significantly outperformed the authors' previous parameter-space work (D2D-PR). On average, D2D-FR only saw a 1.91% drop in NDCG, compared to a 4.88% drop for the older method.
  • Speed: PoT-AU methods were significantly faster than retraining. On the LFM-2B dataset, their method finished in under 100 seconds, while retraining took over 2,200 seconds.

Limitations and Future Work

  • System-wide vs. User-wise: Currently, the method performs "system-wise" unlearning, updating all user embeddings to remove the attribute's influence. The authors identify user-wise attribute unlearning—where only the embeddings of specific users who request privacy are updated—as a key area for future research.
  • Attacker Knowledge: The study assumes a "grey-box" attacker who has access to embeddings but not the full model parameters. Exploring even more restricted or more powerful attack scenarios could be beneficial.

For those interested in the formal math and notation used throughout the paper, refer to the summary table below:

Table 2. Description of Notations

Summary updated

Abstract

With the growing privacy concerns in recommender systems, recommendation unlearning is getting increasing attention. Existing studies predominantly use training data, i.e., model inputs, as unlearning target. However, attackers can extract private information from the model even if it has not been explicitly encountered during training. We name this unseen information as \textit{attribute} and treat it as unlearning target. To protect the sensitive attribute of users, Attribute Unlearning (AU) aims to make target attributes indistinguishable. In this paper, we focus on a strict but practical setting of AU, namely Post-Training Attribute Unlearning (PoT-AU), where unlearning can only be performed after the training of the recommendation model is completed. To address the PoT-AU problem in recommender systems, we propose a two-component loss function. The first component is distinguishability loss, where we design a distribution-based measurement to make attribute labels indistinguishable from attackers. We further extend this measurement to handle multi-class attribute cases with efficient computational overhead. The second component is regularization loss, where we explore a function-space measurement that effectively maintains recommendation performance compared to parameter-space regularization. We use stochastic gradient descent algorithm to optimize our proposed loss. Extensive experiments on four real-world datasets demonstrate the effectiveness of our proposed methods.
BibTeX
@article{chen2025post,
  author = {Chaochao Chen and Yizhao Zhang and Yuyuan Li and Jun Wang and Lianyong Qi and Xiaolong Xu and Xiaolin Zheng and Jianwei Yin},
  title = {{Post-Training Attribute Unlearning in Recommender Systems}},
  journal = {ACM Trans. Information Systems},
  year = {2025},
  doi = {10.1145/3701987},
}
Figure