h2o64 commited on
Commit
ae39dd9
·
verified ·
1 Parent(s): 28f3e41

Write the dataset card of v2

Browse files
Files changed (1) hide show
  1. README.md +39 -130
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- license: cc-by-4.0
3
  pretty_name: samplingdb reference sets
4
  tags:
5
  - sampling
@@ -10,87 +10,19 @@ tags:
10
  - statistical-physics
11
  size_categories:
12
  - 100K<n<1M
13
- configs:
14
- - config_name: dw4
15
- data_files:
16
- - split: test
17
- path: viewer/dw4_6b739c6d.parquet
18
- - config_name: lj13
19
- data_files:
20
- - split: test
21
- path: viewer/lj13_6a0a72c4.parquet
22
- - config_name: lj55
23
- data_files:
24
- - split: test
25
- path: viewer/lj55_dc3f6b7e.parquet
26
- - config_name: seeds
27
- data_files:
28
- - split: test
29
- path: viewer/seeds_f9a50f20.parquet
30
- - config_name: brownian
31
- data_files:
32
- - split: test
33
- path: viewer/brownian_45794097.parquet
34
- - config_name: lgcp
35
- data_files:
36
- - split: test
37
- path: viewer/lgcp_cea6d9a6.parquet
38
- - config_name: lgcp-whitened
39
- data_files:
40
- - split: test
41
- path: viewer/lgcp-whitened_30e98363.parquet
42
- - config_name: breast-cancer
43
- data_files:
44
- - split: test
45
- path: viewer/breast-cancer_543f5f94.parquet
46
- - config_name: german-credit
47
- data_files:
48
- - split: test
49
- path: viewer/german-credit_3cfdf175.parquet
50
- - config_name: ionosphere
51
- data_files:
52
- - split: test
53
- path: viewer/ionosphere_d00109c3.parquet
54
- - config_name: sonar
55
- data_files:
56
- - split: test
57
- path: viewer/sonar_52aa10ef.parquet
58
- - config_name: trialanine
59
- data_files:
60
- - split: test
61
- path: viewer/aaa-T310_e0bfbee3.parquet
62
- - config_name: hexaalanine
63
- data_files:
64
- - split: test
65
- path: viewer/aaaaaa-T310_08d2d916.parquet
66
- - config_name: aldp
67
- data_files:
68
- - split: test
69
- path: viewer/ace-a-nme-T300_54968005.parquet
70
- - config_name: ala4
71
- data_files:
72
- - split: test
73
- path: viewer/ace-aaa-nme-T300_cda31701.parquet
74
- - config_name: ka-ternary-T0.32
75
- data_files:
76
- - split: test
77
- path: viewer/ka-ternary-N44-T0.32_d50e8a3f.parquet
78
- - config_name: ka-ternary-T1.0
79
- data_files:
80
- - split: test
81
- path: viewer/ka-ternary-N44-T1.0_c0f9b3b8.parquet
82
  ---
83
 
84
  # samplingdb reference sets
85
 
86
  Reference samples for the targets of [samplingdb](https://github.com/h2o64/samplingdb), a PyTorch
87
  library of unnormalised densities for benchmarking samplers. A sampler's output is scored against
88
- these sets. Each one comes from a long MCMC run on the target's own density, and was checked for
89
- convergence and independence before it was published here.
 
90
 
91
  You do not need to download anything by hand. samplingdb fetches a set the first time it is used,
92
- checks its sha256, and keeps it in its cache. To look at a set first, open the dataset viewer above
93
- and pick the target in the subset menu.
94
 
95
  ## Quick start
96
 
@@ -111,7 +43,7 @@ To fetch sets ahead of time, for example before a job on machines with no intern
111
  ```python
112
  import samplingdb
113
 
114
- samplingdb.download_references(['lj55', 'aldp']) # by catalog name
115
  samplingdb.download_references() # every published set, 3.1 GB
116
  ```
117
 
@@ -119,7 +51,7 @@ The cache is `~/.cache/samplingdb`, or the directory `SAMPLINGDB_CACHE` names. I
119
  this repo, so a copy of the repo is a ready cache:
120
 
121
  ```sh
122
- hf download h2o64/samplingdb --repo-type dataset --revision v1 --local-dir "$SAMPLINGDB_CACHE"
123
  ```
124
 
125
  Without samplingdb, every file is a plain NumPy array:
@@ -128,31 +60,10 @@ Without samplingdb, every file is a plain NumPy array:
128
  import numpy as np
129
  from huggingface_hub import hf_hub_download
130
 
131
- path = hf_hub_download('h2o64/samplingdb', 'pt/dw4_6b739c6d.npy', repo_type='dataset', revision='v1')
132
  x = np.load(path) # (n_samples, dim)
133
  ```
134
 
135
- ## Browsing, and loading with `datasets`
136
-
137
- Each set also has a Parquet copy in `viewer/`, which is what the dataset viewer shows: one subset
138
- per target, named as in `samplingdb.build`, with one row per sample. The column `x` is the sample
139
- and `log_prob` is the samplingdb target's unnormalised log density at it, whose histogram the viewer
140
- draws above the column. For the particle systems, the peptides and the glass, `log_prob` is minus
141
- the energy in units of kT, so its histogram is the energy distribution, mirrored.
142
-
143
- The same files load with the `datasets` library, under the split `test`:
144
-
145
- ```python
146
- from datasets import load_dataset
147
-
148
- lj55 = load_dataset('h2o64/samplingdb', 'lj55', split='test')
149
- rows = lj55.with_format('numpy')[:]
150
- x, log_prob = rows['x'], rows['log_prob'] # (100352, 165) and (100352,)
151
- ```
152
-
153
- The `.npy` files are what samplingdb reads and what the tag pins; the Parquet copies hold the same
154
- rows.
155
-
156
  ## Files
157
 
158
  Each row of an array is one sample, flattened, in the coordinates the samplingdb target's
@@ -161,9 +72,11 @@ Each row of an array is one sample, flattened, in the coordinates the samplingdb
161
  | Folder | Targets | Coordinates |
162
  | --- | --- | --- |
163
  | `pt/` | DW-4, LJ-13, LJ-55 | particle positions; samplingdb removes the centre of mass when it reads them |
 
164
  | `swapmc/` | ternary Kob-Andersen glass | particle positions in the periodic box, species in canonical order |
165
  | `md/` | peptides | atom positions in nanometres, in the atom order of the released PDB |
166
  | `stan/` | Bayesian posteriors | the unconstrained parameters, in samplingdb's order |
 
167
 
168
  A file is named `<folder>/<target name>_<spec_id>.npy`. The `spec_id` is a hash of the constants
169
  that define the density, so a set can never be read against a different density than the one it
@@ -172,28 +85,29 @@ the full generation protocol with its diagnostics, and the array's sha256.
172
 
173
  | File | `build` name | Samples | dim | dtype | Size | Independence |
174
  | --- | --- | --- | --- | --- | --- | --- |
175
- | `pt/dw4_6b739c6d.npy` | `dw4` | 102400 | 8 | float32 | 3.3 MB | 91% effective |
176
- | `pt/lj13_6a0a72c4.npy` | `lj13` | 102400 | 39 | float32 | 16.0 MB | 98% effective |
177
- | `pt/lj55_dc3f6b7e.npy` | `lj55` | 100352 | 165 | float32 | 66.2 MB | 100% effective |
 
178
  | `stan/seeds_f9a50f20.npy` | `seeds` | 100000 | 26 | float64 | 20.8 MB | bulk ESS 96% of the draws |
179
- | `stan/brownian_45794097.npy` | `brownian` | 100000 | 32 | float64 | 25.6 MB | bulk ESS 92% of the draws |
180
  | `stan/lgcp_cea6d9a6.npy` | `lgcp` | 100000 | 1600 | float64 | 1280.0 MB | bulk ESS 90% of the draws |
181
  | `stan/lgcp-whitened_30e98363.npy` | `lgcp-whitened` | 100000 | 1600 | float64 | 1280.0 MB | bulk ESS 98% of the draws |
182
  | `stan/breast-cancer_543f5f94.npy` | `breast-cancer` | 100000 | 31 | float64 | 24.8 MB | bulk ESS 102% of the draws |
183
  | `stan/german-credit_3cfdf175.npy` | `german-credit` | 100000 | 25 | float64 | 20.0 MB | bulk ESS 110% of the draws |
184
  | `stan/ionosphere_d00109c3.npy` | `ionosphere` | 100000 | 35 | float64 | 28.0 MB | bulk ESS 96% of the draws |
185
  | `stan/sonar_52aa10ef.npy` | `sonar` | 100000 | 61 | float64 | 48.8 MB | bulk ESS 108% of the draws |
186
- | `md/aaa-T310_e0bfbee3.npy` | `trialanine` | 100000 | 99 | float32 | 39.6 MB | 92% effective |
187
- | `md/aaaaaa-T310_08d2d916.npy` | `hexaalanine` | 100005 | 189 | float32 | 75.6 MB | 98% effective |
188
- | `md/ace-a-nme-T300_54968005.npy` | `aldp` | 100000 | 66 | float32 | 26.4 MB | 96% effective |
189
- | `md/ace-aaa-nme-T300_cda31701.npy` | `ala4` | 100000 | 126 | float32 | 50.4 MB | 94% effective |
190
- | `swapmc/ka-ternary-N44-T0.32_d50e8a3f.npy` | `ka-ternary-T0.32` | 105600 | 88 | float32 | 37.2 MB | 20 relaxation times apart |
191
- | `swapmc/ka-ternary-N44-T1.0_c0f9b3b8.npy` | `ka-ternary-T1.0` | 102400 | 88 | float32 | 36.0 MB | 20 relaxation times apart |
192
 
193
  Independence is the effective sample size as a fraction of the rows: measured on the stored chains
194
- for the tempered runs, and Stan's smallest bulk ESS for the posteriors, which exceeds 100% where
195
- successive NUTS draws are anticorrelated. For the glass it is the spacing between stored
196
- configurations of one chain, in structural relaxation times.
197
 
198
  The rows are interleaved across chains, so the first `n` rows of a file span every chain of the run
199
  that produced it, and `test_samples(n=...)` can read a prefix.
@@ -205,35 +119,28 @@ documents each protocol and its acceptance checks in `docs/reference-sets.md`.
205
 
206
  | Folder | Sampler | Checked before writing |
207
  | --- | --- | --- |
208
- | `pt/` | non-reversible parallel tempering with HMC moves | every chain makes 10 round trips and every pair of adjacent levels accepts at least 5% of its swaps; the merged set is at least 90% independent, with no drift from its start |
209
- | `md/` | replica-exchange molecular dynamics with solute tempering, BAOAB at 1 fs | every replica makes a round trip and every pair of adjacent levels accepts at least 5% of its swaps; the merged set is at least 90% independent on the pair distances and backbone torsions, with no drift from its start |
210
- | `swapmc/` | swap Monte Carlo: 100 relaxation times of equilibration, then one configuration every 20 | consecutive configurations of a chain have decorrelated, and the specific heat agrees between the two halves of the run |
211
  | `stan/` | Stan's NUTS, on models written in samplingdb's own coordinates | Stan's log density equals samplingdb's to 1e-9; R-hat below 1.01, bulk ESS above 90% of the draws, no divergences |
212
-
213
- ## Not published yet
214
-
215
- Two catalogued targets have no set in this release. A later release will add them under a new tag.
216
-
217
- - `ka-binary-T0.2`, the binary Kob-Andersen glass of Cheng et al. 2026. Its parallel-tempering
218
- replicas that crystallise stay trapped at intermediate temperatures, and the set generated so far
219
- is not stationary.
220
- - `chignolin`. Its folding equilibrium is expensive to sample, and the planned 10 000-structure
221
- set has not been run yet.
222
 
223
  ## Versions
224
 
225
- samplingdb pins one tag of this repo and the sha256 of every file it reads. A release adds files
226
- under a new tag and never replaces a published one, so every samplingdb version keeps reading the
227
- exact bytes it was tested against. A density change gets a new `spec_id`, and therefore a new file.
 
228
 
229
  | Tag | Contents |
230
  | --- | --- |
231
- | `v1` | the 17 sets above |
 
232
 
233
  ## License and attribution
234
 
235
- The samples are released under CC BY 4.0. They are draws from densities that others defined, so
236
- please also credit the sources of the densities you use:
237
 
238
  - DW-4, LJ-13 and LJ-55: the potentials of Köhler et al. 2020, as implemented in bgflow.
239
  - The logistic regressions: the Ionosphere, Sonar, Statlog (German Credit) and Breast Cancer
@@ -244,3 +151,5 @@ please also credit the sources of the densities you use:
244
  Amber ff99SB-ILDN and ff14SB force fields and OBC implicit solvent, evaluated with OpenMM.
245
  - The ternary glass: the swap-friendly Kob-Andersen mixture of Jung et al. 2023, after Kob and
246
  Andersen 1995.
 
 
 
1
  ---
2
+ license: mit
3
  pretty_name: samplingdb reference sets
4
  tags:
5
  - sampling
 
10
  - statistical-physics
11
  size_categories:
12
  - 100K<n<1M
13
+ viewer: false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  ---
15
 
16
  # samplingdb reference sets
17
 
18
  Reference samples for the targets of [samplingdb](https://github.com/h2o64/samplingdb), a PyTorch
19
  library of unnormalised densities for benchmarking samplers. A sampler's output is scored against
20
+ these sets. Each one comes from a long Markov chain run on the target's own density (MCMC, or
21
+ replica-exchange molecular dynamics for the peptides), or from an exact sampler where the posterior
22
+ allows one, and passed the convergence and independence checks below before it was published here.
23
 
24
  You do not need to download anything by hand. samplingdb fetches a set the first time it is used,
25
+ checks its sha256, and keeps it in its cache.
 
26
 
27
  ## Quick start
28
 
 
43
  ```python
44
  import samplingdb
45
 
46
+ samplingdb.download_references(['lj55', 'ace-a-nme-T300']) # by catalog name
47
  samplingdb.download_references() # every published set, 3.1 GB
48
  ```
49
 
 
51
  this repo, so a copy of the repo is a ready cache:
52
 
53
  ```sh
54
+ hf download h2o64/samplingdb --repo-type dataset --revision v2 --local-dir "$SAMPLINGDB_CACHE"
55
  ```
56
 
57
  Without samplingdb, every file is a plain NumPy array:
 
60
  import numpy as np
61
  from huggingface_hub import hf_hub_download
62
 
63
+ path = hf_hub_download('h2o64/samplingdb', 'pt/dw4_d9994289.npy', repo_type='dataset', revision='v2')
64
  x = np.load(path) # (n_samples, dim)
65
  ```
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  ## Files
68
 
69
  Each row of an array is one sample, flattened, in the coordinates the samplingdb target's
 
72
  | Folder | Targets | Coordinates |
73
  | --- | --- | --- |
74
  | `pt/` | DW-4, LJ-13, LJ-55 | particle positions; samplingdb removes the centre of mass when it reads them |
75
+ | `pt/` | binary Kob-Andersen glass | particle positions in the periodic box, species in canonical order |
76
  | `swapmc/` | ternary Kob-Andersen glass | particle positions in the periodic box, species in canonical order |
77
  | `md/` | peptides | atom positions in nanometres, in the atom order of the released PDB |
78
  | `stan/` | Bayesian posteriors | the unconstrained parameters, in samplingdb's order |
79
+ | `exact/` | the Brownian motion posterior | the unconstrained parameters, in samplingdb's order |
80
 
81
  A file is named `<folder>/<target name>_<spec_id>.npy`. The `spec_id` is a hash of the constants
82
  that define the density, so a set can never be read against a different density than the one it
 
85
 
86
  | File | `build` name | Samples | dim | dtype | Size | Independence |
87
  | --- | --- | --- | --- | --- | --- | --- |
88
+ | `pt/dw4_d9994289.npy` | `dw4` | 102400 | 8 | float32 | 3.3 MB | 91% effective |
89
+ | `pt/lj13_bd3bc3a0.npy` | `lj13` | 102400 | 39 | float32 | 16.0 MB | 98% effective |
90
+ | `pt/lj55_01c56181.npy` | `lj55` | 100352 | 165 | float32 | 66.2 MB | 100% effective |
91
+ | `pt/ka-binary-N64-T0.2_e60ecba4.npy` | `ka-binary-N64-T0.2` | 30720 | 128 | float32 | 15.7 MB | 91% effective |
92
  | `stan/seeds_f9a50f20.npy` | `seeds` | 100000 | 26 | float64 | 20.8 MB | bulk ESS 96% of the draws |
93
+ | `exact/brownian_45794097.npy` | `brownian` | 100000 | 32 | float64 | 25.6 MB | exact independent draws |
94
  | `stan/lgcp_cea6d9a6.npy` | `lgcp` | 100000 | 1600 | float64 | 1280.0 MB | bulk ESS 90% of the draws |
95
  | `stan/lgcp-whitened_30e98363.npy` | `lgcp-whitened` | 100000 | 1600 | float64 | 1280.0 MB | bulk ESS 98% of the draws |
96
  | `stan/breast-cancer_543f5f94.npy` | `breast-cancer` | 100000 | 31 | float64 | 24.8 MB | bulk ESS 102% of the draws |
97
  | `stan/german-credit_3cfdf175.npy` | `german-credit` | 100000 | 25 | float64 | 20.0 MB | bulk ESS 110% of the draws |
98
  | `stan/ionosphere_d00109c3.npy` | `ionosphere` | 100000 | 35 | float64 | 28.0 MB | bulk ESS 96% of the draws |
99
  | `stan/sonar_52aa10ef.npy` | `sonar` | 100000 | 61 | float64 | 48.8 MB | bulk ESS 108% of the draws |
100
+ | `md/aaa-T310_e0bfbee3.npy` | `aaa-T310` | 100000 | 99 | float32 | 39.6 MB | 92% effective |
101
+ | `md/aaaaaa-T310_08d2d916.npy` | `aaaaaa-T310` | 100005 | 189 | float32 | 75.6 MB | 98% effective |
102
+ | `md/ace-a-nme-T300_54968005.npy` | `ace-a-nme-T300` | 100000 | 66 | float32 | 26.4 MB | 96% effective |
103
+ | `md/ace-aaa-nme-T300_cda31701.npy` | `ace-aaa-nme-T300` | 100000 | 126 | float32 | 50.4 MB | 94% effective |
104
+ | `swapmc/ka-ternary-N44-T0.32_d50e8a3f.npy` | `ka-ternary-N44-T0.32` | 131072 | 88 | float32 | 46.1 MB | 93% effective |
105
+ | `swapmc/ka-ternary-N44-T1.0_c0f9b3b8.npy` | `ka-ternary-N44-T1.0` | 163840 | 88 | float32 | 57.7 MB | 92% effective |
106
 
107
  Independence is the effective sample size as a fraction of the rows: measured on the stored chains
108
+ for the tempered runs and the glass, and Stan's smallest bulk ESS for the posteriors, which exceeds
109
+ 100% where successive NUTS draws are anticorrelated. The exact draws are independent by
110
+ construction.
111
 
112
  The rows are interleaved across chains, so the first `n` rows of a file span every chain of the run
113
  that produced it, and `test_samples(n=...)` can read a prefix.
 
119
 
120
  | Folder | Sampler | Checked before writing |
121
  | --- | --- | --- |
122
+ | `pt/` | non-reversible parallel tempering with HMC moves | every chain makes 10 round trips and every pair of adjacent levels accepts at least 5% of its swaps; the set is at least 90% independent; the binary glass, merged from shards, also shows no drift from its start, and its chains started from deep configurations and from a melt agree within 4 standard errors |
123
+ | `md/` | replica-exchange molecular dynamics with solute tempering, BAOAB at 1 fs | every replica makes a round trip and every pair of adjacent levels accepts at least 5% of its swaps; each shard's energy agrees between the two halves of its run within 5 standard errors; the merged set is at least 90% independent on the pair distances and backbone torsions. The integrator is unadjusted: at 1 fs it puts Ace-A-Nme's mean energy about 0.1 kT above the zero-timestep limit |
124
+ | `swapmc/` | swap Monte Carlo on the GPU, 16 384 chains started from equilibrated configurations and stored at a fixed spacing | the merged set is at least 90% independent on the energy and the pair distances, with no drift from its start, and the specific heat agrees between the two halves of the run |
125
  | `stan/` | Stan's NUTS, on models written in samplingdb's own coordinates | Stan's log density equals samplingdb's to 1e-9; R-hat below 1.01, bulk ESS above 90% of the draws, no divergences |
126
+ | `exact/` | rejection sampling of the two log scales from their priors against the bounded marginal likelihood, then the locations from their exact Gaussian conditional | the factorised density equals samplingdb's up to a constant, to 1e-8 across 1000 random points; every proposal stays below the bound |
 
 
 
 
 
 
 
 
 
127
 
128
  ## Versions
129
 
130
+ samplingdb pins one tag of this repo and the sha256 of every file it reads, so every samplingdb
131
+ version keeps reading the exact bytes it was tested against. A density change gets a new
132
+ `spec_id`, and therefore a new file. A set regenerated for the same density keeps its file name and
133
+ changes its bytes under a new tag; samplingdb refuses a cached copy from another tag.
134
 
135
  | Tag | Contents |
136
  | --- | --- |
137
+ | `v1` | 17 sets |
138
+ | `v2` | the Brownian posterior from an exact sampler, under `exact/` in place of `stan/`; both ternary glass sets regenerated on the GPU; the three particle sets, unchanged, under new names, since the particle count joined their `spec_id`; the binary Kob-Andersen glass at T = 0.2, published for the first time; every set under the MIT License, in place of CC BY 4.0 |
139
 
140
  ## License and attribution
141
 
142
+ The samples are released under the MIT License, like samplingdb. They are draws from densities
143
+ that others defined, so please also credit the sources of the densities you use:
144
 
145
  - DW-4, LJ-13 and LJ-55: the potentials of Köhler et al. 2020, as implemented in bgflow.
146
  - The logistic regressions: the Ionosphere, Sonar, Statlog (German Credit) and Breast Cancer
 
151
  Amber ff99SB-ILDN and ff14SB force fields and OBC implicit solvent, evaluated with OpenMM.
152
  - The ternary glass: the swap-friendly Kob-Andersen mixture of Jung et al. 2023, after Kob and
153
  Andersen 1995.
154
+ - The binary glass: the two-dimensional 80:20 Kob-Andersen mixture of Cheng et al. 2026, after Kob
155
+ and Andersen 1995.