JuliaGast / TGB2

Temporal Graph Benchmark project repo
1 stars 0 forks source link

Negative Sampling #4

Closed JuliaGast closed 3 months ago

JuliaGast commented 4 months ago
JuliaGast commented 4 months ago

Notes on negative sampling in the context of static KG link prediction.

Negative sampling for computing the MRRs

Negative sampling for evaluation, i.e. for computing test MRRs is typically NOT done in static KG link prediction evaluation!

See info e.g. here: image Start Small, Think Big: On Hyperparameter Optimization for Large-Scale Knowledge Graph Embeddings and here ([11] from above): image Parallel Training of Knowledge Graph Embedding Models: A Comparison of Techniques

image NBFNet

Negative sampling during Training

Different commonly used approaches to train KGE models, which differ mainly in the way negative examples are generated

For training with negative samples, different strategies exist:

Preliminary Conclusion (Up to discussion)

Due to the fact that it is not done in static KG completion, I opt to not use negative sampling for evaluation of TKG Forecasting, but instead compute the MRR based on scores for all entities in the KG.

In our datasets, we do not have more entities or significantly more test triples, and thus introducing negative sampling for evaluation of TKG models is not well motivated.

Appendix: Datasets used for static KG link prediction

image (https://openreview.net/pdf?id=BkxSmlBFvr)

image (ultra)

Appendix: Datasets used for TKG Forecasting

image

shenyangHuang commented 4 months ago

identify node types and ask the model only to predict MRR for nodes of the same type as the true answer? would that be a fair evaluation?

JuliaGast commented 4 months ago

not really; if models predict wrong node types (which happens) this would not be considered at all. also, for many datasets node types are not given.

JuliaGast commented 4 months ago
JuliaGast commented 4 months ago
JuliaGast commented 3 months ago

suggestions of how to potentially choose node for negative samples: combination of:

JuliaGast commented 3 months ago

What about negative sampling during training?

JuliaGast commented 3 months ago

Update: After meeting with Michael on April 11th we decided to NOT do negative sampling, i.e. to do the 1-vs-all strategy.