liveBook · Manning

Abstraction

As explained in Machine Learning System Design

Abstraction is a technique for managing complexity by exposing higher-level operations while encapsulating lower-level implementation details.

Abstraction manages complexity by placing lower-level implementation details inside reusable blocks, treating them as black boxes, and composing them into higher-level operations. This approach supports system structure, but deciding the right boundaries remains a central design responsibility. section 1.1.2

Effective abstractions balance simplicity with practical control:

  • Expose a small, predictable interface rather than every handler and parameter. section 13.1
  • Avoid leaky abstractions that expose too many implementation details. section 13.1
  • Hide complexity behind reasonable defaults, while allowing overrides for customization and debugging. section 13.1
  • Reconsider heavyweight upfront structures when changing requirements make detailed plans inertial or bureaucratic. section 1.1.2

A configurable prediction interface

A prediction API can expose predict(features, time=None, seed=42), supplying a current time by default while retaining explicit controls for reproducibility and debugging. A model version can also be selected during initialization without exposing model-loading internals. section 13.1

Figure 13.1 Overconfiguration vs. underconfiguration
figure

Compare overconfiguration with underconfiguration when deciding which implementation details and controls an interface should expose. section 13.1

How Machine Learning System Design covers it

How deep it goes
Defines abstraction, contrasts upfront architecture with agile change, and works through leaky interfaces, defaults, overrides, and model versioning.
Examples
Uses black-box software blocks, prediction functions, configurable parameters, and versioned model interfaces.
What you can do after
Apply it via API design by hiding unnecessary internals, choosing useful defaults, and preserving targeted controls for debugging.
How it connects
Connects abstraction with software architecture, encapsulation, agile software development, API design, debugging, and model versioning.

Also explained in

Compare how 15 books explain abstraction →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning System Design. The section links point to the parts of the book it draws on.