Feature importance is not feature contribution
The same tree model can produce three different feature rankings. That is not a contradiction — each method answers a different question.
TL;DR: Feature importance is not feature contribution. Gain measures split-level training utility, permutation importance measures reliance on a held-out dataset, and SHAP measures how features move individual predictions. One model can produce three valid rankings because each method answers a different question — so choose the question first, use more than one lens, and investigate the disagreements.
Visual Summary
The Problem
Someone points at a chart and says: "This is the model's most important feature." The right follow-up is not to accept the ranking — it is to ask: important in what sense?
I can take the same tree-based model and get different rankings depending on the method I use. That is not necessarily a contradiction. It means the methods answer different questions: which splits reduced training loss, which inputs held-out performance relies on, and which features moved an individual prediction away from a baseline.
Treating all three as "the one true ranking" leads to bad decisions. A feature can dominate gain because it offers many possible split points, disappear under permutation because a correlated twin can substitute for it, and still be the main driver of one specific prediction in SHAP.
The Approach
I stopped describing importance as a single property and started presenting it as three distinct lenses, each with an explicit question attached.
Gain: split-level training utility
How much training-objective improvement was attributed to splits using a feature? It is fast and useful, but can favour features with many possible split points and distribute credit unevenly across correlated inputs.
Permutation: predictive reliance on held-out data
How much does held-out performance degrade when one feature is shuffled? This measures reliance in a particular evaluation dataset — but correlated features can mask each other, so shuffling one may show little degradation when another can substitute for it.
SHAP: contribution to individual predictions
How did each feature move an individual prediction relative to a baseline? Aggregating mean absolute SHAP values gives a global summary of average contribution magnitude, but the method is local first.
Cross-check the disagreements
When the three rankings disagree, investigate instead of picking a favourite. Disagreement often reveals correlation, interactions, instability, or a feature whose role is more nuanced than one ranking can show.
In practice the workflow is: state the interpretation question, pick the lens that answers it, then verify the story with a second lens. A feature that ranks high everywhere is a robust signal. A feature that ranks high only under gain deserves a solution-quality question, not a business recommendation.
Outcome
The conversation changed from "which feature is most important?" to "which interpretation question are we trying to answer?" For training diagnostics I use gain. For checking whether a deployed model actually relies on a feature, I use permutation importance on held-out data. For explaining one prediction to a stakeholder, I use SHAP and never present a global ranking as if it were a per-case explanation.
The most valuable output was not a better ranking — it was a cheaper way to spot fragile reasoning. When one feature jumps from fourth to first between methods, the discussion moves to why, and that question usually surfaces a correlation or an interaction that the single ranking was hiding.
Key Takeaway
Design insight: Feature importance is not feature contribution. Gain measures split-level training utility, permutation importance measures reliance on a specific held-out evaluation set, and SHAP measures how features move individual predictions. One model can produce multiple valid importance views because each method answers a different question. Before reading any ranking, choose the question — then cross-check with a second lens and investigate the disagreements, because importance is not causation and a single ranking can hide correlation, interactions, or instability.
Comments
FAQ
What is the key takeaway from "Feature Importance vs Feature Contribution"?
Feature importance is not feature contribution. Gain measures split-level training utility, permutation importance measures reliance on a specific held-out evaluation set, and SHAP measures how features move individual predictions. One model can produce multiple valid importance views because each method answers a different question. Before reading any ranking, choose the question — then cross-check with a second lens and investigate the disagreements, because importance is not causation and a single ranking can hide correlation, interactions, or instability.
Who wrote this and what is it about?
This was written by Mahmoud Trigui, Senior Data Scientist. Gain, permutation, and SHAP answer different questions. One tree model can produce three valid feature rankings — read each lens and cross-check the disagreements.