English

A Grammar of Machine Learning Workflows

Machine Learning 2026-04-07 v3

Abstract

Data leakage has been identified in 648 published machine learning papers across 30 scientific fields. The knowledge to prevent it exists; the tools do not enforce it. This paper presents a grammar - eight typed primitives, a directed acyclic graph, and four hard constraints - that makes the most damaging leakage types structurally unrepresentable. The core mechanism is a terminal assessment gate: the first call-time-enforced evaluate/assess boundary in an ML framework, backed by a specification precise enough for independent reimplementation. A companion landscape study across 2,047 datasets grounds the constraints in measured effect sizes. Two reference implementations (Python, R) are available.

Keywords

Cite

@article{arxiv.2603.10742,
  title  = {A Grammar of Machine Learning Workflows},
  author = {Simon Roth},
  journal= {arXiv preprint arXiv:2603.10742},
  year   = {2026}
}

Comments

36 pages, v1.2. Two maintained implementations: Python (PyPI: mlw), R (GitHub: epagogy/ml). Code: github.com/epagogy/ml

R2 v1 2026-07-01T11:14:37.949Z