SimKGC
SimKGC copied to clipboard
Question about the mask in code
I would like to ask, what do triplet masks and other masks in the code do? Looking forward to your answer!
As said in the paper:
During training, there may exist some false negatives.
For example, the correct entity happens to appear in another triple within the same batch.
We filter out such entities with a binary mask.
If a <h, r, t> triple is true according to the training data,
we do not consider t as a negative.
We use a mask to implement this mechanism.
thanks!