# VERIFY — verification record for ultrams_msnlib_benchmark_v1 Every number, ordering and overlap statement in this package was re-derived from the frozen protocol artifacts and checked against the CSV tables shipped here. No discrepancy was found. This file records **what was checked, how, and with which exact values**, including the checks that can only be performed against the original data-preparation-side artifacts. The package consists of two independent splits. Split-A-specific evidence (counts, cross-checks against the MSnLib original JSON `formula` fields, the repository voting table, and the read-only replay of all six split-A tables) is recorded in [`split_A_full_msnlib/VERIFY.md`](split_A_full_msnlib/VERIFY.md); this file summarises it and covers the split-B payload, the cross-split statistics, and the release integrity. ## 1. Environments | side | runtime | | --- | --- | | frozen split-B manifest producer / split-A table producer (isolated data-preparation environment, read-only) | Linux, Python 3.10.12, NumPy 2.2.6, h5py 3.16.0, RDKit 2026.03.5 | | this verification run (local) | macOS, Python 3.13.11, NumPy 2.4.4, pandas 3.0.3, RDKit 2026.03.3 | Access to the data-preparation environment was **read-only**: `MSnLib.csv` and small metadata files were streamed out; nothing was written or modified on the remote side. ## 2. Inputs actually used | input | identity | | --- | --- | | `MSnLib.csv` | 560,084 data rows, 560,085 physical lines (no embedded newlines), 752,707,651 bytes, SHA-256 `be54b33039cf18675751ea3c6354b592177c899a0cd5df303ae616330133ec07` | | frozen split-B manifest | `fig3h_manifest_strict_adduct_v4`, original SHA-256 `b83656b2b4d265d1d4ea49df30372e844e207863a7ab768f44f241bd68b8186e`; shipped copy redacted in one path field, SHA-256 `6129ed094df59265a684f436da146ef554d9c774e01768363bf58704f87ec237` | | frozen preprocessed spectra (not redistributed) | 110,091,598 bytes, SHA-256 `9296d42e060e7019604e16b20ba80ae13128e03b3e8ee912ee2efeb60bafdf59`; only its small metadata columns are shipped in `protocol/derived/` | | MSnLib original release (formula cross-check) | 18 per-file MS2 JSONL record lists, 560,084 records total, Zenodo 10.5281/zenodo.11163380, CC BY 4.0 | | repository multiple-spectrum voting table (voting-unit cross-check) | `benchmarks/molecular_identification/data/multiple_spectrum_voting_per_group.csv.gz` (5,002 groups, 57,436 spectra) | | hosted candidate file (not part of this manifest) | `MSnLib_candidates.json`, 1,368,264,026 bytes, SHA-256 `125a1cdcc57a3fcef8cc76d5322ac0c434cd09b0bfb9e0c9d28bddf052f45fcc`; candidate SMILES lists for the single-spectrum candidate-ranking task | | retention-time source | `MSnLib_with_rt.csv`, 755,984,910 bytes, SHA-256 `a5b7c38228287c5c1de401050445319b331ee9a5f17993d6e104e9a734fe2964`, columns `mzs,intensities,smiles,precursor_mz,adduct,collision_energy,fold,rt` | | retention-time table (shipped) | `split_A_full_msnlib/msnlib_rt.csv.gz`, 1,483,069 bytes, SHA-256 `994053612db874f7ac7985f278e04cc3463f3b93cd649a195bd167c4c6c7d3d8`, 560,084 rows | ## 3. Split A — formula-level split (summary) Read-only replay in the isolated data-preparation environment with RDKit 2026.03.5 (`split_A_full_msnlib/build_split_a.py`) reproduced every count and **all six table SHA-256 values byte-for-byte**: | quantity | observed | | --- | --- | | data rows | 560,084 | | unique molecular formulas | 21,107 | | formulas train / validation / test | 16,885 / 2,110 / 2,112 | | spectra train / validation / test | 446,667 / 55,980 / 57,437 | | formulas occurring in more than one fold | 0 | | RDKit SMILES parse failures | 0 (48,597 distinct source SMILES) | | test spectra | 57,437 (2,112 formulas, 5,003 source SMILES, 4,889 canonical molecules) | | official voting units — MSnLib source SMILES | 5,002 groups / 57,436 spectra | | alternative canonical view — RDKit canonical isomeric SMILES | 4,888 groups / 57,436 spectra | Cross-checks: the test and validation spectra tables match the historical `MSnLib_test.csv` / `MSnLib_val.csv` row by row on `smiles`, `precursor_mz`, `adduct`, `collision_energy` (0 mismatches); the RDKit formula agrees with the recorded `formula` field of the MSnLib original JSON records (18/18 first records, 0 mismatches over 37,177 streamed records, and all three located C10H10BrN5O2 records); the MSnLib-source-SMILES voting table is member-for-member identical to the repository voting table. Details: [`split_A_full_msnlib/VERIFY.md`](split_A_full_msnlib/VERIFY.md). ## 4. Split B — strict-adduct molecule-level split `rebuild/verify_release.py` re-derived from the shipped CSV tables and the frozen `protocol/` arrays: * counts against `protocol/manifest_summary.json` (compounds, spectra, queries, libraries, valid/dropped rows, per-query exact-adduct library positives 6,201 / 3,160); * ordered query / library SMILES SHA-256 and source-row SHA-256 values for both polarities and both folds; * table row order equals the frozen `query_index` / `library_index`; * query↔library row disjointness, the test partition of all preprocessed rows, one query per validation/test compound, library fold scope; * table ↔ `protocol_*.npz` row-id mapping and `precursor_mz` / `n_peaks` agreement with the frozen row metadata; * compound-level disjointness of the train / validation / test sets per polarity, and the cross-polarity relation recorded in `stats.json` (354 shared positive/negative test compounds). All 97 split-B checks passed. The ordered-sequence hashes for both test tasks are: | task | queries | library | | --- | --- | --- | | `[M+H]+` test | `356f355727380d1df02abbb0aaa3391b180a5c7b93b2103058ba54e8dfae51f0` | `4d69c6f65f8c3ed84df54fc2aa6addd7b28fd1c28909386f4e4ced88d31aacce` | | `[M-H]-` test | `db0aa2c39a1e5bc3c4463f97166c9d3e3ac150cba323f44bd29b636ccbd6553b` | `00dd373d9e175b070c2bd39595ee9532fdbd94f02a344897e81480e4b7784bc2` | ## 5. Cross-split A × B Rebuilt from the shipped tables (`rebuild/verify_release.py`) and reproduced exactly in `stats.json` → `cross_split`: * all 441,829 preprocessed split-B rows exist in `row_formula_fold.csv`, each mapped to exactly one split-A fold; * compound-level cross-tab (per polarity), spectra-level cross-tab (per split-B table and role) and row-level cross-tab all reproduce the published matrices; * the split-A test-fold overlap counts (31,570 `[M+H]+` rows and 13,413 `[M-H]-` rows) are reproduced; * every split-B compound maps to a single formula and therefore a single split-A fold. Key numbers (see [figures_mapping.md](figures_mapping.md) §2 for the full matrices): | quantity | `[M+H]+` | `[M-H]-` | | --- | ---: | ---: | | split-B compounds | 41,348 | 21,293 | | split-B compounds in the same split-A fold | 24,360 (58.9 %) | 12,645 (59.4 %) | | split-B test compounds that are split-A test compounds | 654 / 6,202 | 303 / 3,193 | | split-A test spectra inside the split-B tables | 31,570 / 57,437 | 13,413 / 57,437 | ### 5.4 Retention times (split A row metadata) `split_A_full_msnlib/msnlib_rt.csv.gz` was exported from `MSnLib_with_rt.csv` after reading both files in parallel and comparing them row by row: | check | result | | --- | --- | | header prefix | 7-column `MSnLib.csv` header equals the first seven columns of the 8-column with-RT header | PASS | | rows compared | 560,084 / 560,084 | PASS | | first seven columns identical at every row | 0 mismatches | PASS | | extra rows at the end of either file | 0 / 0 | PASS | | unparsable RT values | 0 / 560,084 | PASS | | distinct RT strings | 8,369 (RT is not constant) | PASS | Shipped table: `row_index,rt`, 560,084 rows, 1,483,069 bytes, SHA-256 `994053612db874f7ac7985f278e04cc3463f3b93cd649a195bd167c4c6c7d3d8`; gzipped only (no plain twin) to keep the package compact, and recorded in `stats.json` → `splits.A.retention_times` and `verification.rt_export`. ## 6. Release integrity `rebuild/verify_release.py` also verifies: * every plain `.csv` is byte-identical to its `.csv.gz` twin (16 pairs); * `stats.json` documents exactly the shipped files (except `stats.json` and `SHA256SUMS`) and every recorded byte size and SHA-256 matches; * `SHA256SUMS` lists every shipped file except itself and every digest matches; * no retired legacy project naming appears anywhere in the shipped text files (the check itself is written so that the verifier does not contain the forbidden string); * no internal absolute paths (data-preparation workspaces, cluster scratch directories, user home directories) and no private keys appear in the shipped text files. Package size: 58 shipped data/document files (plus `stats.json` and `SHA256SUMS`); 192,701,913 bytes. The `.csv.gz`-only upload subset is ≈ 23.0 MiB; the full upload is ≈ 183.8 MiB. ## 7. Voting units: official 5,002 source-SMILES groups and 4,888 canonical groups The published multiple-spectrum voting task reports `n_molecules = 5002`. Verified member-for-member: those 5,002 groups are the test spectra grouped by the **MSnLib source SMILES string** (5,003 distinct strings, one occurring in a single spectrum → 5,002 groups covering 57,436 spectra). This is the **official voting unit** and is shipped as `split_A_full_msnlib/test_molecules_voting.csv`. An alternative chemical-deduplication view groups the same test spectra by **RDKit canonical isomeric SMILES**: 114 source-string groups merge into chemically identical molecules, giving **4,888 groups** covering the same 57,436 spectra (the single excluded molecule is `CC(C)(C)OC(=O)NCC1(CC(=O)O)CCCCC1`). It is shipped as `split_A_full_msnlib/test_molecules_voting_canonical_view.csv` and is **not** the official voting unit. No data was altered to force either count. Details: `split_A_full_msnlib/VERIFY.md` §7 and `stats.json` → `splits.A.anomaly`. ## 8. What could not be verified from this package alone * The peak arrays themselves (`mzs`/`intensities`) are not part of this manifest; they are hosted in the same Hugging Face dataset (`dsadd4/UltraMS-MSnLib-Benchmark`) as `MSnLib.csv` (752,707,651 bytes, SHA-256 `be54b33039cf18675751ea3c6354b592177c899a0cd5df303ae616330133ec07`), together with `MSnLib_candidates.json` (1,368,264,026 bytes, SHA-256 `125a1cdcc57a3fcef8cc76d5322ac0c434cd09b0bfb9e0c9d28bddf052f45fcc`). The row pointers and `row_formula_fold.csv` are the authoritative link back to the spectra. * The historical Figure-3 analysis artifacts themselves; only the published repository voting-group table and the frozen protocol arrays were cross-checked. * The exact physical row order of `MSnLib.csv` beyond what the shipped tables encode; the package depends on the row pointers, not on reconstructing the file order. ## 9. Reproduce this verification ```bash python3 rebuild/verify_release.py # 140 checks, exit 0 shasum -a 256 -c SHA256SUMS # macOS; sha256sum -c SHA256SUMS on Linux ``` ## 10. Transcript of `rebuild/verify_release.py` Unedited output against the final package contents (140 checks, exit status 0): ```text [PASS] csv.gz twins byte-identical to plain csv [PASS] B/pos: protocol adduct vocabulary == [M+H]+ :: ['[M+H]+'] [PASS] B/pos: preprocessed row metadata covers all 301,636 rows uniquely [PASS] B/pos: compound split counts match manifest :: {'train': 28944, 'val': 6202, 'test': 6202} vs {'test': 6202, 'train': 28944, 'val': 6202} [PASS] B/pos: compound vocabulary is exactly the frozen smiles vocabulary :: 41348 vs 41348 [PASS] B/pos: compound_ids unique [PASS] B/pos: spectra per compound sum to manifest valid rows :: 301636 [PASS] B/pos: split table columns are the released schema :: ['polarity', 'compound_id', 'canonical_isomeric_smiles', 'split', 'n_spectra', 'n_frozen_queries', 'n_raw_smiles_variants', 'first_msnlib_csv_data_row'] [PASS] B/pos: train/val/test compound sets pairwise disjoint [PASS] B/pos: the three compound sets cover the whole vocabulary [PASS] B/pos/val: query count 6,202 matches manifest :: 6202 vs 6202 [PASS] B/pos/val: library count 250,424 matches manifest :: 250424 vs 250424 [PASS] B/pos/val: ordered query SMILES sha256 matches manifest [PASS] B/pos/val: ordered library SMILES sha256 matches manifest [PASS] B/pos/val: table row order == frozen query_index/library_index [PASS] B/pos/val: query rows and library rows are disjoint :: 0 shared rows [PASS] B/pos/val: queries are one spectrum per compound in this fold [PASS] B/pos/val: library compounds respect the fold scope [PASS] B/pos/val: query table maps to protocol_pos.npz query rows [PASS] B/pos/val: library table maps to protocol_pos.npz library rows [PASS] B/pos/val: source rows unique in each table [PASS] B/pos/val: n_library_positives column reproduces from the library table (pos/val queries with a library positive: 6,194 / 6,202) [PASS] B/pos/val: adduct column is strict [M+H]+ everywhere [PASS] B/pos/val: csv line = data row + 2 (header offset, no embedded newlines) [PASS] B/pos/val: precursor_mz/n_peaks agree with frozen row metadata (queries) [PASS] B/pos/val: query/library table columns are the released schema [PASS] B/pos/test: query count 6,202 matches manifest :: 6202 vs 6202 [PASS] B/pos/test: library count 295,434 matches manifest :: 295434 vs 295434 [PASS] B/pos/test: ordered query SMILES sha256 matches manifest [PASS] B/pos/test: ordered library SMILES sha256 matches manifest [PASS] B/pos/test: table row order == frozen query_index/library_index [PASS] B/pos/test: query rows and library rows are disjoint :: 0 shared rows [PASS] B/pos/test: queries are one spectrum per compound in this fold [PASS] B/pos/test: library compounds respect the fold scope [PASS] B/pos/test: query table maps to protocol_pos.npz query rows [PASS] B/pos/test: library table maps to protocol_pos.npz library rows [PASS] B/pos/test: source rows unique in each table [PASS] B/pos/test: n_library_positives column reproduces from the library table [PASS] B/pos/test: queries with an exact-adduct library positive == manifest (6,201) :: 6201 [PASS] B/pos/test: source-row hashes match manifest [PASS] B/pos/test: adduct column is strict [M+H]+ everywhere [PASS] B/pos/test: csv line = data row + 2 (header offset, no embedded newlines) [PASS] B/pos/test: precursor_mz/n_peaks agree with frozen row metadata (queries) [PASS] B/pos/test: query/library table columns are the released schema [PASS] B/pos: test queries + test library partition all preprocessed rows [PASS] B/pos: protocol train_rows all belong to train compounds [PASS] B/pos: protocol val_query_rows all belong to val compounds [PASS] B/pos: protocol test_query_rows all belong to test compounds [PASS] B/pos: source MSnLib.csv sha256 recorded [PASS] B/neg: protocol adduct vocabulary == [M-H]- :: ['[M-H]-'] [PASS] B/neg: preprocessed row metadata covers all 140,193 rows uniquely [PASS] B/neg: compound split counts match manifest :: {'train': 14907, 'val': 3193, 'test': 3193} vs {'test': 3193, 'train': 14907, 'val': 3193} [PASS] B/neg: compound vocabulary is exactly the frozen smiles vocabulary :: 21293 vs 21293 [PASS] B/neg: compound_ids unique [PASS] B/neg: spectra per compound sum to manifest valid rows :: 140193 [PASS] B/neg: split table columns are the released schema :: ['polarity', 'compound_id', 'canonical_isomeric_smiles', 'split', 'n_spectra', 'n_frozen_queries', 'n_raw_smiles_variants', 'first_msnlib_csv_data_row'] [PASS] B/neg: train/val/test compound sets pairwise disjoint [PASS] B/neg: the three compound sets cover the whole vocabulary [PASS] B/neg/val: query count 3,193 matches manifest :: 3193 vs 3193 [PASS] B/neg/val: library count 116,135 matches manifest :: 116135 vs 116135 [PASS] B/neg/val: ordered query SMILES sha256 matches manifest [PASS] B/neg/val: ordered library SMILES sha256 matches manifest [PASS] B/neg/val: table row order == frozen query_index/library_index [PASS] B/neg/val: query rows and library rows are disjoint :: 0 shared rows [PASS] B/neg/val: queries are one spectrum per compound in this fold [PASS] B/neg/val: library compounds respect the fold scope [PASS] B/neg/val: query table maps to protocol_neg.npz query rows [PASS] B/neg/val: library table maps to protocol_neg.npz library rows [PASS] B/neg/val: source rows unique in each table [PASS] B/neg/val: n_library_positives column reproduces from the library table (neg/val queries with a library positive: 3,163 / 3,193) [PASS] B/neg/val: adduct column is strict [M-H]- everywhere [PASS] B/neg/val: csv line = data row + 2 (header offset, no embedded newlines) [PASS] B/neg/val: precursor_mz/n_peaks agree with frozen row metadata (queries) [PASS] B/neg/val: query/library table columns are the released schema [PASS] B/neg/test: query count 3,193 matches manifest :: 3193 vs 3193 [PASS] B/neg/test: library count 137,000 matches manifest :: 137000 vs 137000 [PASS] B/neg/test: ordered query SMILES sha256 matches manifest [PASS] B/neg/test: ordered library SMILES sha256 matches manifest [PASS] B/neg/test: table row order == frozen query_index/library_index [PASS] B/neg/test: query rows and library rows are disjoint :: 0 shared rows [PASS] B/neg/test: queries are one spectrum per compound in this fold [PASS] B/neg/test: library compounds respect the fold scope [PASS] B/neg/test: query table maps to protocol_neg.npz query rows [PASS] B/neg/test: library table maps to protocol_neg.npz library rows [PASS] B/neg/test: source rows unique in each table [PASS] B/neg/test: n_library_positives column reproduces from the library table [PASS] B/neg/test: queries with an exact-adduct library positive == manifest (3,160) :: 3160 [PASS] B/neg/test: source-row hashes match manifest [PASS] B/neg/test: adduct column is strict [M-H]- everywhere [PASS] B/neg/test: csv line = data row + 2 (header offset, no embedded newlines) [PASS] B/neg/test: precursor_mz/n_peaks agree with frozen row metadata (queries) [PASS] B/neg/test: query/library table columns are the released schema [PASS] B/neg: test queries + test library partition all preprocessed rows [PASS] B/neg: protocol train_rows all belong to train compounds [PASS] B/neg: protocol val_query_rows all belong to val compounds [PASS] B/neg: protocol test_query_rows all belong to test compounds [PASS] B/neg: source MSnLib.csv sha256 recorded [PASS] B: cross-polarity pos-test x neg-test intersection reproduces stats.json :: 354 vs 354 [PASS] A: formula_split columns :: ['formula', 'fold', 'n_spectra'] [PASS] A: formula_split has 21,107 unique formulas [PASS] A: formula fold values are train/val/test [PASS] A: formula-level counts 16,885 / 2,110 / 2,112 :: {'train': 16885, 'val': 2110, 'test': 2112} [PASS] A: spectra counts 446,667 / 55,980 / 57,437 :: {'train': 446667, 'val': 55980, 'test': 57437} [PASS] A: total spectra = 560,084 [PASS] A: row_formula_fold covers rows 0..560,083 in order [PASS] A: every formula occurs in exactly one fold [PASS] A: row_formula_fold agrees with formula_split (fold and n_spectra) [PASS] A: row-level fold totals match formula_split [PASS] A: test_spectra columns are the released schema :: ['row_index', 'smiles', 'precursor_mz', 'adduct', 'collision_energy', 'fold', 'canonical_isomeric_smiles'] [PASS] A: test_spectra has 57,437 rows, all fold=test [PASS] A: test_spectra row_index equals the rows marked test in row_formula_fold [PASS] A: val_spectra has 55,980 rows, all fold=val [PASS] A: val_spectra row_index equals the rows marked val in row_formula_fold [PASS] A: official voting-unit table columns are group_id, smiles, n_spectra :: ['group_id', 'smiles', 'n_spectra'] [PASS] A: official voting-unit table (MSnLib source SMILES) reproduces from test_spectra [PASS] A: official voting-unit table has 5,002 groups / 57,436 spectra [PASS] A: canonical-view table columns are group_id, canonical_isomeric_smiles, n_spectra :: ['group_id', 'canonical_isomeric_smiles', 'n_spectra'] [PASS] A: canonical-view table reproduces from test_spectra [PASS] A: canonical-view table has 4,888 groups / 57,436 spectra [PASS] A: exactly one test spectrum lies outside the voting tables :: CC(C)(C)OC(=O)NCC1(CC(=O)O)CCCCC1 [PASS] A: retention-time companion table is shipped and matches stats.json :: split_A_full_msnlib/msnlib_rt.csv.gz [PASS] A: retention-time table columns are row_index, rt :: ['row_index', 'rt'] [PASS] A: retention-time table has 560,084 rows in row order [PASS] A: every retention time is present and numeric :: 0 empty, 0 non-numeric [PASS] A/B: every split-B table row exists in row_formula_fold :: 0 missing [PASS] A/B: split-B tables cover all 441,829 preprocessed spectra :: 441829 [PASS] A/B: compound-level cross tab reproduces stats.json [PASS] A/B: spectra-level cross tab reproduces stats.json [PASS] A/B: row-level split-B x split-A cross tab reproduces stats.json [PASS] A/B: row-level split-B totals equal the manifest split-spectra counts [PASS] A/B/pos: A-test rows inside the split-B tables reproduce stats.json :: 31570 vs 31570 [PASS] A/B/neg: A-test rows inside the split-B tables reproduce stats.json :: 13413 vs 13413 [PASS] A/B: every split-B compound has a single split-A fold (same formula) [PASS] stats.json documents exactly the shipped files (except stats.json and SHA256SUMS) :: missing=[] extra=[] [PASS] stats.json byte sizes and sha256 match every shipped file [PASS] SHA256SUMS parses as ' ' lines [PASS] SHA256SUMS covers every shipped file except itself :: 60 entries [PASS] SHA256SUMS hashes match the files [PASS] no retired legacy project naming anywhere in the shipped text files [PASS] no internal absolute paths or private keys in the shipped text files 140/140 checks passed ``` ## 11. Version Release `1.0.0`, generated 2026-11-04. Any change to the tables or protocol files invalidates these hashes and requires a new version directory.