Leakage-free train/test splits for biological data, with certificates anyone can re-verify

Build, audit, and re-verify splits for proteins, nucleic acids, small molecules, cells, and patient cohorts. Built for ML researchers in computational biology and chemistry, benchmark maintainers, and coding agents.

Three-command quickstart

Clone, install in Python 3.10+, build a certified split on the bundled example, and re-verify every number from scratch:

git clone https://github.com/dnncha/splitproof.git && cd splitproof && pip install .
splitproof split examples/proteins.yaml
splitproof verify splitproof.cert.json --split split.csv

Audit the random split column in that same file with splitproof audit examples/proteins.yaml --split-column fold_random. On your own CSV, TSV, FASTA, or Parquet dataset, run splitproof init data.csv to draft a starter policy.yaml, review the constraints, then run splitproof split policy.yaml.

Measured on public benchmarks

Audited on 24 November 2026 across six MoleculeNet datasets and every reviewed human protein in UniProt (full report, reproducible via scripts/realdata.py).

6 of 6

Random 80/20 splits on six MoleculeNet sets (BACE, BBBP, ClinTox, ESOL, Lipophilicity, HIV) leak Tanimoto ≥ 0.8 pairs across train and test; five of six leak exact duplicate compounds.

BACE_72 / BACE_669

BACE's official Model split puts the same compound in both train (neutral) and test (protonated at the guanidine). Raw SMILES comparison misses it; charge neutralisation catches it.

33x

Across all 20,429 reviewed human proteins in UniProt, MMseqs2 identity (≥ 0.3, coverage 0.8) finds 137,696 related pairs compared with 4,126 for k-mer Jaccard (k=5, ≥ 0.3).

Benchmark Rows Constraint audited Related pairs Crossing train/test
BACE (random 80/20)1,513Tanimoto ≥ 0.81,624491
BACE (random 80/20)1,513same ring systems11,5653,774
BACE (official Model)1,513same compound (neutralised)11
BBBP (random 80/20)2,050same compound / Tanimoto ≥ 0.878 / 25125 / 64
ClinTox (random 80/20)1,484same compound / Tanimoto ≥ 0.861 / 16917 / 48
ESOL (random 80/20)1,128same compound / Tanimoto ≥ 0.811 / 2243 / 79
Lipophilicity (random 80/20)4,200same compound / Tanimoto ≥ 0.80 / 1,2170 / 411
HIV (random 80/20)41,127same compound / Tanimoto ≥ 0.8197 / 7,45555 / 2,455
UniProt human (random 80/20)20,429k-mer Jaccard ≥ 0.3 (k=5)4,1261,316
UniProt human (random 80/20)20,429MMseqs2 identity ≥ 0.3, cov 0.8137,69646,874

How it works

Declare your leakage rules in YAML or JSON: similarity constraints (sequence identity, k-mer Jaccard, Tanimoto, ring systems, canonical SMILES, exact duplicates), disjoint groups (donor, patient, plate, site), and one-directional temporal cutoffs.

splitproof builds single-linkage connected components across all declared similarity edges and shared groups to form atomic independent units, then assigns those units to folds with a deterministic, row-order-invariant, quantile-stratified allocator under seed. Every split writes splitproof.cert.json, and splitproof verify recomputes every digest, unit statistic, constraint measurement, and diagnostic from scratch.

Honesty rules: splitproof invents no thresholds of its own, separates exhaustive proof (satisfied) from heuristic or approximate evidence (satisfied_unproven), refuses vacuous constraints (CONSTRAINT_VACUOUS) and impossible homology blobs (GIANT_UNIT), and never calls k-mer Jaccard sequence identity.

Diagnostics emitted on every split and audit

Built for coding agents and MCP

Every CLI command supports --json, deterministic exit codes (0 clean, 1 violated or --require-exact failure, 2 usage/data/verify error, 3 infeasible split), and structured error objects with a remedy field. splitproof mcp exposes the same six operations over stdio with working-directory write confinement: splitproof_init, splitproof_units, splitproof_split, splitproof_audit, splitproof_verify, and splitproof_explain.

Claude Code

claude mcp add splitproof -- splitproof mcp

Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "splitproof": {
      "command": "splitproof",
      "args": ["mcp"]
    }
  }
}

Codex (~/.codex/config.toml)

[mcp_servers.splitproof]
command = "splitproof"
args = ["mcp"]

Agent discovery files

Backends and current limits

Metric Backend Install Exactness
identityMMseqs2mmseqs on PATHheuristic
kmer_jaccardexact sparse Jaccard (n ≤ 20,000)core installexact
kmer_jaccardMinHash LSH (n > 20,000)core installlower_bound
tanimotoRDKit Morgan fingerprints (desalted, neutralised)splitproof[chem]exact
ring_systemscanonical ring-system set over RDKitsplitproof[chem]exact
canonical_smilesRDKit canonical SMILES (desalted, neutralised)splitproof[chem]exact
exact_duplicatenormalised equalitycore installexact

Reads CSV, TSV, FASTA, and Parquet (splitproof[parquet]). Only empty or whitespace-only cells are missing; literal strings like NA, None, and Null stay valid group names.

Not implemented in 0.1.0

Frequently asked questions

What does a proven status in splitproof actually guarantee?
A proven (satisfied) status means an exhaustive backend compared every pair on the constraints declared in the policy, with zero absent or unparsable values on those keys, and zero violations crossed folds. It makes no claim about constraints you did not declare or whether your chosen threshold is strict enough for your field.
Why does splitproof separate k-mer Jaccard from sequence identity?
k-mer Jaccard is a fast exact metric over k-mer sets, whereas sequence identity measures aligned homology. Across all 20,429 reviewed human proteins in UniProt, MMseqs2 sequence identity (≥ 0.3, coverage 0.8) found 137,696 related pairs compared with 4,126 for k-mer Jaccard (k=5, ≥ 0.3), a 33x gap. splitproof therefore never labels k-mer Jaccard as identity.
What does splitproof verify check?
splitproof verify rebuilds the entire certificate from scratch from the dataset and fold assignments and compares every section field by field: policy digest, dataset digest, assignment digest, unit structure, backend parameters, per-constraint measured counts, and nearest-neighbour diagnostics. Editing any number causes verification to fail and report the exact field path.
How does splitproof handle untrusted certificates?
Backends accept only allowlisted numeric parameters from policies so a certificate cannot pick an executable path. During verify, recorded dataset paths outside the working directory are refused unless --data is passed explicitly, and MCP output paths are confined to the current working directory. Certificates are integrity anchors rather than cryptographic signatures.
What is not implemented in splitproof 0.1.0?
splitproof 0.1.0 does not yet implement 3D structural similarity (such as Foldseek or pocket metrics), 2D or bipartite splits for interaction datasets, an in-memory DataFrame API, or opt-in bridge-entity dropping to split giant single-linkage components.