PreferredAI / cornac

A Comparative Framework for Multimodal Recommender Systems
https://cornac.preferred.ai
Apache License 2.0
845 stars 138 forks source link

Lightgcn fix #602

Closed theisjendal closed 3 months ago

theisjendal commented 3 months ago

Description

LightGCN is a simplified version of NGCF, however, some of the simplifications made in LightGCN where not included. Therefore:

Checklist:

theisjendal commented 3 months ago

@tqtg as per https://github.com/PreferredAI/cornac/pull/600#issuecomment-1995827405, I've created a pull request for LightGCN only.

tqtg commented 3 months ago

thanks @theisjendal for clarifying all the changes. They all make sense to me after revising the authors' implementation of LightGCN. Could you also try to compare the updated version and the old one using this example with the same hyper-parameters? I'm curious about the changes in accuracy and speed of convergence.

theisjendal commented 3 months ago

@tqtg, here are the results: OLD Training: 11%, 110/1000 [13:45<1:50:48, 7.47s/iter, loss=0.00479] Early stopping:

NEW Training: 62%, 619/1000 [1:11:29<44:35, 7.02s/iter, loss=0.00469] Early stopping:

VALIDATION:

            | NDCG@20 | Recall@20 | Time (s)
------------ + ------- + --------- + --------
LightGCN-Old |  0.1534 |    0.2420 |   4.9250
LightGCN-New |  0.1552 |    0.2428 |   4.8821

TEST:

             | NDCG@20 | Recall@20 | Train (s) | Test (s)
------------ + ------- + --------- + --------- + --------
LightGCN-Old |  0.1698 |    0.2503 |  831.2188 |   5.2217
LightGCN-New |  0.1717 |    0.2581 | 4294.9170 |   5.2097
tqtg commented 3 months ago

LGTM. Feel free to merge this PR.