When should you use deep learning vs classical machine learning?
The short answer
Deep learning wins when data is abundant, inputs are unstructured (images, text, audio), and features are hard to engineer by hand. Classical ML wins on structured tabular data, small datasets, and when interpretability or training speed matter.
How to think about it
The single most useful heuristic: if a domain expert can write down the features, start with classical ML.
When deep learning is the right call
- Unstructured inputs — images, raw audio, free text. Hand-crafting features is infeasible; learned representations are the whole point.
- Large labelled datasets — deep nets are hungry. They underperform gradient boosted trees on tabular data until you have tens of thousands of rows, sometimes more.
- End-to-end pipelines — translation, speech recognition, image segmentation. The task itself requires learning a complex input-output mapping.
- Transfer learning is available — a pretrained backbone already exists for your domain, so you can fine-tune with modest data.
When classical ML wins
- Structured/tabular data — XGBoost and LightGBM consistently outperform deep nets on tabular benchmarks. Trees handle mixed feature types, missing values, and categorical variables natively.
- Small datasets — fewer than a few thousand examples. Deep nets overfit; a regularised logistic regression or random forest generalises better.
- Interpretability requirement — linear models, decision trees, and SHAP-explained gradient boosters are far easier to audit and explain to stakeholders.
- Inference latency / compute constraints — a gradient boosted tree runs on a microcontroller; a transformer does not.
Quick decision matrix
| Signal | Prefer |
|---|---|
| Image, text, audio input | Deep learning |
| Structured table, <10 k rows | Classical ML (XGBoost) |
| Need feature importance | Classical ML |
| Pretrained backbone available | Deep learning |
| Real-time, edge device | Classical ML |
Start simple. If logistic regression or XGBoost gets you to 90 % of the performance ceiling with 10 % of the engineering effort, ship it.