PathCon icon indicating copy to clipboard operation
PathCon copied to clipboard

Relational paths for non-existing triples

Open kalinin-sanja opened this issue 5 years ago • 6 comments

Let's assume, we want to get model scores for a non-existing triple, i.e., a pair of nodes, which is not connected. It looks like we should calculate relational paths for non-existing triples during the calculation of paths for train/valid/test, because of Bag-Of-Paths (BOP). Or should we calculate those paths after training and use only that paths, which are presented in the train+valid+test?

kalinin-sanja avatar Oct 29 '20 14:10 kalinin-sanja

Hi! If you are going to use the model to evaluate the score for a (h, t) pair, you need to calculate all paths connecting h and t presented in the training data.

hwwang55 avatar Sep 14 '21 22:09 hwwang55

Hi! If you are going to use the model to evaluate the score for a (h, t) pair, you need to calculate all paths connecting h and t presented in the training data.

So, we just once calculate the Bag-Of-Paths vector in the train set and believe that some of these paths will occur between any new pair?

kalinin-sanja avatar Sep 15 '21 08:09 kalinin-sanja

Yes, that's the idea.

hwwang55 avatar Sep 15 '21 21:09 hwwang55

Hi! If you are going to use the model to evaluate the score for a (h, t) pair, you need to calculate all paths connecting h and t presented in the training data.

Hi, all the paths you mentioned here refer to whether train.txt+valid.txt+test.txt constitutes all the paths between h and t in the graph or train.txt constitutes all the paths between h and t in the graph.

If only train.txt is used to construct the path between (h, t), then for the WN18RR dataset, some entities in test.txt do not exist in train.txt. In this case, how can the path from the corresponding entity to other entities be obtained?

zhiweihu1103 avatar Apr 05 '22 01:04 zhiweihu1103

Hi! You can only use training data to calculate paths since training data is all you know when training the model. If a node does not appear in training data, then there is no path connecting this node to others. PathCon cannot handle these nodes.

hwwang55 avatar Apr 05 '22 03:04 hwwang55

OK, Thx.

zhiweihu1103 avatar Apr 05 '22 03:04 zhiweihu1103