Data versioning for healthcare ML makes a clinical dataset reproducible: each training set gets a snapshot id, the code-set versions it was cut against, and a named signer. Tools such as DVC or lakeFS can hold that snapshot, but they are examples, and neither makes the data PHI-safe on its own.
Written for digital health founders and hospital CTOs whose teams train clinical models, it covers the manifest, code-set pinning, PHI status, the cut procedure, reproduction and retirement.
What is data versioning for healthcare ML datasets?
Data versioning for healthcare ML datasets pins each clinical training set to a snapshot id, the code-set versions it was cut against, the time cut and the person who signed it. Agnotic Technologies will not train on a folder of files with no id. DVC and lakeFS are examples of tools that can hold that id, not HIPAA controls.
Reproducing a clinical training set?
We pin a snapshot id and the code-set version, and we keep the snapshot from becoming a second chart.
- Snapshot id: the exact rows used to train, addressable later.
- Code-set version: SNOMED, LOINC, or ICD release the labels were drawn from.
- Signer: a person who says this cut is the one the model card will name.
- PHI rule: the snapshot follows the same minimum-necessary and access rules as the chart. A tool name does not waive that.
Feature pipelines and lakehouses decide how data is shaped and stored. The snapshot is narrower: a fixed, signed record of the exact rows a model was trained on.
What is the snapshot not?
The snapshot is not a live chart, and it is not permission to copy PHI into a data-science laptop. Agnotic stores it in the same access boundary as the training job.
- Not a chart: no write-back, no clinical use of the snapshot as a record.
- Not a waiver: DVC, LakeFS, or any other tool still sits inside the audit and access rules.
- Not implied current: a new code-set release is a new snapshot, not an in-place edit.
What fields belong in the snapshot manifest?
The manifest is a small record stored beside the data that names everything needed to rebuild the training set. If a field is blank, the cut cannot be reproduced.
| Field | Example content | Why |
|---|---|---|
| Snapshot id | A DVC hash, or a lakeFS commit or tag | The exact files, addressable later |
| Cohort definition | Query text and its version in source control | Who was included and why |
| Time cut | Data as of a stated date and time | Stops later records leaking in |
| Code-set versions | SNOMED CT, LOINC and ICD-10-CM release identifiers | Labels mean what they meant at cut time |
| Label definition | Version of the logic that assigns outcomes | A changed label is a different dataset |
| De-identification status | Method used, or 'contains PHI' | Sets the access rules |
| Signer | Name and date | The person accountable for the cut |
How do DVC and lakeFS hold the snapshot id?
DVC records a hash of the tracked data in a small file committed to Git; lakeFS records a commit over the data lake itself. Either gives you an id that points at fixed content.
DVC creates .dvc files as data placeholders that are versioned with Git. Each one holds the information needed to track the target data over time, including its path and an MD5 hash.
The lakeFS documentation describes a commit as an immutable checkpoint containing a complete snapshot of a repository, and a tag as a readable pointer to a single immutable commit.
| Question | DVC | lakeFS |
|---|---|---|
| Where does the id live? | A .dvc file in the Git repository | A commit or tag in the lakeFS repository |
| What does it point at? | Hashed files in a cache or remote | A snapshot of objects in the store |
| Which teams does it suit? | Teams that already version training code in Git | Teams that already keep data in an object store |
| Does it decide who may read the data? | No | No |
Agnotic picks whichever matches the client's existing storage. Neither choice changes the manifest or the PHI rules.
How should code-set versions be pinned?
Record the release identifier for every code system the cohort or labels use, at the time of the cut. A label built from a value set is reproducible only against the release that value set was expanded from.
- Value sets: store the expansion used, not only the value set name.
- Mappings: if local codes were mapped to standard ones, version the mapping table with the snapshot.
- New release: a new code-set release means a new snapshot with a new id. The old one stays as it was.
Many reproductions fail quietly here: the files are identical, but the label logic now resolves to a different set of codes.
Is the snapshot de-identified, or is it still PHI?
A snapshot is de-identified only if it meets one of the two methods in the HIPAA Privacy Rule. Otherwise it is PHI and carries the same access and audit rules as its source.
Under 45 CFR 164.514(b), health information is de-identified only by an expert determination with documented methods and results, or by removing the identifiers listed in paragraph (b)(2) under the conditions stated there.
Where the snapshot is PHI, limit read access to the people whose work needs it, the same minimum-necessary approach the client applies to the source systems.
- De-identified: record the method and, for expert determination, where the documentation lives.
- Identifiable: restrict access to the named training group and log reads.
- Mixed: if any field in the snapshot is identifiable, treat the whole snapshot as PHI.
The manifest states which case applies, so nobody infers it from a folder name or a tool.
Cutting a snapshot, step by step
Cutting a snapshot is a short, repeatable job that ends with a signed manifest. Run it the same way every time.
- Step 1, freeze inputs: fix the time cut and the code-set releases.
- Step 2, extract: run the versioned cohort and label queries against the source as of the time cut.
- Step 3, check: compare counts and label distributions with the previous snapshot and explain the differences.
- Step 4, commit: store the files and record the DVC hash or lakeFS commit as the snapshot id.
- Step 5, manifest: write the manifest with every field filled.
- Step 6, sign: the dataset owner reviews and signs. Training starts only after this.
A worked example: retraining a readmission model
A worked example: a hospital's data science team wants to retrain a readmission risk model after a new ICD-10-CM release. The current model card names its snapshot id, so the team can see exactly which cut it was trained on.
The team cuts a new snapshot against the new release, with the same cohort query version and an updated label mapping. The check step shows a shift in one outcome group, traced to codes that moved in the release.
The dataset owner signs the new manifest. The new model card names the new snapshot id, and the old snapshot stays available so both models can be compared on the same evaluation cut.
How do you reproduce a model from its snapshot?
Check out the snapshot by id, confirm the hashes, and rerun training with the code version and settings the model card names. The metrics should match within the tolerance your training process documents.
- Data: fetch by snapshot id and verify hashes before training.
- Code: check out the training code commit named in the model card.
- Environment: use the recorded library versions and random seeds.
- Compare: if metrics differ beyond tolerance, suspect an unpinned input before suspecting the model.
Agnotic runs this reproduction once before a model is first deployed, not only when someone asks later. A cut that cannot be reproduced on day one will not become reproducible after the storage has been moved twice.
What should be logged when someone reads a snapshot?
Every read of a snapshot that contains PHI should be logged with who, which snapshot, when and for which job. A training run counts as a reader too.
- Person or service account, snapshot id, time, and purpose or job id.
- Copies made, and where they went.
- Access grants and removals on the snapshot's storage location.
These reads belong in the same audit records the client keeps for its source systems.
When should an old snapshot be retired?
Retire a snapshot when no deployed or archived model card names it and the client's retention policy allows disposal. Until then it is the evidence for how a model was built.
- Check: search model cards and the registry for the snapshot id.
- Approve: the dataset owner and the compliance owner sign the retirement.
- Dispose: delete the data and its storage copies under the client's disposal procedure, and keep the manifest with a retired flag.
Retiring the data does not retire the record of it. The manifest, the signer and the model card links stay, so a later reviewer can see that the cut existed, who approved it, and when it was disposed of.
What are the common mistakes with clinical dataset versioning?
The common mistakes are versioning the files but not the meaning of the labels, assuming a tool controls access, and editing a snapshot in place. Each one leaves a model card pointing at data nobody can rebuild.
- Pinning data hashes but not the code-set release or value set expansion behind the labels.
- Recording a cohort query by name only, so a later edit silently changes who was included.
- Granting read access to anyone who can see the Git repository that holds the .dvc files.
- Overwriting a snapshot after a fix instead of cutting a new one with a new id.
- Keeping working copies on laptops, outside the logged store.
What does dataset versioning mean for the build plan?
It means the training platform needs a controlled store, a manifest template and a signing step before the first model is trained, not after the first audit question. The pieces are small, but fitting them to models already in use is slow.
- Tooling: choose DVC or lakeFS to match where the client's data already lives.
- Access: set up the training group and read logging on the snapshot store.
- Gate: make training jobs refuse a snapshot that has no signed manifest.
- Proof: run one full reproduction before the first deployment.
Who signs the cut, who stores it, and who may read it?
The dataset owner signs, platform engineering stores and protects, and read access is limited to the named training group. Nobody gets access because they can see the repository.
- Dataset owner: cohort, labels, code-set choices, and the signature.
- Platform engineering: storage, DVC or lakeFS setup, access controls, and logs.
- Data scientists: read access through the training environment, not local copies.
- Compliance: de-identification method and retention.
How does Agnotic pin the cut?
Agnotic sets up the snapshot store with DVC or lakeFS, the manifest template, the signing step and read logging on the client's training platform, then runs a full reproduction before the first model ships.
Id, code-set version, signer
Examples may hold the files. They do not replace the pin or the PHI rule.
Related reading on Agnotic
The FHIR-to-features pipeline, clinical utility, reusable features and the model registry.


