Abstract
Recommender systems (RS) are vital intellectual property for digital platforms, yet they are increasingly vulnerable to model extraction attacks. Traditional gradient-based defenses fail in this domain due to the discrete, non-differentiable nature of ranking lists. This paper introduces Gradient-based Ranking Optimization (GRO), a novel framework that transforms rankings into differentiable "swap matrices." By strategically poisoning the feedback provided to potential attackers, GRO significantly degrades surrogate model performance while maintaining high recommendation utility for legitimate users.
The Challenge of Model Extraction in RS
In a model extraction attack, an adversary queries a target recommender system with synthetic data to obtain top-k recommendation lists. These lists are then used to train a "surrogate model" that mimics the target's behavior. Such stolen models can facilitate proprietary algorithm theft or serve as a foundation for more advanced adversarial attacks, such as data poisoning.
Defending against these attacks is uniquely difficult in the RS domain. Unlike classification tasks that output continuous probability scores, RS output discrete rankings. This lack of differentiability prevents the use of standard gradient-based defense techniques, which typically rely on calculating how small output perturbations affect model loss.
Methodology: Gradient-based Ranking Optimization (GRO)
GRO addresses the differentiability problem by formulating the defense as a bi-level optimization task. The goal is to minimize the target model's loss (preserving utility) while maximizing the loss of a simulated attacker's "student model."
The core components of GRO include:
- Swap Matrices: The framework converts a discrete top-k list into a matrix $A$, where $A_{i,j} = 1$ if item $j$ is at rank $i$. This representation allows the ranking process to be integrated into a differentiable pipeline.
- Strategic Misinformation: GRO identifies the minimal set of swaps in a ranking list that results in the maximum confusion for a machine learning model. For instance, swapping the top two items might have negligible impact on a human user but can significantly disrupt a surrogate model's training process.
- Swap Loss: A specialized loss function pushes the target model to produce rankings that align with a "poisoned" version of the original list, ensuring the data leaked to attackers is misleading.
Experimental Results
The effectiveness of GRO was evaluated on three benchmark datasets: MovieLens-1M, MovieLens-20M, and Steam. The experiments assumed a "worst-case" scenario where the attacker uses the same architecture as the defender (e.g., Bert4Rec).
Key findings include:
- Superior Defense: GRO consistently outperformed baselines like random shuffling or list reversal. In many cases, the attacker's surrogate model accuracy was reduced by over 50% compared to undefended models.
- Utility Preservation: Unlike aggressive defenses that ruin user experience, GRO maintained recommendation quality very close to undefended levels. By focusing on minimal swaps, the system preserves the perceived value for legitimate users.
- Robustness: The defense remained effective even when the attacker employed different model architectures (e.g., NARM) than the defender's student model, demonstrating strong cross-architecture generalizability.
Limitations and Future Directions
A current limitation of GRO is the sensitivity of the hyperparameter $\lambda$, which controls the swap loss magnitude. Optimal values vary across datasets (e.g., 1.0 for ML-20M vs. 0.001 for Steam), suggesting a need for automated tuning methods in future research. Additionally, future work will explore defenses against attackers who leverage auxiliary metadata beyond simple top-k lists.
Summary updated