Unifying Knowledge Graph Learning and Recommendation: Towards a Better Understanding of User Preferences

Yixin Cao, Xiang Wang, Xiangnan He, Zikun Hu, Tat-Seng Chua

Abstract

Incorporating knowledge graph (KG) into recommender system is promising in improving the recommendation accuracy and explainability. However, existing methods largely assume that a KG is complete and simply transfer the "knowledge" in KG at the shallow level of entity raw data or embeddings. This may lead to suboptimal performance, since a practical KG can hardly be complete, and it is common that a KG has missing facts, relations, and entities. Thus, we argue that it is crucial to consider the incomplete nature of KG when incorporating it into recommender system. In this paper, we jointly learn the model of recommendation and knowledge graph completion. Distinct from previous KG-based recommendation methods, we transfer the relation information in KG, so as to understand the reasons that a user likes an item. Technically, we contribute a new translation-based recommendation model, which specially accounts for various preferences in translating a user to an item, and then jointly train it with a KG completion model by combining several transfer schemes. Extensive experiments on two benchmark datasets show that our method outperforms state-of-the-art KG-based recommendation methods.

Introduction

Knowledge Graphs (KGs)—structured networks of entities and relations—are powerful tools for modern recommendation engines. They allow systems to understand semantic connections, such as a shared director between two films. However, most current KG-based recommenders suffer from two major flaws: they assume KGs are complete and they treat user preferences as "black boxes" rather than explicit semantic links. In reality, KGs are often riddled with missing links, and failing to understand the intent behind a user's choice leads to shallow integration.

Figure 1: Conceptual overview of how user-item interactions can be mapped to specific relations within a Knowledge Graph.

The KTUP Framework

We introduce KTUP (Knowledge-enhanced Translation-based User Preference), a framework that jointly learns to recommend items and complete the underlying Knowledge Graph. By treating user-item interactions as a form of "knowledge," the two tasks mutually improve each other.

Methodology

KTUP is built on two core pillars:

  1. Translation-based User Preference (TUP): Inspired by the TransH algorithm, TUP models a user ($u$) liking an item ($i$) as a mathematical translation: $u + p \approx i$, where $p$ is a "preference" vector. To handle diverse tastes, these vectors are projected onto a preference-specific hyperplane.
  2. Joint Training: The model aligns recommendation preferences with KG relations. If a user's behavior suggests a preference for a specific director, the model uses that interaction data to help predict missing isDirectorOf links in the actual Knowledge Graph.
Figure 5: The KTUP architecture, illustrating the joint learning process between user-item interactions and knowledge graph completion.

Preference Induction

To determine why a user likes an item, the model uses two strategies to induce preferences: a Hard Strategy (using Gumbel-Softmax to pick the most likely single reason) and a Soft Strategy (using an attention mechanism to combine multiple reasons, such as both director and lead actor).

Experimental Evaluation

KTUP was evaluated on the MovieLens-1m and DBbook2014 datasets. The results demonstrate significant improvements over state-of-the-art baselines like CKE and CFKG. On the sparse DBbook2014 dataset, KTUP achieved an 11.06% gain in F1-score, proving particularly robust in "cold start" scenarios where users have few interactions.

Crucially, the joint training also improved KG Completion. KTUP achieved higher accuracy in predicting missing graph links than models dedicated solely to that task, such as TransE or TransH. This confirms that user behavior provides vital signals for refining structured knowledge.

Conclusion

KTUP moves beyond shallow embedding transfers by explicitly modeling the semantic relations that drive user preferences. By jointly learning recommendation and KG completion, the system provides both higher accuracy and human-readable explanations. Future work will explore multi-hop reasoning and symbolic logic to capture even more complex user behaviors.

Summary updated

Abstract

Incorporating knowledge graph (KG) into recommender system is promising in improving the recommendation accuracy and explainability. However, existing methods largely assume that a KG is complete and simply transfer the "knowledge" in KG at the shallow level of entity raw data or embeddings. This may lead to suboptimal performance, since a practical KG can hardly be complete, and it is common that a KG has missing facts, relations, and entities. Thus, we argue that it is crucial to consider the incomplete nature of KG when incorporating it into recommender system. In this paper, we jointly learn the model of recommendation and knowledge graph completion. Distinct from previous KG-based recommendation methods, we transfer the relation information in KG, so as to understand the reasons that a user likes an item. As an example, if a user has watched several movies directed by (relation) the same person (entity), we can infer that the director relation plays a critical role when the user makes the decision, thus help to understand the user's preference at a finer granularity. Technically, we contribute a new translation-based recommendation model, which specially accounts for various preferences in translating a user to an item, and then jointly train it with a KG completion model by combining several transfer schemes. Extensive experiments on two benchmark datasets show that our method outperforms state-of-the-art KG-based recommendation methods. Further analysis verifies the positive effect of joint training on both tasks of recommendation and KG completion, and the advantage of our model in understanding user preference. We publish our project at https://github.com/TaoMiner/joint-kg-recommender.
BibTeX
@inproceedings{cao2019unifying,
  author = {Yixin Cao and Xiang Wang and Xiangnan He and Zikun Hu and Tat-Seng Chua},
  title = {{Unifying Knowledge Graph Learning and Recommendation: Towards a Better Understanding of User Preferences}},
  booktitle = {The Web Conference},
  year = {2019},
  doi = {10.1145/3308558.3313705},
}
Figure