Foundation Principles
Machine learning systems obey a deceptively simple conservation law: complexity cannot be destroyed, only moved. Complexity flows among the three domains of the D·A·M taxonomy: Data as information, Algorithm as logic, and Machine as physics. Simplifying one domain necessarily burdens the others. A hand-crafted feature pipeline reduces algorithmic complexity but demands more data engineering effort. A larger model absorbs messy data but shifts complexity onto the hardware that must train and serve it. This Conservation of Complexity is the meta-principle that motivates everything in this book. The quantitative invariants introduced throughout the book are its measurable instantiations: each one quantifies a constraint that emerges from where complexity currently resides.
Architectures, frameworks, and optimizations succeed only when they respect invariant constraints imposed by hardware, mathematics, and information theory. Just as civil engineers cannot ignore gravity, ML engineers cannot ignore the physical laws that govern data, computation, and system throughput. Part I establishes these invariant constraints: not best practices that evolve with frameworks or opinions that differ between teams, but the physics of ML engineering. The first constraint starts with data itself, where the familiar boundary between program and input begins to disappear.
Principle 1: The Data as Code Invariant
Implication: Data engineering requires the same rigor as software engineering. Datasets must be versioned (like Git), unit-tested (data quality checks), and debugged. Deleting a row of training data is the engineering equivalent of deleting a line of code; retraining rebuilds the learned artifact from changed source material.
If data is the source code, then it is not merely a logical artifact—it also has physical properties that constrain system architecture. Unlike code, which can be copied and distributed freely, data resists movement, and its scale changes where computation should happen.
Principle 2: The Data Gravity Invariant
Implication: Large datasets become the gravitational center of the architecture. Systems increasingly move compute to data by shipping queries or code to the storage layer rather than moving data to compute by repeatedly downloading large datasets.
Together, these two invariants establish that data is both the logical program and the physical anchor of every ML system. With these foundations in place, Part I builds the conceptual framework: from the discipline’s origins and core metrics, through the physical constraints that create the deployment spectrum, to the lifecycle that manages complexity across stages, and finally to the engineering practices that treat data with the rigor it demands.