tkipf / gcn

Implementation of Graph Convolutional Networks in TensorFlow
MIT License
7.12k stars 2k forks source link

How to use GCN for multi relation edge prediction? #106

Open Abhinav43 opened 5 years ago

Abhinav43 commented 5 years ago

Hi Thomas,

I am new in graph neural network field and I was going through different kinds of graph networks proposed by you. I want to solve very simple problem using graph networks. The problem looks like this :

So suppose if my dataset looks like this:

bond_one           bond_two              relations

a_b                 b_c                 a_d_r,    a_b ,               .... etc ( relations can be many )                  { 2 relation } 
c_v                 r_a                 c_r_a ,   c_b_a ,   r_r_r   ..etc   { 3 relation } 
v_r                 d_m                 a_d_r,    a_b ,   c_r_a ,     c_b_a ,     r_r_r,   v_dm,   v_rr ,  v_mn { 8 relation }

Now I tried GAE but using GAE I can solve this problem as binary classification where if there is any relation between bond_one & two then 1 and if not then 0

But I want to predict multiple relations so interaction can be many as you can see in example first there are only two interactions, second there are three and third there are eight interactions.

I don't want to solve this using pure deep learning methods, Instead I wanted to go for Graph neural networks and Graph convolution networks.

Can you give some insights how I can go for this problem with different kinds of Graph networks ( GCN , GAE , R-GCN etc.. ) ?

Is this kind of problem link prediction or edge classification?

Looking forward to your reply

Thank you :)

tkipf commented 5 years ago

Our R-GCN model can handle this setting out-of-the-box, as it does not matter how many edges of different type there are between two nodes. If you would like to predict edge types as part of your model, then both the formulation as graph auto-encoder from our R-GCN paper ( https://arxiv.org/abs/1703.06103) with a bilinear scoring function for an edge type and also the MLP-based edge/relation classifier from the encoder of our NRI model (https://arxiv.org/abs/1802.04687) can be applied. For an optimized implementation of R-GCNs, see https://www.dgl.ai

On Thu, Apr 11, 2019 at 9:12 AM Tim as short notifications@github.com wrote:

Hi Thomas,

I am new in graph neural network field and I was going through different kinds of graph networks proposed by you. I want to solve very simple problem using graph networks. The problem looks like this :

So suppose if my dataset looks like this:

bond_one bond_two relations

a_b b_c a_d_r, a_b , .... etc ( relations can be many ) { 2 relation } c_v r_a c_r_a , c_b_a , r_r_r ..etc { 3 relation } v_r d_m a_d_r, a_b , c_r_a , c_b_a , r_r_r, v_dm, v_rr , v_mn { 8 relation }

Now I tried GAE but using GAE I can solve this problem as binary classification where if there is any relation between bond_one then 1 and if not then 0

But I want to predict multiple relations so interaction can be many as you can see in example first there are only two interactions, second there are three and third there are eight interactions.

I don't want to solve this using pure deep learning methods, Instead I wanted to go for Graph neural networks and Graph convolution networks.

Can you give some insights how I can go for this problem with different kinds of Graph networks ( GCN , GAE , R-GCN etc.. ) ?

Is this kind of problem link prediction or edge classification?

Looking forward to your reply

Thank you ! Keep writing keep sharing :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tkipf/gcn/issues/106, or mute the thread https://github.com/notifications/unsubscribe-auth/AHAcYCP8vywAWaPU-cZf6nJ-6TXRBAyoks5vfuB1gaJpZM4co5jP .