mana-ysh / knowledge-graph-embeddings

Implementations of Embedding-based methods for Knowledge Base Completion tasks
Apache License 2.0
257 stars 63 forks source link

Question about the mode: "single" and "pairwise" #2

Closed CicoZhang closed 6 years ago

CicoZhang commented 6 years ago

I am wondering if you could give a simple explanation of the mode "single" and "pairwise". Is there any preference to stick to one mode?

Thank you in advance.

mana-ysh commented 6 years ago

These two modes have the different objective functions. “single” mode uses the negative log likelihood of sigmoid activation as an objective, and “pairwise” mode uses max-margin loss.

In my opinion, there isn’t the significant difference in performance between single and pairwise mode, but it may depend on the model or dataset you use.

CicoZhang commented 6 years ago

Great, thank you for the explanation!