Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

KGAT: Knowledge Graph Attention Network for Recommendation

Knowledge graph attention lets recommenders learn from shared item attributes

  • Problem Feature-based recommenders treat each user-item interaction as an independent instance, so they miss collaborative signal carried by shared attributes like a common director. Exploiting multi-hop links is hard because reachable nodes grow quickly and the paths matter unequally.
  • Method KGAT merges the user-item graph with a knowledge graph and stacks attention-weighted propagation layers over each node's neighbors. Unlike path-based methods, it learns which neighbors matter, and it trains user and item vectors with a BPR loss.
  • Results KGAT reached recall@20 of 0.1489 and ndcg@20 of 0.1006 on Amazon-book with three propagation layers, outperforming the baselines.

What feature-based recommenders leave out

Recommenders that use side information often turn each user-item interaction into a feature vector and pass it to a supervised model such as a factorization machine or NFM. Each interaction then becomes a separate training instance, so the model has no direct way to know that two movies share a director. That gap makes it hard to recover attribute-based collaborative signal from what many users have done.

The toy example illustrates the point: a user watched a movie whose director also made other films that the user has not seen. Collaborative filtering draws on other users who watched the same movie, while attribute-based models draw on movies with the same director, and the two sources are complementary. Connecting both sources runs through several hops in one graph, which feature-based models do not represent.

Exploiting such paths runs into two difficulties: the number of nodes reachable through high-order relations grows quickly with the order, and these relations do not contribute equally to a prediction. Path-based methods select paths or hand-define meta-paths, and that selection is not tuned toward the recommendation objective. Regularization-based methods use the knowledge graph only as an auxiliary loss, so high-order structure is encoded implicitly and cannot be checked directly.

The collaborative knowledge graph as input

The input combines a user-item bipartite graph built from observed interactions with a knowledge graph of item side information. Each observed interaction becomes a triplet \((u, \text{Interact}, i)\), and item-entity alignments connect items to knowledge graph entities so that the two parts form one graph. The merged graph has entity set \(\mathcal{E}'=\mathcal{E}\cup\mathcal{U}\) and relation set \(\mathcal{R}'=\mathcal{R}\cup\{\text{Interact}\}\), so users and items are nodes in the same structure as entities.

Relations are kept in both canonical and inverse directions, so a connection can be traversed from an attribute back to an item.

For a user and item, the model outputs a predicted probability \(\hat{y}_{ui}\) that the user adopts the item. Behavior-based paths such as user to item to another user to a second item capture collaborative filtering, while paths through a shared attribute capture the signal that feature models miss.

Embedding the graph with TransR

The model embeds the collaborative knowledge graph with TransR, which gives every entity and relation a vector while keeping the graph structure. Entity vectors are projected into the relation space by a matrix \(W_r\), and a triplet is plausible when the projected head plus the relation vector lands close to the projected tail.

Training uses a pairwise ranking loss over valid triplets and corrupted ones, where a corrupted triplet replaces one entity at random. The loss is \[ \mathcal{L}_{KG}=\sum_{(h,r,t,t')\in\mathcal{T}} -\ln\sigma\big(g(h,r,t')-g(h,r,t)\big) \] where \(\sigma\) is the sigmoid function. Minimizing it raises the score of the corrupted triplet relative to the valid one, because a larger \(g\) means a less plausible triplet.

The authors describe this loss as a regularizer that injects direct connections into the representations.

One propagation layer: ego-network, attention and aggregation

Each entity \(h\) gathers information from its ego-network, the set \(\mathcal{N}_h\) of triplets in which \(h\) is the head. The neighborhood summary is the weighted sum \[ e_{N_h}=\sum_{(h,r,t)\in\mathcal{N}_h}\pi(h,r,t)\,e_t \] where \(\pi(h,r,t)\) sets how much information flows from \(t\) to \(h\) under relation \(r\). Because an entity connects several triplets, information from an attribute can reach a user through the item that links them.

The raw attention score is a relation-aware inner product \[ \pi(h,r,t)=(W_r e_t)^\top \tanh(W_r e_h + e_r) \] which uses the tanh nonlinearity. The authors describe this as making the score depend on how close the head and tail are in the relation's space, so closer entities receive more propagation. A softmax over the triplets in \(\mathcal{N}_h\) then normalizes the raw scores, and the normalized value keeps the same symbol \(\pi\) in the paper.

The authors note that these normalized weights can be read as explanations, since they show which neighbors receive attention.

GCN and GraphSage fix the discount between two nodes from their neighborhood sizes, whereas this model learns a weight for each neighbor. Unlike graph attention networks, which take only node representations as input, the attention here also takes the relation embedding \(e_r\), so the relation enters each weight.

After propagation, the entity's own vector \(e_h\) and its neighborhood summary are combined by an aggregator \(f\), giving \(e_h^{(1)}=f(e_h, e_{N_h})\). The GCN aggregator is \(f_{GCN}=\mathrm{LeakyReLU}\big(W(e_h+e_{N_h})\big)\), so the two vectors are summed before a linear map. The GraphSage aggregator concatenates the two vectors before the linear map, \(f_{GraphSage}=\mathrm{LeakyReLU}\big(W(e_h\,\|\,e_{N_h})\big)\).

The authors argue that the product term makes the message sensitive to how similar the two vectors are.

Stacking layers, layer aggregation and training

Layers are stacked recursively, so the layer-\(l\) representation uses the layer-\((l-1)\) representations of the neighbors. The recursion is \[ e_h^{(l)}=f\big(e_h^{(l-1)},e_{N_h}^{(l-1)}\big), \qquad e_{N_h}^{(l-1)}=\sum_{(h,r,t)\in\mathcal{N}_h}\pi(h,r,t)\,e_t^{(l-1)} \] Each added layer reaches neighbors one hop further, so a three-layer model captures third-order connectivity.

For each user and item the model concatenates the representations from layer 0 to layer \(L\), giving \(e_u^*\) and \(e_i^*\). The matching score is the inner product \(\hat{y}(u,i)=e_u^{*\top}e_i^{*}\). Because every layer's output is kept, the depth \(L\) controls how much high-order propagation enters the score.

The recommendation loss is the BPR loss \[ \mathcal{L}_{CF}=\sum_{(u,i,j)\in\mathcal{O}}-\ln\sigma\big(\hat{y}(u,i)-\hat{y}(u,j)\big) \] which pushes observed interactions above sampled unobserved ones. The knowledge graph loss and the recommendation loss are optimized alternately with mini-batch Adam: one batch updates the embeddings of all nodes, and another batch of \((u,i,j)\) updates the model parameters with the prediction loss.

The joint objective is \(\mathcal{L}_{KGAT}=\mathcal{L}_{KG}+\mathcal{L}_{CF}+\lambda\lVert\Theta\rVert_2^2\), with an L2 penalty that guards against overfitting. Most trainable parameters are entity embeddings, about 6.5 million on the Amazon dataset, while the propagation weights are much smaller, about 5.4 thousand for the three-layer tower on that dataset.

Datasets, split and evaluation protocol

Experiments use Amazon-book, Last-FM and Yelp2018, which differ in domain, size and sparsity. Last-FM treats tracks as items and keeps a subset of interactions from January to June 2015, while Yelp2018 treats local businesses such as restaurants and bars as items.

For Amazon-book and Last-FM, items are mapped to Freebase entities by title matching, and the knowledge includes triplets around two-hop neighbor entities. For Yelp2018, item knowledge comes from the local business information network, including category, location and attribute. Infrequent entities are filtered out, and relations are kept only when they appear in enough triplets.

For each user 80% of the interactions form the training set, and 10% of the training interactions form the validation set used to tune hyper-parameters. Each observed interaction is a positive instance and is paired with one sampled item that the user has not consumed. Evaluation ranks all items the user has not interacted with, excluding the positive items in the training set, and reports recall@K and ndcg@K with K set to 20 by default, averaged over test users.

Baselines are FM, NFM, CKE, CFKG, MCRec, RippleNet and GC-MC, grouped as supervised, regularization-based, path-based and graph neural network methods.

Overall comparison with knowledge-aware baselines

KGAT has the highest recall@20 and ndcg@20 in the overall table on all three datasets. On Amazon-book KGAT reaches recall@20 of 0.1489 and ndcg@20 of 0.1006 with three propagation layers. The reported improvements in recall@20 over the strongest baseline are 8.95% on Amazon-book, 4.93% on Last-FM and 7.18% on Yelp2018. The authors attribute the gain to stacked attentive propagation layers that model high-order connectivity explicitly, and they note that the attention weights separate KGAT from GC-MC.

FM and NFM generally score above the regularization-based CFKG and CKE in most cases, which suggests that the regularization route uses item knowledge less fully. RippleNet has lower recall@20 than NFM on Amazon-book (0.1336 against 0.1366) and on Last-FM (0.0791 against 0.0829), but higher recall@20 on Yelp2018 (0.0664 against 0.0660). The authors suggest that NFM's hidden layer gives it stronger capacity to capture nonlinear feature interactions.

RippleNet outperforms MCRec by a large margin on Amazon-book, which the authors link to MCRec's dependence on hand-defined meta-paths. MCRec has no entries for Last-FM and Yelp2018 in the overall table. GC-MC performs close to RippleNet on Last-FM and Yelp2018, but it drops the semantic relations between nodes that RippleNet uses.

Performance on users with few interactions

Test users are split into four groups by interaction count, with a similar total number of interactions in each group. The analysis is run on ndcg@20 for Amazon-book, Last-FM and Yelp2018.

The authors read this as high-order propagation enriching the representations of inactive users, which goes beyond the lower-order signal the baselines use. On the densest Yelp2018 group KGAT only slightly beats some baselines, and the authors attribute this to broad preferences of heavy users and to noise that high-order connectivity can add.

Depth, aggregators and the role of embedding and attention

The depth study varies the number of propagation layers over 1, 2, 3 and 4. Four layers give 0.1503 on Amazon-book, a small step beyond three, and the authors suggest that third-order relations are largely enough.

The aggregator study compares one-layer variants with GCN, GraphSage and Bi-Interaction aggregators on all three datasets. The authors attribute GraphSage's weaker result to its dropping the interaction between an entity vector and its ego-network vector.

The ablation removes the TransR embedding loss, the attention, or both, from one-layer KGAT, and the attention-free variant sets the coefficient to 1/|N_h|. Removing a component lowers the score here, which supports keeping that component but does not show that the removal itself improves anything.

Case study and inference cost

The case study picks user u208 and item i4293 from Amazon-book, where the item is in the test set and unseen during training. The highest-attention path runs from u208 through Old Man's War to the author John Scalzi and then to i4293, and the explanation points to the shared author of a book the user has already watched. This is one user and one item, so it illustrates a single explanation rather than a measure of explanation quality.

Another path passes through the entity English under the relation Original Language, which the authors judge too general to explain anything. The authors plan hard attention to filter such entities out in future work.

Inference time on Amazon-book for all testing instances is 560s for KGAT, against 700s for FM, 780s for NFM, 2 hours for RippleNet and 20 hours for MCRec. The authors describe KGAT as comparable in cost to FM and NFM and much more efficient than the path-based methods. These timings are reported for Amazon-book only.

Limitations

The attention uses only an inner product form, and the authors leave further exploration of the attention module for future work. The explanation study uses one user and one item on Amazon-book, and it reports low-quality explanations when item knowledge is too general. Efficiency is measured on Amazon-book only.

Paper info

Authors
Xiang Wang, Xiangnan He, Yixin Cao, Meng Liu, Tat-Seng Chua
Venue
arXiv · Preprint
First published
2019-5-20
Added
2026-11-12
Updated
2019-6-8
Version
v2
arXiv
1905.07854
DOI
10.1145/3292500.3330989
Category
cs.LG · cs.IR · stat.ML
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Xiang Wang, Xiangnan He, Yixin Cao, Meng Liu, Tat-Seng Chua (2019). KGAT: Knowledge Graph Attention Network for Recommendation. arXiv:1905.07854v2. https://doi.org/10.1145/3292500.3330989

BibTeX
@article{wang2019kgat,
  title = {{KGAT: Knowledge Graph Attention Network for Recommendation}},
  author = {Xiang Wang and Xiangnan He and Yixin Cao and Meng Liu and Tat-Seng Chua},
  year = {2019},
  eprint = {1905.07854},
  archivePrefix = {arXiv},
  doi = {10.1145/3292500.3330989},
  url = {https://arxiv.org/abs/1905.07854v2}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up