Add GATv3Conv implementation and tests #9937
Open
+364
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
torch_geometric/nn/conv/gatv3_conv.py
– Implements the GATv3Conv layer.test/nn/conv/test_gatv3_conv.py
– Validates functionality, including bipartite inputs, edge attributes, and return of attention weights.torch_geometric/nn/conv/__init__.py
– ExportsGATv3Conv
for usage throughout the PyG library.Reference
https://arxiv.org/abs/2409.16327
This work is authored by David Narganes-Carlon and collaborators. Let me know if further modifications or clarifications are needed.