kuandeng / LightGCN

479 stars 127 forks source link

About the layer combination coefficients #7

Closed zxm97 closed 4 years ago

zxm97 commented 4 years ago

In function '_create_lightgcn_embed', the code computes E(0), A_fold_hat E(0), A_fold_hat^2 E(0)...A_fold_hat^K * E(0), then concatenates them and uses tf.reduce_mean to get the final representations. Where are the layer combination coefficients 1 / (K + 1) ?

kuandeng commented 4 years ago

The result of tf.reduce_mean function is the average of the K+1 embeddings , which equals to the weighted sum of the K+1 embeddings with coefficients 1/(K+1).

zxm97 commented 4 years ago

Sorry, I confused k with K