Knowledge-enhanced Black-box Attacks for Recommendations

Jingfan Chen, Wenqi Fan, Guanghui Zhu, Xiangyu Zhao, Chunfeng Yuan, Qing Li, Yihua Huang · DOI

Introduction: The Vulnerability of Modern Recommender Systems

Recommender systems (RecSys) are ubiquitous, yet they remain susceptible to adversarial manipulation. Attackers can perform "shilling attacks" by injecting fake user profiles—simulated sets of item interactions—to artificially inflate or deflate the popularity of specific items. While "white-box" attacks (where the model's internal parameters are known) have been extensively studied, they are rarely feasible in practice. "Black-box" attacks, which operate without internal access, are more realistic but significantly more challenging due to the vast search space of potential items to include in a fake profile.

Overview of the black-box attack scenario leveraging a Knowledge Graph (KG) to generate fake user profiles.

KGAttack: A Strategic Framework for Adversarial Injection

To address these challenges, researchers have introduced KGAttack, a framework that treats the generation of fake profiles as a strategic optimization problem solved via Deep Reinforcement Learning (DRL). The core innovation lies in leveraging a Knowledge Graph (KG) to guide the selection of items, ensuring that fake profiles are both effective and semantically coherent.

Methodology

The KGAttack framework consists of several integrated components designed to mimic realistic user behavior while maximizing attack impact:

  1. Knowledge-enhanced Representation Learning: Instead of treating items as independent entities, KGAttack uses Graph Neural Networks (GNNs) to learn item embeddings based on their relationships within a KG (e.g., shared directors, genres, or actors).
  2. Hierarchical Policy Networks: To navigate the massive item catalog, the model employs a two-step hierarchical policy:
  3. Anchor Selection: The agent first selects an "anchor item" from the fake user's current history.
  4. Item Picking: It then chooses a new item from the anchor's $H$-hop neighbors in the KG. This significantly prunes the action space and ensures the profile remains "on-topic."
  5. State Encoding: A Gated Recurrent Unit (GRU) maintains the sequential state of the fake user profile, capturing the temporal dynamics of user-item interactions.
  6. Reward Mechanism: The system utilizes "spy users" to monitor the target item's rank in the black-box system. The change in ranking serves as a reward signal to train the RL agent.
Detailed architecture of KGAttack, including (a) state representation learning, (b) candidate selection, (c) hierarchical policy networks, and (d) the injection attack process.

Experimental Evaluation

The framework was evaluated on three real-world datasets—MovieLens-1M, Book-Crossing, and Last.FM—with Knowledge Graphs sourced from Microsoft Satori. The attacks targeted diverse recommendation models, including GNN-based (Pinsage), Collaborative Filtering (NeuMF), and Knowledge-aware (KGCN) systems.

Key Insights

  • Knowledge as a Double-Edged Sword: Recommender systems that incorporate KGs for better accuracy are paradoxically more vulnerable to KG-based attacks. Attackers can exploit the same semantic paths used for recommendations to "poison" the system more effectively.
  • The Power of Anchoring: By selecting items related to an "anchor," the attack generates profiles that mirror real-world co-occurrence patterns, making them harder to detect by standard anomaly detection algorithms.
  • Efficiency and Robustness: Pruning the action space via the KG allows the RL agent to converge much faster than traditional black-box methods. Furthermore, a balanced approach between exploiting target-related items and exploring the wider KG leads to more robust attacks.

Results and Impact

KGAttack consistently outperformed state-of-the-art baselines like PoisonRec. In evasion attacks on the Pinsage model, KGAttack achieved a Hit Ratio (HR@20) of 0.672 on MovieLens-1M, compared to the best baseline's 0.628. The framework proved equally effective in poisoning attacks, where the target model is retrained on the manipulated data, significantly boosting the visibility of target items.

Conclusion

The development of KGAttack highlights a critical security gap in modern recommender systems. By demonstrating that publicly available item attributes can be weaponized to conduct sophisticated black-box attacks, this research underscores the need for more robust defense mechanisms and "shilling detection" algorithms that account for semantic relationships in user behavior.

Summary updated

BibTeX
@inproceedings{chen2022knowledge,
  author = {Jingfan Chen and Wenqi Fan and Guanghui Zhu and Xiangyu Zhao and Chunfeng Yuan and Qing Li and Yihua Huang},
  title = {{Knowledge-enhanced Black-box Attacks for Recommendations}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2022},
  doi = {10.1145/3534678.3539359},
}
Figure