Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick question about the Inconsistent between Diffnet code and paper #19

Closed
Dingseewhole opened this issue Dec 27, 2021 · 3 comments
Closed

Comments

@Dingseewhole
Copy link

In your great original paper Sec 3.2 you use a sigmoid-based BPR loss (i.e., Eq(13)) to train the model. And in Eq(13) you use (r_ai-r_aj). But in your implement code diffnet.py line-127 you use self.opt_loss = tf.nn.l2_loss(self.labels_input - self.prediction) to generate the loss. It means you use the MSE-loss which is greatly different from BPR loss. I wonder to know which one is the correct version?

@PeiJieSun
Copy link
Owner

Hi, thank you for your attention to our work. Please refer to this github version, it is the correct one. And sorry for the wrong loss function in the paper.

@Dingseewhole
Copy link
Author

Thank you for your quick reply!
In Diffnet and Diffnet++, it seems you use the implicit dataset (such as Yelp, larger than 3 is pos others are abandoned) to train and test the model. And as I know the MSE-based loss is usually used in the explicit dataset that has both positive and negative labels. So if the loss function of Diffnet is MSE-based loss how did it get the negative inputs?

@PeiJieSun
Copy link
Owner

Sorry for the later response. You can treat the label of the negative inputs as zeros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants