Skip to content

Add TIGER model for Semantic ID recommendation#711

Open
hieuddo wants to merge 2 commits into
PreferredAI:masterfrom
hieuddo:tiger
Open

Add TIGER model for Semantic ID recommendation#711
hieuddo wants to merge 2 commits into
PreferredAI:masterfrom
hieuddo:tiger

Conversation

@hieuddo

@hieuddo hieuddo commented Jul 14, 2026

Copy link
Copy Markdown
Member

Description

This PR integrates TIGER (Recommender Systems with Generative Retrieval) into cornac, along with dataset utilities to support its content-embedding requirements.

Key Changes

  • Added load_text() to cornac/datasets/amazon_review.py to parse product metadata (title, price, brand, categories, and description).
  • Added unit tests for metadata parsing in tests/cornac/datasets/test_amazon_review.py.
  • TIGER model implementation, using NextItemRecommender interface
    • Included default configurations (paischer_config.py and grid_config.py) matching the settings used in popular benchmarks, to replicate results from the original paper.
  • Added examples/tiger_example.py with training pipeline on the Amazon Review (beauty) dataset

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).
  • I have updated datasets/README.md (if you are adding a new dataset).

@hieuddo hieuddo added the models New models, changes to models label Jul 14, 2026
@hieuddo

hieuddo commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

I've done some tuning with the three Amazon review datasets that are commonly used in Semantic ID papers.

The table below shows Recall@5 across three datasets, with GRID and PAISCHER configs, comparing to TIGER original paper and GRID benchmark.

Category Defaults GRID_CONFIG PAISCHER_CONFIG TIGER Paper GRID published
beauty 0.0217 0.0340 0.0419 0.0454 0.0422
sports 0.0157 0.0188 0.0240 0.0264 0.0236
toys 0.0192 0.0298 0.0362 (+desc) 0.0521 0.0376

Setting: leave_last_out split (identical splits to original paper), mode="last", max_len=20, seed=123. Sentence-T5-base (768-d) item embeddings over TIGER-style Title/Price/Brand/Categories text.

Reproducing TIGER is quite tricky, especially for toys, because there are some references saying for beauty and sports, they use Title/Price/Brand/Categories textual information, while it's not entirely clear with toys (likely only Descriptions). (+desc) in the table means we use all Title/Price/Brand/Categories and descriptions.

Between the two configs, GRID prioritizes speed and sacrifices a bit of performance (uses Adam optimizer for faster convergence; original paper uses Adagrad); while PAISCHER tries to follow closely with the original paper to achieve the best results possible.

More detailed tuning, base encoder (ablation studies in GRID show that using rkmeans results in better performance than rqvae with their training style)

Category Recipe Tokenizer R@5 N@5 R@10 N@10 R@20 N@20 Train(s)
beauty default rqvae 0.0217 0.0132 0.0386 0.0186 0.0591 0.0238 8072
beauty grid rkmeans 0.0340 0.0216 0.0564 0.0288 0.0885 0.0368 4772
beauty paischer rqvae 0.0419 0.0270 0.0634 0.0338 0.0953 0.0419 4341
beauty paischer rkmeans 0.0404 0.0259 0.0641 0.0335 0.1005 0.0427 9386
sports default rqvae 0.0157 0.0098 0.0262 0.0132 0.0442 0.0177 11075
sports grid rkmeans 0.0188 0.0117 0.0329 0.0162 0.0540 0.0215 5503
sports paischer rqvae 0.0230 0.0149 0.0373 0.0195 0.0596 0.0251 14102
sports paischer rkmeans 0.0240 0.0155 0.0394 0.0204 0.0635 0.0265 15917
toys default rqvae 0.0192 0.0115 0.0325 0.0158 0.0509 0.0204 6366
toys grid rkmeans 0.0298 0.0189 0.0506 0.0256 0.0780 0.0325 4270
toys paischer rqvae 0.0320 0.0205 0.0521 0.0269 0.0822 0.0345 9698
toys paischer rkmeans 0.0348 0.0222 0.0578 0.0295 0.0922 0.0382 9544
toys paischer +desc rkmeans 0.0362 0.0237 0.0583 0.0308 0.0915 0.0391 8609

A few other things to note:

  • TIGER likely uses Sentence-T5-XXL embedding, but improvements are minimal (sometimes even decrease)
  • beam_search doesn't show improvements over exact scoring
  • beauty and sports are somewhat reproducible, but toys is not
  • Using OpenAI's text-embedding-3-large embedding (provided by RPG) might improve the performance, but not a lot
  • Well-tuned SASRec and BERT4Rec (within cornac) still outperform TIGER. Quick runs from Global temporal and leave-last-out splitting for next-item evaluation #708 (comment) already showed we have better results than SASRec and BERT4Rec's results from TIGER paper. I did some more detailed tuning for SASRec and BERT4Rec, and the results are much higher.

@hieuddo

hieuddo commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

@qtuantruong @lthoang We do have all the tuning/experimental results from the notes above. Not sure if we should document it somewhere for reference?

@hieuddo hieuddo requested review from lthoang and qtuantruong July 15, 2026 09:31
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.

1 participant