Jointly Learning Explainable Rules for Recommendation with Knowledge Graph

Weizhi Ma, Min Zhang, Yue Cao, Woojeong Jin, Chenyang Wang, Yiqun Liu, Shaoping Ma, Xiang Ren

Abstract

RuleRec is a joint learning framework that automatically mines relational rules from Knowledge Graphs (KGs) to enhance both the accuracy and explainability of recommender systems. By integrating symbolic reasoning with neural models through multi-task learning, RuleRec discovers which KG patterns—such as shared manufacturers or compatible operating systems—actually drive user behavior, moving beyond labor-intensive manual meta-path engineering.

Introduction

Modern recommender systems often face a trade-off between the high performance of "black-box" neural networks and the transparency of symbolic methods. While neural models like Neural Collaborative Filtering (NCF) are effective, they lack interpretability. Conversely, symbolic methods provide clear justifications but often require experts to manually define "meta-paths," a process that is neither scalable nor adaptive to nuanced item relationships like substitutes versus complements.

RuleRec addresses this by automatically inducing explainable rules from a Knowledge Graph and jointly optimizing them with a recommendation engine. This framework achieves state-of-the-art accuracy while providing human-readable justifications for its suggestions.

The RuleRec Framework

The system consists of two primary modules optimized through a multi-task learning objective.

Rule Learning Module

Instead of relying on human-defined rules, RuleRec employs random walks on a heterogeneous graph (linking items to entities in Freebase) to identify common relational patterns. For example, it might discover that items sharing a manufacturer are frequently purchased together.

RuleRec learns to map Knowledge Graph relations (like 'manufacturer' or 'rivals') to item associations (like 'Buy Together' or 'Also View').

The core innovation lies in joint optimization. The model learns a weight vector $w$ that represents the importance of different rules. This vector is optimized for two tasks simultaneously: predicting known item associations (e.g., "Also Viewed") and predicting actual user preferences. This ensures the model prioritizes rules that are both logically sound and practically relevant.

Recommendation Module

The recommendation module takes a base model (such as BPRMF or NCF) and augments its prediction score with a "rule-guided" component. By combining the user's purchase history with the weighted symbolic rules, the system can generate more accurate and justifiable suggestions.

The Recommendation Module uses a learned weight vector $w$ to prioritize rules that best align with a user's purchase history to generate recommended items.

Key Insights

  • Rules vs. Paths: RuleRec focuses on rules (sequences of relation types) rather than specific paths. Rules are more generalizable; for instance, a "same manufacturer" rule applies across the entire dataset, whereas a specific path between two items is unique.
  • Noise Filtering: Knowledge Graphs are often noisy. The joint learning approach naturally filters this noise by assigning low weights to rules that do not correlate with actual user behavior.
  • Cold-Start Mitigation: Because recommendations are grounded in item attributes within the KG, RuleRec can provide sensible suggestions for new items with no prior purchase history.

Results and Impact

Evaluated on Amazon (Cellphone and Electronics) and MovieLens datasets, RuleRec demonstrated significant performance gains. When integrated with NCF, it achieved a 3.0% to 6.4% improvement in Recall@10 on the Cellphone dataset. Furthermore, a qualitative study confirmed the model's explainability, with experts finding 94% of the top-weighted rules to be logically sound. By bridging the gap between neural performance and symbolic reasoning, RuleRec provides a scalable path toward more transparent AI.

Summary updated

BibTeX
@inproceedings{ma2019jointly,
  author = {Weizhi Ma and Min Zhang and Yue Cao and Woojeong Jin and Chenyang Wang and Yiqun Liu and Shaoping Ma and Xiang Ren},
  title = {{Jointly Learning Explainable Rules for Recommendation with Knowledge Graph}},
  booktitle = {The Web Conference},
  year = {2019},
  doi = {10.1145/3308558.3313607},
}
Figure