RGRecSys: A Toolkit for Robustness Evaluation of Recommender Systems

Zohreh Ovaisi, Shelby Heinecke, Jia Li, Yongfeng Zhang, Elena Zheleva, Caiming Xiong · DOI

TL;DR

Recommender systems often perform brilliantly in the lab but crumble when faced with real-world "messiness" like data sparsity, biased distributions, or malicious attacks. RGRecSys (Robustness Gym for RecSys) is a new open-source toolkit built on PyTorch that allows researchers to stress-test recommendation models across five key dimensions of robustness, moving beyond simple accuracy metrics to ensure models are reliable and fair.

What Problem Does This Paper Address?

Most recommender system (RecSys) research operates under the "i.i.d. assumption"—the idea that training and testing data are independent and identically distributed. In reality, this is almost never true. Data is often sparse, user features can be corrupted or intentionally misrepresented, and malicious actors may attempt to subvert rankings through profile injection attacks.

While many libraries exist to compare model performance (like RecBole or LensKit), they primarily focus on standard accuracy metrics (e.g., nDCG, Recall) under ideal conditions. There has been a lack of a unified, easy-to-use framework for robustness evaluation. Without such a tool, it is difficult for engineers to know if a model that looks good on a benchmark will actually survive a deployment where data distributions shift or features are noisy.

Methods

The authors introduce RGRecSys, a toolkit integrated with the popular RecBole framework. It provides a standardized API to evaluate models across five specific robustness "slices":

  1. Subpopulation: Evaluates if a model performs consistently across different groups (e.g., does it work as well for women as it does for men?).
  2. Distributional Shift: Tests how a model handles a test set that has a different distribution than the training set (e.g., training on a 74% male population but testing on a 50/50 split).
  3. Transformations: Perturbs user or item features (like age or location) with random or structured noise to see how much the model over-relies on potentially unreliable metadata.
  4. Attack: Simulates Cross-Site Request Forgery (CSRF) attacks by corrupting a fraction of the interaction data in the training set.
  5. Sparsity: Randomly drops user interactions to determine how much data a model needs before its performance degrades significantly.

Datasets

For their case study, the authors utilized the MovieLens 100k dataset, a classic benchmark containing 100,000 ratings from 943 users on 1,682 movies. They used an 80/10/10 split for training, validation, and testing. While the toolkit is designed to work with any dataset supported by RecBole, this specific benchmark served to demonstrate the toolkit's evaluation capabilities across various model architectures (General vs. Context-Aware).

Key Insights and Ideas

  • Average Performance is Deceptive: A model might have a high overall AUC but perform significantly worse on specific subpopulations. For example, the authors found that almost all tested models performed worse for female users than male users on the MovieLens dataset.
  • Feature Reliance is a Double-Edged Sword: Context-aware models (like DSSM) that leverage user features can be highly vulnerable to "Transformations." If a user's age is slightly miscalculated or misrepresented, the model's accuracy can drop sharply.
  • Architecture Matters for Robustness: Different architectures have distinct "Achilles' heels." The authors noted that NeuMF and DCN were particularly vulnerable to data sparsity, whereas ItemKNN and DSSM showed more resilience to distributional shifts in gender.
  • Unified Evaluation: By building on top of RecBole, RGRecSys allows researchers to test dozens of existing state-of-the-art models (like LightGCN or DeepFM) without rewriting the models themselves.

Key Results

The paper presents a case study comparing several general and context-aware models:

  • Gender Gap: SpectralCF (General) and LR (Context-Aware) exhibited the largest performance gaps between male and female subpopulations.
  • Distributional Shift: When shifting the test set to a 50/50 gender split, all models saw performance degradation, but ItemKNN and DSSM were the most stable.
  • Feature Perturbation: Perturbing user age by just 10% caused a noticeable drop in AUC for context-aware models, with DSSM being the most sensitive.
  • Sparsity: Removing 25% of user interactions revealed that NeuMF and DCN are highly sensitive to data scarcity compared to their peers.

Limitations and Future Work

The authors acknowledge that their case study was limited to a single, relatively small dataset (MovieLens 100k) and a specific set of trials. Consequently, the results are intended to showcase the toolkit's utility rather than provide a definitive ranking of model robustness.

Future directions include: * Expanding the library to include more complex attack types and noisy interaction scenarios. * Addressing the "cold-start" problem as a robustness dimension. * Integrating fairness and explainability metrics to provide a more holistic view of model health beyond just accuracy and robustness.

The RGRecSys toolkit is open-source and available on GitHub: salesforce/RGRecSys

Summary updated

BibTeX
@inproceedings{ovaisi2022rgrecsys,
  author = {Zohreh Ovaisi and Shelby Heinecke and Jia Li and Yongfeng Zhang and Elena Zheleva and Caiming Xiong},
  title = {{RGRecSys: A Toolkit for Robustness Evaluation of Recommender Systems}},
  booktitle = {WSDM},
  year = {2022},
  doi = {10.1145/3488560.3502192},
}
Figure