Skip to content
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

Fix GNNExplainer with GCN #3508

Merged
merged 6 commits into from Nov 18, 2021
Merged

Conversation

RBendias
Copy link
Contributor

Currently, GNNExplainer uses the wrong number of hops in the GNNExplainer examples. The default value is equal to the number of message passing layers, but for an n-layer GCN model, the number of hops is equal to n+1.
Increasing num_hops by 1 would include too many edges in the explanation.
Instead, I excluded the normalization from each GCNConv and added GCNNorm as a data transformation.

examples/gnn_explainer.py Outdated Show resolved Hide resolved
examples/gnn_explainer_ba_shapes.py Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2021

Codecov Report

Merging #3508 (90c94f3) into master (83d929c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3508   +/-   ##
=======================================
  Coverage   81.70%   81.70%           
=======================================
  Files         291      291           
  Lines       14465    14465           
=======================================
  Hits        11818    11818           
  Misses       2647     2647           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 83d929c...90c94f3. Read the comment docs.

Copy link
Member

@rusty1s rusty1s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you.

@rusty1s rusty1s merged commit ceba827 into pyg-team:master Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants