Comparisons
Pairs that get conflated in real metric reviews and real design docs — batch and online, precision and recall, data drift and concept drift, validation and test. Neither column wins; what decides is the problem. Each record leads with the confusion, because the confusion is the reason the record exists.
Random forest vs gradient boosting
They are lumped together as "tree ensembles" and boosting is assumed to be the strictly better one. They reduce error by opposite mechanisms. A forest reduces variance: each tree overfits its bootstrap sample, and averaging many uncorrelated overfits cancels the noise, which is why it is hard to break with more trees and forgiving of untuned settings. Boosting reduces bias: each shallow tree corrects what the ensemble so far gets wrong, which is why it can reach lower error — and why it will happily fit label noise if the learning rate, depth and number of rounds are not tuned with early stopping on a validation set. The strongest case for the forest is robustness: it is the model you can hand to a new team and expect a good answer without a search. The strongest case for boosting is the ceiling: with the same features and a proper tuning budget it usually wins, and the implementations are fast. Both produce poorly calibrated probabilities, both cannot extrapolate beyond the training range, and both become the wrong answer when the inputs are images or text.
When you want a strong tabular model with almost no tuning, when the data is noisy, when training must be parallel and fast, or when the team cannot spend a day on hyperparameters.
When you can tune and validate carefully, the data is reasonably clean, and the last few points of quality matter — which is most tabular competitions and many production rankers.
| Dimension | Random forest — many deep trees on bootstrap samples, averaged | Gradient boosting — many shallow trees, each fitting the residuals of the ones before |
|---|---|---|
| Reduces | Variance | Bias |
| Tree shape | Deep, grown independently | Shallow, grown sequentially |
| Training | Embarrassingly parallel | Sequential across rounds |
| Tuning sensitivity | Low; more trees rarely hurts | High; rounds, depth, learning rate interact |
| Noise in labels | Averaged away | Fitted unless stopped early |
| Quality ceiling | Good | Usually higher with tuning |
| Shared limits | No extrapolation; poor calibration | No extrapolation; poor calibration |
| Wrong for | Tiny data, images, text | Tiny data, images, text, no validation set |
Model families compared
Linear, trees, boosting, neural and k-NN — compared without naming a winner, and with the block that says where the comparison stops being true.
No column is a winner. Each family is a set of assumptions about the data — linear separability, axis-aligned interactions, additive residuals, a representation that can be learned, locality in feature space — and the right one is the one whose assumptions your data happens to satisfy at the size you have. The reflex answer “XGBoost” is the red flag this table exists to catch: it is often right on tabular data and it is never right as a reflex, because it skips the baseline that would have told you whether anything more than a linear model was needed. The where this comparison misleads block on every row is the part worth reading.
Count independent entities, not rows — a million events from ten thousand users is ten-thousand-sized data for generalising to new users. And the neural column flips completely with transfer learning: a pretrained model fine-tuned on two thousand images beats every other column on that task.
The "boosting wins on tabular" claim is true for a tuned model on tens of thousands of clean rows with a validation set. It is not true for three hundred rows, for a problem whose signal is linear, for a regulator who wants coefficients, or for a team with no time to tune — and the gap to the linear model is often inside the error bar.
The columns are not competing on the same input. Once a pretrained network has produced an embedding, a linear model or k-NN on top of it is often within a few points of full fine-tuning — so "neural for images" usually means "a neural representation, then whichever head is cheapest".
Interpretability is not one property. A linear model with two hundred correlated features and L1 selection is harder to explain honestly than a depth-three tree; and every column's "explanation" is undermined equally by a leaked or proxy feature, which the explanation will present with confidence.
Training cost is dominated by the number of runs, not the run: a boosted model tuned over two hundred configurations costs more than a network fine-tuned once. And the k-NN column's zero is a loan repaid on every query.
The model is rarely the slow part. Feature retrieval, a network hop and JSON serialisation usually dwarf any of these numbers, so a latency budget is a question about the serving path before it is a question about the family.
A low burden on the modelling side does not remove the burden on the serving side: every column's features must be reproduced at prediction time with the same code, the same freshness and the same point-in-time semantics. Trees remove the need to engineer features, not the need to serve them.
Native handling is convenient and dangerous in equal measure: it lets a tree model learn that "missing" predicts the target, which is fine until serving produces missingness for a different reason — a timeout, a new form — and the model reads the outage as a signal.
Calibration only matters if a downstream decision multiplies the score by a cost or compares it to a probability threshold; a pure ranker does not need it. And calibration measured on the validation set drifts with the base rate in production, for every column alike.
Neither behaviour is "correct". A tree that predicts last year's maximum for a record-breaking day is wrong; a linear model that predicts a negative price is wrong differently. The honest answer is a monitor on inputs outside the training range and a fallback for them, whichever family serves.
Irrelevant is not the danger — leaky is. Every column will seize a feature that carries the answer, and the more capable the model the more efficiently it does so; robustness to noise says nothing about robustness to leakage, which only a point-in-time audit provides.
Every column is wrong somewhere, and the question that finds where is the same for all of them: how much data, of what modality, at what latency, with what interpretability requirement, judged by which metric, at what cost to train and serve. A model family chosen before those are answered is a guess with a library name.