How does a tree handle missing values during inference if surrogate splits are not supported?

Quick Overview

Asks how a decision tree routes a sample with a missing feature value at prediction time when it cannot use surrogate splits. Tests the fallback rules a tree can use, how each is set during training, their trade-offs, and consistency between training and serving.

How does a tree handle missing values during inference if surrogate splits are not supported?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How does a tree handle missing values during inference if surrogate splits are not supported? A surrogate split is a backup split on another feature that mimics the primary split when its feature is missing. Assume the tree, or the library that runs it, has no such backup. ```hint Decide at training time Think about what each node could record during training so that a sample with a missing value has a fixed place to go at inference. ``` ```hint Hard or soft routing Compare committing a sample to a single branch with spreading it out, and think about what each choice costs at prediction time and what kind of output it gives. ``` ### What a Strong Answer Covers - The main fallback rules a tree can use without surrogates - How each rule is set during training and applied during inference - The trade-offs between the rules in accuracy, prediction cost and the kind of output they produce - Consistency of missing-value handling between training and serving - What happens when a feature that was never missing in training arrives missing at inference ### Follow-up Questions - How do surrogate splits work, and why do many libraries skip them? - A feature that was always present in training starts arriving empty in production. What do you do? - When is the fact that a value is missing itself predictive, and how would you let the model use it?

Overview: Asks how a decision tree routes a sample with a missing feature value at prediction time when it cannot use surrogate splits. Tests the fallback rules a tree can use, how each is set during training, their trade-offs, and consistency between training and serving.

PracHub logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

How does a tree handle missing values during inference if surrogate splits are not supported?

A surrogate split is a backup split on another feature that mimics the primary split when its feature is missing. Assume the tree, or the library that runs it, has no such backup.

What a Strong Answer Covers Guidance

  • The main fallback rules a tree can use without surrogates
  • How each rule is set during training and applied during inference
  • The trade-offs between the rules in accuracy, prediction cost and the kind of output they produce
  • Consistency of missing-value handling between training and serving
  • What happens when a feature that was never missing in training arrives missing at inference

Follow-up Questions Guidance

  • How do surrogate splits work, and why do many libraries skip them?
  • A feature that was always present in training starts arriving empty in production. What do you do?
  • When is the fact that a value is missing itself predictive, and how would you let the model use it?