The Dark Side of Explanations: Poisoning Recommender Systems with Counterfactual Examples

Ziheng Chen, Fabrizio Silvestri, Jia Wang, Yongfeng Zhang, Gabriele Tolomei · DOI

TL;DR

This research exposes a critical security flaw in explainable recommender systems. By leveraging publicly available counterfactual explanations, the proposed H-CARS attack can reverse-engineer a model's logic and inject fake data to manipulate recommendations, even with limited access to the original training set.

Introduction

As deep learning-based recommender systems become more pervasive, the demand for transparency has led to the adoption of Counterfactual Explanations (CFs). These explanations provide users with actionable insights, such as: "If you hadn't interacted with Item A, we wouldn't have recommended Item B." However, this paper reveals that such transparency comes at a cost. These explanations effectively leak the model's internal decision boundaries, providing a blueprint for malicious actors to conduct sophisticated poisoning attacks.

The H-CARS Framework

The authors introduce H-CARS (Horn-Clause Attacks to Recommender Systems), a framework that exploits the "explanation API" of a recommender system. Unlike traditional attacks that rely on brute-force or extensive data access, H-CARS uses a three-stage approach to efficiently compromise the system:

  1. Surrogate Model Extraction: The attacker builds a surrogate model using Neural Collaborative Reasoning (NCR), which represents recommendations as logical Horn clauses. This logical representation is highly effective at mimicking the target system's decision-making process.
  2. CF-Enhanced Learning: The attacker queries the target system for counterfactual explanations and uses them as high-quality training data. These CFs identify the minimal interactions responsible for a recommendation, allowing the surrogate to learn the model's logic with far less data than traditional methods.
  3. Poisoning via Backtracking: Finally, the attacker uses an optimization framework to determine the ideal user-item interactions needed to promote a target item, shifting the system's embeddings to favor the malicious content.
Overview of the H-CARS framework, illustrating how counterfactual explanations are used to train a surrogate model.

Experimental Setup and Results

The researchers evaluated H-CARS on two standard benchmarks, Yelp and MovieLens100K, against state-of-the-art recommendation models like NCF and RCF. The attack was compared to established baselines, including DL-Attack and RAPU-R.

Comparison of H-CARS against baseline poisoning attacks across different datasets and recommendation models.

Key Findings

  • Superior Performance: H-CARS consistently outperformed all baselines. On the MovieLens dataset, it improved the target item's Hit Ratio by 5% to 8% over the next best method, demonstrating its potency in real-world scenarios.
  • Efficiency with Limited Data: The attack remains effective even when the attacker has access to only a small fraction (e.g., 30%) of the training data. The "hints" provided by counterfactual explanations compensate for the lack of a full dataset.
  • The Role of Counterfactuals: Ablation studies confirmed that the inclusion of "Counterfactual Loss" is essential to the attack's success. Removing the CF-based training component significantly weakened the surrogate model's ability to mimic the target system.

Conclusion and Future Work

The findings of this paper serve as a warning for the development of explainable AI. While explanations are vital for trust, they must be designed with security in mind. Future research should explore defensive mechanisms, such as Differential Privacy, to provide transparency without exposing the system to Horn-clause-based poisoning attacks. Protecting the integrity of recommendations is paramount as these systems continue to influence user behavior and information dissemination.

Summary updated

BibTeX
@inproceedings{chen2023dark,
  author = {Ziheng Chen and Fabrizio Silvestri and Jia Wang and Yongfeng Zhang and Gabriele Tolomei},
  title = {{The Dark Side of Explanations: Poisoning Recommender Systems with Counterfactual Examples}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2023},
  doi = {10.1145/3539618.3592070},
}
Figure