Skip to content

Added support for heterogeneous graphs in PGExplainer #10168

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

Merged
merged 30 commits into from
Apr 16, 2025

Conversation

XinweiHe
Copy link

@XinweiHe XinweiHe commented Apr 5, 2025

Fixes #9112
Note: This version of heterogenous data support use global aggregated node embedding to generate the explanation for each heterogeneous edge type. We could potentially support edge specific embedding as an option in the future as necessary.

@XinweiHe XinweiHe self-assigned this Apr 5, 2025
@XinweiHe XinweiHe marked this pull request as ready for review April 5, 2025 21:46
@XinweiHe XinweiHe force-pushed the xinwei_support_pg_explainer_hetero_v3 branch from 18a080f to 155af8d Compare April 5, 2025 23:30
XinweiHe added 2 commits April 5, 2025 23:33
@XinweiHe XinweiHe changed the title Support hetero data in PGExplainer Added support for heterogenous graphs in PGExplainer Apr 6, 2025
Base automatically changed from xinwei_support_gnn_explainer_hetero_v1 to master April 6, 2025 20:09
@wsad1
Copy link
Member

wsad1 commented Apr 10, 2025

Nice work.
Can we test for HGTConv and HanConv, to ensure that it works for Hetero GNNs not created by the to_hetero operation.

@XinweiHe
Copy link
Author

Can we test for HGTConv and HanConv, to ensure that it works for Hetero GNNs not created by the to_hetero operation.

I think those are not supported at the moment. Will support them soon.

@wsad1
Copy link
Member

wsad1 commented Apr 11, 2025

I think those are not supported at the moment. Will support them soon.

Will it be part of this PR?

@XinweiHe
Copy link
Author

Will it be part of this PR?

Yes.

Copy link

codecov bot commented Apr 12, 2025

Codecov Report

Attention: Patch coverage is 94.59459% with 8 lines in your changes missing coverage. Please review.

Project coverage is 85.34%. Comparing base (ffdec32) to head (744f830).

Files with missing lines Patch % Lines
torch_geometric/explain/algorithm/pg_explainer.py 93.96% 7 Missing ⚠️
torch_geometric/utils/embedding.py 96.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10168      +/-   ##
==========================================
- Coverage   86.20%   85.34%   -0.86%     
==========================================
  Files         496      496              
  Lines       33655    33770     +115     
==========================================
- Hits        29013    28822     -191     
- Misses       4642     4948     +306     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@XinweiHe XinweiHe enabled auto-merge (squash) April 16, 2025 08:57
@XinweiHe XinweiHe disabled auto-merge April 16, 2025 08:57
@XinweiHe XinweiHe merged commit a208789 into master Apr 16, 2025
19 checks passed
@XinweiHe XinweiHe deleted the xinwei_support_pg_explainer_hetero_v3 branch April 16, 2025 09:10
@XinweiHe XinweiHe changed the title Added support for heterogenous graphs in PGExplainer Added support for heterogeneous graphs in PGExplainer May 9, 2025
chrisn-pik pushed a commit to chrisn-pik/pytorch_geometric that referenced this pull request Jun 30, 2025
Fixes pyg-team#9112
Note: This version of heterogenous data support use global aggregated
node embedding to generate the explanation for each heterogeneous edge
type. We could potentially support edge specific embedding as an option
in the future as necessary.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Akihiro Nitta <[email protected]>
Co-authored-by: Jinu Sunil <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Roadmap] Heterogeneous Graphs Explainability Support
3 participants