ML System Design

Why You Propose a Baseline First

Establishing simple, fast baseline models before deploying complex deep neural networks.

🟢 beginner5 min readsystem-design
Proposing a Baseline First is a fundamental best practice in machine learning engineering and system design interviews. Before building complex 100 layer Transformer or GNN architectures, start with a simple, interpretable baseline (e.g. Heuristic Rules, Logistic Regression, BM25, or Most Popular items). Baselines validate data pipelines, set lower bound performance benchmarks, provide fast fallback options, and quantify ROI improvements of complex models.

Why Start with a Baseline?

When asked to design a recommendation system or fraud detector, eager engineers often jump straight to complex architectures:

"We will use a 100-layer Graph Neural Network combined with a Mixture-of-Experts Transformer!"

In production engineering, this is a major red flag (Over-Engineering).

Proposing a Baseline First is the golden rule of machine learning system design:

  STEP 1: Simple Heuristic / Rule-Based Baseline
                     │
                     ▼
  STEP 2: Simple Statistical Machine Learning Baseline (Logistic Regression / BM25)
                     │
                     ▼
  STEP 3: Complex Deep Learning Model (Transformers / DeepFM / Two-Tower)
┌──────────────────────────┬──────────────────────────┬──────────────────────────┐
│ 1. PIPELINE VALIDATION   │ 2. PERFORMANCE BENCHMARK │ 3. ROI QUANTIFICATION    │
├──────────────────────────┼──────────────────────────┼──────────────────────────┤
│ Proves end-to-end data   │ Establishes lower-bound  │ Proves whether spending  │
│ ingestion, logging, and  │ metrics (Accuracy/NDCG)  │ $100k GPU compute adds   │
│ evaluation pipeline works.│ that complex models must │ real incremental value.  │
│ Catch bugs early!        │ beat to justify existence│                          │
└──────────────────────────┴──────────────────────────┴──────────────────────────┘

4 Crucial Reasons to Build Baselines First

1. Validating End-to-End Infrastructure

Building a simple baseline (e.g. Logistic Regression) forces you to set up data pipelines, feature generation, inference endpoints, and monitoring telemetry on day one.

If your complex model fails 3 months later, you know the data pipeline is reliable because the baseline already proved it!

2. Setting a Performance Floor

A baseline sets the minimum acceptable metric score ($R^2$, $NDCG@10$, $F1$-score).

If your complex 10-layer GNN scores $NDCG@10 = 0.65$, is that good or bad?

3. Instant Fallback in Production

Complex deep models fail in production due to GPU OOMs, model server crashes, or missing features.

A simple baseline (e.g. cached Top-10 popular items or rule heuristics) serves as a sub-millisecond production fallback, ensuring 99.99% system availability!

4. Quantifying Business ROI

Complex models cost money: GPU hardware, higher latency, and complex maintenance.

If a simple Logistic Regression model achieves $92%$ accuracy at $2\text{ms}$ latency and $$100/\text{month}$ cloud cost, switching to a Transformer achieving $93%$ accuracy at $200\text{ms}$ latency and $$10,000/\text{month}$ cloud cost may not make business sense.

Standard Baselines by Domain

DomainSimple Heuristic BaselineSimple ML Baseline
E-Commerce RecSysMost Popular / Trending ItemsItem-Item Co-occurrence Matrix
Search EngineExact Match / Frequency CountBM25 Lexical Keyword Search
Fraud DetectionRule Engine ("Amount > $5k & Country != Home")Logistic Regression / Decision Tree
Text ClassificationKeyword Match ListTF-IDF + Naive Bayes / SVM
Time SeriesLast Value Carried Forward (Naive)Exponential Smoothing / ARIMA

Say this out loud

Proposing a baseline first validates end to end data pipelines, establishes a lower bound performance benchmark, provides an instant low latency production fallback, and quantifies whether complex models justify their compute and maintenance costs. Always start with heuristics or simple models like Logistic Regression before scaling to deep architectures.

Followups to expect

  1. What is a Dummy Baseline (Zero-Rule Baseline)? Predicting the majority class label everywhere for classification (or mean target for regression) to establish the absolute minimum statistical performance threshold.
  2. How do you pitch a baseline transition to business stakeholders? Frame it as iterative deployment: ship V1 baseline in week 1 to capture immediate value, while training V2 deep learning models in parallel for future A/B testing.

Check yourself

Question 1 of 3

Why should a machine learning engineer build and evaluate a simple baseline model before building a complex deep neural network?

More in ML System Design

See all →
A Framework for Any ML Design Round5 minFraming a Business Problem as ML5 minOnline vs Offline Evaluation5 min