Skip to content

Add RPG Semantic-ID recommender - #715

Merged
hieuddo merged 1 commit into
PreferredAI:masterfrom
hieuddo:rpg
Jul 28, 2026
Merged

Add RPG Semantic-ID recommender#715
hieuddo merged 1 commit into
PreferredAI:masterfrom
hieuddo:rpg

Conversation

@hieuddo

@hieuddo hieuddo commented Jul 27, 2026

Copy link
Copy Markdown
Member

Description

This PR integrates RPG (Generating Long Semantic IDs in Parallel for
Recommendation) into cornac. RPG scales up to 16-64 unordered codes for Semantic IDs (TIGER uses 4 hierarchical codes).

Key changes

  • Added RPG through the NextItemRecommender interface, with graph-guided
    and exact full-catalog scoring.
  • Added the official defaults and tuned configurations for Amazon Beauty,
    Sports, and Toys.
  • Added aligned item-feature support to NextItemEvaluation, documentation,
    requirements, an example, and evaluation tests.

Verification and tuning

Dataset LR Temp. Codebooks Beams Edges / steps R@5 ours / paper N@5 ours / paper R@10 ours / paper N@10 ours / paper
Beauty 0.010 0.03 32 20 200 / 3 0.0533 / 0.0550 0.0372 / 0.0381 0.0789 / 0.0809 0.0454 / 0.0464
Sports 0.003 0.03 16 100 30 / 5 0.0288 / 0.0314 0.0198 / 0.0216 0.0420 / 0.0463 0.0241 / 0.0263
Toys 0.003 0.03 16 200 20 / 3 0.0613 / 0.0592 0.0415 / 0.0401 0.0898 / 0.0869 0.0506 / 0.0490

Setting: Amazon Reviews 2014 5-core, chronological leave-last-out,
mode="last", max_len=50, seed=123, and the official RPG
text-embedding-3-large item embeddings.

The results are reasonably comparable with the paper: Beauty and Sports are
within 3.1% and 8.3% of the reported R@5, while Toys is 3.5% higher.

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 merged commit e11a0df into PreferredAI:master Jul 28, 2026
19 checks passed
@hieuddo
hieuddo deleted the rpg branch July 28, 2026 00:07
@hieuddo hieuddo added the models New models, changes to models label Jul 28, 2026
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