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

LightGCN复现问题可能受到 "l2_reg_loss" 和 "bpr计算中负采样方式" 的影响 #68

Closed
ChanglongZheng opened this issue Jun 19, 2024 · 3 comments

Comments

@ChanglongZheng
Copy link

hi,余老师,在看您的代码的时候,我发现和LightGCN的代码是有些不同的。

  1. l2_reg_loss的设置,LightGCN中是使用了0层embedding去计算reg_loss的
    image
    去实验了一下,即使不使用较小的学习率,也能够提升到和论文接近的指标。
    image

  2. LightGCN-torch版本中,计算bpr loss时使用的负采样也是不一样的,如下图
    image

因为我自己在跑LightGCN的时候遇到了复现不出来LightGCN结果的问题,也看到有其他人在问这个问题,所以请您看看会不会有以上的原因。

@Coder-Yu
Copy link
Owner

第一个应该是有影响的 你可以试一下

负采样所有算法都一样的 应该问题不大

@ChanglongZheng
Copy link
Author

非常感谢您的回复!

我测试的结果是,

  • 不同的reg_loss计算方法在LightGCN上会有影响,使用LightGCN原文中用0层embedding计算reg_loss可以复现出来LightGCN的结果;在SimGCL上没有影响,SimGCL依然保持了论文中的性能。
    image

  • 负采样算法影响会有一些影响,在不同的模型上表现不同,具体哪个好也无法下定论,所以采用一样的负采样是可以的。

@Coder-Yu
Copy link
Owner

好的 你可以提交一个PR fix一下LightGCN

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