Heterogeneous graph model application design problem? GCN, GAT #4224
-
Heterogeneous graph model application design problem? GCN, GAT Hello, I am learning graph network recently, thank you for providing the pyg open source library My demo dataset is a heterogeneous graph data, referring to the dataset designed by the official website, which contains two types of nodes and two types of edges The data is as follows:
Both author and paper nodes have features. 1、I'm currently running into a problem:
I refer to the official website documentation and design the following model:
I hope to be able to introduce both node and edge features into the calculation, but the documentation on the official website does not show how to use edge features for learning on heterogeneous graphs converted from homogeneous graphs.(GAT、GCN) 2、I saw on the official website that the heterogeneous convolution wrapper can be used to learn different models for different edges, so for my demo, is it possible to set paper-cite-paper to use gcn, auther-write-paper to use GAT, paper-rev_write-auther using GraphSAGE? If possible, my question is still how to pass edge features to convolutional models corresponding to different edges? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 14 replies
-
Can you upload the data (e.g., via You should be able to use any GNN operator that supports edge features as well, e.g.: conv = GATConv((-1, -1), hidden_channels, edge_dim=-1) and call it via conv(x, edge_index, edge_attr) Heterogeneous models can then be called via hgtmodel(data.x_dict, data.edge_index_dict, data.edge_attr_dict)
|
Beta Was this translation helpful? Give feedback.
Can you upload the data (e.g., via
torch.save(data, 'data.pt')
? I'm happy to look into the issue.You should be able to use any GNN operator that supports edge features as well, e.g.:
and call it via
Heterogeneous models can then be called via