Some implementation problems
ty4b112 opened this issue · 2 comments
ty4b112 commented
Thanks for providing the source code for your work diffnet and diffnet++.
Since I am a pytorch user, I want to reimplement your works with pytorch and more recent python version, so that more researchers can compare their works with yours. However, I was confused by some of your implementation details:
- In DataModule.py, you use generateConsumedItemsSparseMatrix() to get the user-item graph. As I understand, you make the train/valid/test data correspond to a data file and get the user-item graph described by this file, which cause severe problem: during testing, your model are avaliable with all true test data, which means that your model answer some questions it has the ground truth. Your training process also has the same data leakeage problem.
- In your paper 'A Neural Influence Diffusion Model for Social Recommendation' eq-4, you said you use a regularization parameter to control the complexity of user and item free embedding matrices. But in your code diffnet.py, you seems only compute the MSE loss between the ground truth and your predictions.
PeiJieSun commented
Thanks for your attention to our work.
- Don't worry about the data leak issue, we execute the generateConsumedItemsSparseMatrix function with different input data. You can find the details in /diffnet/train.py line 33.
- We are sorry maybe we don't implement the regularization term in optimizing our model. But you can try to set the weight_decay with some appropriate value when re-implement our code with PyTorch Adam optimizer.
ty4b112 commented
Thanks for your quick reply.
I am sorrt that I made a serious mistake because of carelessness. It is true that there is no data leak issue during testing.