dice-group / Convolutional-Complex-Knowledge-Graph-Embeddings

19 stars 2 forks source link

Is the formula right ? #6

Open SsnAgo opened 2 years ago

SsnAgo commented 2 years ago

Hi, I read the paper and I find that (3) and (4) are not equivalent to (1) and (5)? Also I think (3) even not equivalent to (4) ? image image image And I notice that it is calculated using formula (4) in the code. If it is my misunderstanding, please kindly advise me. thanks~

Demirrr commented 2 years ago

Dear @SsnAgo,

Thank you for your question. A score of a triple is computed via Eq. 4 as you mentioned. Through Eq. 1 and Eq 5, we previously aimed to higlight the connection of conv. with Hermitian inner product. However, there is an indeed typo. Hence, it is not your misunderstanding. You may have a look at our updated manuscript where we fixed this issue and please let me know if something is still unclear.

Cheers, CD

SsnAgo commented 2 years ago

Thanks for your reply~ @Demirrr Ok, thanks ~ finally,may I ask, when I used the parameters given in the paper to run the code, I found that the experiment result did not reach the performance in the paper, is there a more suitable parameter?

Demirrr commented 2 years ago

Firstly, you may want to use pretrained models provided.

If you would like to reproduce experiments, I would suggest you the followings

  1. Fix the seed of random number generator to 1 and
  2. Carry out grid search whose ranges are defined in Section 5.3.

If you have already followed these steps, could you elaborate on results and generated log files?

SsnAgo commented 2 years ago

Thanks~ @Demirrr I noticed that the ablation experiment in the paper, the Conv(') operation was eliminated. Does this mean the model complete degeneration into ComplEx?

Demirrr commented 2 years ago

Yes, it does indeed.

At evaluation/inference time, we removed the Conv(.) function to obtain scores of input triples as shown in here. Thereofre, scores are generated solely via the Hermitian inner product.

SsnAgo commented 2 years ago

Thanks a lot ! @Demirrr

Demirrr commented 2 years ago

Lemme know if you face any difficulties

Jim-Hou commented 2 years ago

Hi, I add ConEx in my own model to predict the score as decoder. While Encoder is based on GCN and attention network. But ConEx get lower MRR than InteractE/ConvE in this situation. So I remove my Encoder and I find ConEx is still far from the performance in the paper. It get 0.33 Valid MRR about 200 epoch. I use the the parameters given in the paper: embedding_dim = 100 ; kernel_size = 3; num_of_output_channels = 16; input_dropout = 0.3; feature_map_dropout = 0.4; batch_size = 512; learning_rate = 0.01; label_smoothing = 0.1 and seed = 1. Is there something else I haven't noticed? The code all I used is the 'class ConEx' in complex_models.py. I used BCE loss and KvsAll scoring technique.

Demirrr commented 2 years ago

Hello @Jim-Hou

You may want to take a look at #7. Therein, I elucidated possible solutions.