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 LPFormer model and example #9956

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

Conversation

HarryShomer
Copy link

@HarryShomer HarryShomer commented Jan 16, 2025

This pull request adds an implementation of the SOTA Link Prediction model LPFormer from the KDD'24 paper - LPFormer: An Adaptive Graph Transformer for Link Prediction.

Example

python examples/test_lpformer.py.

I am able to replicate the reported performance on ogbl-ppa.

The results are shown below. I use the same hyperparameters used in the paper. Results are over 5 seeds.

Reported PyG
63.32 ± 0.6 63.15 ± 0.9

Testing

The tests for LPFormer can be found in test/nn/models/test_lpformer.py. They each pass.

Docs

I've also included the documentation for the code. It builds and renders correctly with Sphinx with no errors.

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 89.27445% with 34 lines in your changes missing coverage. Please review.

Project coverage is 86.35%. Comparing base (50f5622) to head (0e059d2).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
torch_geometric/nn/models/lpformer.py 89.24% 34 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9956      +/-   ##
==========================================
- Coverage   87.03%   86.35%   -0.69%     
==========================================
  Files         490      491       +1     
  Lines       32432    32744     +312     
==========================================
+ Hits        28227    28275      +48     
- Misses       4205     4469     +264     

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

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.

1 participant