--- license: other license_name: amazon-reviews-2023 license_link: https://amazon-reviews-2023.github.io/ language: - en pretty_name: 'Amazon Reviews 2023 — User Interactions (5-core, leave-one-out, sequential)' size_categories: - 10M **Item content features** (title, images, price, brand, …) are in the companion > dataset **[`yufan/amazon2023-item-metadata`](https://huggingface.co/datasets/yufan/amazon2023-item-metadata)**, joined by > `parent_asin`. All files are **JSON Lines** (`.jsonl`). ## Subsets (configs) & splits Configs are named **`_`** and grouped by processing method; each has `train` / `validation` / `test` splits (single `train` for `interactions_*`). `5 categories × 4 processing variants = 20 configs`. | Processing variant (config prefix) | What it is | |---|---| | `seq_maxlen50_*` | leave-one-out **sequential** split, history ≤ 50 (ID-based / SASRec-style) | | `seq_maxlen20_*` | leave-one-out **sequential** split, history ≤ 20 (semantic-ID / generative) | | `last_out_*` | leave-one-out **direct** split (no history column; MF/BPR-style) | | `interactions_*` | 5-core interaction table (no split applied; single `train`) | Categories: `Video_Games`, `Industrial_and_Scientific`, `Beauty_and_Personal_Care`, `Musical_Instruments`, `Books`. ```python from datasets import load_dataset # sequential split (history <= 50), Video Games ds = load_dataset("yufan/amazon2023-user-interactions", "seq_maxlen50_Video_Games") train, valid, test = ds["train"], ds["validation"], ds["test"] # item content features (companion dataset), same category meta = load_dataset("yufan/amazon2023-item-metadata", "Video_Games")["train"] ``` ### Which config do I use? | If your model is … | Use | |---|---| | Sequential / ID-based (SASRec, GRU4Rec) | `seq_maxlen50_` | | Generative / Semantic-ID (TIGER) | `seq_maxlen20_` | | Non-sequential (MF, BPR, LightGCN) | `last_out_` | | Custom (re-split yourself) | `interactions_` | ### Repository layout ``` interactions/.jsonl last_out/.{train,valid,test}.jsonl seq_maxlen20/.{train,valid,test}.jsonl seq_maxlen50/.{train,valid,test}.jsonl stats.json stats.md ``` ### Record schemas **`interactions_*` and `last_out_*`** — one interaction per line: ```json {"user_id": "AEVPP…N7WFQ", "parent_asin": "B09JY72CNG", "rating": 4.0, "timestamp": 1630594913298} ``` **`seq_maxlen20_*` / `seq_maxlen50_*`** — same, plus the chronological history (list of `parent_asin`, most-recent-last, capped at the max length): ```json {"user_id": "AEVPP…N7WFQ", "parent_asin": "B09JY72CNG", "rating": 4.0, "timestamp": 1630594913298, "history": ["B08R5B7YS4", "B0863MT183", "…"]} ``` `parent_asin` is the Amazon product (parent) id — the standard item id for the Amazon Reviews 2023 benchmark, and the **join key** to the item-metadata dataset. --- ## Data-processing protocol Source: the official **Amazon Reviews 2023** ([McAuley-Lab/Amazon-Reviews-2023](https://huggingface.co/datasets/McAuley-Lab/Amazon-Reviews-2023), [website](https://amazon-reviews-2023.github.io/)). 1. **Input:** official de-duplicated raw interactions (`benchmark/.../rating_only`). 2. **5-core filtering:** iteratively drop users and items with < 5 interactions until every remaining user **and** item has ≥ 5. 3. **Chronological ordering:** per user, sort ascending by `timestamp`; keep the earliest occurrence of each `(user, item)` pair. 4. **Leave-one-out split:** per user, **last** → `test`, **second-to-last** → `validation`, the rest → `train`. 5. **Sequential history:** attach each target's prior history, truncated to the most recent **20** or **50** items. The 5-core and leave-one-out logic is borrowed **verbatim** from the official benchmark scripts ([`kcore_filtering.py`, `last_out_split.py`](https://github.com/hyp1231/AmazonReviews2023/tree/main/benchmark_scripts)), so the splits reproduce the official `5core/last_out` exactly. This recipe was popularised by **TIGER** (Rajput et al., NeurIPS 2023, [arXiv:2305.05065](https://arxiv.org/abs/2305.05065)). --- ## Validation / double-check **Level 1 — exact match to the official benchmark.** For every category, our re-derived 5-core interaction count and number of test users are **identical** to the official `McAuley-Lab/Amazon-Reviews-2023` `5core/rating_only` and `5core/last_out` files (asserted in the build script). **Level 2 — exact match to numbers reported in peer-reviewed papers.** Under the *same conditions* (Amazon Reviews 2023 · same category · 5-core · leave-one-out), our `(users / items / interactions)` match **to the digit** the dataset statistics reported by **~15 independent papers**: | Category | Ours — users / items / interactions | Reported **identically** by (same 5-core + LOO) | |---|---|---| | Musical_Instruments | 57,439 / 24,587 / 511,836 | **9 papers** — UTGRec, MTGRec, LARES, CCFRec, Pctx, LLaDA-Rec, HSTU-BLaIR, Augment-or-Not, MLPs | | Video_Games | 94,762 / 25,612 / 814,586 | **4** — GrIT, Not-Just-What-But-When, MLPs, HSTU-BLaIR | | Industrial_and_Scientific | 50,985 / 25,848 / 412,947 | **4** — GrIT, MLPs, Augment-or-Not, Token-Weighted | | Beauty_and_Personal_Care | 729,576 / 207,649 / 6,624,441 | **2** — AlphaFree, Closing-the-Gap | | Books | 776,370 / 495,063 / 9,488,297 | **2** — Not-Just-What-But-When, Hi-SAM (≈, rounded) | ≈ 20 reported data points across ~15 independent papers, all matching exactly (a few differ by 1 from rounding, e.g. HSTU-BLaIR's 814,585 vs 814,586).
Cross-validation references (papers reporting identical statistics) UTGRec ([2504.04405](https://arxiv.org/abs/2504.04405)) · MTGRec / Pre-training Generative Rec. ([2504.04400](https://arxiv.org/abs/2504.04400)) · LARES ([2505.16865](https://arxiv.org/abs/2505.16865)) · CCFRec / Bridging Textual-Collaborative ([2503.12183](https://arxiv.org/abs/2503.12183)) · Pctx ([2510.21276](https://arxiv.org/abs/2510.21276)) · LLaDA-Rec ([2511.06254](https://arxiv.org/abs/2511.06254)) · HSTU-BLaIR ([2504.10545](https://arxiv.org/abs/2504.10545)) · Augment-or-Not ([2505.23053](https://arxiv.org/abs/2505.23053)) · MLPs ([2605.12617](https://arxiv.org/abs/2605.12617)) · GrIT ([2602.19728](https://arxiv.org/abs/2602.19728)) · Not-Just-What-But-When ([2507.23209](https://arxiv.org/abs/2507.23209)) · Token-Weighted ([2601.17787](https://arxiv.org/abs/2601.17787)) · AlphaFree ([2603.02653](https://arxiv.org/abs/2603.02653)) · Closing-the-Gap ([2508.14910](https://arxiv.org/abs/2508.14910)) · Hi-SAM ([2602.11799](https://arxiv.org/abs/2602.11799))
**Near-matches confirm the same base.** A few papers use the same 5-core + LOO but report *slightly smaller* counts because they add **one extra filter** — e.g. ReSID drops items lacking structured side-info (≈2–6 % smaller across *every* category: VG 94,515; Musical 57,359; Books 775,503), Multimodal-GR drops items without images (Beauty 724,796), SPARC keeps only `rating ≥ 4` (Books 459,133). Being only marginally smaller is itself evidence that the underlying 5-core + LOO base is identical. **Larger differences only arise when the conditions differ** (excluded by the precondition above): the *old 2014* Beauty (22,363 users; BSARec, RecCocktail, Understanding-GR, Beyond-Unimodal), *sub-sampling* (Efficient-Responsible 2,289; Heterogeneous 10k/domain), or *omitting 5-core / temporal-truncation* (R²ec, Reinforced-PO) — these are the papers' own design choices, not discrepancies in this dataset. --- ## Statistics (after 5-core) | Category | #Users | #Items | #Interactions | Avg len | Median | Sparsity | |----------|-------:|-------:|--------------:|--------:|-------:|---------:| | `Video_Games` | 94,762 | 25,612 | 814,586 | 8.5961 | 6 | 0.99966437 | | `Industrial_and_Scientific` | 50,985 | 25,848 | 412,947 | 8.0994 | 6 | 0.99968665 | | `Beauty_and_Personal_Care` | 729,576 | 207,649 | 6,624,441 | 9.0799 | 7 | 0.99995627 | | `Musical_Instruments` | 57,439 | 24,587 | 511,836 | 8.9109 | 7 | 0.99963757 | | `Books` | 776,370 | 495,063 | 9,488,297 | 12.2214 | 7 | 0.99997531 | ### Leave-one-out split row counts | Category | direct train | valid | test | seq20 train | seq50 train | |----------|-------------:|------:|-----:|------------:|------------:| | `Video_Games` | 625,062 | 94,762 | 94,762 | 530,300 | 530,300 | | `Industrial_and_Scientific` | 310,977 | 50,985 | 50,985 | 259,992 | 259,992 | | `Beauty_and_Personal_Care` | 5,165,289 | 729,576 | 729,576 | 4,435,713 | 4,435,713 | | `Musical_Instruments` | 396,958 | 57,439 | 57,439 | 339,519 | 339,519 | | `Books` | 7,935,557 | 776,370 | 776,370 | 7,159,187 | 7,159,187 | (`valid` = `test` = #users by construction. Sequential `train` uses the rolling next-item scheme; the 20/50 variants share the same row count, differing only in history length.) --- ## Intended uses & limitations Next-item sequential recommendation, generative / semantic-ID recommendation, content/multimodal recommendation (with the companion item-metadata dataset), cold-start studies. Implicit feedback (all retained reviews are positives; use `rating` for explicit labels). No leakage by construction. The two largest categories (Books, Beauty) are processed from the official pre-filtered 5-core data (verified equivalent). ## License & citation Derived from **Amazon Reviews 2023** (McAuley Lab); for **research use**. Please cite: > Yupeng Hou, Jiacheng Li, Zhankui He, An Yan, Xiusi Chen, Julian McAuley. > *Bridging Language and Items for Retrieval and Recommendation.* 2024. > [arXiv:2403.03952](https://arxiv.org/abs/2403.03952) · > https://amazon-reviews-2023.github.io/ > Shashank Rajput et al. *Recommender Systems with Generative Retrieval (TIGER).* > NeurIPS 2023. [arXiv:2305.05065](https://arxiv.org/abs/2305.05065)