Unlearning Protected User Attributes in Recommendations with Adversarial Training

Christian Ganhör, David Penz, Navid Rekabsaz, Oleg Lesota, Markus SchedlarXiv 2022 · DOI

TL;DR

Recommender systems often inadvertently learn sensitive user attributes like gender or race from interaction data, leading to privacy leaks and reinforced biases. This paper introduces Adv-MultVAE, a model that uses adversarial training and a gradient reversal layer to "scrub" protected information from latent user embeddings while maintaining high-quality recommendations.

What Problem Does This Paper Address?

Modern collaborative filtering algorithms are incredibly good at finding patterns. Too good, in fact. Even when sensitive attributes—like gender, age, or location—are not explicitly provided to the model, the system can often infer them just by looking at what movies you watch or what music you listen to.

This leads to two major issues:

  1. Privacy: A user’s protected attributes can be "leaked" and recovered by an attacker from the model's internal parameters or embeddings.
  2. Bias: If a model "knows" a user's demographic, it may reinforce "filter bubbles," narrowing the variety of content shown to specific groups and intensifying societal biases.

The authors aim to create a recommendation model that is "blind" to these protected attributes without sacrificing the accuracy of its suggestions.

Methods

The researchers build upon the state-of-the-art MultVAE (Variational Auto-Encoder with Multinomial Likelihood) architecture. Their novel extension, Adv-MultVAE, adds an adversarial component to the training process.

The architecture consists of three main parts:

  • Encoder ($f$): Compresses user interaction data into a low-dimensional latent vector ($z$).
  • Decoder ($g$): Reconstructs the user's interactions from $z$ to provide recommendations.
  • Adversary ($h$): A new "head" that attempts to predict the protected attribute (e.g., gender) directly from the latent vector $z$.

The "secret sauce" is the Gradient Reversal Layer (GRL) placed between the latent vector and the adversary. During the forward pass, it acts as an identity function. However, during backpropagation, it multiplies the gradient by a negative scalar ($-\lambda$). This creates a min-max game: the adversary tries to get better at predicting gender, while the encoder is forced to learn representations that make gender prediction impossible.

Figure 2: Outline of Adv-MultVAE. The bold arrows show the flow of gradients during backward pass, where the red color indicates the reversed gradient for learning latent em- beddings (𝒛) invariant to the protected attribute (𝒚).

Datasets

The authors evaluated their approach on two standardized datasets:

  • MovieLens-1M (ML-1M): A classic dataset containing movie ratings along with user demographics (gender, age, occupation).
  • LFM-2b-DemoBias: A subset of the Last.fm 2b dataset focused on music listening records and demographic information.

In both cases, the researchers focused on gender as the protected attribute to be "unlearned."

Key Insights and Ideas

  • Implicit Leakage is Real: In a standard MultVAE, user embeddings naturally cluster by gender. As shown in Figure 1, an attacker can distinguish male from female users with ~71-72% balanced accuracy just by looking at their latent representations.
  • The Adversary vs. The Attacker: The authors distinguish between the adversary (used during training to hide info) and an attacker (a separate network used after training to see if info can still be recovered). They found that even if the internal adversary is totally confused, a strong external attacker might still find some lingering traces of the protected attribute.
  • The Pareto Frontier of Fairness: There is an inherent trade-off between recommendation utility (measured by NDCG) and bias mitigation. As you increase the strength of the adversarial training ($\lambda$), the model becomes "fairer" but recommendation quality eventually dips.

Latent embeddings before (a) and after (b) adversarial training, showing how gender clusters are broken up. Latent embeddings after (b) adversarial training.

Key Results

  • Significant Bias Reduction: Adv-MultVAE successfully reduced the balanced accuracy (BAcc) of gender prediction from ~0.71 down to ~0.57 on the MovieLens dataset. A BAcc of 0.50 would represent a perfectly "blind" model.
  • Performance Stability: While there was a statistically significant drop in recommendation metrics (NDCG and Recall) compared to the best-performing standard MultVAE, the authors noted that this was largely due to the challenges of model selection. When comparing Adv-MultVAE to a standard MultVAE at the end of its training cycle (accounting for overfitting), the performance difference was negligible.
  • Saturation Effects: Increasing the gradient reversal scaling ($\lambda$) helps up to a point, after which the adversary's ability to learn saturates, as seen in the researchers' analysis of BAcc over different $\lambda$ values.
Figure 3: Balanced accuracy of adversarial and attacker net- works over a range of gradient reversal scalings 𝜆.

Limitations and Future Work

  • Generalization: The current approach reduces correlations based on observed data. It is unclear how well this "unlearning" generalizes to out-of-distribution data or different domains.
  • User Perception: The study focuses on the model's internal state. It does not directly measure whether users actually perceive the recommendations as less biased.
  • Model Selection: Finding the perfect balance between BAcc (fairness) and NDCG (utility) remains a manual and difficult task. Future work could involve automated methods to optimize this trade-off.
  • Beyond Binary: The current study uses a binary definition of gender provided by the datasets; the authors suggest the model is generic enough to be applied to non-binary settings in the future.

Summary updated

BibTeX
@misc{ganhor2022unlearning,
  author = {Christian Ganhör and David Penz and Navid Rekabsaz and Oleg Lesota and Markus Schedl},
  title = {{Unlearning Protected User Attributes in Recommendations with Adversarial Training}},
  year = {2022},
  eprint = {2206.04500},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.04500},
}
Figure