jamesding0302 commited on
Commit
13a408d
·
verified ·
1 Parent(s): dea6eeb

Add README

Browse files
Files changed (1) hide show
  1. README.md +71 -25
README.md CHANGED
@@ -2,49 +2,95 @@
2
  configs:
3
  - config_name: amazonreviews2014_beauty
4
  data_files:
5
- - split: validation
6
- path: "data/amazonreviews2014_beauty/validation.jsonl"
7
  - split: test
8
- path: "data/amazonreviews2014_beauty/test.jsonl"
 
9
  - config_name: amazonreviews2014_sports_and_outdoors
10
  data_files:
11
- - split: validation
12
- path: "data/amazonreviews2014_sports_and_outdoors/validation.jsonl"
13
  - split: test
14
- path: "data/amazonreviews2014_sports_and_outdoors/test.jsonl"
 
15
  - config_name: amazonreviews2023_industrial_and_scientific
16
  data_files:
17
- - split: validation
18
- path: "data/amazonreviews2023_industrial_and_scientific/validation.jsonl"
19
  - split: test
20
- path: "data/amazonreviews2023_industrial_and_scientific/test.jsonl"
 
21
  - config_name: amazonreviews2023_musical_instruments
22
  data_files:
23
- - split: validation
24
- path: "data/amazonreviews2023_musical_instruments/validation.jsonl"
25
  - split: test
26
- path: "data/amazonreviews2023_musical_instruments/test.jsonl"
 
27
  - config_name: amazonreviews2023_office_products
28
  data_files:
29
- - split: validation
30
- path: "data/amazonreviews2023_office_products/validation.jsonl"
31
  - split: test
32
- path: "data/amazonreviews2023_office_products/test.jsonl"
 
33
  - config_name: steam
34
  data_files:
35
- - split: validation
36
- path: "data/steam/validation.jsonl"
37
  - split: test
38
- path: "data/steam/test.jsonl"
39
- - config_name: yelp_yelp_2020
 
40
  data_files:
41
- - split: validation
42
- path: "data/yelp_yelp_2020/validation.jsonl"
43
  - split: test
44
- path: "data/yelp_yelp_2020/test.jsonl"
45
  ---
46
 
47
- # MemGen annotation datasets
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
- This repo contains memorization/generalization annotations for multiple benchmarks.
50
- Each benchmark is a config (subset) selectable in the HF dataset dropdown.
 
 
 
 
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
+ ```