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

Add GATv3Conv implementation and tests #9937

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

davidnarganes
Copy link

Description
This Pull Request introduces GATv3Conv, a context-aware extension of GATv2. It applies element-wise multiplication of source and target feature embeddings, incorporates a learnable context attention layer, and supports optional weight sharing. Inspired by the GATher framework (Narganes-Carlon et al., 2024).

Key Changes

  • New file: torch_geometric/nn/conv/gatv3_conv.py – Implements the GATv3Conv layer.
  • Tests: test/nn/conv/test_gatv3_conv.py – Validates functionality, including bipartite inputs, edge attributes, and return of attention weights.
  • Initialization: torch_geometric/nn/conv/__init__.py – Exports GATv3Conv for usage throughout the PyG library.

Reference

This work is authored by David Narganes-Carlon and collaborators. Let me know if further modifications or clarifications are needed.

@puririshi98
Copy link
Contributor

puririshi98 commented Jan 15, 2025

this is good at a high level. however i want to see how it compares to existing work. Can you please update this example:
https://github.com/pyg-team/pytorch_geometric/blob/master/examples/ogbn_train.py#L31
to have a "--gnn-choice" arg parse option, with choices ["sage, gat, gatv3"]. and run all 3 in your environment to see how they compare. Please make the highest test acc the default. I can review a little closer once that initial test is done

@puririshi98
Copy link
Contributor

puririshi98 commented Jan 15, 2025

also please make sure the CI (automated testing) is all green

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.

2 participants