forked from dmlc/dgl
-
Notifications
You must be signed in to change notification settings - Fork 0
[Model] Heterogeneous graph support for GNNExplainer #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
moeinfinityx
wants to merge
5
commits into
master
Choose a base branch
from
gnnexplainer-hetero
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@moeinfinityx can work on https://github.com/syssec-utd/dgl ? |
moeinfinityx
added a commit
that referenced
this pull request
Dec 12, 2022
* [Model] Heterogeneous graph support for GNNExplainer (#1) * add HeteroGNNExplainer * GNNExplainer for heterogeenous graph * fix typo * variable name cleanup * added HeteroGNNExplainer test * added doc indexing for HeteroGNNExplainer * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <[email protected]> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <[email protected]> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <[email protected]> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <[email protected]> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <[email protected]> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <[email protected]> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <[email protected]> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <[email protected]> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <[email protected]> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <[email protected]> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <[email protected]> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <[email protected]> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <[email protected]> * Update gnnexplainer.py Change DGLHeteroGraph to DGLGraph, and specified parameter inputs * Added ntype parameter to the explainer_node call * responding to @mufeili's comment regarding restoring empty lines at appriopiate places to be consistent with existing practices * responding to @mufeili's comment regarding restoring empty lines at appriopiate places that were missed in the last commit * docstring comments added based on @mufeili suggestions * indorporated @mufeili requested changes related to docstring model declaration. * example model and test_nn.py added for explain_graphs * explain_nodes fixed and fixed the way hetero num nodes and edges are handled * white spaces removed * lint issues fixed * explain_graph model updated * explain nodes model updated * minor fixes related to gpu compatability * cuda support added * simplify WIP * _init_masks for ennexplainer updated to match heterographs * Update * model simplified and docstring comments updated * nits: docstring udpated * lint check issues updated * lint check updated * soem formatting updated * disabling int32 testing for GNNExplainer * Update Co-authored-by: Kangkook Jee <[email protected]> Co-authored-by: ahadjawaid <[email protected]> Co-authored-by: Mufei Li <[email protected]> Co-authored-by: kxm180046 <[email protected]> Co-authored-by: Kunal Mukherjee <[email protected]> Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Ubuntu <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add Heterogeneous Graph support for GNNExplainer
Checklist
Please feel free to remove inapplicable items for your PR.
or have been fixed to be compatible with this change
Changes
Added a new class HeteroGNNExplainer for Heterogeneous graph explanation.
The output of the model has been manually verified on MUTAG dataset. Unfortunately there's no ground truth for the explanation, so we cannot quantify the model's performance. Instead, we manually investigated the results and confirms that it aligns well with human intuition.
Link to the MUTAG Hetero GNNExplainer notebook
The code has also been verified on several datasets DGL officially provides, see this repo for details.
Inline documentation is added following the original style, and an example of using the module is included in the documentation.