yufan's picture
Expand validation: same-condition cross-check vs ~15 papers (per-category exact matches)
215bf78 verified
|
Raw
History Blame Contribute Delete
15.3 kB
---
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<n<100M
tags:
- recommendation
- sequential-recommendation
- generative-recommendation
- amazon-reviews
- recsys
- leave-one-out
- 5-core
task_categories:
- other
configs:
- config_name: seq_maxlen50_Video_Games
data_files:
- split: train
path: seq_maxlen50/Video_Games.train.jsonl
- split: validation
path: seq_maxlen50/Video_Games.valid.jsonl
- split: test
path: seq_maxlen50/Video_Games.test.jsonl
- config_name: seq_maxlen50_Industrial_and_Scientific
data_files:
- split: train
path: seq_maxlen50/Industrial_and_Scientific.train.jsonl
- split: validation
path: seq_maxlen50/Industrial_and_Scientific.valid.jsonl
- split: test
path: seq_maxlen50/Industrial_and_Scientific.test.jsonl
- config_name: seq_maxlen50_Beauty_and_Personal_Care
data_files:
- split: train
path: seq_maxlen50/Beauty_and_Personal_Care.train.jsonl
- split: validation
path: seq_maxlen50/Beauty_and_Personal_Care.valid.jsonl
- split: test
path: seq_maxlen50/Beauty_and_Personal_Care.test.jsonl
- config_name: seq_maxlen50_Musical_Instruments
data_files:
- split: train
path: seq_maxlen50/Musical_Instruments.train.jsonl
- split: validation
path: seq_maxlen50/Musical_Instruments.valid.jsonl
- split: test
path: seq_maxlen50/Musical_Instruments.test.jsonl
- config_name: seq_maxlen50_Books
data_files:
- split: train
path: seq_maxlen50/Books.train.jsonl
- split: validation
path: seq_maxlen50/Books.valid.jsonl
- split: test
path: seq_maxlen50/Books.test.jsonl
- config_name: seq_maxlen20_Video_Games
data_files:
- split: train
path: seq_maxlen20/Video_Games.train.jsonl
- split: validation
path: seq_maxlen20/Video_Games.valid.jsonl
- split: test
path: seq_maxlen20/Video_Games.test.jsonl
- config_name: seq_maxlen20_Industrial_and_Scientific
data_files:
- split: train
path: seq_maxlen20/Industrial_and_Scientific.train.jsonl
- split: validation
path: seq_maxlen20/Industrial_and_Scientific.valid.jsonl
- split: test
path: seq_maxlen20/Industrial_and_Scientific.test.jsonl
- config_name: seq_maxlen20_Beauty_and_Personal_Care
data_files:
- split: train
path: seq_maxlen20/Beauty_and_Personal_Care.train.jsonl
- split: validation
path: seq_maxlen20/Beauty_and_Personal_Care.valid.jsonl
- split: test
path: seq_maxlen20/Beauty_and_Personal_Care.test.jsonl
- config_name: seq_maxlen20_Musical_Instruments
data_files:
- split: train
path: seq_maxlen20/Musical_Instruments.train.jsonl
- split: validation
path: seq_maxlen20/Musical_Instruments.valid.jsonl
- split: test
path: seq_maxlen20/Musical_Instruments.test.jsonl
- config_name: seq_maxlen20_Books
data_files:
- split: train
path: seq_maxlen20/Books.train.jsonl
- split: validation
path: seq_maxlen20/Books.valid.jsonl
- split: test
path: seq_maxlen20/Books.test.jsonl
- config_name: last_out_Video_Games
data_files:
- split: train
path: last_out/Video_Games.train.jsonl
- split: validation
path: last_out/Video_Games.valid.jsonl
- split: test
path: last_out/Video_Games.test.jsonl
- config_name: last_out_Industrial_and_Scientific
data_files:
- split: train
path: last_out/Industrial_and_Scientific.train.jsonl
- split: validation
path: last_out/Industrial_and_Scientific.valid.jsonl
- split: test
path: last_out/Industrial_and_Scientific.test.jsonl
- config_name: last_out_Beauty_and_Personal_Care
data_files:
- split: train
path: last_out/Beauty_and_Personal_Care.train.jsonl
- split: validation
path: last_out/Beauty_and_Personal_Care.valid.jsonl
- split: test
path: last_out/Beauty_and_Personal_Care.test.jsonl
- config_name: last_out_Musical_Instruments
data_files:
- split: train
path: last_out/Musical_Instruments.train.jsonl
- split: validation
path: last_out/Musical_Instruments.valid.jsonl
- split: test
path: last_out/Musical_Instruments.test.jsonl
- config_name: last_out_Books
data_files:
- split: train
path: last_out/Books.train.jsonl
- split: validation
path: last_out/Books.valid.jsonl
- split: test
path: last_out/Books.test.jsonl
- config_name: interactions_Video_Games
data_files:
- split: train
path: interactions/Video_Games.jsonl
- config_name: interactions_Industrial_and_Scientific
data_files:
- split: train
path: interactions/Industrial_and_Scientific.jsonl
- config_name: interactions_Beauty_and_Personal_Care
data_files:
- split: train
path: interactions/Beauty_and_Personal_Care.jsonl
- config_name: interactions_Musical_Instruments
data_files:
- split: train
path: interactions/Musical_Instruments.jsonl
- config_name: interactions_Books
data_files:
- split: train
path: interactions/Books.jsonl
---
# Amazon Reviews 2023 — User Interactions (5-core, leave-one-out, sequential)
User–item **interaction** data for five Amazon Reviews 2023 categories, processed
into ready-to-use **sequential / generative recommendation** splits with the
*de-facto standard* recipe (**5-core filtering → chronological ordering →
leave-one-out split**).
Every record keeps the **timestamp**, and the splits are **byte-for-byte
reproducible** from the official Amazon Reviews 2023 release; the statistics also
**match, exactly, numbers reported by multiple peer-reviewed papers**
(see [§ Validation](#validation--double-check)).
> **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 **`<processing>_<Category>`** 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_<Category>` |
| Generative / Semantic-ID (TIGER) | `seq_maxlen20_<Category>` |
| Non-sequential (MF, BPR, LightGCN) | `last_out_<Category>` |
| Custom (re-split yourself) | `interactions_<Category>` |
### Repository layout
```
interactions/<Category>.jsonl
last_out/<Category>.{train,valid,test}.jsonl
seq_maxlen20/<Category>.{train,valid,test}.jsonl
seq_maxlen50/<Category>.{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).
<details>
<summary><b>Cross-validation references (papers reporting identical statistics)</b></summary>
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))
</details>
**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)