Conditional Graph Attention Networks for Distilling and Refining Knowledge Graphs in Recommendation

Ke Tu, Peng Cui, Daixin Wang, Zhiqiang Zhang, Jun Zhou, Yuan Qi, Wenwu Zhu

TL;DR

Knowledge graphs (KGs) are powerful tools for recommendation, but their massive scale often introduces noise. Knowledge-aware Conditional Attention Networks (KCAN) solves this by distilling the KG into target-specific subgraphs and using a novel "conditional attention" mechanism to refine edge weights based on the specific user-item pair being predicted.

What Problem Does This Paper Address?

Recommender systems often struggle with "data sparsity"—when users have only interacted with a tiny fraction of available items. Incorporating side information from Knowledge Graphs (e.g., linking a movie to its director, genre, or actors) helps bridge these gaps.

However, KGs face two major hurdles in recommendation:

  1. Distillation Issue: KGs are enormous and general-purpose. Most relationships in a massive graph like DBpedia are irrelevant noise for a specific recommendation task.
  2. Refinement Issue: Existing models usually assign static weights to KG edges. In reality, a "genre" connection might be crucial for one user but irrelevant to another who chooses movies based solely on the lead actor.

The authors argue that a good model must not only filter the graph (distill) but also personalize its structure for every specific prediction (refine).

Methods

The KCAN framework consists of four main modules, as illustrated in Figure 2:

The framework of the proposed KGAN (KCAN). It includes KG Embedding, Distillation (KAGCN), Refinement (LCSAN), and an MLP prediction layer.
  • Knowledge Graph Embedding: The model uses TransH to learn initial vector representations for entities and relations, preserving the basic topology of the KG.
  • Knowledge-aware Graph Convolutional Network (KAGCN): This layer uses a global attention mechanism to propagate information across the graph. It identifies which relationships are generally important, helping to capture broad semantic similarities.
  • Target-specific Subgraph Sampling: To handle the "Distillation" problem, the model samples a fixed-size neighborhood for each user and item. Crucially, it uses the attention scores from the KAGCN layer as sampling probabilities, effectively filtering out "noisy" edges.
  • Local Conditional Subgraph Attention Network (LCSAN): This is the core innovation. Unlike standard GCNs, LCSAN calculates conditional attention. The weight of an edge in the subgraph is dynamically adjusted based on the specific user-item pair (the "target") currently being evaluated. This addresses the "Refinement" issue by personalizing the graph's influence.
  • Prediction: Finally, global and local representations are concatenated and passed through a Multi-layer Perceptron (MLP) to predict the likelihood of a user-item interaction.

Datasets

The authors evaluated KCAN on three widely used public benchmark datasets:

  • MovieLens: A classic movie recommendation dataset.
  • Last-FM: A music listening dataset.
  • Yelp: A dataset involving local business interactions (restaurants, bars, etc.).

For each, they matched items to entities in massive external KGs like Microsoft Satori and Freebase.

Key Insights and Ideas

  • Global vs. Local Importance: The model distinguishes between what is generally true in the world (global attention) and what matters to a specific user in a specific context (conditional attention).
  • Dynamic Graph Distillation: Instead of using the whole KG or hand-crafted "meta-paths," KCAN learns to extract the most relevant sub-structures automatically.
  • Visualizing Preference: The conditional attention mechanism provides a form of explainability. As shown in Figure 3, the importance of the same edge (e.g., a user's connection to a specific movie) changes significantly depending on which target item the system is trying to predict.
Example of how attention weights shift between the global graph (a) and target-specific subgraphs (b and c). Red nodes are the targets.

Key Results

KCAN consistently outperformed state-of-the-art baselines, including popular models like KGAT and RippleNet, across all three datasets.

  • Top-K Recommendation: In metrics like Hit Ratio@10 and NDCG@10, KCAN showed significant improvements. For example, on MovieLens, it achieved a Hit@10 of 0.668 compared to KGAT's 0.467.
  • CTR Prediction: In Click-Through Rate prediction (measured by AUC), KCAN reached 0.907 on MovieLens and 0.937 on Yelp, surpassing all baselines.
  • Ablation Studies: The authors proved that both the global distillation (KAGCN) and local refinement (LCSAN) layers are essential; removing either one led to a drop in performance.

Limitations and Future Work

While KCAN is efficient (its complexity is linear relative to the scale of the network), the authors acknowledge that there is still room to further reduce time complexity for real-time industrial applications. They also suggest that future work could focus on making the model's "reasoning" even more explainable, perhaps by generating natural language justifications for why a specific KG path led to a recommendation.

Summary updated

BibTeX
@inproceedings{tu2021conditional,
  author = {Ke Tu and Peng Cui and Daixin Wang and Zhiqiang Zhang and Jun Zhou and Yuan Qi and Wenwu Zhu},
  title = {{Conditional Graph Attention Networks for Distilling and Refining Knowledge Graphs in Recommendation}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2021},
  doi = {10.1145/3459637.3482331},
}
Figure