Privacy-Aware Recommendation with Private-Attribute Protection using Adversarial Learning

Ghazaleh Beigi, Ahmadreza Mosallanezhad, Ruocheng Guo, Hamidreza Alvari, Alexander Nou, Huan Liu · DOI

Abstract

Recommendation is one of the critical applications that helps users find information relevant to their interests. However, a malicious attacker can infer users' private information via recommendations. Prior work obfuscates user-item data before sharing it with recommendation system. This approach does not explicitly address the quality of recommendation while performing data obfuscation. Moreover, it cannot protect users against private-attribute inference attacks based on recommendations. This work is the first attempt to build a Recommendation with Attribute Protection (RAP) model which simultaneously recommends relevant items and counters private-attribute inference attacks. The key idea of our approach is to formulate this problem as an adversarial learning problem with two main components: the private attribute inference attacker, and the Bayesian personalized recommender. The attacker seeks to infer users' private-attribute information according to their items list and recommendations. The recommender aims to extract users' interests while employing the attacker to regularize the recommendation process. Experiments show that the proposed model both preserves the quality of recommendation service and protects users against private-attribute inference attacks.

Introduction

Recommender systems have become indispensable for navigating information-rich environments. However, they can inadvertently leak sensitive user information—such as age, gender, or occupation—based on a user's interaction history and the items recommended to them. This paper addresses private-attribute inference attacks, where a malicious actor uses a target's public interactions and received recommendations to deduce hidden demographic traits.

Historically, defenses relied on data obfuscation before reaching the recommender, using techniques like differential privacy or perturbation. These methods often suffer from two major flaws: significant degradation of recommendation quality (utility loss) and a failure to protect against privacy leaks occurring from new recommendations. This paper introduces RAP (Recommendation with Attribute Protection), an adversarial learning framework designed to generate high-quality recommendations that actively conceal users' private attributes.

Methodology: Adversarial Learning for Privacy

The core of RAP is a min-max game formulated through adversarial learning. The framework consists of two competing components that interact during training:

  1. The Bayesian Personalized Recommender: Based on Bayesian Personalized Ranking (BPR), this engine learns latent embeddings for users and items to predict and rank items a user is likely to interact with.
  2. The Private-Attribute Inference Attacker: This component is a neural network (specifically, a single-layer RNN) that acts as the adversary. It attempts to predict private attributes by analyzing the user's embeddings and the embeddings of their entire item list, including both historical interactions and newly recommended items.
The RAP adversarial learning framework, showing the interaction between the Bayesian Personalized Recommender and the Private Attribute Inference Attacker.

During training, the attacker updates its weights to improve its guesses, while the recommender updates its embeddings to minimize recommendation error and simultaneously maximize the attacker's prediction error. A hyperparameter, $\alpha$, controls the weight of the privacy penalty. This forces the recommender to find a representation that is useful for ranking but useless for demographic profiling.

Experimental Setup

The framework was evaluated using the MovieLens dataset (100k ratings, 943 users, 1,682 movies). To test attribute protection, the authors focused on three specific user attributes:

  • Gender: Male/Female
  • Age: Binned into under-35, 35-45, and over-45.
  • Occupation: 21 distinct categories.

Key Results and Insights

The performance of RAP was measured using Utility (Precision@K) and Privacy (Micro-AUC of the attacker's classifier, where lower is better).

Privacy vs. Utility Trade-off

RAP successfully confused the attacker, significantly dropping the inference AUC compared to an unprotected baseline. For instance, with 35 test items, Gender AUC dropped from 0.7662 to 0.6039, and Age AUC dropped from 0.7050 to 0.5397. Crucially, RAP maintained high utility; its P@K was 0.152, nearly identical to the unprotected model's 0.156.

Impact of the privacy parameter $\alpha$ on Attacker AUC (Privacy) and Precision@K (Utility).

The Role of the Privacy Parameter ($\alpha$)

As shown in the experimental results, increasing the adversarial penalty $\alpha$ improves privacy up to a point, typically around $\alpha = 0.5$. Beyond this "Goldilocks" zone, the model may overfit, which can paradoxically make embeddings more vulnerable to the attacker while simultaneously degrading recommendation quality.

Holistic Protection

A surprising insight from the study was that protecting multiple attributes simultaneously is more efficient than protecting a single one. Variants of RAP that targeted only one attribute (e.g., Age) resulted in a greater loss of recommendation quality than the full model protecting all three. This suggests that the latent space can more effectively hide a broad set of demographic features than a single specific trait.

Conclusion

RAP demonstrates that adversarial learning is a powerful tool for balancing utility and privacy in recommender systems. By explicitly incorporating an attacker into the training loop, the model learns to hide sensitive features in latent space without relying on brute-force data distortion.

Future work may involve adapting differential privacy mechanisms specifically for these adversarial attacks and investigating personalized utility-privacy trade-offs to cater to individual user preferences.

Summary updated

BibTeX
@inproceedings{beigi2019privacy,
  author = {Ghazaleh Beigi and Ahmadreza Mosallanezhad and Ruocheng Guo and Hamidreza Alvari and Alexander Nou and Huan Liu},
  title = {{Privacy-Aware Recommendation with Private-Attribute Protection using Adversarial Learning}},
  booktitle = {WSDM},
  year = {2019},
  doi = {10.1145/3336191.3371832},
}
Figure