There is a newer version of the record available.

Published March 14, 2026 | Version 1.1

A Grammar of Machine Learning Workflows

Authors/Creators

Description

Data leakage affected 294 published papers across 17 scientific fields (Kapoor & Narayanan, 2023); a living survey has since grown that count to 648 across 30 fields. The dominant response has been documentation: checklists, linters, best-practice guides. Documentation reduces errors but does not close structural failures. This paper proposes a structural remedy: a grammar that decomposes the supervised learning lifecycle into 8 kernel primitives connected by a typed directed acyclic graph (DAG), with four hard constraints that reject the two most damaging leakage classes at call time. The grammar's core contribution is the terminal assess constraint: a runtime-enforced evaluate/assess boundary where repeated test-set assessment is rejected by a guard on a nominally distinct Evidence type. A companion study across 2,047 experimental instances quantifies why this matters: selection leakage inflates performance by d_z = 0.93 and memorization leakage by d_z = 0.53–1.11. Two maintained implementations (Python, R) demonstrate the claims. The appendix specification lets anyone build a conforming version.

Files

roth2026_grammar_ml_workflows_v1.1.pdf

Files (225.1 kB)

Name Size Download all
md5:1fb192dafed7c66ead830ec405f42f13
225.1 kB Preview Download

Additional details

Related works

Is identical to
Preprint: arXiv:2603.10742 (arXiv)
Is supplemented by
Software: https://github.com/epagogy/ml (URL)
Software: https://pypi.org/project/mlw/ (URL)

Software

Repository URL
https://github.com/epagogy/ml
Programming language
Python , R , Julia
Development Status
Active