Category: B2; Team name: DLLB; Dataset: PPI#234
Open
dleko11 wants to merge 9 commits intogeometric-intelligence:mainfrom
Open
Category: B2; Team name: DLLB; Dataset: PPI#234dleko11 wants to merge 9 commits intogeometric-intelligence:mainfrom
dleko11 wants to merge 9 commits intogeometric-intelligence:mainfrom
Conversation
Co-authored-by: luka-benic <luka121benic@gmail.com> Co-authored-by: dleko11 <davidleko11@gmail.com>
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
We fixed some compatibility issues, namely we had a problem with the PPI dataset class from torch_geometric version 2.8.0. which was not compatible with networkx version 2.8.8. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Co-authored-by: luka-benic luka121benic@gmail.com
Co-authored-by: dleko11 davidleko11@gmail.com
Checklist
Description
This PR extends TopoBench to support edge-level link prediction on both transductive and inductive graph datasets, and adds a tutorial notebook that illustrates how to use the new functionality.
Concretely, the PR introduces:
LinkPredictionReadOut) for link prediction on top of existing GNN backbones (GCN, GAT).Key Changes (Code)
Edge-level splitting
load_edge_transductive_splitsfor single-graph / transductive datasets (e.g. Cora).load_edge_inductive_splitsfor multi-graph / inductive datasets (e.g. MUTAG, PPI).DataloadDatasetobjects with:edge_label_index,edge_label(positive and negative candidate edges),Dynamic negative sampling
NegativeSamplingTransformintopobench.transforms.data_manipulations:edge_label_index,torch_geometric.utils.negative_sampling,edge_label_index/edge_labeleach epoch according toneg_pos_ratioandneg_sampling_method.Edge-level readout
LinkPredictionReadOutintopobench.nn.readouts:x_0from the backbone,PPI dataset support
torch_geometric.datasets.PPI) that:split_idxmapping,Configuration-level support
task_level: edgeandnum_classes: 2for link prediction.split_paramsfor link prediction:learning_setting(transductive / inductive),val_prop,test_prop,train_prop,is_undirected,neg_pos_ratio(dynamic train negatives),neg_sampling_ratio(static val/test negatives),neg_sampling_method.These changes plug into the existing TopoBench training pipeline without altering the high-level interface (Hydra configs +
run.yaml).Tutorial (Usage Example)
To illustrate the new link prediction support, this PR also adds:
tutorials/tutorial_link_prediction.ipynbThe notebook demonstrates:
LinkPredictionReadOutinteract in practice.The tutorial is an example user guide for the new functionality; all core logic lives in the library code.
Issue
Additional context