What are interaction constraints in gradient boosted trees and when would you use them?

Quick Overview

Asks what interaction constraints do in gradient boosted tree libraries and when you would turn them on. Tests understanding of how trees encode feature interactions, how constraint groups are specified, and what restricting the model costs in accuracy.

What are interaction constraints in gradient boosted trees and when would you use them?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

What are interaction constraints in gradient boosted trees and when would you use them? ```hint Where a tree stores interactions Think about what it means, inside a single tree, for two features to interact, and where in the tree structure that happens. ``` ```hint Who wants fewer interactions Consider the people who have to explain, approve or maintain the model, and what a model built from per-feature or per-group effects gives them. ``` ### What a Strong Answer Covers - Where interactions live in a tree and what the constraint restricts. - How the feature groups are specified, and what happens to features that appear in no group. - Concrete situations where restricting interactions is worth it. - The accuracy cost and how to check it against an unconstrained model. ### Follow-up Questions - If the groups do not overlap, what does the final model look like as a function of the features? - How do interaction constraints differ from monotone constraints? - Does blocking a sensitive feature's interactions make the model fair with respect to that feature? - How would you find out which interactions are worth allowing?

Overview: Asks what interaction constraints do in gradient boosted tree libraries and when you would turn them on. Tests understanding of how trees encode feature interactions, how constraint groups are specified, and what restricting the model costs in accuracy.

General logo
General
Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

What are interaction constraints in gradient boosted trees and when would you use them?

What a Strong Answer Covers Guidance

  • Where interactions live in a tree and what the constraint restricts.
  • How the feature groups are specified, and what happens to features that appear in no group.
  • Concrete situations where restricting interactions is worth it.
  • The accuracy cost and how to check it against an unconstrained model.

Follow-up Questions Guidance

  • If the groups do not overlap, what does the final model look like as a function of the features?
  • How do interaction constraints differ from monotone constraints?
  • Does blocking a sensitive feature's interactions make the model fair with respect to that feature?
  • How would you find out which interactions are worth allowing?