Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Hongzhi (Steve), Chen 704bcaf6dd | 1 year ago | |
---|---|---|
.. | ||
gnn_subgraph | 1 year ago | |
README.md | 1 year ago | |
explain_main.py | 1 year ago | |
models.py | 1 year ago | |
train_main.py | 1 year ago |
This is a DGL example for GNNExplainer: Generating Explanations for Graph Neural Networks. For the authors' original implementation,
see here.
Contributors:
Four built-in synthetic datasets are used in this example.
First, train a GNN model on a dataset.
python train_main.py --dataset $DATASET
Valid options for $DATASET
: BAShape
, BACommunity
, TreeCycle
, TreeGrid
The trained model weights will be saved to model_{dataset}.pth
Second, install GNNLens2 with
pip install -U flask-cors
pip install Flask==2.0.3
pip install gnnlens
Third, explain the trained model with the same dataset
python explain_main.py --dataset $DATASET
Finally, launch GNNLens2
to visualize the explanations
gnnlens --logdir gnn_subgraph
By entering localhost:7777
in your web browser address bar, you can see the GNNLens2 interface. 7777
is the default port GNNLens2 uses. You can specify an alternative one by adding --port xxxx
after the command line and change the address in the web browser accordingly.
A sample visualization is available below. For more details of using GNNLens2
, check its tutorials.
Figure: Explanation for node 41 of BAShape
No Description
Python C++ Jupyter Notebook Cuda Text other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》