Tree Depth and Interaction Order in Boosting
The maximum depth of the individual trees inside a gradient-boosted model directly caps how many features can interact within a single tree, which is a more useful way to think about the setting than 'model complexity' alone.
Prerequisites: Decision Trees and CART, Gradient Boosting as Functional Gradient Descent
Every gradient-boosted model is built from many small trees, and one of the first hyperparameters you set is how deep each of those trees is allowed to grow. It's tempting to think of tree depth as just a generic "complexity" dial, but it has a much more concrete meaning: the maximum depth of a tree caps the maximum number of features that tree can combine in a single decision path. That's the real lever you're turning, and it changes what kinds of patterns the model can represent at all — not just how tightly it fits the training data.
Depth as interaction order
A tree with depth 1 — a single split, sometimes called a "stump" — can only ever look at one feature at a time; its prediction for any point depends on exactly one variable. A tree with depth 2 can split on one feature and then, within each resulting branch, split again on a second feature, so its prediction can depend on how two features combine (an interaction between them). In general, a tree of depth can capture interactions among at most features, because each level of the tree can introduce at most one new feature into the decision path leading to a given leaf.
In plain English: depth is a hard ceiling on how many variables are allowed to jointly determine a prediction within one tree. A boosted model made of depth-1 trees is, by construction, additive — the sum of many single-feature effects — and can never represent a genuine interaction, no matter how many such trees you add.
Worked example: can the model see this pattern?
Suppose the true signal driving a return prediction is: "buy signal only fires when momentum is positive and volatility is low — neither condition alone predicts anything." This is a two-way interaction. Boosting 500 depth-1 stumps on this data will systematically underfit: each stump can only report one condition in isolation, and averaging many such rules can never reconstruct a rule that genuinely requires both together. Switch to depth-3 trees, and a single tree can split first on momentum, then on volatility within the momentum-positive branch, capturing the interaction directly — needing far fewer trees to represent the true pattern rather than just approximating pieces of it.
The overfitting side of the tradeoff
Deeper trees aren't free: a tree of depth 6 can carve the feature space into far more distinct regions than a stump can, and with enough depth a single tree can start memorizing quirks of the particular training rows it saw. In gradient boosting, moderate per-tree depth (3–6) is usually enough to model realistic interaction structure — going much deeper tends to overfit rather than add genuine predictive power, since real market relationships rarely involve clean six-way interactions.
The explorer above shows train versus test error as model complexity increases; tree depth plays exactly that complexity-dial role in a boosted ensemble — shallow trees underfit interaction structure, very deep ones start fitting noise.
What this means in practice
If you suspect a strategy's signal genuinely depends on interactions between a small number of features (a common case in finance: signal strength conditioned on regime), start with depth 3–4 rather than depth 1, and check validation performance rather than defaulting to the deepest tree your library allows. Most gradient boosting libraries default to a modest depth (3–8) for exactly this reason — it's usually enough to capture real-world interaction complexity without giving individual trees enough freedom to memorize training noise.
Tree depth in gradient boosting caps the maximum interaction order the model can represent: a depth- tree can combine at most features along any decision path. Depth-1 stumps can only model additive, one-feature-at-a-time effects and will systematically underfit any real interaction between features, while excessive depth risks individual trees memorizing training-set noise.
Don't tune tree depth purely by watching validation accuracy go up and treating it as "more complexity is better" — check whether your problem plausibly involves feature interactions at all. If it doesn't, deeper trees just add overfitting risk with no compensating benefit, and a shallower, more regularized model will generalize better even at a slightly lower training-set fit.
Related concepts
Practice in interviews
Further reading
- Hastie, Tibshirani & Friedman, The Elements of Statistical Learning, ch. 10