A gradient boosting model must be monotonically non-decreasing in a liquidity feature. Explain how a monotonic constraint is enforced during split search, what it costs in training fit, and give one case where imposing it improves live performance.
A gradient boosting model must be monotonically non-decreasing in a liquidity feature. Explain how a monotonic constraint is enforced during split search, what it costs in training fit, and give one case where imposing it improves live performance.
Approach: Consider what bounds must be carried down each branch so no descendant split can violate the ordering, then ask what happens to those bounds as depth grows.
The constraint is enforced by carrying an interval of allowed leaf values down each branch: when a node splits on the constrained feature, the left subtree's values are capped above by the midpoint of the two child means and the right subtree's are floored below by it, and any split whose child means violate the required ordering is rejected. Every descendant inherits and tightens those bounds, so no combination of later splits can produce a non-monotone response, and the guarantee covers interactions with other features as well as the marginal. The cost is a strictly worse training loss, since the feasible set of functions is a subset of the unconstrained one, and the gap is largest where the sample shows the relationship reversing in a region driven by a handful of rows. That is exactly the case where the constraint helps live, because a thin region where the fitted relationship flips is where an unconstrained model produces a large confident prediction with no economic support. Encoding the prior that expected cost rises with size traded replaces a fitted artefact with a known fact, and it also makes the model extrapolate sensibly past the training range on that axis.
Follow-up: How do you enforce monotonicity in a neural network, and what does the equivalent constraint do to the expressive power of the hidden layers?
Key concepts: monotonic constraint, leaf value bounds, split rejection, extrapolation.