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

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

TL;DR

Most recommendation engines treat Knowledge Graphs (KGs) as static, perfect maps of the world, but in reality, KGs are often riddled with missing links. This paper introduces KTUP (Knowledge-enhanced Translation-based User Preference), a framework that jointly learns to recommend items and complete the underlying Knowledge Graph, allowing the two tasks to mutually improve each other while providing human-readable explanations for why a user might like a specific product.

What Problem Does This Paper Address?

Knowledge Graphs—structured networks of entities (like "Robert Zemeckis") and relations (like "isDirectorOf")—are powerful tools for recommendation. They help systems understand that if you liked Forrest Gump, you might like Back to the Future because they share the same director.

However, the authors identify two major flaws in current KG-based recommenders:

  1. Incompleteness: Real-world KGs are never finished. If the link between a director and their movie is missing in the graph, a standard recommender loses that vital connection.
  2. Shallow Integration: Many systems just "borrow" entity embeddings from a KG without understanding the intent or relation behind a user's choice. They treat user preferences as "black boxes" rather than explicit semantic links.

Methods

The authors propose a multi-task learning model called KTUP. It consists of two main parts:

  • TUP (Translation-based User Preference): Inspired by the TransH algorithm used in KG completion, 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 the fact that one user likes many items (the N-to-N issue), they project these vectors onto a preference-specific hyperplane.
  • Preference Induction: Since we don't always know why a user likes something, the model uses two strategies to "induce" the preference:
  • Hard Strategy: Uses a Gumbel-Softmax trick to pick the single most likely preference (e.g., "this user is a fan of this director").
  • Soft Strategy: Uses an attention mechanism to combine multiple reasons (e.g., "this user likes the director and the lead actor").
  • Joint Training (The "KT" in KTUP): This is the secret sauce. The model aligns the recommendation task with the KG completion task. It forces the "preference" vectors in the recommendation side to align with "relation" vectors in the KG side. If a user's behavior suggests they follow a specific director, the model uses that "knowledge" to help predict missing links in the actual Knowledge Graph.

Datasets

The researchers evaluated their model on two widely used benchmarks, both mapped to DBPedia entities:

  • MovieLens-1m: A dense dataset of movie ratings.
  • DBbook2014: A much sparser dataset focused on book recommendations.

They specifically looked at how well the model performed as data became scarcer, simulating real-world "cold start" problems.

Key Insights and Ideas

  • The Two-Way Street: The most significant "aha" moment is that user-item interactions are themselves a form of "knowledge." If thousands of users who like Steven Spielberg movies also watch a new unlinked film, that interaction data can be used to "fix" the KG by predicting the missing isDirectorOf link.
  • Hyperplanes Matter: Simple translation ($u + p = i$) fails when a user has diverse tastes. By using hyperplanes (TransH style), the model allows the same user and item to have different representations depending on the specific "reason" (preference) being considered.
  • Explainability by Design: Because the preferences are mapped directly to KG relations (like starring or isDirectorOf), the model doesn't just give a score; it can tell you why. For example: "We recommended Batman Forever because you have a strong preference for director Joel Schumacher."

Key Results

  • Superior Accuracy: KTUP consistently outperformed state-of-the-art baselines like CKE and CFKG. On the sparse DBbook2014 dataset, KTUP (soft) achieved an 11.06% gain in F1-score over the best baseline.
  • Mutual Improvement: The joint training didn't just help recommendations; it also improved KG Completion. KTUP achieved higher "Hit@10" scores for predicting missing graph links than models dedicated solely to KG completion (like TransE or TransH).
  • Robustness to Sparsity: The model showed a significant advantage in "cold start" scenarios where users had very few interactions, proving that the transferred knowledge from the KG effectively fills the gaps in user history.

Limitations and Future Work

  • Multi-hop Reasoning: The current model primarily looks at direct (one-hop) relations. The authors suggest that exploring "multi-hop" preferences (e.g., "I like movies produced by companies that often hire my favorite director") could further improve performance.
  • Rule Mining: The authors express interest in integrating symbolic logic or rule mining (e.g., "If a user likes X and Y, they usually like Z") to handle even more complex user behaviors.
  • Computational Complexity: While not explicitly detailed as a failure, joint training on massive KGs and massive interaction logs is computationally expensive, which may limit real-time deployment without further optimization.

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},
}

Loading related content...

Figure