Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

How to peform inductive inference using Shadow-GNN #8

Open
hussien opened this issue Oct 16, 2023 · 1 comment
Open

How to peform inductive inference using Shadow-GNN #8

hussien opened this issue Oct 16, 2023 · 1 comment

Comments

@hussien
Copy link

hussien commented Oct 16, 2023

Hi, I am looking for a sample code of a node classification task that does inference for an unseen node X. X doesn't exist at training time.
the unseen node X will be connected with a subset of seen nodes and another set of unseen nodes as well at the inference time.
I can not find a sample code for that in your provided code.

@ZimpleX
Copy link
Contributor

ZimpleX commented Oct 17, 2023

For this you need to prepare separate adj files, adj_train that defines the connectivity among training nodes only and adj_full that defines connectivity among nodes seen or unseen during training. adj_full will be used during the validation & test phases.

For example, on the Flickr graph, we perform inductive training (I think it aligns with your use case). In the config yaml you can specify that the training is inductive:

https://github.com/facebookresearch/shaDow_GNN/blob/main/config_train/flickr/vanilla/sage_3_ppr.yml#L3

Then when loading the graph for training, the model will separately load adj_train and adj_full, and information of adj_full is unseen during training:

https://github.com/facebookresearch/shaDow_GNN/blob/main/config_train/flickr/vanilla/sage_3_ppr.yml#L3

Here is an example of the data format conversion script (GraphSAINT format --> shaDow format): https://github.com/facebookresearch/shaDow_GNN/blob/main/para_graph_sampler/graph_engine/frontend/loader.py#L43

In this section, we defined all the data files required to train shaDow-GNN (you don't need to prepare those optional files, as they will be auto-generated):

https://github.com/facebookresearch/shaDow_GNN#general-shadow-format

Please let me know of any additional questions. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants