Alex6657 commited on
Commit
069ee18
·
verified ·
1 Parent(s): d9ba1f2

Add MAGE datasets with original features and interaction splits

Browse files
README.md ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: MAGE multimodal recommendation datasets
3
+ language:
4
+ - en
5
+ tags:
6
+ - recommendation
7
+ - multimodal
8
+ - graph-learning
9
+ - arxiv:2610.37409
10
+ configs:
11
+ - config_name: baby
12
+ default: true
13
+ data_files:
14
+ - split: train
15
+ path: data/baby/train.parquet
16
+ - split: validation
17
+ path: data/baby/validation.parquet
18
+ - split: test
19
+ path: data/baby/test.parquet
20
+ - config_name: sports
21
+ data_files:
22
+ - split: train
23
+ path: data/sports/train.parquet
24
+ - split: validation
25
+ path: data/sports/validation.parquet
26
+ - split: test
27
+ path: data/sports/test.parquet
28
+ - config_name: clothing
29
+ data_files:
30
+ - split: train
31
+ path: data/clothing/train.parquet
32
+ - split: validation
33
+ path: data/clothing/validation.parquet
34
+ - split: test
35
+ path: data/clothing/test.parquet
36
+ - config_name: elec
37
+ data_files:
38
+ - split: train
39
+ path: data/elec/train.parquet
40
+ - split: validation
41
+ path: data/elec/validation.parquet
42
+ - split: test
43
+ path: data/elec/test.parquet
44
+ ---
45
+
46
+ # MAGE datasets
47
+
48
+ Prepared Baby, Sports, Clothing, and Electronics datasets for **Can Complementary Signals Bridge Similarity Islands? Manifold-Augmented Graph Embedding for Multimodal Recommendation**.
49
+
50
+ - [Paper](https://arxiv.org/abs/2610.37409)
51
+ - [Code and training instructions](https://github.com/Alex-bupt/mage)
52
+ - [Input format](https://github.com/Alex-bupt/mage/blob/main/docs/DATA_FORMAT.md)
53
+
54
+ The release contains fixed interaction splits, item and user ID mappings, visual and text feature matrices, an expanded text-feature catalog, and offline relation graphs. It provides numeric features rather than raw images or review text. These prepared Amazon-category benchmarks build on the data used by [GUME](https://github.com/Alex-bupt/mage/blob/main/docs/upstream/GUME_README.md) and MMRec.
55
+
56
+ ## Contents
57
+
58
+ `archive/MAGE_datasets_2026-10-08.zip` is an unchanged mirror of the prepared dataset archive previously distributed through Google Drive. Extract it with a ZIP64-compatible utility to obtain:
59
+
60
+ ```text
61
+ MAGE_datasets/
62
+ baby/
63
+ sports/
64
+ clothing/
65
+ elec/
66
+ README.txt
67
+ SHA256SUMS.txt
68
+ ```
69
+
70
+ Electronics uses `elec` as its directory and dataset name in the code.
71
+
72
+ | Dataset | Recommendation items | Expanded text rows | Stage-1 `--seed-max` |
73
+ | --- | ---: | ---: | ---: |
74
+ | Baby | 7,050 | 71,317 | 7,049 |
75
+ | Sports | 18,357 | 77,832 | 18,356 |
76
+ | Clothing | 23,033 | 84,695 | 23,032 |
77
+ | Electronics | 63,001 | 498,196 | 63,000 |
78
+
79
+ Each dataset directory includes:
80
+
81
+ | File | Contents |
82
+ | --- | --- |
83
+ | `<dataset>.inter` | Original interaction table and split labels |
84
+ | `<dataset>_hard_eval.inter` | Same training/validation rows, with a restricted hard test subset |
85
+ | `i_id_mapping.csv`, `u_id_mapping.csv` | Original catalog/user identifiers and zero-based model IDs |
86
+ | `image_feat.npy` | Aligned visual features, `(items, 4096)`, float64 |
87
+ | `text_feat.npy` | Augmented text features, `(items, 512)`, float32 |
88
+ | `text_feat_raw.npy` | Unmodified recommendation-item text features |
89
+ | `text_feat_full.npy`, `i_id_mapping_full.csv` | Expanded text catalog and aligned item mapping |
90
+ | `related_by_id.json` | Relations over the expanded item IDs |
91
+ | `p2b_map_filtered.json` | Complementary edges between recommendation items |
92
+ | `offline_manifest.json` | Preparation settings, shapes and feature hashes |
93
+
94
+ The `.inter` files and the mapping `.csv` files are **tab-separated**. Interaction columns are `userID`, `itemID`, `rating`, `timestamp`, and `x_label`. The split labels are `0` = training, `1` = validation, and `2` = test. Keep the supplied IDs, row order and splits unchanged. The user mapping retains the original benchmark's pseudonymous user identifiers.
95
+
96
+ ## Explore interaction splits
97
+
98
+ The Parquet files under `data/` expose the original interaction table as four Hugging Face configurations: `baby`, `sports`, `clothing`, and `elec`. Each retains the five source columns and separates rows according to the existing `x_label`; no split is resampled. These tables also power the dataset viewer.
99
+
100
+ ```python
101
+ from datasets import load_dataset
102
+
103
+ dataset = load_dataset("Alex6657/MAGE", "baby")
104
+ print(dataset["train"][0])
105
+ ```
106
+
107
+ | Configuration | Users | Training rows | Validation rows | Test rows |
108
+ | --- | ---: | ---: | ---: | ---: |
109
+ | `baby` | 19,445 | 118,551 | 20,559 | 21,682 |
110
+ | `sports` | 35,598 | 218,409 | 37,899 | 40,029 |
111
+ | `clothing` | 39,387 | 197,338 | 40,150 | 41,189 |
112
+ | `elec` | 192,403 | 1,304,382 | 192,403 | 192,403 |
113
+
114
+ The Parquet configurations contain interactions only. Download the archive for feature matrices, mappings, graphs and the separate hard-test files needed for the full MAGE workflow.
115
+
116
+ ## Download the training data
117
+
118
+ ```python
119
+ from huggingface_hub import hf_hub_download
120
+
121
+ archive = hf_hub_download(
122
+ repo_id="Alex6657/MAGE",
123
+ repo_type="dataset",
124
+ filename="archive/MAGE_datasets_2026-10-08.zip",
125
+ )
126
+ print(archive)
127
+ ```
128
+
129
+ The archive is **1,882,496,634 bytes**. SHA-256:
130
+
131
+ ```text
132
+ 8412c252d01efbcadc48101b3d3634191318e554d11219a93119b6253fb0651a
133
+ ```
134
+
135
+ The extracted archive contains `SHA256SUMS.txt` for its files. From `MAGE_datasets/`, verify it with `sha256sum -c SHA256SUMS.txt` where available.
136
+
137
+ ## Prepare text features for training
138
+
139
+ The archived `text_feat.npy` files use Stage-1 gap retention **0.60**. The current Baby, Sports and Clothing configurations in the code repository use **0.20**, **0.40** and **0.40**, respectively. For those configurations, regenerate `text_feat.npy` from `text_feat_full.npy` using the repository's Stage-1 commands before training. Preserve the original files and use a fresh working directory without graph caches.
140
+
141
+ `--seed-max` is the inclusive last recommendation item ID. Expanded text rows supply neighbor features and must not be passed directly as the Stage-2 training feature matrix. The first recommendation-item rows of the expanded mapping must match the seed mapping. All text embeddings have 512 columns; visual features have 4096 columns.
142
+
143
+ Electronics has 480 zero visual-feature rows, representing missing visual signal.
144
+
145
+ ## Use and attribution
146
+
147
+ These files are intended for research on multimodal recommendation. Preserve the original benchmark attribution and applicable third-party terms. This mirror does not grant additional rights to the underlying datasets. The code repository retains its [upstream references and notices](https://github.com/Alex-bupt/mage/blob/main/docs/upstream/GUME_README.md).
148
+
149
+ Please cite the [MAGE paper](https://arxiv.org/abs/2610.37409) when using the prepared features and graphs, together with the relevant original data and method sources.
archive/MAGE_datasets_2026-10-08.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8412c252d01efbcadc48101b3d3634191318e554d11219a93119b6253fb0651a
3
+ size 1882496634
archive/MAGE_datasets_2026-10-08.zip.sha256 ADDED
@@ -0,0 +1 @@
 
 
1
+ 8412c252d01efbcadc48101b3d3634191318e554d11219a93119b6253fb0651a MAGE_datasets_2026-10-08.zip
archive/README.txt ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MAGE prepared datasets (2026-10-08)
2
+ Source code: https://github.com/Alex-bupt/mage
3
+ Validated code revision: 7434e84212155dc9b954a1ed171b65c8bfcc2d2d
4
+
5
+ Extract the ZIP using a ZIP64-compatible utility. MAGE_datasets/ is the data
6
+ root containing baby/, sports/, clothing/ and elec/. From the code repository:
7
+ python main/src/main.py --model mage --dataset clothing --config main/src/configs/experiments/clothing_local.yaml --data-path /absolute/path/to/MAGE_datasets
8
+
9
+ Each dataset includes:
10
+ <name>.inter: original training/validation/test split
11
+ <name>_hard_eval.inter: same training/validation rows, restricted hard test set
12
+ i_id_mapping.csv, u_id_mapping.csv: recommendation item and user mappings
13
+ image_feat.npy: aligned visual features (N x 4096, float64)
14
+ text_feat.npy: enhanced training text features (N x 512, float32)
15
+ text_feat_raw.npy: unmodified seed text features for baseline analysis
16
+ text_feat_full.npy: expanded text catalog, including offline neighbor items
17
+ i_id_mapping_full.csv: expanded catalog item mapping
18
+ related_by_id.json: expanded-ID offline relation graph
19
+ p2b_map_filtered.json: seed-ID online complementary graph
20
+ offline_manifest.json: algorithm parameters and feature provenance
21
+
22
+ Dataset Seed items Expanded text rows --seed-max
23
+ baby 7050 71317 7049
24
+ sports 18357 77832 18356
25
+ clothing 23033 84695 23032
26
+ elec 63001 498196 63000
27
+
28
+ The training text features are already augmented. To regenerate Clothing:
29
+ python stage1_process.py --emb-path /absolute/path/to/MAGE_datasets/clothing/text_feat_full.npy --related-path /absolute/path/to/MAGE_datasets/clothing/related_by_id.json --out-path /absolute/path/to/MAGE_datasets/clothing/text_feat.npy --seed-max 23032
30
+ Use the matching last seed ID from the table for other datasets. Do not use
31
+ expanded text features directly as the training feature matrix.
32
+
33
+ Shared offline parameters: STRONG_PERCENTILE=95, WEAK_PERCENTILE=45,
34
+ WEAK_SIM_MIN=0.20, CONCEPTOR_APERTURE=12, GAP_KEEP_RATIO=0.60,
35
+ MARGIN_EPS=1e-8; fixed ALPHA_HARD_CAP=0.35. The code applies WEAK_SIM_MIN
36
+ as a hard similarity floor; its inherited soft-weighting comment is stale.
37
+
38
+ Validation: mappings, feature row alignment, finite values, split membership
39
+ and hard-test subset consistency were checked. All four datasets completed
40
+ one CPU epoch plus validation/test on real 32-user subsets with reduced model
41
+ dimensions. This does not establish full-dataset convergence or paper metrics.
42
+ Electronics contains 480 zero visual-feature rows; normalization guards handle
43
+ these missing visual signals. No synthetic test data or model caches are included.
44
+
45
+ SHA256SUMS.txt covers every other file in the extracted MAGE_datasets directory.
46
+ Run sha256sum -c SHA256SUMS.txt from that directory where available.
47
+ Keep IDs and row order unchanged. Clear/rebuild cached KNN graphs if features
48
+ are replaced. See repository docs/DATA_FORMAT.md for loader details and
49
+ docs/upstream/GUME_README.md for upstream attribution and academic-use notice.
50
+ This package grants no additional rights to underlying third-party datasets.
data/baby/test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:05c83d1a43c2a30b200768142446b0d13ac3d61abaa2b4856c4e19f1a31b51c8
3
+ size 156107
data/baby/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b7f1c25afc9cfdabbcc98e1a98323aadafcb6b3a9fd72960f45864e94f4bb15
3
+ size 571663
data/baby/validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:197fe34fd11b459b7904ee3925fe3a2867b910deb656d8f0a27757e7eb829265
3
+ size 149776
data/clothing/test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7fbf81b4e9fc62ad5c041cff9cec9403f3b2e0d72ea2712eef3e123820f4b441
3
+ size 309072
data/clothing/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f62ecbd7fd730714c0f9752cae53df8ca43355bfda2e393901e2538189e6771
3
+ size 864297
data/clothing/validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed59ffed5ce5a5ad447ff7be2ad80d5d116b0b430ec0c4cd601b52c629fd3114
3
+ size 303401
data/elec/test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b72b8235cb430b79368551b3bd5f488bfbac6acb32a640847b5b256cf444a906
3
+ size 1243759
data/elec/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:29371ff3b6a3fd475c9709e2be0eba35daedee0ca846892fe9c8c10cdfdde718
3
+ size 6306395
data/elec/validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:86df33d305f87aac83ae2ea5506134ef1c5e797f37cc5e2a20557a65a7b1dde5
3
+ size 1257543
data/sports/test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8438c202603cee709aec729ef3fa020d4cbdbd85e92b4728337d33daae08eb2
3
+ size 288249
data/sports/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c290dc9e7c71665467f153392fd113f6cd41d6c6ebedc94c4e4446df647779db
3
+ size 942004
data/sports/validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d2ce274a214d801d4c88d584d6f3a3e3d979c97130149a26724fe4de867c9ca1
3
+ size 276030
dataset_statistics.json ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "baby": {
3
+ "rows": 160792,
4
+ "users": 19445,
5
+ "items": 7050,
6
+ "splits": {
7
+ "train": 118551,
8
+ "validation": 20559,
9
+ "test": 21682
10
+ },
11
+ "source_member": "MAGE_datasets/baby/baby.inter",
12
+ "columns": {
13
+ "userID": "int64",
14
+ "itemID": "int64",
15
+ "rating": "float64",
16
+ "timestamp": "int64",
17
+ "x_label": "int64"
18
+ }
19
+ },
20
+ "sports": {
21
+ "rows": 296337,
22
+ "users": 35598,
23
+ "items": 18357,
24
+ "splits": {
25
+ "train": 218409,
26
+ "validation": 37899,
27
+ "test": 40029
28
+ },
29
+ "source_member": "MAGE_datasets/sports/sports.inter",
30
+ "columns": {
31
+ "userID": "int64",
32
+ "itemID": "int64",
33
+ "rating": "float64",
34
+ "timestamp": "int64",
35
+ "x_label": "int64"
36
+ }
37
+ },
38
+ "clothing": {
39
+ "rows": 278677,
40
+ "users": 39387,
41
+ "items": 23033,
42
+ "splits": {
43
+ "train": 197338,
44
+ "validation": 40150,
45
+ "test": 41189
46
+ },
47
+ "source_member": "MAGE_datasets/clothing/clothing.inter",
48
+ "columns": {
49
+ "userID": "int64",
50
+ "itemID": "int64",
51
+ "rating": "float64",
52
+ "timestamp": "int64",
53
+ "x_label": "int64"
54
+ }
55
+ },
56
+ "elec": {
57
+ "rows": 1689188,
58
+ "users": 192403,
59
+ "items": 63001,
60
+ "splits": {
61
+ "train": 1304382,
62
+ "validation": 192403,
63
+ "test": 192403
64
+ },
65
+ "source_member": "MAGE_datasets/elec/elec.inter",
66
+ "columns": {
67
+ "userID": "int64",
68
+ "itemID": "int64",
69
+ "rating": "float64",
70
+ "timestamp": "int64",
71
+ "x_label": "int64"
72
+ }
73
+ }
74
+ }