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

You add reverse relation to the training data? #3

Closed
cheungdaven opened this issue Mar 25, 2019 · 1 comment
Closed

You add reverse relation to the training data? #3

cheungdaven opened this issue Mar 25, 2019 · 1 comment

Comments

@cheungdaven
Copy link

Reverse relation is usually removed from datasets, but you add it to training data? What is the motivation for this?

@ibalazevic
Copy link
Owner

ibalazevic commented Mar 25, 2019

We train and test the model using 1-N scoring which is why we insert reciprocal relations, the same way as in Dettmers et al., 2018 (code) (reciprocal relations are also used by Lacroix et al., 2018 (code)): for each relation, we create an inverse by appending "_reverse" to the relation name. However, we train and test each triple only in one direction, always predicting the tail, i.e. (e_1, r, ?) and (e_2, r_reverse, ?), which is equivalent to not having reciprocal relations and predicting both head and tail.

This is different from having reciprocal relations in your training and test set, because in that case for each of them you would predict both head and tail, which would lead to an easier task and higher accuracy.

I hope this answers your question.

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

No branches or pull requests

2 participants