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

Implementing XGNN: Towards Model-Level Explanations of Graph Neural Networks #8618

Open
wants to merge 139 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
daef679
initial commit
Nov 7, 2023
f58195f
added base files
Nov 7, 2023
c67a3c2
a
Nov 7, 2023
f8dd136
a
Nov 7, 2023
38597cf
a
Nov 7, 2023
f7e36e7
a
Nov 7, 2023
d168a79
XGNNExplainer example
BP4769 Nov 7, 2023
30b5a20
XGNNExplanation example
BP4769 Nov 7, 2023
027e201
Expaliner expanded to handle GenerativeExplanation
BP4769 Nov 7, 2023
8ce4ff9
changes
Nov 7, 2023
956d7e5
changes
Nov 7, 2023
82af31b
changes
Nov 7, 2023
5d1b38a
changes
Nov 7, 2023
3f4bf75
Updated explanation documentation
amadejp Nov 7, 2023
9cd21b0
modified: torch_geometric/explain/algorithm/xgnn_explainer.py
Nov 7, 2023
0c126dc
testing
BP4769 Nov 7, 2023
c830ba3
testing
BP4769 Nov 7, 2023
c856513
adapted generativeExplanaton
Nov 7, 2023
b4b6b1f
a
Nov 7, 2023
949b287
Commit to pull
BP4769 Nov 14, 2023
b47450a
Code cleaned
BP4769 Nov 14, 2023
bed350c
XGNNGenerator documentation update
amadejp Nov 14, 2023
6c97973
a
Nov 14, 2023
25d3bd1
class name reformat fix
amadejp Nov 14, 2023
c4d0862
XGNNExplainer docs update
amadejp Nov 15, 2023
9bc2f53
masks in GraphGenerator
BP4769 Nov 30, 2023
afafc2e
XGNNTrainer name fixed
BP4769 Nov 30, 2023
e5423fb
added datasets and classes, pretrained model
Nov 30, 2023
3af3d48
adjustment
Nov 30, 2023
9c86ddd
added pretrained model to example
Nov 30, 2023
ee675ee
test XGNNTrainer names fixed
BP4769 Nov 30, 2023
e49cf84
Merge branch 'dev' of https://github.com/SimonBele/pytorch_geometric …
BP4769 Nov 30, 2023
897a636
calculate reward function
amadejp Nov 30, 2023
4710d93
bla
Nov 30, 2023
e1e6b04
commit
BP4769 Nov 30, 2023
e5539f0
commit
BP4769 Nov 30, 2023
3a5acaf
calculate reward function
amadejp Nov 30, 2023
1e7b813
Merge branch 'dev' of https://github.com/SimonBele/pytorch_geometric …
amadejp Nov 30, 2023
1c9b0db
train_generative_model development
amadejp Nov 30, 2023
88ad513
new ExplanationType added
BP4769 Nov 30, 2023
af5c9c5
fixing semantic/other errors
amadejp Nov 30, 2023
5d17d86
debugging rl example
amadejp Dec 5, 2023
8019da1
dev
Dec 5, 2023
2448c0c
debugging
BP4769 Dec 5, 2023
e07939c
Update xgnn_explainer.py
amadejp Dec 5, 2023
8b5659a
dev
Dec 5, 2023
88f63e8
Merge branch 'dev' of github.com:SimonBele/pytorch_geometric into dev
Dec 5, 2023
6ede98f
a
Dec 5, 2023
597135c
debugging GraphGenerator and RL example in general
amadejp Dec 5, 2023
d221bc9
Merge branch 'dev' of https://github.com/SimonBele/pytorch_geometric …
amadejp Dec 5, 2023
01fac18
debigging
BP4769 Dec 7, 2023
125b5cf
refactored
Dec 7, 2023
a427234
mutag added, seperate directory created
Dec 7, 2023
45a1eaf
debugging
BP4769 Dec 7, 2023
a007d52
Merge branch 'dev' of https://github.com/SimonBele/pytorch_geometric …
BP4769 Dec 7, 2023
026465a
fixes
Dec 7, 2023
4ddfb25
a
Dec 7, 2023
d587682
objectview
Dec 7, 2023
d8bfaca
Update xgnn_explainer.py
amadejp Dec 7, 2023
5126563
candidate set extracted from data
BP4769 Dec 7, 2023
b74fd8d
debugging
amadejp Dec 7, 2023
321e4a0
Update xgnn_explainer.py
amadejp Dec 7, 2023
889d08d
Update xgnn_explainer.py
amadejp Dec 7, 2023
7502d10
debugging RL example
amadejp Dec 7, 2023
5add1fd
froze pretrained
Dec 7, 2023
2f20331
custom softmax function added
amadejp Dec 7, 2023
ae5b32d
simon hated doing this
BP4769 Dec 7, 2023
a9dcdf5
another model added
BP4769 Dec 11, 2023
ddccc22
code made prettier
BP4769 Dec 11, 2023
bf7af4d
debugging
BP4769 Dec 11, 2023
bf8f0bb
added weight initialization
Dec 12, 2023
ff0c21d
better training
Dec 12, 2023
160e71b
added pretrained model
Dec 12, 2023
95439e4
Fix XGNNExplainer to handle missing candidate_set argument
BP4769 Dec 12, 2023
351855f
Merge branch 'dev' of https://github.com/SimonBele/pytorch_geometric …
BP4769 Dec 12, 2023
490f95e
debugging + Add initial_node_type parameter to RLGenExplainer constru…
BP4769 Dec 12, 2023
787553f
refactored xgnnexplainer
SimonBele Dec 12, 2023
76c7618
refactor fix
amadejp Dec 12, 2023
b2a09b1
debugging
BP4769 Dec 12, 2023
111b0ad
Merge branch 'dev' of https://github.com/SimonBele/pytorch_geometric …
BP4769 Dec 12, 2023
b8c5aeb
a
SimonBele Dec 12, 2023
758e741
Merge branch 'dev' of github.com:SimonBele/pytorch_geometric into dev
SimonBele Dec 12, 2023
a3e38fc
fixed validate
SimonBele Dec 12, 2023
694483a
xgnn model fixing
amadejp Dec 12, 2023
a7a7280
model args and .pth updated
amadejp Dec 12, 2023
c60bd05
single graph prediction support in pretrained
SimonBele Dec 12, 2023
64c243d
rl example gnn_output updated
amadejp Dec 12, 2023
a621ee0
quickfix
amadejp Dec 12, 2023
ebf365f
Fix bug in login functionality
BP4769 Dec 12, 2023
4fcd85d
added generatemodel base class
SimonBele Dec 12, 2023
f272748
changed generativeExplanation
SimonBele Dec 12, 2023
2b7eba1
merge conflict resolved + minor changes
BP4769 Dec 12, 2023
c9a4509
added base class
SimonBele Dec 13, 2023
a95e6a0
Merge branch 'dev' of github.com:SimonBele/pytorch_geometric into dev
SimonBele Dec 13, 2023
dcfaa50
fixed imports
SimonBele Dec 13, 2023
3f9ed5c
changed generative explanation, explanation set sampler
SimonBele Dec 13, 2023
30259da
a
SimonBele Dec 13, 2023
3e6aa0e
aaa
SimonBele Dec 13, 2023
427cd7e
updated graphGenerator forward logic
amadejp Dec 13, 2023
17861cb
a
SimonBele Dec 13, 2023
c15efd8
no list anymore
BP4769 Dec 13, 2023
e736c31
aAaaaa
SimonBele Dec 13, 2023
20c1abc
aAaaaa
SimonBele Dec 13, 2023
4195c2d
small hotfixes
amadejp Dec 13, 2023
b173463
Update xgnn_explainer.py
amadejp Dec 13, 2023
3576feb
Added graph visualisations
BP4769 Dec 13, 2023
d5089e2
Merge branch 'dev' of https://github.com/SimonBele/pytorch_geometric …
BP4769 Dec 13, 2023
1c5e73f
Refactor graph sampling and training process
amadejp Dec 13, 2023
41ab8e4
something works :)
amadejp Dec 13, 2023
b64a03b
Graph visualisations improved
BP4769 Dec 13, 2023
fd6d8ca
merge
BP4769 Dec 13, 2023
82d6852
Code cleanup + example almost completed with multiple graphs of diffe…
BP4769 Dec 13, 2023
4946a90
Refactor xgnn_explainer.py: Clean up code, remove unused functions, a…
amadejp Dec 13, 2023
ff17e40
Delete unnecessary code and unused imports
amadejp Dec 13, 2023
bbc377d
Directory cleanup
amadejp Dec 13, 2023
73d7aaa
Better visualisation
BP4769 Dec 13, 2023
301c499
Merge branch 'dev' of https://github.com/SimonBele/pytorch_geometric …
BP4769 Dec 13, 2023
08cc25f
prettier code
SimonBele Dec 13, 2023
0299668
Visualisation finnished
BP4769 Dec 13, 2023
ceaf166
Merge branch 'dev' of https://github.com/SimonBele/pytorch_geometric …
BP4769 Dec 13, 2023
953b28d
Class & Function descriptions reformat
amadejp Dec 13, 2023
58167b2
code & dir cleanup
amadejp Dec 14, 2023
1530062
Added pytest for generative explanation
amadejp Dec 14, 2023
6094353
PEP8 reformat
amadejp Dec 14, 2023
6165fd5
Update CHANGELOG.md
amadejp Dec 14, 2023
d6a24a2
Merge branch 'master' into dev
SimonBele Dec 14, 2023
9523127
Merge pull request #1 from SimonBele/dev
SimonBele Dec 14, 2023
652cb27
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 14, 2023
5d4d97e
Merge branch 'pyg-team:master' into master
SimonBele Dec 15, 2023
fce545c
Reformat to PEP8 style
amadejp Dec 20, 2023
54a17fc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 20, 2023
fc4e530
Merge branch 'master' into master
SimonBele Dec 21, 2023
75bb078
Fixed ruff check fail
amadejp Dec 21, 2023
178cba4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 21, 2023
a878a2c
Merge branch 'master' into master
amadejp Dec 21, 2023
048b5c4
Update test_generative_explanation.py
amadejp Dec 30, 2023
31f301b
Merge branch 'master' of https://github.com/SimonBele/pytorch_geometric
amadejp Dec 30, 2023
b70cdc0
Merge branch 'master' into master
amadejp Dec 30, 2023
5e31373
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ examples/**/*.png
examples/**/*.pdf
benchmark/results/
.mypy_cache/

!torch_geometric/data/
!test/data/
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added the `RCDD` dataset ([#8196](https://github.com/pyg-team/pytorch_geometric/pull/8196))
- Added distributed `GAT + ogbn-products` example targeting XPU device ([#8032](https://github.com/pyg-team/pytorch_geometric/pull/8032))
- Added the option to skip explanations of certain message passing layers via `conv.explain = False` ([#8216](https://github.com/pyg-team/pytorch_geometric/pull/8216))
- Added implementation of generative graph explanation to `explain` module (https://github.com/pyg-team/pytorch_geometric/pull/8618)

### Changed

Expand Down
4 changes: 4 additions & 0 deletions docs/source/modules/explain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ Explanations
:show-inheritance:
:members:

.. autoclass:: torch_geometric.explain.GenerativeExplanation
:show-inheritance:
:members:

Explainer Algorithms
--------------------

Expand Down
Binary file added examples/explain/xgnn/mutag_model.pth
Binary file not shown.
Loading
Loading