Foundation Principles
Machine learning systems exhibit a deceptively simple heuristic: complexity often moves rather than disappearing, although good design can remove accidental complexity. 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 can burden 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 heuristic motivates everything in this book. The quantitative bounds, models, and principles introduced throughout the book describe constraints that emerge from where complexity currently resides.
Architectures, frameworks, and optimizations succeed only when they respect 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 foundations: not best practices that evolve with frameworks or opinions that differ between teams, but enduring physical constraints and quantitative models for 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 Principle
Implication: Data engineering requires the same rigor as software engineering. Datasets should be versioned (like Git), unit-tested (data quality checks), and debugged. Deleting a row of training data can alter the rebuilt model just as deleting a line of code can alter a compiled artifact.
If data functions as source code, then it is not merely a logical artifact; it also has physical properties that constrain system architecture when data and computation occupy different locations.
Principle 2: The Data-Gravity Principle
Implication: Large datasets can become the gravitational center of the architecture. Systems may 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 principles establish that data can be both the logical program and a physical anchor of an ML system. Part I develops these implications as a dependency chain. Deployment constraints define where a system can execute; the lifecycle carries those constraints through problem definition, data, modeling, validation, and operation; and data engineering makes them enforceable in versioned, tested pipeline artifacts. Ignoring any link returns complexity as integration cost: an accurate model that cannot execute, a workflow that cannot reproduce its inputs, or a pipeline whose outputs no longer match deployment conditions.