shenyangHuang / TGB

Temporal Graph Benchmark project repo
https://tgb.complexdatalab.com/
182 stars 36 forks source link

Inconsistent number of negative edges in tgbl-wiki-v2 #76

Closed OlegPlatonov closed 8 months ago

OlegPlatonov commented 9 months ago

Hi! I've noticed that for the tgbl-wiki-v2 dataset, while most val and test edges have 999 negative edges, there are 2 edges in the val set and 2 edges in the test set that have 998 negative edges. I wonder if this is intended? I think it woul be more convenient to have the same number of negatives for all edges so the predictions for negatives could be reshaped into a matrix of the shape (num_pos_edges, num_neg_edges_per_pos_edge) and passed to the evaluator together. Now I have to evaluate each positive edge and its negative edges separately and then average the results, which is slower.

shenyangHuang commented 8 months ago

Hi,

Thanks for your interest in our work and your comment. The negative samples are pre-generated and fixed for reproducible evaluation. Batching the negatives might allow for faster inference. In this case however, you can still group the test edges with 999 negative edges together and keep the 2 edges as their separate batch.

Best, Shenyang(Andy) Huang