LLM4MEA: Data-free Model Extraction Attacks on Sequential Recommenders via Large Language Models

Shilong Zhao, Fei Sun, Kaike Zhang, Shaoling Jing, Du Su, Zhichao Shi, Zhiyi Yin, Huawei Shen, Xueqi Cheng · DOI

Abstract

Sequential recommender systems are critical components of modern digital platforms, yet they are vulnerable to Model Extraction Attacks (MEAs) that seek to clone their proprietary logic. Data-free MEAs are especially difficult because attackers lack access to the original training data, often resulting in a distribution mismatch when using random query generation. We propose LLM4MEA, a framework that utilizes Large Language Models (LLMs) to act as realistic user simulators. By generating synthetic interaction sequences that mirror human behavior, LLM4MEA allows for the creation of high-fidelity surrogate models. Our results demonstrate that LLM4MEA significantly outperforms prior data-free methods across multiple benchmarks, highlighting a new frontier in recommender system security.

Introduction

In the competitive landscape of AI, a model’s value lies in its learned weights and the proprietary data used to train it. Model Extraction Attacks (MEAs) pose a significant threat by enabling adversaries to replicate a target model's functionality through black-box queries. This not only leads to intellectual property theft but also facilitates "white-box" adversarial attacks against the cloned surrogate.

The most restrictive and challenging scenario is the data-free attack, where the adversary has no prior knowledge of the target's training set. Traditional data-free methods often rely on random sampling or GAN-based generation, which fail to capture the nuanced, evolving preferences inherent in sequential recommendation. Real users exhibit specific patterns—such as clicking on related items or following trends—that random noise cannot replicate. LLM4MEA addresses this by using the semantic reasoning capabilities of LLMs to bridge the distribution gap.

Methodology: The LLM-Driven Agent

The core of LLM4MEA is an intelligent agent that interacts with the target model to build a synthetic dataset. Instead of random queries, the agent "simulates" a user by maintaining a history and making choices based on the target model's recommendations.

Overview of the LLM4MEA framework, illustrating the iterative sequence generation by the LLM-driven agent and the subsequent knowledge distillation to train the surrogate model.

Key Components

  • Memory Compression (MC) Module: To handle the limited context windows of LLMs and avoid the "lost in the middle" phenomenon, the MC module employs a strategy inspired by the serial position effect. It retains only the initial (primacy) and most recent (recency) items in a user's history, effectively capturing both long-term interests and short-term trends.
  • Preference Stabilization (PS) Module: To ensure the agent maintains a consistent "persona," the system prompts the LLM to summarize the user's preference into a concise sentence. This summary guides future item selections, preventing the agent's behavior from drifting into incoherence.
  • Debiasing and Distillation: To counter Exposure Bias (only seeing what the model recommends) and Position Bias (LLMs preferring top-ranked items), the framework incorporates random noise and list shuffling. Finally, the surrogate model is trained using a ranking-based distillation loss to match the target model's output logits.

Experimental Setup

The framework was evaluated on three diverse datasets: Amazon Beauty (sparse, short sequences), Amazon Games, and Steam (dense, long sequences). The researchers targeted three state-of-the-art sequential recommendation architectures: NARM, SASRec, and BERT4Rec.

Key Insights and Results

The primary advantage of LLM4MEA lies in its ability to generate high-quality synthetic data. By leveraging the semantic understanding of item titles, the LLM agent creates sequences that are statistically much closer to real-world user data than those produced by random or GAN-based methods.

Comparison of N-gram distributions of surrogate data generated by different methods. LLM4MEA ('Ours') achieves higher coverage and a smaller gap compared to the secret training data distribution.

Performance Highlights

  • Fidelity Gains: LLM4MEA achieved a 51.9% improvement in Agreement@1 on the Amazon Beauty dataset compared to the previous state-of-the-art (SR-DFME).
  • Distribution Matching: As shown in the N-gram analysis, the LLM4MEA distribution significantly reduces the gap between the surrogate data and the "Secret Data," avoiding the over-exposure and under-exposure issues seen in random or DFME baselines.
  • Vulnerability of Dense Data: The attack is particularly potent on dense datasets like Steam, where the target model provides a richer signal for the LLM to exploit.

Conclusion and Future Work

LLM4MEA demonstrates that the reasoning capabilities of LLMs can be weaponized to perform highly effective data-free model extraction. While the method shows some limitations on extremely sparse datasets with complex bidirectional models like BERT4Rec, its overall success underscores a critical security vulnerability in modern recommender systems. Future research will focus on developing robust defenses, such as detecting non-human interaction patterns or injecting strategic noise into recommendation lists to thwart LLM-driven simulators.

Summary updated

BibTeX
@inproceedings{zhao2025llm,
  author = {Shilong Zhao and Fei Sun and Kaike Zhang and Shaoling Jing and Du Su and Zhichao Shi and Zhiyi Yin and Huawei Shen and Xueqi Cheng},
  title = {{LLM4MEA: Data-free Model Extraction Attacks on Sequential Recommenders via Large Language Models}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2025},
  url = {https://openreview.net/forum?id=TwgqJLAbnk},
}
Figure