Black-Box Attacks on Sequential Recommenders via Data-Free Model Extraction

Zhenrui Yue, Zhankui He, Huimin Zeng, Julian J. McAuley

Introduction

Sequential recommender systems (SRSs) are integral to modern digital platforms, yet they are often deployed as black boxes to protect proprietary algorithms and user privacy. While previous research into adversarial attacks on these systems typically assumes access to the underlying training data, this paper explores a more challenging and realistic "data-free" setting. In this scenario, an attacker aims to replicate a complex sequential recommender using only the ranked lists provided by a public API.

Overview of the proposed attack framework, contrasting normal operation with profile pollution and data poisoning attacks enabled by model extraction.

Methodology

The authors propose a two-stage attack framework that first extracts a white-box surrogate model and then leverages it for downstream adversarial attacks.

Data-Free Model Extraction

The extraction process consists of two main components:

  1. Autoregressive Data Generation: To overcome the lack of real user data, the attacker uses the victim model to "hallucinate" synthetic sequences. Starting with a random item, the attacker queries the API, samples from the recommended list, and iteratively builds "user-like" sequences.
  2. Knowledge Distillation with Ranking Loss: A local white-box model (the surrogate) is trained to mimic the victim. Since APIs typically return ranked lists rather than raw probability scores, a specialized pair-wise ranking loss function is employed to ensure the surrogate learns the relative order of preferences.
The two-stage model extraction process: (a) generating synthetic sequences autoregressively and (b) distilling the black-box model's knowledge into a white-box surrogate.

Downstream Attacks

Once the surrogate model is established, the attacker can perform sophisticated attacks:

  • Profile Pollution: Appending adversarial items to a real user's history to manipulate future recommendations toward a target item.
  • Data Poisoning: Injecting fake user profiles into the system's training set to bias the model's future behavior.
  • Gradient-Based Search: Utilizing the white-box nature of the surrogate, attackers can use gradient descent (specifically a variation of the Fast Gradient Sign Method, or T-FGSM) to mathematically find the most "persuasive" items to inject.

Experimental Evaluation

The framework was tested on three standard benchmarks: ML-1M (movies), Steam (games), and Amazon Beauty (cosmetics). The "victim" models included RNN-based (NARM), Transformer-based (SASRec), and Bidirectional Transformer (BERT4Rec) architectures.

Key Results

  • High Fidelity Extraction: Surrogate models achieved approximately 94.5% of the original models' performance. On ML-1M, the surrogate and victim agreed on top-10 recommendations over 74% of the time.
  • Attack Effectiveness: Profile pollution attacks significantly increased the exposure of target items. On the Steam dataset, the exposure (N@10) for target items rose from 0.070 to 0.381 with minimal adversarial injection.
  • Efficiency: Successful extraction was achieved with a relatively small budget of 5,000 API queries, making the attack practical and difficult to distinguish from legitimate user activity.

Discussion and Insights

The study reveals that sequential models are inherently generative, allowing attackers to bypass the need for original datasets. Furthermore, the attacks exhibit high cross-architecture transferability; a surrogate trained on one architecture can successfully attack a victim using another. Interestingly, sparser datasets like Amazon Beauty proved more vulnerable to downstream attacks, as the models have less "real" signal to resist adversarial noise.

Conclusion

This research highlights a critical security flaw in black-box recommender systems. By demonstrating that model extraction is feasible even without training data, the authors underscore the need for more robust training regimes and defensive distillation techniques to protect these ubiquitous systems from adversarial manipulation.

Summary updated

BibTeX
@inproceedings{yue2021black,
  author = {Zhenrui Yue and Zhankui He and Huimin Zeng and Julian J. McAuley},
  title = {{Black-Box Attacks on Sequential Recommenders via Data-Free Model Extraction}},
  booktitle = {RecSys},
  year = {2021},
  url = {https://openreview.net/forum?id=p3oRajmYJHQ},
}
Figure