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

[Model] Implemented SubgraphX Explainer for Homogeneous graph #5315

Merged
merged 16 commits into from
Feb 23, 2023

Conversation

kunmukh
Copy link
Contributor

@kunmukh kunmukh commented Feb 17, 2023

Description

Implemented SubgraphX Explainer (https://arxiv.org/pdf/2102.05152.pdf) for Homogeneous Graphs. Original PR: #4913, this PR was created as the original PR went out of date.

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • I've leverage the tools to beautify the python and c++ code.
  • All changes have test coverage
  • Code is well-documented
  • To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
  • If the PR is for a new model/paper, I've updated the example index here.

Changes

  • Added a new class, SubgraphXExplainer for homogeneous graph explanation.

The output of the model has been manually verified on MUTAG dataset. A visualization script was created to visualize the mutag dataset (external ref: https://gist.github.com/kunmukh/06d948b6b730447baa932873026e15da). Unfortunately, there's no ground truth for the explanation except for what is mentioned in the research paper, so we cannot quantify the model's performance. Instead, we manually investigated the results and confirmed that they aligned well with human intuition and findings of the research paper.

Inline documentation is added following the original style, and an example of using the module is included in the documentation.

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 17, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 17, 2023

Commit ID: 1e03ce0

Build ID: 1

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 17, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 17, 2023

Commit ID: 34d5dbf

Build ID: 2

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@mufeili
Copy link
Member

mufeili commented Feb 18, 2023

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 18, 2023

Commit ID: 34d5dbf

Build ID: 3

Status: ❌ CI test failed in Stage [Lint Check].

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 20, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 20, 2023

Commit ID: 59e1031c735a9d0cd8037208fbbf1ea2496cc0a8

Build ID: 4

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 20, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 20, 2023

Commit ID: a778680

Build ID: 5

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 20, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 20, 2023

Commit ID: ef74239

Build ID: 6

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@mufeili
Copy link
Member

mufeili commented Feb 20, 2023

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 20, 2023

Commit ID: 1eb0a13e72e6050df2f94be0bfcda5053c6e2afe

Build ID: 7

Status: ❌ CI test failed in Stage [Torch CPU (Win64) Unit test].

Report path: link

Full logs path: link

@mufeili
Copy link
Member

mufeili commented Feb 20, 2023

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 20, 2023

Commit ID: d369dc90e21150d5c8d98253903cf5ecac41f681

Build ID: 8

Status: ❌ CI test failed in Stage [Torch CPU (Win64) Unit test].

Report path: link

Full logs path: link

@mufeili
Copy link
Member

mufeili commented Feb 20, 2023

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 20, 2023

Commit ID: 9fc0900d9600da6ec1009244e79c81de384fec9d

Build ID: 9

Status: ❌ CI test failed in Stage [Torch CPU (Win64) Unit test].

Report path: link

Full logs path: link

@mufeili
Copy link
Member

mufeili commented Feb 20, 2023

tests/python/pytorch/nn/test_nn.py::test_subgraphx[False-2-idtype0-g5] Cancelling nested steps due to timeout

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 20, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 20, 2023

Commit ID: db9348c

Build ID: 10

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 21, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 21, 2023

Commit ID: 69d7552

Build ID: 16

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 21, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 21, 2023

Commit ID: f4b6442

Build ID: 17

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@kunmukh
Copy link
Contributor Author

kunmukh commented Feb 21, 2023

@mufeili I chose the first homogeneous graph defined, which has 10 nodes and 17 edges. It was completed in ~3 mins. Can you trigger the dgl-bot?

image

@mufeili
Copy link
Member

mufeili commented Feb 22, 2023

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 22, 2023

Commit ID: f4b6442

Build ID: 18

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

@mufeili
Copy link
Member

mufeili commented Feb 22, 2023

@kunmukh That's great! Is it possible to reduce the test time to say 20 seconds by using an alternative graph and tuning various parameters? Let's say the CI will time out after 1 hour and we might have at least 100 things to test. We will not want to spend too much time on testing SubgraphX alone.

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 22, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

1 similar comment
@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 22, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 22, 2023

Commit ID: 689ae98

Build ID: 19

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 22, 2023

Commit ID: 689ae98

Build ID: 20

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@kunmukh
Copy link
Contributor Author

kunmukh commented Feb 22, 2023

@mufeili got it under 20 sec. I changed the parameters to focus less on exploration. Can you trigger the bot and merge the PR 💯 ?
image

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 22, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 22, 2023

Commit ID: 87fb666

Build ID: 21

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@mufeili
Copy link
Member

mufeili commented Feb 23, 2023

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 23, 2023

Commit ID: aa8fc6e50c489a7cb03bd8733264e2d2b6577b69

Build ID: 22

Status: ❌ CI test failed in Stage [Distributed Torch CPU Unit test].

Report path: link

Full logs path: link

@mufeili
Copy link
Member

mufeili commented Feb 23, 2023

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Feb 23, 2023

Commit ID: e48967f11944b17c2c8e3f1a50ed3099dc81d376

Build ID: 23

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

@mufeili mufeili merged commit 45153fc into dmlc:master Feb 23, 2023
paoxiaode pushed a commit to paoxiaode/dgl that referenced this pull request Mar 24, 2023
)

* subgraphx commit

* nits

* newline eof added

* lint fix

* test script updated to use default values

* lint fix

* graphs that are used for test cases are updated to a small graph

* lint formatted

* test paramter adj to complete the test under 20s

* lint fixes

---------

Co-authored-by: kxm180046 <[email protected]>
DominikaJedynak pushed a commit to DominikaJedynak/dgl that referenced this pull request Mar 12, 2024
)

* subgraphx commit

* nits

* newline eof added

* lint fix

* test script updated to use default values

* lint fix

* graphs that are used for test cases are updated to a small graph

* lint formatted

* test paramter adj to complete the test under 20s

* lint fixes

---------

Co-authored-by: kxm180046 <[email protected]>
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.

4 participants