What is the difference between gain, cover, and split-count feature importance in boosting libraries?

Quick Overview

Asks how gain, cover and split-count feature importance differ in gradient boosting libraries such as XGBoost and LightGBM. Tests what each measures at a split, average versus total variants, library defaults, the biases they share, and when SHAP or permutation importance is the better choice.

What is the difference between gain, cover, and split-count feature importance in boosting libraries?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

What is the difference between gain, cover, and split-count feature importance in boosting libraries such as XGBoost and LightGBM? When would each one mislead you? ```hint Look at one split node For each importance type, ask what quantity is recorded at a split node that uses the feature, and whether the library sums it or averages it across splits. ``` ```hint Who gets more chances Think about which kinds of features offer the tree many candidate thresholds, and what that does to a measure computed on the training data. ``` ### What a Strong Answer Covers - What each of the three measures at the level of a single split - The average versus total variants and the defaults in XGBoost and LightGBM - What cover means for losses other than squared error - The biases shared by all three (training data, correlated features, high-cardinality features, inconsistency) - What to use instead when the importance drives a decision ### Follow-up Questions - A random ID column ranks near the top by split count. Why, and what would permutation importance on validation data show? - Two features are almost perfectly correlated. How is gain importance divided between them, and how does SHAP behave? - Why can average gain rank a rarely used feature above one the model uses everywhere? - What does it mean for a feature importance method to be consistent?

Overview: Asks how gain, cover and split-count feature importance differ in gradient boosting libraries such as XGBoost and LightGBM. Tests what each measures at a split, average versus total variants, library defaults, the biases they share, and when SHAP or permutation importance is the better choice.

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

What is the difference between gain, cover, and split-count feature importance in boosting libraries such as XGBoost and LightGBM? When would each one mislead you?

What a Strong Answer Covers Guidance

  • What each of the three measures at the level of a single split
  • The average versus total variants and the defaults in XGBoost and LightGBM
  • What cover means for losses other than squared error
  • The biases shared by all three (training data, correlated features, high-cardinality features, inconsistency)
  • What to use instead when the importance drives a decision

Follow-up Questions Guidance

  • A random ID column ranks near the top by split count. Why, and what would permutation importance on validation data show?
  • Two features are almost perfectly correlated. How is gain importance divided between them, and how does SHAP behave?
  • Why can average gain rank a rarely used feature above one the model uses everywhere?
  • What does it mean for a feature importance method to be consistent?