DEEP-PolyU / CAGED_CIKM22

26 stars 1 forks source link

I have some questions about the code and would like to ask. 😀 #8

Open sinczyf opened 1 year ago

sinczyf commented 1 year ago

Sorry to bother you! I have some questions about the code and would like to ask. 1) In the data processing stage, I didn't find that you set up two views according to the paper; 2) In the training stage, I didn't see the relevant code to calculate the similarity of triples in the two views and use it in the contrastive learning loss. If it is convenient, look forward to your reply!

Qing145 commented 1 year ago

Dear sinczyf, thanks a lot for your attention! The function 'get_triple_neighbor' in the file 'create_batch.py' is used to create two views at triple level. Centering on the target triple (h, r, t), we have two different sets of triple-level neighbors, i.e., 'head_neighbor', and 'tail_neighbor', respectively. For convenience, we packaged these two triple sets in one single list, i.e., 'hrt_neighbor'. During training, we first divide this list into two equal parts by using 'reshape' function, and the similarity is computed via L1 norm function, i.e., 'pos_z0-pos_z1'.

sinczyf commented 1 year ago

Thank you very much for your reply! I solved my doubts after reading your paper carefully, good luck!