SlideShare a Scribd company logo
Graph Neural Networks for
Recommendations
1
Data Science and Engineering Lab
Tutorial website: https://advanced-recommender-systems.github.io/ijcai2021-tutorial/
Wenqi Fan
The Hong Kong Polytechnic University
https://wenqifan03.github.io, wenqifan@polyu.edu.hk
2
A General Paradigm
1 0 1 1
0 1 0 0
1 1 0 0
1 0 0 1
0/1 Interaction matrix
users
items Items
Users
𝑢! 𝑣!
𝑢! 𝑣"
𝑢! 𝑣#
𝑢" 𝑣!
… …
Data instance
(𝑢$, 𝑣%) and side
information
Learning and Reasoning on Graph for Recommendation, WSDM 2020
3
A General Paradigm
Items
Users
𝑢! 𝑣!
1 0 1 1
0 1 0 0
1 1 0 0
1 0 0 1
0/1 Interaction matrix
users
items
𝑢! 𝑣"
𝑢! 𝑣#
𝑢" 𝑣!
… …
Data instance
(𝑢$, 𝑣%) and side
information
Representation
Learning
Interaction
Modeling
!
𝑦!"
User
Item
Other Features
Learning and Reasoning on Graph for Recommendation, WSDM 2020
4
A General Paradigm
Items
Users
𝑢! 𝑣!
𝑢! 𝑣"
𝑢! 𝑣#
𝑢" 𝑣!
… …
Data instance
(𝑢$, 𝑣%) and side
information
Representation
Learning
Interaction
Modeling !
𝑦!"
User
Item
Other Features
Information Isolated Island Issue
ignore implicit/explicit relationships among instances (High-order Connectivity )
Learning and Reasoning on Graph for Recommendation, WSDM 2020
5
A General Paradigm
𝑢! 𝑣!
𝑢! 𝑣"
𝑢! 𝑣#
𝑢! 𝑣!
𝑢" 𝑣!
… …
… … 𝑢!
𝑣!
Behavior similarity
among users/items
Items
Users
𝑢! 𝑣!
𝑢! 𝑣"
𝑢! 𝑣#
𝑢" 𝑣!
… …
Data instance
(𝑢$, 𝑣%) and side
information
Representation
Learning
Interaction
Modeling !
𝑦!"
User
Item
Other Features
Information Isolated Island Issue
ignore implicit/explicit relationships among instances (High-order Connectivity )
Learning and Reasoning on Graph for Recommendation, WSDM 2020
6
Data as Graphs
The world is more closely connected than you might think!
Most of the data in RS has essentially a graph structure
- E-commerce, Content Sharing, Social Networking ...
7
Data as Graphs
The world is more closely connected than you might think!
Most of the data in RS has essentially a graph structure
- E-commerce, Content Sharing, Social Networking ...
Items
Users
User-Item Interactions
(purchase, click, add-to-cart, etc.)
user-item graph
8
Data as Graphs
The world is more closely connected than you might think!
Most of the data in RS has essentially a graph structure
- E-commerce, Content Sharing, Social Networking ...
Items
Users
User-user Connections
(social networks)
User-Item Interactions
(purchase, click, add-to-cart, etc.)
user-item graph
user-user social graph
9
Data as Graphs
The world is more closely connected than you might think!
Most of the data in RS has essentially a graph structure
- E-commerce, Content Sharing, Social Networking ...
Items
Users
Attributes
User-user Connections
(social networks)
User-Item Interactions
(purchase, click, add-to-cart, etc.)
Item-item Connections
(substitutes/complements; external knowledge)
user-item graph
user-user social graph
item graph
10
How to solve such issue?
Items
Users
Attributes
Items
Users
𝑢! 𝑣!
𝑢! 𝑣"
𝑢! 𝑣#
𝑢" 𝑣!
… …
Data instance
(𝑢$, 𝑣%) and side
information
Representation
Learning
Interaction
Modeling !
𝑦!"
User
Item
Explore & Exploit Relations among Instances
Information Isolated
Island Issue
Other Features
Graph-structured data
11
How to solve such issue?
Items
Users
𝑢! 𝑣!
𝑢! 𝑣"
𝑢! 𝑣#
𝑢" 𝑣!
… …
Data instance
(𝑢$, 𝑣%) and side
information
Representation
Learning
Interaction
Modeling !
𝑦!"
User
Item
Explore & Exploit Relations among Instances
Graph Neural Networks
(GNNs)
Items
Users
Attributes
Information Isolated
Island Issue
Other Features
Graph-structured data
12
Graph Neural Networks (GNNs)
Key idea: Generate node embeddings via using
neural networks to aggregate information from
local neighborhoods.
Node
Node feature
Neural Message Passing
/Information Propagation
Inductive Representation Learning on Large Graphs, NeuIPS, 2017.
13
Graph Neural Networks (GNNs)
Key idea: Generate node embeddings via using
neural networks to aggregate information from
local neighborhoods.
Node
Node feature
1. Model a local structural information
(neighborhood) of a node;
Neural Message Passing
/Information Propagation
Inductive Representation Learning on Large Graphs, NeuIPS, 2017.
14
Graph Neural Networks (GNNs)
Key idea: Generate node embeddings via using
neural networks to aggregate information from
local neighborhoods.
Node
Node feature
1. Model a local structural information
(neighborhood) of a node;
2. Aggregation operation;
3. Representation update.
GNNs can naturally integrate node feature and
the topological structure for graph-structured
data.
Neural Message Passing
/Information Propagation
Inductive Representation Learning on Large Graphs, NeuIPS, 2017.
15
Graph Neural Networks (GNNs)
Basic approach: Average neighbor messages and apply a neural network.
𝐡#
$ = 𝐱#
k-th layer embedding of node 𝒗
Initial 0-th layer embeddings are equal to node 𝒗’s features
Embedding after k layers of neighborhood aggregation.
Semi-supervised Classification with Graph Convolutional Network, ICLR, 2017.
𝐳# = 𝐡#
%
𝐡#
% = 𝜎 𝐖&
%
'
'∈) #
𝐡'
%*&
|𝑁 𝑢 |
+ 𝐖+
%
𝐡#
%*&
16
Graph Neural Networks (GNNs)
Basic approach: Average neighbor messages and apply a neural network.
𝐡#
$ = 𝐱#
Average of neighbor’s previous layer embeddings
k-th layer embedding of node 𝒗
Non-linearity (e.g., ReLU or tanh)
Initial 0-th layer embeddings are equal to node 𝒗’s features
trainable matrices (i.e., what we learn)
Embedding after k layers of neighborhood aggregation.
Previous layer embedding of node 𝑣
Semi-supervised Classification with Graph Convolutional Network, ICLR, 2017.
𝐳# = 𝐡#
%
𝐡#
% = 𝜎 𝐖&
%
'
'∈) #
𝐡'
%*&
|𝑁 𝑢 |
+ 𝐖+
%
𝐡#
%*&
17
Graph Neural Network (GNN)
Ø GraphSAGE:
Ø GAT:
Inductive Representation Learning on Large Graphs, NeuIPS, 2017.
Graph Attention Networks, ICLR, 2018
Ø Simple neighborhood aggregation:
𝐡#
% = 𝜎 𝐖&
%
'
'∈) #
𝐡'
%*&
|𝑁 𝑢 |
+ 𝐖+
%
𝐡#
%*&
18
Graph Neural Network (GNN)
Ø GraphSAGE:
Ø GAT:
Inductive Representation Learning on Large Graphs, NeuIPS, 2017.
Graph Attention Networks, ICLR, 2018
Ø Simple neighborhood aggregation:
𝐡#
% = 𝜎 [𝐖&
%
- AGG 𝐡'
%*&, ∀'∈ 𝑁 𝑢 , 𝐖+
%
- 𝐡#
%]
𝐡#
% = 𝜎 𝐖&
%
'
'∈) #
𝐡'
%*&
|𝑁 𝑢 |
+ 𝐖+
%
𝐡#
%*&
Generalized Aggregation: mean, pooling, LSTM
19
Graph Neural Network (GNN)
Ø GraphSAGE:
Ø GAT:
Inductive Representation Learning on Large Graphs, NeuIPS, 2017.
Graph Attention Networks, ICLR, 2018
Ø Simple neighborhood aggregation:
𝐡#
% = 𝜎 [𝐖&
%
- AGG 𝐡'
%*&, ∀'∈ 𝑁 𝑢 , 𝐖+
%
- 𝐡#
%]
Generalized Aggregation: mean, pooling, LSTM
𝐡#
% = 𝜎 '
'∈) #
𝛼#,' 𝐖% 𝐡'
%*&
Learned attention weights
𝐡#
% = 𝜎 𝐖&
%
'
'∈) #
𝐡'
%*&
|𝑁 𝑢 |
+ 𝐖+
%
𝐡#
%*&
Book: Deep Learning on Graphs
20
1.	Introduction
2.	Foundations	of	Graphs
Part	One:	Foundations
3.	Foundations	of	Deep	Learning
4.	Graph	Embedding
Part	Two:	Methods
5.	Graph	Neural	Networks
6.	Robust	Graph	Neural	Networks
7.	Scalable	Graph	Neural	Networks
8.	Graph	Neural	Networks	for	Complex	Graphs
9.	Beyond	GNNs:	More	Deep	Models	for	Graphs
10.	Graph	Neural	Networks	in	Natural	Language	Processing
Part	Three:	Applications
11.	Graph	Neural	Networks	in	Computer	Vision
12.	Graph	Neural	Networks	in	Data	Mining	
13.	Graph	Neural	Networks	in	Bio-Chemistry	and	Healthcare
14.	Advanced	Methods	in	Graph	Neural	Networks
Part	Four:	Advances
15.	Advanced	Applications	in	Graph	Neural	Networks
https://cse.msu.edu/~mayao4/dlg_book/
Authors
English Version: Yao Ma and Jiliang Tang
Chinese Version: Yiqi Wang, Wei Jin, Yao Ma and Jiliang Tang
21
GNNs based Recommendation
Collaborative Filtering
• Graph Convolutional Neural Networks for Web-Scale Recommender Systems (KDD’18)
• Graph Convolutional Matrix Completion (KDD’18 Deep Learning Day )
• Neural Graph Collaborative Filtering (SIGIR’19)
• LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation (SIGIR’20)
• Graph Trend Networks for Recommendations, arXiv:2108.05552, 2021
Collaborative Filtering with Side Information (Users/Items)
p Social Recommendation (Users)
• Graph Neural Network for Social Recommendation (WWW’19)
• A Neural Influence Diffusion Model for Social Recommendation (SIGIR’19)
• A Graph Neural Network Framework for Social Recommendations (TKDE’20)
p Knowledge-graph-aware Recommendation (Items)
• Knowledge Graph Convolutional Networks for Recommender Systems with Label Smoothness
Regularization (KDD’19 and WWW’19)
• KGAT: Knowledge Graph Attention Network for Recommendation (KDD’19)
22
GNNs based Recommendation
Collaborative Filtering
• Graph Convolutional Neural Networks for Web-Scale Recommender Systems (KDD’18)
• Graph Convolutional Matrix Completion (KDD’18 Deep Learning Day )
• Neural Graph Collaborative Filtering (SIGIR’19)
• LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation (SIGIR’20)
• Graph Trend Networks for Recommendations, arXiv:2108.05552, 2021
Collaborative Filtering with Side Information (Users/Items)
p Social Recommendation (Users)
• Graph Neural Network for Social Recommendation (WWW’19)
• A Neural Influence Diffusion Model for Social Recommendation (SIGIR’19)
• A Graph Neural Network Framework for Social Recommendations (TKDE’20)
p Knowledge-graph-aware Recommendation (Items)
• Knowledge Graph Convolutional Networks for Recommender Systems with Label Smoothness
Regularization (KDD’19 and WWW’19)
• KGAT: Knowledge Graph Attention Network for Recommendation (KDD’19)
23
Interactions as Bipartite Graph
1 0 1 1
0 1 0 0
1 1 0 0
1 0 0 1
0/1 Interaction matrix
users
items
users items
Bipartite Graph
24
Interactions as Bipartite Graph
5 0 3 1
0 3 0 0
2 5 0 0
5 0 0 4
Weighted interaction matrix
users
items
users items
Bipartite Graph
5
3
1
3
2
5
5
4
25
GCMC
users items
Bipartite Graph
5
3
1
3
2
5
5
4
User representation learning
µi,r =
X
j2Ni,r
1
cij
Wrxj
Aggregate for each rating:
Graph Convolutional Matrix Completion. 2017.
26
GCMC
users items
Bipartite Graph
5
3
1
3
2
5
5
4
User representation learning
µi,r =
X
j2Ni,r
1
cij
Wrxj
Aggregate for each rating:
ui = W · (accum(ui,1, . . . , ui,R))
Item representation learning in a similar way
Graph Convolutional Matrix Completion. 2017.
27
NGCF
Embedding Propagation, inspired by GNNs
• Propagate embeddings recursively on the user-item graph
• Construct information flows in the embedding space
Neural Graph Collaborative Filtering. SIGIR 2019.
User-item
Graph
High-order Connectivity for 𝑢1
28
NGCF
Embedding Propagation, inspired by GNNs
• Propagate embeddings recursively on the user-item graph
• Construct information flows in the embedding space
Neural Graph Collaborative Filtering. SIGIR 2019.
User-item
Graph
collaborative signal: message passed
from interacted items to 𝑢
Self-connections
High-order Connectivity for 𝑢1
29
NGCF
Embedding Propagation, inspired by GNNs
• Propagate embeddings recursively on the user-item graph
• Construct information flows in the embedding space
Neural Graph Collaborative Filtering. SIGIR 2019.
User-item
Graph
Different layers
collaborative signal: message passed
from interacted items to 𝑢
Self-connections
High-order Connectivity for 𝑢1
30
LightGCN
Simplifying GCN for recommendation
LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation. SIGIR 2020.
discard feature transformation and nonlinear activation
31
LightGCN
Simplifying GCN for recommendation
LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation. SIGIR 2020.
discard feature transformation and nonlinear activation
§ Unreliable user-item interactions
Graph Trend Networks for Recommendations
33
Graph Trend Networks for Recommendations. arXiv:2108.05552, 2021.
Macbook Pro Camera Lipstick
Ring
Handbag
iPhone 
User 1 User 2 User 3 User 4
E.g.,
(1) User 3 was affected by the click-bait issue.
(2) User 2 bought a one-time item for his mother’s birthday
present;
Embedding Propagation Rule
Overlook unreliable interactions (e.g.,
random/bait clicks) and uniformly treat all
the interactions
§ Performance of LightGCN under different perturbation rates.
Preliminary study
34
Graph Trend Networks for Recommendations. arXiv:2108.05552, 2021.
§ Performance of LightGCN under different perturbation rates.
Preliminary study
35
Graph Trend Networks for Recommendations. arXiv:2108.05552, 2021.
Ø To build a more reliable and
robust recommender system
Ø Graph Trend Networks for
recommendations (GTN)
§ Laplacian smoothing problem
Graph Trend Networks for Recommendations
36
Graph Trend Networks for Recommendations. arXiv:2108.05552, 2021.
A unified view on graph neural networks as graph signal denoising, arXiv:2010.01777, 2020.
Matrix form:
edge-wise form
§ Design Motivation from Graph Trend Filtering
§ Embedding smoothness objective:
Graph Trend Networks for Recommendations
37
Preserve the proximity
Impose embedding smoothness
Trend filtering on graphs, Journal of Machine Learning Research, 2016.
Graph Trend Networks for Recommendations. arXiv:2108.05552, 2021.
GTN
38
Graph Trend Networks for Recommendations. arXiv:2108.05552, 2021.
Recommendation performance
under different perturbation rates.
39
GNN based Recommendation
Collaborative Filtering
• Graph Convolutional Neural Networks for Web-Scale Recommender Systems (KDD’18)
• Graph Convolutional Matrix Completion (KDD’18 Deep Learning Day )
• Neural Graph Collaborative Filtering (SIGIR’19)
• LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation (SIGIR’20)
Collaborative Filtering with Side Information (Users/Items)
p Social Recommendation (Users)
• Graph Neural Network for Social Recommendation (WWW’19)
• A Neural Influence Diffusion Model for Social Recommendation (SIGIR’19)
• A Graph Neural Network Framework for Social Recommendations (TKDE’20)
p Knowledge-graph-aware Recommendation (Items)
• Knowledge Graph Convolutional Networks for Recommender Systems with Label Smoothness
Regularization (KDD’19 and WWW’19)
• KGAT: Knowledge Graph Attention Network for Recommendation (KDD’19)
40
Social Recommendation
Side information about users: social networks
p Users’ preferences are similar to or influenced by the people around them (nearer neighbours)
[Tang et. al, 2013]
Social recommendation: a review, SNAM, 2013
41
Social Recommendation
Side information about users: social networks
p Users’ preferences are similar to or influenced by the people around them (nearer neighbours)
[Tang et. al, 2013]
Social recommendation: a review, SNAM, 2013
42
GraphRec
Graph Data in Social Recommendation
Graph Neural Networks for Social Recommendation. WWW 2019.
User-Item Graph Social Graph
43
GraphRec
Graph Data in Social Recommendation
Graph Neural Networks for Social Recommendation. WWW 2019.
User-Item
Graph
Social Graph
User-Item Graph Social Graph
Users
Bridge
44
GraphRec
Three Components:
p User Modeling
p Item Modeling
p Rating Prediction
Graph Neural Networks for Social Recommendation. WWW 2019.
45
GraphRec
Item Aggregation
(User-Item Graph)
Social Aggregation
(Social Graph)
Three Components:
p User Modeling
p Item Modeling
p Rating Prediction
Graph Neural Networks for Social Recommendation. WWW 2019.
GraphRec: User Modeling
46
p Social Aggregation in user-user social graph
p Users are likely to share more similar tastes with strong
ties than weak ties.
Strong tie
Weak tie
Graph Neural Networks for Social Recommendation. WWW 2019.
GraphRec: User Modeling
47
p Social Aggregation in user-user social graph
p Users are likely to share more similar tastes with strong
ties than weak ties.
Strong tie
Weak tie
Aggregating item-space users messages from
social neighbors
Graph Neural Networks for Social Recommendation. WWW 2019.
Attention network to differentiate the importance weight.
attentive weight
Social-space
user latent factor
Item representation
Item-space
user latent factor
User-item
Graph
Social Graph
48
User Modeling: Social Aggregation
user item
Graph Neural Networks for Social Recommendation. WWW 2019.
Social-space
user latent factor
Item representation
Item Aggregation
Item-space
user latent factor
User-item
Graph
Social Graph
49
User Modeling: Social Aggregation
user item
Graph Neural Networks for Social Recommendation. WWW 2019.
Social-space
user latent factor
Item representation
Item Aggregation
Item-space
user latent factor
Social Aggregation
User-item
Graph
Social Graph
50
User Modeling: Social Aggregation
user item
Graph Neural Networks for Social Recommendation. WWW 2019.
51
GNNs based Recommendation
Collaborative Filtering
• Graph Convolutional Neural Networks for Web-Scale Recommender Systems (KDD’18)
• Graph Convolutional Matrix Completion (KDD’18 Deep Learning Day )
• Neural Graph Collaborative Filtering (SIGIR’19)
• LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation (SIGIR’20)
Collaborative Filtering with Side Information (Users/Items)
p Social Recommendation (Users)
• Graph Neural Network for Social Recommendation (WWW’19)
• A Neural Influence Diffusion Model for Social Recommendation (SIGIR’19)
• A Graph Neural Network Framework for Social Recommendations (TKDE’20)
p Knowledge-graph-aware Recommendation (Items)
• Knowledge Graph Convolutional Networks for Recommender Systems with Label Smoothness
Regularization (KDD’19 and WWW’19)
• KGAT: Knowledge Graph Attention Network for Recommendation (KDD’19)
KGCN (WWW’19)
Heterogeneous Graph:
Ø Nodes: entities (Items)
Ø Edges: relations
Side information about items: Knowledge Graph (KG)
Triples: (head, relation, tail)
Knowledge Graph Convolutional Networks for Recommender Systems, WWW 2019.
52
KGCN (WWW’19)
Heterogeneous Graph:
Ø Nodes: entities (Items)
Ø Edges: relations
Side information about items: Knowledge Graph (KG)
Triples: (head, relation, tail)
Forrest Gump
(items)
Robert Zemeckis
film.film.director
Knowledge Graph Convolutional Networks for Recommender Systems, WWW 2019.
53
KGCN (WWW’19)
3.2 KGCN Layer
KGCN is proposed to capture high-order structural proximity among
entities in a knowledge graph. We start by describing a single KGCN
layer in this subsection. Consider a candidate pair of user u and
item (entity) . We use N ( ) to denote the set of entities directly
connected to ,2 and rei,ej to denote the relation between entity ei
and ej . We also use a function : Rd ⇥Rd ! R (e.g., inner product)
to compute the score between a user and a relation:
u
r = (u, r), (1)
where u 2 Rd and r 2 Rd are the representations of user u and
relation r, respectively, d is the dimension of representations. In
general, u characterizes the importance of relation r to user u. For
ℎ=1
ℎ=2
(a) (b)
Figure 1: (a) A two-layer receptive �eld (green entities
GNNs?
Heterogeneous Graph:
Ø Nodes: entities (Items)
Ø Edges: relations
Side information about items: Knowledge Graph (KG)
Triples: (head, relation, tail)
Forrest Gump
(items)
Robert Zemeckis
film.film.director
Knowledge Graph Convolutional Networks for Recommender Systems, WWW 2019.
54
KGCN (WWW’19)
• Representation Aggregation of neighboring entities
mong
GCN
and
ectly
ty ei
duct)
(1)
and
ns. In
(a)
𝐞𝑢
[ℎ + 1]
𝐞1
𝑢
[ℎ]
𝐞2
𝑢
[ℎ] 𝐞3
𝑢
[ℎ]
𝐞4
𝑢
[ℎ]
෤
𝜋𝑟𝑣,𝑒2
𝑢
e𝑢
[ℎ]
……
𝐞𝑢
[𝐻]
item 𝐮 user
ො
𝑦
predicted probability
iteration ℎ + 1
෤
𝜋𝑟𝑣,𝑒1
𝑢
෤
𝜋𝑟𝑣,𝑒3
𝑢
෤
𝜋𝑟𝑣,𝑒4
𝑢
(𝐯𝑢
)
(b)
Transform a heterogeneous KG into a
user-personalized weighted graph
Knowledge Graph Convolutional Networks for Recommender Systems. WWW 2019. 55
KGCN (WWW’19)
• Representation Aggregation of neighboring entities
mong
GCN
and
ectly
ty ei
duct)
(1)
and
ns. In
(a)
𝐞𝑢
[ℎ + 1]
𝐞1
𝑢
[ℎ]
𝐞2
𝑢
[ℎ] 𝐞3
𝑢
[ℎ]
𝐞4
𝑢
[ℎ]
෤
𝜋𝑟𝑣,𝑒2
𝑢
e𝑢
[ℎ]
……
𝐞𝑢
[𝐻]
item 𝐮 user
ො
𝑦
predicted probability
iteration ℎ + 1
෤
𝜋𝑟𝑣,𝑒1
𝑢
෤
𝜋𝑟𝑣,𝑒3
𝑢
෤
𝜋𝑟𝑣,𝑒4
𝑢
(𝐯𝑢
)
(b)
Transform a heterogeneous KG into a
user-personalized weighted graph
Normalized
user-specific relation
(e.g., inner product)
Knowledge Graph Convolutional Networks for Recommender Systems. WWW 2019. 56
KGCN (WWW’19)
• Representation Aggregation of neighboring entities
mong
GCN
and
ectly
ty ei
duct)
(1)
and
ns. In
(a)
𝐞𝑢
[ℎ + 1]
𝐞1
𝑢
[ℎ]
𝐞2
𝑢
[ℎ] 𝐞3
𝑢
[ℎ]
𝐞4
𝑢
[ℎ]
෤
𝜋𝑟𝑣,𝑒2
𝑢
e𝑢
[ℎ]
……
𝐞𝑢
[𝐻]
item 𝐮 user
ො
𝑦
predicted probability
iteration ℎ + 1
෤
𝜋𝑟𝑣,𝑒1
𝑢
෤
𝜋𝑟𝑣,𝑒3
𝑢
෤
𝜋𝑟𝑣,𝑒4
𝑢
(𝐯𝑢
)
(b)
Transform a heterogeneous KG into a
user-personalized weighted graph
Normalized
user-specific relation
(e.g., inner product)
Knowledge Graph Convolutional Networks for Recommender Systems. WWW 2019. 57
58
KGAT
KGAT: Knowledge graph attention network for recommendation. KDD 2019.
User-item Graph 𝒖𝟏 →
𝒓𝟏
𝒊𝟏
Knowledge Graph 𝒊𝟏 →
𝒓𝟐
𝒆𝟏
59
KGAT
KGAT: Knowledge graph attention network for recommendation. KDD 2019.
User-item Graph 𝒖𝟏 →
𝒓𝟏
𝒊𝟏
Knowledge Graph 𝒊𝟏 →
𝒓𝟐
𝒆𝟏
Collaborative Knowledge Graph
(CKG)
To fully exploit high-order relations in CKG
e.g., the long-range connectivities:
𝑢! →
&!
𝑖! →
&"
𝑒!
' &"
𝑖(
' &!
𝑢(, 𝑢"
𝑢! →
&!
𝑖! →
&"
𝑒!
' &#
𝑖", 𝑖#
60
KGAT
KGAT: Knowledge graph attention network for recommendation. KDD 2019.
61
KGAT
KGAT: Knowledge graph attention network for recommendation. KDD 2019.
Information Propagation:
Knowledge-aware Attention:
Information Aggregation:
62
KGAT
KGAT: Knowledge graph attention network for recommendation. KDD 2019.
IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, SUBMISSION 2019
AirPods
iPhone XS
iPad Pro
MacBook Pro
MacBook Air
MacBook
Apple Pencil
Smart Keyboard
USB Type-C Hub
(c) Item-item Graph
(b) User-User Social Graph
…
5
3
1
iPhone XS
Electric Toothbrush
iPad Pro
(a) User-item Graph
User-item Interactions
Social Relations
Item-item Relations
Item-item Graph
User-item Graph
User-User Social Graph
1 5
3
(d) Graph Data in Social Recommendation
Figure 1: Graph Data in Social Recommendations. It contains three graphs including the user-item graph (a), the u
social graph (b), and the item-item graph (c). Note that the number on the edges of the user-item graph den
63
GraphRec+
A Graph Neural Network Framework for Social Recommendations, TKDE 2020
Graph Neural Networks for Social Recommendation, WWW 2019.
IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, SUBMISSION 2019
AirPods
iPhone XS
iPad Pro
MacBook Pro
MacBook Air
MacBook
Apple Pencil
Smart Keyboard
USB Type-C Hub
(c) Item-item Graph
(b) User-User Social Graph
…
5
3
1
iPhone XS
Electric Toothbrush
iPad Pro
(a) User-item Graph
User-item Interactions
Social Relations
Item-item Relations
Item-item Graph
User-item Graph
User-User Social Graph
1 5
3
(d) Graph Data in Social Recommendation
Figure 1: Graph Data in Social Recommendations. It contains three graphs including the user-item graph (a), the u
social graph (b), and the item-item graph (c). Note that the number on the edges of the user-item graph den
64
GraphRec+
Ø ‘users who bought A also bought B’
Ø ‘users who viewed A also viewed B’
Substitutable and Complementary Items
Item-item Graph
E.g.,
A Graph Neural Network Framework for Social Recommendations, TKDE 2020
Graph Neural Networks for Social Recommendation, WWW 2019.
65
GraphRec+
IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, SUBMISSION 2019 4
concat
…
Opinion Embedding
Item Embedding
User Embedding
… …
Attention Network
μ1 μ2
μ3
User-space
Item Modeling
User Aggregation
Score Prediction
User Latent Factor
concat
… …
Attention Network
α1
α2
α3
Item-space
Item-space Item-space Item-space
Social-space
Attention Network
…
…
β2
β3
β1
User Modeling
Item
Aggregation Social Aggregation
Item Latent Factor
…
concat
User-space User-space User--space
item2item-space
Attention Network
…
…
!!
!"
!#
Item-space: Item-space User Latent Factor
Social-space: Social-space User Latent Factor
User-space: User-space Item Latent Factor
Item2item-space: Item2item-space Item Latent Factor
Item2item Aggregation
!!
…
…
5
3
1
iPhone XS
Electric
Toothbrush
iPad Pro
AirPods
iPhone XS
iPad Pro
MacBook
Pro
Smart
Keyboard
USB Type-C
Hub
Figure 2: The overall architecture of the proposed model. It contains three major components: user modeling, item
A Graph Neural Network Framework for Social Recommendations, TKDE 2020
Graph Neural Networks for Social Recommendation, WWW 2019.
66
Conclusion: Future Directions
Depth
When the deeper GNNs can help in recommender systems?
67
Conclusion: Future Directions
Depth
When the deeper GNNs can help in recommender systems?
Security (Data Poisoning Attack & Defense)
Ø Edges
user-item interactions
social relations
knowledge graph
Ø Node (users/items) Features
Ø Local Graph Structure

More Related Content

Graph Neural Networks for Recommendations

  • 1. Graph Neural Networks for Recommendations 1 Data Science and Engineering Lab Tutorial website: https://advanced-recommender-systems.github.io/ijcai2021-tutorial/ Wenqi Fan The Hong Kong Polytechnic University https://wenqifan03.github.io, wenqifan@polyu.edu.hk
  • 2. 2 A General Paradigm 1 0 1 1 0 1 0 0 1 1 0 0 1 0 0 1 0/1 Interaction matrix users items Items Users 𝑢! 𝑣! 𝑢! 𝑣" 𝑢! 𝑣# 𝑢" 𝑣! … … Data instance (𝑢$, 𝑣%) and side information Learning and Reasoning on Graph for Recommendation, WSDM 2020
  • 3. 3 A General Paradigm Items Users 𝑢! 𝑣! 1 0 1 1 0 1 0 0 1 1 0 0 1 0 0 1 0/1 Interaction matrix users items 𝑢! 𝑣" 𝑢! 𝑣# 𝑢" 𝑣! … … Data instance (𝑢$, 𝑣%) and side information Representation Learning Interaction Modeling ! 𝑦!" User Item Other Features Learning and Reasoning on Graph for Recommendation, WSDM 2020
  • 4. 4 A General Paradigm Items Users 𝑢! 𝑣! 𝑢! 𝑣" 𝑢! 𝑣# 𝑢" 𝑣! … … Data instance (𝑢$, 𝑣%) and side information Representation Learning Interaction Modeling ! 𝑦!" User Item Other Features Information Isolated Island Issue ignore implicit/explicit relationships among instances (High-order Connectivity ) Learning and Reasoning on Graph for Recommendation, WSDM 2020
  • 5. 5 A General Paradigm 𝑢! 𝑣! 𝑢! 𝑣" 𝑢! 𝑣# 𝑢! 𝑣! 𝑢" 𝑣! … … … … 𝑢! 𝑣! Behavior similarity among users/items Items Users 𝑢! 𝑣! 𝑢! 𝑣" 𝑢! 𝑣# 𝑢" 𝑣! … … Data instance (𝑢$, 𝑣%) and side information Representation Learning Interaction Modeling ! 𝑦!" User Item Other Features Information Isolated Island Issue ignore implicit/explicit relationships among instances (High-order Connectivity ) Learning and Reasoning on Graph for Recommendation, WSDM 2020
  • 6. 6 Data as Graphs The world is more closely connected than you might think! Most of the data in RS has essentially a graph structure - E-commerce, Content Sharing, Social Networking ...
  • 7. 7 Data as Graphs The world is more closely connected than you might think! Most of the data in RS has essentially a graph structure - E-commerce, Content Sharing, Social Networking ... Items Users User-Item Interactions (purchase, click, add-to-cart, etc.) user-item graph
  • 8. 8 Data as Graphs The world is more closely connected than you might think! Most of the data in RS has essentially a graph structure - E-commerce, Content Sharing, Social Networking ... Items Users User-user Connections (social networks) User-Item Interactions (purchase, click, add-to-cart, etc.) user-item graph user-user social graph
  • 9. 9 Data as Graphs The world is more closely connected than you might think! Most of the data in RS has essentially a graph structure - E-commerce, Content Sharing, Social Networking ... Items Users Attributes User-user Connections (social networks) User-Item Interactions (purchase, click, add-to-cart, etc.) Item-item Connections (substitutes/complements; external knowledge) user-item graph user-user social graph item graph
  • 10. 10 How to solve such issue? Items Users Attributes Items Users 𝑢! 𝑣! 𝑢! 𝑣" 𝑢! 𝑣# 𝑢" 𝑣! … … Data instance (𝑢$, 𝑣%) and side information Representation Learning Interaction Modeling ! 𝑦!" User Item Explore & Exploit Relations among Instances Information Isolated Island Issue Other Features Graph-structured data
  • 11. 11 How to solve such issue? Items Users 𝑢! 𝑣! 𝑢! 𝑣" 𝑢! 𝑣# 𝑢" 𝑣! … … Data instance (𝑢$, 𝑣%) and side information Representation Learning Interaction Modeling ! 𝑦!" User Item Explore & Exploit Relations among Instances Graph Neural Networks (GNNs) Items Users Attributes Information Isolated Island Issue Other Features Graph-structured data
  • 12. 12 Graph Neural Networks (GNNs) Key idea: Generate node embeddings via using neural networks to aggregate information from local neighborhoods. Node Node feature Neural Message Passing /Information Propagation Inductive Representation Learning on Large Graphs, NeuIPS, 2017.
  • 13. 13 Graph Neural Networks (GNNs) Key idea: Generate node embeddings via using neural networks to aggregate information from local neighborhoods. Node Node feature 1. Model a local structural information (neighborhood) of a node; Neural Message Passing /Information Propagation Inductive Representation Learning on Large Graphs, NeuIPS, 2017.
  • 14. 14 Graph Neural Networks (GNNs) Key idea: Generate node embeddings via using neural networks to aggregate information from local neighborhoods. Node Node feature 1. Model a local structural information (neighborhood) of a node; 2. Aggregation operation; 3. Representation update. GNNs can naturally integrate node feature and the topological structure for graph-structured data. Neural Message Passing /Information Propagation Inductive Representation Learning on Large Graphs, NeuIPS, 2017.
  • 15. 15 Graph Neural Networks (GNNs) Basic approach: Average neighbor messages and apply a neural network. 𝐡# $ = 𝐱# k-th layer embedding of node 𝒗 Initial 0-th layer embeddings are equal to node 𝒗’s features Embedding after k layers of neighborhood aggregation. Semi-supervised Classification with Graph Convolutional Network, ICLR, 2017. 𝐳# = 𝐡# % 𝐡# % = 𝜎 𝐖& % ' '∈) # 𝐡' %*& |𝑁 𝑢 | + 𝐖+ % 𝐡# %*&
  • 16. 16 Graph Neural Networks (GNNs) Basic approach: Average neighbor messages and apply a neural network. 𝐡# $ = 𝐱# Average of neighbor’s previous layer embeddings k-th layer embedding of node 𝒗 Non-linearity (e.g., ReLU or tanh) Initial 0-th layer embeddings are equal to node 𝒗’s features trainable matrices (i.e., what we learn) Embedding after k layers of neighborhood aggregation. Previous layer embedding of node 𝑣 Semi-supervised Classification with Graph Convolutional Network, ICLR, 2017. 𝐳# = 𝐡# % 𝐡# % = 𝜎 𝐖& % ' '∈) # 𝐡' %*& |𝑁 𝑢 | + 𝐖+ % 𝐡# %*&
  • 17. 17 Graph Neural Network (GNN) Ø GraphSAGE: Ø GAT: Inductive Representation Learning on Large Graphs, NeuIPS, 2017. Graph Attention Networks, ICLR, 2018 Ø Simple neighborhood aggregation: 𝐡# % = 𝜎 𝐖& % ' '∈) # 𝐡' %*& |𝑁 𝑢 | + 𝐖+ % 𝐡# %*&
  • 18. 18 Graph Neural Network (GNN) Ø GraphSAGE: Ø GAT: Inductive Representation Learning on Large Graphs, NeuIPS, 2017. Graph Attention Networks, ICLR, 2018 Ø Simple neighborhood aggregation: 𝐡# % = 𝜎 [𝐖& % - AGG 𝐡' %*&, ∀'∈ 𝑁 𝑢 , 𝐖+ % - 𝐡# %] 𝐡# % = 𝜎 𝐖& % ' '∈) # 𝐡' %*& |𝑁 𝑢 | + 𝐖+ % 𝐡# %*& Generalized Aggregation: mean, pooling, LSTM
  • 19. 19 Graph Neural Network (GNN) Ø GraphSAGE: Ø GAT: Inductive Representation Learning on Large Graphs, NeuIPS, 2017. Graph Attention Networks, ICLR, 2018 Ø Simple neighborhood aggregation: 𝐡# % = 𝜎 [𝐖& % - AGG 𝐡' %*&, ∀'∈ 𝑁 𝑢 , 𝐖+ % - 𝐡# %] Generalized Aggregation: mean, pooling, LSTM 𝐡# % = 𝜎 ' '∈) # 𝛼#,' 𝐖% 𝐡' %*& Learned attention weights 𝐡# % = 𝜎 𝐖& % ' '∈) # 𝐡' %*& |𝑁 𝑢 | + 𝐖+ % 𝐡# %*&
  • 20. Book: Deep Learning on Graphs 20 1. Introduction 2. Foundations of Graphs Part One: Foundations 3. Foundations of Deep Learning 4. Graph Embedding Part Two: Methods 5. Graph Neural Networks 6. Robust Graph Neural Networks 7. Scalable Graph Neural Networks 8. Graph Neural Networks for Complex Graphs 9. Beyond GNNs: More Deep Models for Graphs 10. Graph Neural Networks in Natural Language Processing Part Three: Applications 11. Graph Neural Networks in Computer Vision 12. Graph Neural Networks in Data Mining 13. Graph Neural Networks in Bio-Chemistry and Healthcare 14. Advanced Methods in Graph Neural Networks Part Four: Advances 15. Advanced Applications in Graph Neural Networks https://cse.msu.edu/~mayao4/dlg_book/ Authors English Version: Yao Ma and Jiliang Tang Chinese Version: Yiqi Wang, Wei Jin, Yao Ma and Jiliang Tang
  • 21. 21 GNNs based Recommendation Collaborative Filtering • Graph Convolutional Neural Networks for Web-Scale Recommender Systems (KDD’18) • Graph Convolutional Matrix Completion (KDD’18 Deep Learning Day ) • Neural Graph Collaborative Filtering (SIGIR’19) • LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation (SIGIR’20) • Graph Trend Networks for Recommendations, arXiv:2108.05552, 2021 Collaborative Filtering with Side Information (Users/Items) p Social Recommendation (Users) • Graph Neural Network for Social Recommendation (WWW’19) • A Neural Influence Diffusion Model for Social Recommendation (SIGIR’19) • A Graph Neural Network Framework for Social Recommendations (TKDE’20) p Knowledge-graph-aware Recommendation (Items) • Knowledge Graph Convolutional Networks for Recommender Systems with Label Smoothness Regularization (KDD’19 and WWW’19) • KGAT: Knowledge Graph Attention Network for Recommendation (KDD’19)
  • 22. 22 GNNs based Recommendation Collaborative Filtering • Graph Convolutional Neural Networks for Web-Scale Recommender Systems (KDD’18) • Graph Convolutional Matrix Completion (KDD’18 Deep Learning Day ) • Neural Graph Collaborative Filtering (SIGIR’19) • LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation (SIGIR’20) • Graph Trend Networks for Recommendations, arXiv:2108.05552, 2021 Collaborative Filtering with Side Information (Users/Items) p Social Recommendation (Users) • Graph Neural Network for Social Recommendation (WWW’19) • A Neural Influence Diffusion Model for Social Recommendation (SIGIR’19) • A Graph Neural Network Framework for Social Recommendations (TKDE’20) p Knowledge-graph-aware Recommendation (Items) • Knowledge Graph Convolutional Networks for Recommender Systems with Label Smoothness Regularization (KDD’19 and WWW’19) • KGAT: Knowledge Graph Attention Network for Recommendation (KDD’19)
  • 23. 23 Interactions as Bipartite Graph 1 0 1 1 0 1 0 0 1 1 0 0 1 0 0 1 0/1 Interaction matrix users items users items Bipartite Graph
  • 24. 24 Interactions as Bipartite Graph 5 0 3 1 0 3 0 0 2 5 0 0 5 0 0 4 Weighted interaction matrix users items users items Bipartite Graph 5 3 1 3 2 5 5 4
  • 25. 25 GCMC users items Bipartite Graph 5 3 1 3 2 5 5 4 User representation learning µi,r = X j2Ni,r 1 cij Wrxj Aggregate for each rating: Graph Convolutional Matrix Completion. 2017.
  • 26. 26 GCMC users items Bipartite Graph 5 3 1 3 2 5 5 4 User representation learning µi,r = X j2Ni,r 1 cij Wrxj Aggregate for each rating: ui = W · (accum(ui,1, . . . , ui,R)) Item representation learning in a similar way Graph Convolutional Matrix Completion. 2017.
  • 27. 27 NGCF Embedding Propagation, inspired by GNNs • Propagate embeddings recursively on the user-item graph • Construct information flows in the embedding space Neural Graph Collaborative Filtering. SIGIR 2019. User-item Graph High-order Connectivity for 𝑢1
  • 28. 28 NGCF Embedding Propagation, inspired by GNNs • Propagate embeddings recursively on the user-item graph • Construct information flows in the embedding space Neural Graph Collaborative Filtering. SIGIR 2019. User-item Graph collaborative signal: message passed from interacted items to 𝑢 Self-connections High-order Connectivity for 𝑢1
  • 29. 29 NGCF Embedding Propagation, inspired by GNNs • Propagate embeddings recursively on the user-item graph • Construct information flows in the embedding space Neural Graph Collaborative Filtering. SIGIR 2019. User-item Graph Different layers collaborative signal: message passed from interacted items to 𝑢 Self-connections High-order Connectivity for 𝑢1
  • 30. 30 LightGCN Simplifying GCN for recommendation LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation. SIGIR 2020. discard feature transformation and nonlinear activation
  • 31. 31 LightGCN Simplifying GCN for recommendation LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation. SIGIR 2020. discard feature transformation and nonlinear activation
  • 32. § Unreliable user-item interactions Graph Trend Networks for Recommendations 33 Graph Trend Networks for Recommendations. arXiv:2108.05552, 2021. Macbook Pro Camera Lipstick Ring Handbag iPhone  User 1 User 2 User 3 User 4 E.g., (1) User 3 was affected by the click-bait issue. (2) User 2 bought a one-time item for his mother’s birthday present; Embedding Propagation Rule Overlook unreliable interactions (e.g., random/bait clicks) and uniformly treat all the interactions
  • 33. § Performance of LightGCN under different perturbation rates. Preliminary study 34 Graph Trend Networks for Recommendations. arXiv:2108.05552, 2021.
  • 34. § Performance of LightGCN under different perturbation rates. Preliminary study 35 Graph Trend Networks for Recommendations. arXiv:2108.05552, 2021. Ø To build a more reliable and robust recommender system Ø Graph Trend Networks for recommendations (GTN)
  • 35. § Laplacian smoothing problem Graph Trend Networks for Recommendations 36 Graph Trend Networks for Recommendations. arXiv:2108.05552, 2021. A unified view on graph neural networks as graph signal denoising, arXiv:2010.01777, 2020. Matrix form: edge-wise form
  • 36. § Design Motivation from Graph Trend Filtering § Embedding smoothness objective: Graph Trend Networks for Recommendations 37 Preserve the proximity Impose embedding smoothness Trend filtering on graphs, Journal of Machine Learning Research, 2016. Graph Trend Networks for Recommendations. arXiv:2108.05552, 2021.
  • 37. GTN 38 Graph Trend Networks for Recommendations. arXiv:2108.05552, 2021. Recommendation performance under different perturbation rates.
  • 38. 39 GNN based Recommendation Collaborative Filtering • Graph Convolutional Neural Networks for Web-Scale Recommender Systems (KDD’18) • Graph Convolutional Matrix Completion (KDD’18 Deep Learning Day ) • Neural Graph Collaborative Filtering (SIGIR’19) • LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation (SIGIR’20) Collaborative Filtering with Side Information (Users/Items) p Social Recommendation (Users) • Graph Neural Network for Social Recommendation (WWW’19) • A Neural Influence Diffusion Model for Social Recommendation (SIGIR’19) • A Graph Neural Network Framework for Social Recommendations (TKDE’20) p Knowledge-graph-aware Recommendation (Items) • Knowledge Graph Convolutional Networks for Recommender Systems with Label Smoothness Regularization (KDD’19 and WWW’19) • KGAT: Knowledge Graph Attention Network for Recommendation (KDD’19)
  • 39. 40 Social Recommendation Side information about users: social networks p Users’ preferences are similar to or influenced by the people around them (nearer neighbours) [Tang et. al, 2013] Social recommendation: a review, SNAM, 2013
  • 40. 41 Social Recommendation Side information about users: social networks p Users’ preferences are similar to or influenced by the people around them (nearer neighbours) [Tang et. al, 2013] Social recommendation: a review, SNAM, 2013
  • 41. 42 GraphRec Graph Data in Social Recommendation Graph Neural Networks for Social Recommendation. WWW 2019. User-Item Graph Social Graph
  • 42. 43 GraphRec Graph Data in Social Recommendation Graph Neural Networks for Social Recommendation. WWW 2019. User-Item Graph Social Graph User-Item Graph Social Graph Users Bridge
  • 43. 44 GraphRec Three Components: p User Modeling p Item Modeling p Rating Prediction Graph Neural Networks for Social Recommendation. WWW 2019.
  • 44. 45 GraphRec Item Aggregation (User-Item Graph) Social Aggregation (Social Graph) Three Components: p User Modeling p Item Modeling p Rating Prediction Graph Neural Networks for Social Recommendation. WWW 2019.
  • 45. GraphRec: User Modeling 46 p Social Aggregation in user-user social graph p Users are likely to share more similar tastes with strong ties than weak ties. Strong tie Weak tie Graph Neural Networks for Social Recommendation. WWW 2019.
  • 46. GraphRec: User Modeling 47 p Social Aggregation in user-user social graph p Users are likely to share more similar tastes with strong ties than weak ties. Strong tie Weak tie Aggregating item-space users messages from social neighbors Graph Neural Networks for Social Recommendation. WWW 2019. Attention network to differentiate the importance weight. attentive weight
  • 47. Social-space user latent factor Item representation Item-space user latent factor User-item Graph Social Graph 48 User Modeling: Social Aggregation user item Graph Neural Networks for Social Recommendation. WWW 2019.
  • 48. Social-space user latent factor Item representation Item Aggregation Item-space user latent factor User-item Graph Social Graph 49 User Modeling: Social Aggregation user item Graph Neural Networks for Social Recommendation. WWW 2019.
  • 49. Social-space user latent factor Item representation Item Aggregation Item-space user latent factor Social Aggregation User-item Graph Social Graph 50 User Modeling: Social Aggregation user item Graph Neural Networks for Social Recommendation. WWW 2019.
  • 50. 51 GNNs based Recommendation Collaborative Filtering • Graph Convolutional Neural Networks for Web-Scale Recommender Systems (KDD’18) • Graph Convolutional Matrix Completion (KDD’18 Deep Learning Day ) • Neural Graph Collaborative Filtering (SIGIR’19) • LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation (SIGIR’20) Collaborative Filtering with Side Information (Users/Items) p Social Recommendation (Users) • Graph Neural Network for Social Recommendation (WWW’19) • A Neural Influence Diffusion Model for Social Recommendation (SIGIR’19) • A Graph Neural Network Framework for Social Recommendations (TKDE’20) p Knowledge-graph-aware Recommendation (Items) • Knowledge Graph Convolutional Networks for Recommender Systems with Label Smoothness Regularization (KDD’19 and WWW’19) • KGAT: Knowledge Graph Attention Network for Recommendation (KDD’19)
  • 51. KGCN (WWW’19) Heterogeneous Graph: Ø Nodes: entities (Items) Ø Edges: relations Side information about items: Knowledge Graph (KG) Triples: (head, relation, tail) Knowledge Graph Convolutional Networks for Recommender Systems, WWW 2019. 52
  • 52. KGCN (WWW’19) Heterogeneous Graph: Ø Nodes: entities (Items) Ø Edges: relations Side information about items: Knowledge Graph (KG) Triples: (head, relation, tail) Forrest Gump (items) Robert Zemeckis film.film.director Knowledge Graph Convolutional Networks for Recommender Systems, WWW 2019. 53
  • 53. KGCN (WWW’19) 3.2 KGCN Layer KGCN is proposed to capture high-order structural proximity among entities in a knowledge graph. We start by describing a single KGCN layer in this subsection. Consider a candidate pair of user u and item (entity) . We use N ( ) to denote the set of entities directly connected to ,2 and rei,ej to denote the relation between entity ei and ej . We also use a function : Rd ⇥Rd ! R (e.g., inner product) to compute the score between a user and a relation: u r = (u, r), (1) where u 2 Rd and r 2 Rd are the representations of user u and relation r, respectively, d is the dimension of representations. In general, u characterizes the importance of relation r to user u. For ℎ=1 ℎ=2 (a) (b) Figure 1: (a) A two-layer receptive �eld (green entities GNNs? Heterogeneous Graph: Ø Nodes: entities (Items) Ø Edges: relations Side information about items: Knowledge Graph (KG) Triples: (head, relation, tail) Forrest Gump (items) Robert Zemeckis film.film.director Knowledge Graph Convolutional Networks for Recommender Systems, WWW 2019. 54
  • 54. KGCN (WWW’19) • Representation Aggregation of neighboring entities mong GCN and ectly ty ei duct) (1) and ns. In (a) 𝐞𝑢 [ℎ + 1] 𝐞1 𝑢 [ℎ] 𝐞2 𝑢 [ℎ] 𝐞3 𝑢 [ℎ] 𝐞4 𝑢 [ℎ] ෤ 𝜋𝑟𝑣,𝑒2 𝑢 e𝑢 [ℎ] …… 𝐞𝑢 [𝐻] item 𝐮 user ො 𝑦 predicted probability iteration ℎ + 1 ෤ 𝜋𝑟𝑣,𝑒1 𝑢 ෤ 𝜋𝑟𝑣,𝑒3 𝑢 ෤ 𝜋𝑟𝑣,𝑒4 𝑢 (𝐯𝑢 ) (b) Transform a heterogeneous KG into a user-personalized weighted graph Knowledge Graph Convolutional Networks for Recommender Systems. WWW 2019. 55
  • 55. KGCN (WWW’19) • Representation Aggregation of neighboring entities mong GCN and ectly ty ei duct) (1) and ns. In (a) 𝐞𝑢 [ℎ + 1] 𝐞1 𝑢 [ℎ] 𝐞2 𝑢 [ℎ] 𝐞3 𝑢 [ℎ] 𝐞4 𝑢 [ℎ] ෤ 𝜋𝑟𝑣,𝑒2 𝑢 e𝑢 [ℎ] …… 𝐞𝑢 [𝐻] item 𝐮 user ො 𝑦 predicted probability iteration ℎ + 1 ෤ 𝜋𝑟𝑣,𝑒1 𝑢 ෤ 𝜋𝑟𝑣,𝑒3 𝑢 ෤ 𝜋𝑟𝑣,𝑒4 𝑢 (𝐯𝑢 ) (b) Transform a heterogeneous KG into a user-personalized weighted graph Normalized user-specific relation (e.g., inner product) Knowledge Graph Convolutional Networks for Recommender Systems. WWW 2019. 56
  • 56. KGCN (WWW’19) • Representation Aggregation of neighboring entities mong GCN and ectly ty ei duct) (1) and ns. In (a) 𝐞𝑢 [ℎ + 1] 𝐞1 𝑢 [ℎ] 𝐞2 𝑢 [ℎ] 𝐞3 𝑢 [ℎ] 𝐞4 𝑢 [ℎ] ෤ 𝜋𝑟𝑣,𝑒2 𝑢 e𝑢 [ℎ] …… 𝐞𝑢 [𝐻] item 𝐮 user ො 𝑦 predicted probability iteration ℎ + 1 ෤ 𝜋𝑟𝑣,𝑒1 𝑢 ෤ 𝜋𝑟𝑣,𝑒3 𝑢 ෤ 𝜋𝑟𝑣,𝑒4 𝑢 (𝐯𝑢 ) (b) Transform a heterogeneous KG into a user-personalized weighted graph Normalized user-specific relation (e.g., inner product) Knowledge Graph Convolutional Networks for Recommender Systems. WWW 2019. 57
  • 57. 58 KGAT KGAT: Knowledge graph attention network for recommendation. KDD 2019. User-item Graph 𝒖𝟏 → 𝒓𝟏 𝒊𝟏 Knowledge Graph 𝒊𝟏 → 𝒓𝟐 𝒆𝟏
  • 58. 59 KGAT KGAT: Knowledge graph attention network for recommendation. KDD 2019. User-item Graph 𝒖𝟏 → 𝒓𝟏 𝒊𝟏 Knowledge Graph 𝒊𝟏 → 𝒓𝟐 𝒆𝟏 Collaborative Knowledge Graph (CKG) To fully exploit high-order relations in CKG e.g., the long-range connectivities: 𝑢! → &! 𝑖! → &" 𝑒! ' &" 𝑖( ' &! 𝑢(, 𝑢" 𝑢! → &! 𝑖! → &" 𝑒! ' &# 𝑖", 𝑖#
  • 59. 60 KGAT KGAT: Knowledge graph attention network for recommendation. KDD 2019.
  • 60. 61 KGAT KGAT: Knowledge graph attention network for recommendation. KDD 2019. Information Propagation: Knowledge-aware Attention: Information Aggregation:
  • 61. 62 KGAT KGAT: Knowledge graph attention network for recommendation. KDD 2019.
  • 62. IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, SUBMISSION 2019 AirPods iPhone XS iPad Pro MacBook Pro MacBook Air MacBook Apple Pencil Smart Keyboard USB Type-C Hub (c) Item-item Graph (b) User-User Social Graph … 5 3 1 iPhone XS Electric Toothbrush iPad Pro (a) User-item Graph User-item Interactions Social Relations Item-item Relations Item-item Graph User-item Graph User-User Social Graph 1 5 3 (d) Graph Data in Social Recommendation Figure 1: Graph Data in Social Recommendations. It contains three graphs including the user-item graph (a), the u social graph (b), and the item-item graph (c). Note that the number on the edges of the user-item graph den 63 GraphRec+ A Graph Neural Network Framework for Social Recommendations, TKDE 2020 Graph Neural Networks for Social Recommendation, WWW 2019.
  • 63. IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, SUBMISSION 2019 AirPods iPhone XS iPad Pro MacBook Pro MacBook Air MacBook Apple Pencil Smart Keyboard USB Type-C Hub (c) Item-item Graph (b) User-User Social Graph … 5 3 1 iPhone XS Electric Toothbrush iPad Pro (a) User-item Graph User-item Interactions Social Relations Item-item Relations Item-item Graph User-item Graph User-User Social Graph 1 5 3 (d) Graph Data in Social Recommendation Figure 1: Graph Data in Social Recommendations. It contains three graphs including the user-item graph (a), the u social graph (b), and the item-item graph (c). Note that the number on the edges of the user-item graph den 64 GraphRec+ Ø ‘users who bought A also bought B’ Ø ‘users who viewed A also viewed B’ Substitutable and Complementary Items Item-item Graph E.g., A Graph Neural Network Framework for Social Recommendations, TKDE 2020 Graph Neural Networks for Social Recommendation, WWW 2019.
  • 64. 65 GraphRec+ IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, SUBMISSION 2019 4 concat … Opinion Embedding Item Embedding User Embedding … … Attention Network μ1 μ2 μ3 User-space Item Modeling User Aggregation Score Prediction User Latent Factor concat … … Attention Network α1 α2 α3 Item-space Item-space Item-space Item-space Social-space Attention Network … … β2 β3 β1 User Modeling Item Aggregation Social Aggregation Item Latent Factor … concat User-space User-space User--space item2item-space Attention Network … … !! !" !# Item-space: Item-space User Latent Factor Social-space: Social-space User Latent Factor User-space: User-space Item Latent Factor Item2item-space: Item2item-space Item Latent Factor Item2item Aggregation !! … … 5 3 1 iPhone XS Electric Toothbrush iPad Pro AirPods iPhone XS iPad Pro MacBook Pro Smart Keyboard USB Type-C Hub Figure 2: The overall architecture of the proposed model. It contains three major components: user modeling, item A Graph Neural Network Framework for Social Recommendations, TKDE 2020 Graph Neural Networks for Social Recommendation, WWW 2019.
  • 65. 66 Conclusion: Future Directions Depth When the deeper GNNs can help in recommender systems?
  • 66. 67 Conclusion: Future Directions Depth When the deeper GNNs can help in recommender systems? Security (Data Poisoning Attack & Defense) Ø Edges user-item interactions social relations knowledge graph Ø Node (users/items) Features Ø Local Graph Structure