Add README
Browse files
README.md
CHANGED
|
@@ -2,49 +2,95 @@
|
|
| 2 |
configs:
|
| 3 |
- config_name: amazonreviews2014_beauty
|
| 4 |
data_files:
|
| 5 |
-
- split:
|
| 6 |
-
path: "
|
| 7 |
- split: test
|
| 8 |
-
path: "
|
|
|
|
| 9 |
- config_name: amazonreviews2014_sports_and_outdoors
|
| 10 |
data_files:
|
| 11 |
-
- split:
|
| 12 |
-
path: "
|
| 13 |
- split: test
|
| 14 |
-
path: "
|
|
|
|
| 15 |
- config_name: amazonreviews2023_industrial_and_scientific
|
| 16 |
data_files:
|
| 17 |
-
- split:
|
| 18 |
-
path: "
|
| 19 |
- split: test
|
| 20 |
-
path: "
|
|
|
|
| 21 |
- config_name: amazonreviews2023_musical_instruments
|
| 22 |
data_files:
|
| 23 |
-
- split:
|
| 24 |
-
path: "
|
| 25 |
- split: test
|
| 26 |
-
path: "
|
|
|
|
| 27 |
- config_name: amazonreviews2023_office_products
|
| 28 |
data_files:
|
| 29 |
-
- split:
|
| 30 |
-
path: "
|
| 31 |
- split: test
|
| 32 |
-
path: "
|
|
|
|
| 33 |
- config_name: steam
|
| 34 |
data_files:
|
| 35 |
-
- split:
|
| 36 |
-
path: "
|
| 37 |
- split: test
|
| 38 |
-
path: "
|
| 39 |
-
|
|
|
|
| 40 |
data_files:
|
| 41 |
-
- split:
|
| 42 |
-
path: "
|
| 43 |
- split: test
|
| 44 |
-
path: "
|
| 45 |
---
|
| 46 |
|
| 47 |
-
# MemGen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
configs:
|
| 3 |
- config_name: amazonreviews2014_beauty
|
| 4 |
data_files:
|
| 5 |
+
- split: val
|
| 6 |
+
path: "AmazonReviews2014-Beauty/val.jsonl"
|
| 7 |
- split: test
|
| 8 |
+
path: "AmazonReviews2014-Beauty/test.jsonl"
|
| 9 |
+
|
| 10 |
- config_name: amazonreviews2014_sports_and_outdoors
|
| 11 |
data_files:
|
| 12 |
+
- split: val
|
| 13 |
+
path: "AmazonReviews2014-Sports_and_Outdoors/val.jsonl"
|
| 14 |
- split: test
|
| 15 |
+
path: "AmazonReviews2014-Sports_and_Outdoors/test.jsonl"
|
| 16 |
+
|
| 17 |
- config_name: amazonreviews2023_industrial_and_scientific
|
| 18 |
data_files:
|
| 19 |
+
- split: val
|
| 20 |
+
path: "AmazonReviews2023-Industrial_and_Scientific/val.jsonl"
|
| 21 |
- split: test
|
| 22 |
+
path: "AmazonReviews2023-Industrial_and_Scientific/test.jsonl"
|
| 23 |
+
|
| 24 |
- config_name: amazonreviews2023_musical_instruments
|
| 25 |
data_files:
|
| 26 |
+
- split: val
|
| 27 |
+
path: "AmazonReviews2023-Musical_Instruments/val.jsonl"
|
| 28 |
- split: test
|
| 29 |
+
path: "AmazonReviews2023-Musical_Instruments/test.jsonl"
|
| 30 |
+
|
| 31 |
- config_name: amazonreviews2023_office_products
|
| 32 |
data_files:
|
| 33 |
+
- split: val
|
| 34 |
+
path: "AmazonReviews2023-Office_Products/val.jsonl"
|
| 35 |
- split: test
|
| 36 |
+
path: "AmazonReviews2023-Office_Products/test.jsonl"
|
| 37 |
+
|
| 38 |
- config_name: steam
|
| 39 |
data_files:
|
| 40 |
+
- split: val
|
| 41 |
+
path: "Steam/val.jsonl"
|
| 42 |
- split: test
|
| 43 |
+
path: "Steam/test.jsonl"
|
| 44 |
+
|
| 45 |
+
- config_name: yelp_2020
|
| 46 |
data_files:
|
| 47 |
+
- split: val
|
| 48 |
+
path: "Yelp-Yelp_2020/val.jsonl"
|
| 49 |
- split: test
|
| 50 |
+
path: "Yelp-Yelp_2020/test.jsonl"
|
| 51 |
---
|
| 52 |
|
| 53 |
+
# MemGen Annotations
|
| 54 |
+
|
| 55 |
+
This is the annotation dataset for **On the Memorization and Generalization of Generative Recommendation**.
|
| 56 |
+
|
| 57 |
+
\[[Paper]\] \[[Code]\] \[[Models]\]
|
| 58 |
+
|
| 59 |
+
[Paper]: <link not ready yet>
|
| 60 |
+
[Code]: https://github.com/Jamesding000/MemGen-GR
|
| 61 |
+
[Models]: https://huggingface.co/jamesding0302/memgen-checkpoints
|
| 62 |
+
|
| 63 |
+
The annotations categorize evaluation instances under the leave-one-out protocol:
|
| 64 |
+
- **test** split uses the **last** item in the user history sequence as target,
|
| 65 |
+
- **val** split uses the **second-to-last** item as target.
|
| 66 |
+
|
| 67 |
+
## Columns
|
| 68 |
+
- `sample_id`: row index within the split in the original dataset.
|
| 69 |
+
- `user_id`: raw user identifier (join key).
|
| 70 |
+
- `master`: one of `memorization`, `generalization`, `uncategorized`.
|
| 71 |
+
- `subcategories`: list of `{rule, hop}` for fine-grained generalization types.
|
| 72 |
+
- `all_labels`: all string labels (e.g., `["generalization", "symmetry_3"]`).
|
| 73 |
+
|
| 74 |
+
## Load
|
| 75 |
+
```python
|
| 76 |
+
from datasets import load_dataset
|
| 77 |
+
|
| 78 |
+
labels = load_dataset(
|
| 79 |
+
"jamesding0302/memgen-annotations",
|
| 80 |
+
"amazonreviews2014_beauty",
|
| 81 |
+
split="test",
|
| 82 |
+
)
|
| 83 |
+
print(labels[0])
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## Merge with processed dataset
|
| 87 |
+
```python
|
| 88 |
+
from datasets import load_dataset
|
| 89 |
+
|
| 90 |
+
lab = load_dataset("json", data_files="item_case_records.jsonl", split="train", cache_dir="./hf_cache")
|
| 91 |
|
| 92 |
+
ds = pipeline.split_datasets["train"]
|
| 93 |
+
ds = ds.add_column("master", lab["master"]) \
|
| 94 |
+
.add_column("subcategories", lab["subcategories"]) \
|
| 95 |
+
.add_column("all_labels", lab["all_labels"])
|
| 96 |
+
```
|