Demonstration 1 of 1
Low attribution for a copy, and what removing it costs
When two columns carry the same information, does the one with low attribution deserve to be dropped, and what does dropping both cost?
Shapley attribution divides credit among the columns the fitted model used. With identical columns a tree picks one of them at every split (here the first column), so the other receives exactly zero credit and ranks below pure noise. With near-copies the model uses both and the split between them is arbitrary, changing from dataset to dataset. In every case the pair is what the model needs: removing only the low-attribution copy is nearly free when the copies are tight, removing both is expensive.
Scroll sideways for the whole equation
phi_j is the attribution of column j to one prediction, v(S) the mean model output when only the columns in S are taken from the explained row, and mean |phi_j| the quantity a SHAP screen ranks. The weight is the share of column orderings in which the columns of S come before j.
Predict first. With two identical columns, what mean absolute attribution does the low-attribution copy receive, and what does dropping both cost?
Choose an example
Scroll sideways for the whole figure
Constructed example: eight seeded synthetic datasets, a histogram gradient boosting model and exact Shapley enumeration, measured by the chapter activity.
Calculated values
- Higher copy |attribution|
- 0.265
- Lower copy |attribution|
- 0.000
- Noise column |attribution|
- 0.020
- Drop low copy
- 0.000
- Drop both copies
- +0.206
- Drop a noise column
- 0.000
At copy correlation 1.0: the higher-ranked copy has mean |attribution| 0.265 and the lower-ranked copy 0.000, against 0.020 for a noise column. The low copy ranks below a pure-noise column, so a screen would call it noise. Removing the low copy changes fresh-row log loss by 0.000; removing both copies changes it by +0.206, and 0.206 - 0.000 = 0.206 is the extra cost of dropping the pair. The lower-ranked copy was column A in 0 of 8 datasets.
Worked steps
- Share of the pair's attribution held by the low copy: 0.000 / (0.000 + 0.265) = 0.000.
- Cost of dropping the low copy: 0.000 log loss; a noise column: 0.000.
- Cost of dropping both: 0.206 - 0.000 = 0.206 beyond the single removal.
- Low copy was column A in 0 of 8 datasets (column order, not information, breaks a tie).
Use the idea
Treat a low mean |SHAP| as a candidate for a removal experiment, not a verdict. Check correlated substitutes first, remove the candidate and its substitutes as a group on the same development rows, and keep a pure-noise column as the control for what removal costs when a column carries nothing.
Where the conclusion applies
Constructed data. The shap library is not installed, so attribution is computed by exact interventional Shapley enumeration on predicted probability (the chapter's tree explainer is the efficient version of the same idea, and its output is a margin by default), with a histogram gradient boosting classifier standing in for LightGBM. Which of two identical columns receives the credit is decided by column order in this model; other libraries break ties differently.
Check your understanding: Why does the low-attribution copy cost nothing to drop at correlation 1.0, but cost something at correlation 0.5?
Chapter 27 source: section "A Removal Contrast".