Skip to content

Add DiffGRM generative recommender - #718

Open
hieuddo wants to merge 1 commit into
PreferredAI:masterfrom
hieuddo:diffgrm
Open

Add DiffGRM generative recommender#718
hieuddo wants to merge 1 commit into
PreferredAI:masterfrom
hieuddo:diffgrm

Conversation

@hieuddo

@hieuddo hieuddo commented Aug 10, 2026

Copy link
Copy Markdown
Member

Description

This PR integrates DiffGRM (Diffusion-based Generative Recommendation Model) into cornac through the NextItemRecommender interface.

The official repository at commit ad7b971c7e525e9fea6fb8e362a5c49dccb2473c did not contain a root repository license, so we tried to implement DiffGRM without copying the code directly (ours is Apache-2.0).

Key changes

  • Added a native DiffGRM model using Cornac's NextItemRecommender and FeatureModality interfaces.
  • Added configurations for Amazon Beauty, Sports, and Toys.
  • Added detailed documentation covering configuration, reproduction results.

Verification and reproducibility

The evaluation uses Amazon Sports 2014 5-core, chronological leave-one-out, max_len=50, the frozen released Semantic-ID table, paper beam size 128, and seeds 2024-2026. Checkpoints are selected using the SID-level validation objective 0.8 * NDCG@10 + 0.2 * Recall@10.

Result Recall@5 NDCG@5 Recall@10 NDCG@10
Paper .0363 .0245 .0550 .0305
Cornac, seed 2024 .0324 .0220 .0501 .0277
Cornac, seed 2025 .0360 .0244 .0545 .0304
Cornac, seed 2026 .0325 .0218 .0518 .0280
Cornac mean ± sample SD .0337 ± .0020 .0227 ± .0014 .0521 ± .0022 .0287 ± .0015

The three-seed mean is 5.19%-7.29% below the paper across the four metrics. Seed 2025, which also has the highest declared validation score, is within 0.46%-0.91% of every paper value. The paper likely used results from one seed instead of average of multiple runs (see https://github.com/hieuddo/cornac/blob/c0d200c560de6d3708b329395a6f327d61963e39/cornac/models/diffgrm/README.md#reproduction-path)

This verification shows the Cornac implementation achieves reasonably comparable results.

Related Issues

Checklist:

  • I have added tests.
  • I have updated the documentation accordingly.
  • I have updated README.md (if you are adding a new model).
  • I have updated examples/README.md (if you are adding a new example).

@hieuddo hieuddo added the models New models, changes to models label Aug 10, 2026

@qtuantruong qtuantruong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

models New models, changes to models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants