johnpolat commited on
Commit
304a4bc
·
verified ·
1 Parent(s): a245eb4

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +89 -26
README.md CHANGED
@@ -14,41 +14,42 @@ tags:
14
  - benchmark
15
  - kdd-2026
16
  - nanoparticles
 
 
 
 
 
 
 
 
 
17
  ---
18
 
19
  # RADII: Radius-Resolved Benchmark of Nanoparticle Structures
20
 
21
- **RADII** measures where graph generative models start to fail as the structures they
22
- generate grow larger. Radius is treated as a continuous scaling knob from
23
- in-distribution to out-of-distribution; the dataset spans ten materials and 25 radii
24
- with leakage-free splits.
25
 
26
  - **Paper:** *How Far Can You Grow? Characterizing the Extrapolation Frontier of Graph Generative Models for Materials Science* — KDD '26
27
- - **Code:** [github.com/KurbanIntelligenceLab/RADII](https://github.com/KurbanIntelligenceLab/RADII) (MIT)
28
  - **Archival DOI:** [10.5281/zenodo.20431021](https://doi.org/10.5281/zenodo.20431021) (CC-BY-4.0)
29
 
30
  ## Quick start
31
 
32
- This dataset uses a custom loader that downloads the seed (3 MB) from Zenodo
33
- and regenerates the full ~12 GB benchmark locally on first use. **First call
34
- takes minutes to ~1 hour depending on hardware; subsequent calls are instant.**
35
-
36
  ```bash
37
- pip install datasets "radii @ git+https://github.com/KurbanIntelligenceLab/RADII"
38
  ```
39
 
40
  ```python
41
  from datasets import load_dataset
42
 
43
- ds = load_dataset("KurbanIntelligenceLab/RADII", split="train", trust_remote_code=True)
44
- print(ds.features, len(ds), ds[0])
45
  ```
46
 
47
- `with_format("torch")` works for one-line PyTorch integration:
48
-
49
- ```python
50
- ds = ds.with_format("torch")
51
- ```
52
 
53
  ## Splits
54
 
@@ -58,8 +59,8 @@ ds = ds.with_format("torch")
58
  | `id_test` | 13,500 | 6 values: 11, 13, 15, 17, 19, 21 (interleaved, unseen orientations) |
59
  | `ood_test` | 13,480 | 4 values: 6, 7, 29, 30 (strictly outside training range) |
60
 
61
- The OOD test structures are ~59% smaller and ~24% larger than the smallest and largest
62
- training structures (atom counts 33–11,298 vs train 81–9,148).
63
 
64
  ## Materials (10)
65
 
@@ -80,13 +81,75 @@ Ag, Au, CH₃NH₃PbI₃, Fe₂O₃, MoS₂, PbS, SnO₂, SrTiO₃, TiO₂, ZnO.
80
  | `cell_pos` | list[list[float32]] | Unit-cell basis positions (per-material) |
81
  | `cell_z` | list[int8] | Unit-cell basis atomic numbers |
82
 
83
- ## Why a custom loader?
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
- The benchmark is deterministic from a 3 MB seed archive. Rather than duplicating
86
- ~12 GB of derived data on this Hub, the loader fetches the seed from the citeable
87
- Zenodo record and regenerates locally — keeping a single source of truth and
88
- making the reproducibility story explicit. The HF datasets cache makes subsequent
89
- calls fast.
90
 
91
  ## Citation
92
 
@@ -102,4 +165,4 @@ calls fast.
102
  ## License
103
 
104
  CC-BY-4.0. See [10.5281/zenodo.20431021](https://doi.org/10.5281/zenodo.20431021)
105
- for the archival record terms. The accompanying code is MIT-licensed at the GitHub repo.
 
14
  - benchmark
15
  - kdd-2026
16
  - nanoparticles
17
+ configs:
18
+ - config_name: default
19
+ data_files:
20
+ - split: train
21
+ path: train.parquet
22
+ - split: id_test
23
+ path: id_test.parquet
24
+ - split: ood_test
25
+ path: ood_test.parquet
26
  ---
27
 
28
  # RADII: Radius-Resolved Benchmark of Nanoparticle Structures
29
 
30
+ **RADII** measures where graph generative models start to fail as the structures
31
+ they generate grow larger. Radius is treated as a continuous scaling knob from
32
+ in-distribution to out-of-distribution; the dataset spans 10 materials and 25
33
+ radii with leakage-free splits.
34
 
35
  - **Paper:** *How Far Can You Grow? Characterizing the Extrapolation Frontier of Graph Generative Models for Materials Science* — KDD '26
36
+ - **Code (models, trainer, generation pipeline):** [github.com/KurbanIntelligenceLab/RADII](https://github.com/KurbanIntelligenceLab/RADII) (MIT)
37
  - **Archival DOI:** [10.5281/zenodo.20431021](https://doi.org/10.5281/zenodo.20431021) (CC-BY-4.0)
38
 
39
  ## Quick start
40
 
 
 
 
 
41
  ```bash
42
+ pip install datasets
43
  ```
44
 
45
  ```python
46
  from datasets import load_dataset
47
 
48
+ ds = load_dataset("KurbanIntelligenceLab/RADII", split="train").with_format("torch")
49
+ print(ds.features, len(ds), ds[0]["material"], ds[0]["num_atoms"])
50
  ```
51
 
52
+ That's it — no `trust_remote_code`, no Zenodo download, no regeneration.
 
 
 
 
53
 
54
  ## Splits
55
 
 
59
  | `id_test` | 13,500 | 6 values: 11, 13, 15, 17, 19, 21 (interleaved, unseen orientations) |
60
  | `ood_test` | 13,480 | 4 values: 6, 7, 29, 30 (strictly outside training range) |
61
 
62
+ OOD test structures are ~59% smaller and ~24% larger than the smallest and
63
+ largest training structures (atom counts 33–11,298 vs train 81–9,148).
64
 
65
  ## Materials (10)
66
 
 
81
  | `cell_pos` | list[list[float32]] | Unit-cell basis positions (per-material) |
82
  | `cell_z` | list[int8] | Unit-cell basis atomic numbers |
83
 
84
+ ## Analysis recipes (per-radius, per-material, cross-split)
85
+
86
+ The metadata columns are first-class, so slicing and grouping are one-liners:
87
+
88
+ ```python
89
+ from datasets import load_dataset
90
+
91
+ # All three splits at once
92
+ ds_all = load_dataset("KurbanIntelligenceLab/RADII")
93
+
94
+ # Per-radius slice — every train sample at R=12
95
+ r12 = ds_all["train"].filter(lambda x: x["radius"] == 12)
96
+
97
+ # Per-material grouping
98
+ materials = ds_all["train"].unique("material") # ['Ag', 'Au', ...]
99
+ ag_ood = ds_all["ood_test"].filter(lambda x: x["material"] == "Ag")
100
+
101
+ # Cross-split: atom counts by radius
102
+ import pandas as pd
103
+ for split in ("train", "id_test", "ood_test"):
104
+ df = ds_all[split].select_columns(["radius", "num_atoms"]).to_pandas()
105
+ print(split, df.groupby("radius")["num_atoms"].agg(["mean", "min", "max"]))
106
+
107
+ # Atom-count envelope check (replicates the paper's 59% / 24% statistic)
108
+ train_min, train_max = ds_all["train"]["num_atoms"], ds_all["train"]["num_atoms"]
109
+ print("train atom-count range:", min(train_min), "to", max(train_max))
110
+ print("OOD atom-count range:", min(ds_all["ood_test"]["num_atoms"]),
111
+ "to", max(ds_all["ood_test"]["num_atoms"]))
112
+ ```
113
+
114
+ ## PyTorch collate (variable-length `pos`/`z`)
115
+
116
+ ```python
117
+ import torch
118
+ from torch.utils.data import DataLoader
119
+
120
+ def collate(batch):
121
+ return {
122
+ "pos": [torch.as_tensor(b["pos"]) for b in batch],
123
+ "z": [torch.as_tensor(b["z"]) for b in batch],
124
+ "cell_matrix": torch.stack([torch.as_tensor(b["cell_matrix"]) for b in batch]),
125
+ "material": [b["material"] for b in batch],
126
+ "radius": torch.tensor([b["radius"] for b in batch]),
127
+ }
128
+
129
+ loader = DataLoader(ds, batch_size=32, shuffle=True, collate_fn=collate)
130
+ ```
131
+
132
+ For PyTorch Geometric, the `pos`/`z` lists drop straight into
133
+ `torch_geometric.data.Batch.from_data_list(...)`.
134
+
135
+ ## Models
136
+
137
+ The 5 baselines from the paper (ADiT, CDVAE, DiffCSP, FlowMM, MatterGen) live
138
+ in the GitHub repo's `radii.models` namespace and follow the standard
139
+ HuggingFace model interface (`PyTorchModelHubMixin`):
140
+
141
+ ```python
142
+ from radii.models import ADiTUnitCell
143
+ from radii.train_config import ModelConfig
144
+
145
+ m = ADiTUnitCell(**ModelConfig.ADiT.to_dict())
146
+ m.save_pretrained("./my_adit")
147
+ m2 = ADiTUnitCell.from_pretrained("./my_adit")
148
+ # m.push_to_hub("my-username/my-radii-adit") also works
149
+ ```
150
 
151
+ See the GitHub README for training (`python -m radii.train --model adit`) and
152
+ override flags (`--epochs`, `--lr`, `--from-checkpoint`, `--eval-only`).
 
 
 
153
 
154
  ## Citation
155
 
 
165
  ## License
166
 
167
  CC-BY-4.0. See [10.5281/zenodo.20431021](https://doi.org/10.5281/zenodo.20431021)
168
+ for the archival record terms. Accompanying code is MIT-licensed at the GitHub repo.