Skip to content
Discussion options

You must be logged in to vote

Message passing in bipartite graphs will send messages from source nodes to target nodes, and as such, will only give a new representation for the target nodes. All your code looks correct, besides that you also want to do message passing in reverse direction using the transposed adjacency matrix:

conv1 = GATConv(in_channels=(num_features_type_A, num_features_type_B, out_channels=...)
conv2 = GATConv(in_channels=(num_features_type_B, num_features_type_A, out_channels=...)

out1 = conv1(x=(x_A, x_B), edge_index)
out2 = conv2(x=(x_B, x_A), edge_index[torch.tensor([1, 0]).as_tensor(edge_index))

Note that GATConv does not support edge weights, as it will compute an edge weight/attention score…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@liujxing
Comment options

Comment options

You must be logged in to vote
6 replies
@michalisfrangos
Comment options

@rusty1s
Comment options

@michalisfrangos
Comment options

@rusty1s
Comment options

@michalisfrangos
Comment options

Answer selected by liujxing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants