Key takeaways
- Deep learning is a subset of machine learning, so the real choice is between classical methods such as gradient-boosted trees and neural networks.
- On tabular data of about 10,000 rows, a 2022 benchmark of 45 datasets found tree-based models still ahead of deep learning.
- Deep learning earns its cost on unstructured inputs such as images, speech and text, and on very large data volumes.
- Machine learning is usually described as supervised, unsupervised and reinforcement learning, plus two hybrids (semi-supervised and self-supervised), and most business projects use supervised learning.
- For language and documents, use a pretrained model through an API and test it on your own examples before considering any training.
Teams often hear "AI" and assume it means deep learning, then price a project around GPUs and a research hire. For a lot of business problems that is the wrong tool, and the evidence is public. Choosing between machine learning and deep learning starts with one question: what shape is your data? A table of rows and columns points to one answer, and images, speech or documents point to another.
What is the difference between machine learning and deep learning?
Machine learning means a program learns patterns from examples instead of following rules a person wrote. Deep learning is one family inside it, built on neural networks with many layers of connected units that learn their own features from raw input. Everything else in machine learning is often called classical machine learning: linear and logistic regression, decision trees, random forests and gradient boosting.
Gradient boosting builds many small decision trees in sequence, each one correcting the errors of the earlier ones. The best-known implementation, XGBoost, is described by its authors as a scalable tree boosting system that data scientists use to reach state-of-the-art results on many challenges. Tabular data means rows and columns, such as an invoice table, a customer export or a transaction log.
How do machine learning and deep learning compare?
Use classical machine learning for rows and columns, and deep learning for pixels, sound and free text.
| Classical machine learning (for example gradient boosting) | Deep learning | |
|---|---|---|
| Data needed | Works on thousands of rows; benchmarked at about 10,000 rows | Often needs far more data; some speech systems train on 680,000 hours of audio |
| Compute | A laptop or a small server | Usually GPUs; GPT-3 has 175 billion parameters |
| Tuning effort | Lower; one study found XGBoost needed much less tuning | Higher, with more settings to search |
| Explainability | Simpler models can be inspected directly; trees give feature importance | Harder to explain; needs extra tooling |
| Typical cost to run | Low per prediction and easy to host | Higher per prediction, and you may pay for GPU time or API tokens |
| Good at | Fraud scores, credit risk, churn, demand forecasts, pricing | Image recognition, speech to text, language understanding and generation |
| Typical failure | Weak when the useful signal is in raw text or images | Overkill, costly and harder to audit on small tabular problems |
Treat the cost row as a pattern, not a quote. Real figures depend on your volume, your hosting and your provider, and no honest number exists before someone has seen your data.
What are the different branches of machine learning?
Machine learning is usually described in three paradigms, supervised, unsupervised and reinforcement, plus two hybrids that matter in practice, semi-supervised and self-supervised. They differ in what the data looks like and what the model is told.
- Supervised learning trains on examples with known answers, called labels. A bank's past transactions marked fraudulent or legitimate train a model to score new ones. Much business machine learning is supervised, because most business records come with an outcome attached: paid or unpaid, churned or retained.
- Unsupervised learning looks for structure in data without labels. Clustering, which works on unlabeled data, can group customers by buying pattern or group similar support tickets so a team can see what is common.
- Semi-supervised learning combines a small labeled set with a large unlabeled one. In scikit-learn's terms it fits the situation where some training samples are not labeled. A claims team that has tagged 500 documents out of 50,000 might use it to extend those tags.
- Self-supervised learning creates its own labels from the data. Large language models learn this way: the GPT-4 report describes pretraining as predicting the next token in a document, which needs no human labeling.
- Reinforcement learning learns from rewards for actions in an environment. One widely cited use today is in training chat models: OpenAI's ChatGPT announcement describes ranking model responses to build a reward model, then tuning the model against it. Using it to run operations directly, such as pricing or routing, usually needs a reliable simulator and is uncommon in mid-sized companies.
Where is each used in industry, and why?
Classical machine learning dominates spreadsheet-shaped problems because the signal is in the columns and the volumes are modest. Typical uses are fraud scoring, credit risk, churn prediction, demand forecasting and lead scoring. Stripe's engineering team describes this path in its Radar write-up: the models started simple, with logistic regression, and until mid-2022 the system ran an ensemble that included XGBoost.
Deep learning dominates unstructured inputs. In vision, a residual network won the ILSVRC 2015 image classification task with a 3.57% error rate on the ImageNet test set for an ensemble of residual networks. In speech, Whisper reports strong zero-shot results after training on 680,000 hours of audio. In language, GPT-3 and GPT-4 are well-known examples of models that generate and interpret text. Deep learning also appears in industrial operations: Google DeepMind's 2018 data center post describes neural networks that predict the effect of cooling actions and directly control the cooling plant under operator supervision, with Google reporting cooling energy savings of around 30 percent on average. Operators can exit AI control at any time.
Do tree-based methods still beat deep learning on tabular data?
On the benchmarks that exist, yes, with limits worth stating. The 2022 paper Why do tree-based models still outperform deep learning on tabular data? tested deep models against XGBoost and random forests on a standard set of 45 datasets. Its authors found tree-based models remained state of the art on medium-sized data, around 10,000 samples, even when their speed advantage was set aside. They attribute the gap to the models' differing inductive biases, and set three challenges for neural networks built for tabular data: robustness to uninformative features, preserving the orientation of the data, and learning irregular functions easily.
An earlier study, Tabular Data: Deep Learning is Not All You Need (2021), reached a similar result: XGBoost outperformed several newer deep models across the datasets studied and required much less tuning, though an ensemble of deep models and XGBoost beat XGBoost alone.
Both studies are from 2021 and 2022, so check for newer benchmarks before treating the gap as permanent. They also cover medium-sized data. At very large scale the picture can change, as the next section shows.
When does deep learning win on business data?
When the volume or the input type changes. Stripe's account is the clearest example from a company that publishes its engineering choices. In mid-2022, according to the Radar post, the team migrated from an ensemble "Wide and Deep" model that included XGBoost to a model built only from a deep neural network. Stripe's stated reason was that XGBoost was incompatible at scale with more advanced techniques it wanted to use, and that its training was hard to parallelize. The post reports that removing it cut training time by over 85%, and that Radar decides in under 100 milliseconds on billions of payments.
That is a company with a payment network's volume and a large ML team. A 50-person distributor with a transaction table of 20,000 rows has neither, and the benchmarks above apply to it.
Deep learning also wins when your data is not a table at all: scanned invoices, call recordings, product photos, support emails and contracts. There the question is not which algorithm to train but which pretrained model to call.
What should you start with?
Follow this order and stop at the first step that solves the problem.
- Write the rule version first. A hand-written rule such as "flag invoices over a set amount from new vendors" gives you a baseline. A model has to beat it to be worth running.
- For rows and columns, fit gradient boosting. Compare it with logistic regression on the same train and test split. Keep the simpler model if the difference is small.
- For documents, images or audio, call a pretrained model through an API. Test it on your own examples. Training a deep model from scratch is rarely justified at this size, and our guide to how LLMs work explains why they behave as they do.
- Fine-tune only after a measured gap. If a pretrained model gets the content right but the format or category wrong, see RAG vs fine-tuning vs prompting.
- Test before production. Hold out recent cases the model never saw, and follow the steps in testing AI before production.
Illustrative example: A wholesale supplier wants to predict which of its 3,000 trade customers will stop ordering. Its CRM export holds one row per customer with order counts, last order date, support tickets and credit terms. The team first tries a rule, "no order in 90 days", then fits a gradient-boosted model on last year's data and compares both against the following quarter's actual losses. Separately, the same supplier's 40,000 scanned delivery notes go to a pretrained document model through an API, because those are images and text, not rows. Two problems, two different tools.
How Kastling approaches this
Choosing the technique is part of the design work in AI Integration & Automation. Kastling would start from the business task and the data behind it, connect the systems a business already uses, and agree how success will be measured before any model is trained or any API is bought.
Where the data is a table, that would usually mean a simple model with a clear baseline. Where it is documents, it would usually mean a pretrained model with a named person approving consequential outputs. Everything is tested against real business scenarios before it goes live, and cloud deployments run on AWS or Azure. Scope and operating costs are set out in the proposal.
AI data readiness check
Check the data behind one workflow across five areas, and get the three steps that would make it ready for AI.
Questions
Is deep learning always more accurate than machine learning?
No. Accuracy depends on the data. On images, audio and text, deep networks are the standard approach, but on tabular business data the studies cited here found gradient-boosted trees at least as accurate, with less tuning. Compare both on your own data with the same train and test split before deciding.
How much data do we need before machine learning is worth trying?
There is no universal threshold. The 2022 benchmark cited here worked with datasets of about 10,000 rows, and classical methods can work on fewer. What matters more is whether the outcome you want to predict is recorded reliably, since a model cannot learn from labels that are missing or inconsistent. Our data readiness check helps you assess that.
Can we explain a deep learning decision to a regulator or a customer?
It is harder than with simpler models. Decision trees and linear models can be inspected directly, while a deep network spreads its logic across millions of weights. If a decision must be explained, such as a credit refusal, favor the simpler model unless testing shows a gap that justifies the added complexity and a documented explanation method.
Where do large language models fit?
They are deep learning models trained on text, and they are the usual starting point for language tasks such as summarizing, drafting and classifying documents. They are not a good first choice for predicting a number from a spreadsheet, where a gradient-boosted model is cheaper to run and easier to test.
Sources
- Grinsztajn et al. (arXiv): Why do tree-based models still outperform deep learning on tabular data?
- Shwartz-Ziv and Armon (arXiv): Tabular Data: Deep Learning is Not All You Need
- Chen and Guestrin (arXiv): XGBoost: A Scalable Tree Boosting System
- Stripe Engineering: How we built it, Stripe Radar (March 29, 2023)
- arXiv: Deep Residual Learning for Image Recognition
- arXiv: Whisper, speech recognition via large-scale weak supervision
- arXiv: Language Models are Few-Shot Learners
- arXiv: GPT-4 Technical Report
- scikit-learn documentation: Clustering
- scikit-learn documentation: Semi-supervised learning
- OpenAI: Introducing ChatGPT (November 30, 2022)
- Google DeepMind: Safety-first AI for autonomous data centre cooling and industrial control (August 17, 2018)