Add RPG Semantic-ID recommender - #715
Merged
Merged
Conversation
3 tasks
qtuantruong
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR integrates
RPG(Generating Long Semantic IDs in Parallel forRecommendation) into
cornac.RPGscales up to 16-64 unordered codes for Semantic IDs (TIGERuses 4 hierarchical codes).Key changes
RPGthrough theNextItemRecommenderinterface, with graph-guidedand exact full-catalog scoring.
Sports, and Toys.
NextItemEvaluation, documentation,requirements, an example, and evaluation tests.
Verification and tuning
Setting: Amazon Reviews 2014 5-core, chronological leave-last-out,
mode="last",max_len=50,seed=123, and the official RPGtext-embedding-3-largeitem embeddings.The results are reasonably comparable with the paper: Beauty and Sports are
within
3.1%and8.3%of the reported R@5, while Toys is3.5%higher.Checklist:
README.md(if you are adding a new model).examples/README.md(if you are adding a new example).