Hooker Mentch Zhou 2021 - Conditional and Relearning Importance Measures

Summary

Four importance measures avoid evaluating the original model off the data. Each needs one more model: a model of , a refit of , or both.

  • Conditional importance : resample given , then predict with the original model.
  • Dropped/LOCO importance : refit without .
  • Permute-and-relearn : permute , then refit.
  • Condition-and-relearn : resample conditionally, then refit.

Theorem 2: under squared error all four target with . Theorem 3: for linear models they scale with times the residual variation of given the other features. This is the compensation effect: correlated features lose importance, the opposite of PaP. In simulation (Fig. 7) the four measures agree on rankings for RF, NN and linear models.

Overview

The paper’s subtitle is “variable importance requires at least one more model, or there is no free variable importance”. Every remedy in §5 follows one of two ideas (p. 10):

  1. Generate from its conditional distribution given the rest. Examples: Strobl et al. (2008), first; Tuv et al. (2009), tree ensembles for non-redundant feature sets; Wu et al. (2007), pseudovariables to tune linear models; the knockoff framework of Barber et al. (2015) and Candès et al. (2018); and Fisher et al.’s (2019) conditional model class reliance, which the results here favour (MCR definition).

Definition: The two modes of the knockoff framework (§5 item 1, p. 10)

The paper describes the knockoff framework of Barber et al. (2015) and Candès et al. (2018) as working in one of two ways:

  1. Swap-and-test. The original features are swapped out for randomized replacements (knockoffs), drawn so that they mimic the dependence structure of the real features but carry no extra information about . Importance is then assessed by a conditional randomization test. This is the mode used in §5.1, where Model-X knockoffs serve as the substitute (^ex-noise-test-sim).
  2. Augment-and-filter. The feature space is augmented with null copies of the original features, a model is fit on originals plus copies, and a knockoff filter is applied to eliminate non-important features. In Barber et al. (2015), Controlling the false discovery rate via knockoffs (Annals of Statistics 43(5)), the filter compares each feature’s statistic with its copy’s and picks a threshold that controls the false discovery rate. The paper does not use this mode.

Both modes belong to the “generate conditionally” family because the knockoffs respect the joint feature distribution, so the model is never queried off the data.

  1. Remove and refit (leave-one-covariate-out, LOCO). This is classical in statistics (Lehmann & Romano 2006) and was proposed in a conformal-inference setting by Lei et al. (2018).

The two can be combined. Mentch & Hooker (2016) compare a forest trained on the original data with one trained on data where is permuted. The permutation only makes the feature irrelevant, and both models are evaluated inside the bulk of the data. They permuted rather than dropped the feature so that both fits have the same complexity and are statistically comparable.

Main Content

Definitions (§5, p. 12)

Definition: Conditional variable importance

Build by drawing , then

In the Gaussian-copula simulation the conditional law is known in closed form. Strobl et al. (2008) fit here: for each tree they permute within cells of a partition built from all cut points on in that tree. Fisher et al.’s conditional model reliance also fits here.

Definition: Dropped variable importance (LOCO)

Fit on , then

This uses training error and is equivalent to the LOCO methods of Lei et al. (2018).

Definition: Permute-and-relearn importance

Fit on , then

Mentch & Hooker (2016) used this together with distributional results for random forests to test the significance of .

Definition: Condition-and-relearn importance

Fit on , then

Sign convention. For the source writes (loss of original) (loss of refit). The intended quantity, as for , is the increase in loss when the feature is muted. Read these with the sign reversed, or as magnitudes.

Costs (p. 12): each measure requires training a new model and/or estimating and sampling . The simulation has this conditional law analytically, which “will rarely if ever be the case in practice.”

Condition-and-relearn importance (assembled from the §5 definitions and the §1 "gold standard" remark; the paper gives no numbered algorithm)

  1. Fit on and record its loss on the evaluation set.
  2. Fit a model for , for example a Gaussian or copula model, a knockoff generator, or a within-partition permutation.
  3. Draw to build .
  4. Refit on with the same learning algorithm and settings.
  5. Importance = loss of minus loss of on the evaluation data. Repeat steps 3-5 and average.
  6. If you need significance, compare the two losses with a test that accounts for refitting (see Hooker Mentch Zhou 2021 - Relearning Hypothesis Tests and Bike-Share Application).

Theorem 2: a shared target

Theorem 2: Common population target under squared error (§5, p. 13)

Let be with replaced by some satisfying , and let . Then the minimum least-squares predictor of from is

and for this

Outside squared-error loss, the loss-minimizing predictor from need not be , and the four definitions may differ.

Proof sketch (Appendix A, p. 21)

The first equality uses . estimates this directly. A permuted , a conditional draw , and, for , any constant in place of all satisfy , which gives the result.

How dropping a column fits Theorem 2 (from the proof, Appendix A, p. 21)

The theorem statement is phrased in terms of a replacement with . That obviously covers (conditional draw, refit not needed), (permuted copy) and (conditional draw). The link to is made only in the proof: dropping is equivalent to replacing it with any constant. A constant is independent of everything, so it trivially satisfies , and the best predictor from is the best predictor from alone, i.e. . The proof also says explicitly that “is the quantity we estimate directly in” : conditional importance plugs in a sample of without refitting, whereas the other three reach by refitting. A caution the proof does not raise (vault gloss): Theorem 2 is a population statement about the best predictor. It does not rule out the finite-sample behaviour in §5.1, where a learner refit on permuted features can still reject a true null far too often.

Contrast with PaP. Here integrates against the conditional density . The PaP target in ^def-pap-targets uses the marginal . That one change is the whole difference between staying on the data and extrapolating. The target is the variance of that cannot explain, which links it to the total-effect Sobol index (Variance-Based Sensitivity and Sobol Indices) and to the conditional expectation function (Regression and the CEF).

Figure 7: agreement in simulation (p. 14)

Average importance rank by measure for random forests (left), neural networks (middle) and linear models (right). Data: 10 simulated data sets of size 200. Top row: independent features. Bottom row: with Gaussian-copula .

  • All four measures agree on the ordering, within Monte Carlo variability, across all models.
  • Unlike PaP, they reduce the importance of as correlation rises.
    • For LOCO, can absorb part of ‘s signal.
    • For conditional measures, has a much smaller variance than the marginal of (see the points in Fig. 5).

Approximate average ranks read from the Fig. 7 plot. Series: π = PaP, C, D, πL, CL; o = RF OOB, shown for RF only. Under PaP the theoretical rank of - is about 6.

Panel (): PaP (π): C / D / πL / CL-: π-: alternatives: π vs alternatives
Random forest~7.9, ~8.4 (OOB ~8.8, ~9.1)~3.5~5~7~7.7 (OOB ~7) vs ~9
Neural network~7.5, ~7.5~3.2-4.8~5-5.4~6-7~6.9 vs ~7.5
Linear model~6.1, ~5.9~2.5~6~7~9 vs ~9

Figure 7, transcribed in full. All six panels were read from the rendered plot points (p. 14, 300 dpi, enlarged), so values are approximate to about ±0.1 rank (±0.2 for the NN panels, where markers overlap). Legend symbols: π black circle, C red triangle, D green plus, πL blue cross, CL cyan diamond, o magenta inverted triangle (RF only). “1, 2, 3” for - means the marker sits on the integer to within plotting resolution. Theoretical PaP ranks (Theorem 1, eq. (2)): - about 6, , , , , . For the alternatives at , Theorem 3 scales by their residual variance given the other features. As a rough Gaussian approximation (our calculation, not the paper’s) that is about of the marginal variance, so the expected importances are proportional to for , against for , for and for -. The implied ordering is , i.e. ranks 1, 2.5, 2.5, 4, 5, 6-8, 9, 10. The linear panel matches this exactly.

Top row, (independent features).

LearnerMeasure
RFπ5.556.455.855.96.25123910
RFC5.56.455.86.156.1123910
RFD5.756.056.05.856.35123910
RFπL5.86.15.95.96.25123910
RFCL5.76.156.05.86.25123910
RFo (OOB)5.56.55.75.956.25123910
NNπ6.356.15.45.35.453.74.33.956.857.55
NNC5.66.05.355.65.453.754.24.36.68.3
NND5.55.356.25.055.74.253.754.357.07.85
NNπL6.55.056.055.85.83.33.553.97.17.85
NNCL6.35.755.656.16.32.63.054.07.47.75
Linearπ5.855.656.056.16.3123910
LinearC5.75.856.156.16.15123910
LinearD / πL / CL (overlap)5.75.955.95.956.5123910

Bottom row, ( Gaussian-copula correlated).

LearnerMeasure
RFπ7.98.454.954.955.051237.6510
RFC3.53.757.06.97.1124.8910
RFD3.43.67.07.07.05125910
RFπL3.553.57.056.97.05125910
RFCL3.43.67.06.87.15125910
RFo (OOB)8.89.14.94.955.151237.09.1
NNπ7.457.455.45.05.352.93.653.656.957.2
NNC3.43.656.66.36.33.354.855.07.557.95
NND4.83.26.756.35.83.54.35.057.457.85
NNπL3.93.356.456.956.353.054.554.87.558.0
NNCL4.04.356.456.15.653.554.455.86.857.8
Linearπ6.15.96.15.955.9123910
LinearC / D / πL / CL (overlap)2.552.57.06.857.05145910

What the full transcription adds to the text.

  • Top row. For RF and the linear model all measures coincide on - and scatter only within the - tie (ranks 5.5-6.5), i.e. at the choice of measure does not matter. The NN top row is the noisy one: every measure compresses the ranking ( only 7.5-8.3, at 2.6-4.3), and the five measures disagree within - by up to about 1.5 ranks. This is learner variability at , not extrapolation (there is no correlation to extrapolate across).
  • Bottom row. For the linear model the alternatives push (about 2.5) below (coefficient 0.5), and the freed rank positions move , up to 4 and 5 (instead of 2 and 3). For RF the pair falls to about 3.5: below (about 5) and - (about 7), but still above , which stays at rank 2. PaP and OOB do the reverse, and RF-OOB even drops to about 9.1 and to 7.0 because occupy the top two slots.
  • The text’s claim that the four alternatives “all agree (to within Monte Carlo variability)” is visible in the RF and linear panels (spread ≤0.25 rank). In the NN bottom panel the spread is larger: ranks at about 4.8 while gives about 3.4, and ranks at about 5.8 vs about 4.8 for .
  • Caption fidelity: the caption reads “Gaussian copular” (typo for copula) and says “10 simulated data sets of size 200”, a smaller design than the 50 replicates of size 2,000 behind Fig. 1.

This shows the compensation effect. Under the alternatives, the correlated pair drops below the independent equal-coefficient features (ranks ~2.5-3.5), for the linear model as well. The linear-model panel shows clearly that PaP (black) and the alternatives (cyan) answer different questions even when no extrapolation occurs. Theorem 1 vs Theorem 3.

Theorem 3: linear-model expectations and the compensation effect

Theorem 3: Alternative importances for least-squares linear models (§5, p. 13)

Let be fit by least squares, with linear dependence between features, . Let be the least-squares residuals from predicting . Then

The comes from estimating coefficients with a random covariate matrix after permuting a feature. Normalized by it is and generally small. (Equation transcribed as printed. The proof shows , which suggests and should have the same order. Treat the exact constants with care.)

Notation problems in the printed statement of Theorem 3 (p. 13, checked against the rendered PDF)

  1. Mixed hats in . The source prints . The intercept carries a hat but no subscript, while the slope carries a subscript but no hat, and has lost its row index . Since is described as “the least-squares residuals to predict ”, the consistent reading is : the sample residuals from regressing column on the other columns. The unhatted in the hypothesis are the population coefficients.
  2. vs . Both displayed results are printed with (no hat), but the theorem is about the fitted model . The Appendix A proof (p. 21) makes the same slip: it writes , where the left side forces the coefficient on to be . The result is therefore a statement about the estimated coefficient: , the same as in Theorem 1, which is stated with . Replacing with the true only holds up to estimation error.
  3. Constant on . Separately (the caveat above), the proof gives , so is consistent. But would make equal to , not twice it. The factor of 2 on the relearn measures is not derived in the appendix.

The equations above are transcribed exactly as printed. These are our readings of the notation, not corrections published by the authors.

Proof sketch (Appendix A, pp. 21-22)

  • Regressing on for invertible is the same as regressing on . Include an intercept column in .
  • Write . Both the residuals and are orthogonal to . Hence This is the omitted-variable formula: the dropped coefficient loads onto correlated features through .
  • . The cross term vanishes, and substitution gives the residual sum of squares .
  • : centre the . Then , so , and the result carries over.
  • : same calculation after subtracting from .
  • : as in Theorem 1, using .

Definition: Compensation effect (§5, p. 13)

All four alternatives reduce the importance of correlated features relative to their coefficients, because only the part of not linearly predictable from (, or ) counts. Theorem 3 suggests correcting for this by dividing by the appropriate residual quantity, if one wants a coefficient-like ranking. That correction is exact only for linear models.

Joint importance (p. 13). The most reliable diagnostic the authors know for correlated groups is to remove or permute pairs jointly and refit. Extending Theorem 1 gives a joint importance of

(printed with twice; the second is presumably ). This cannot be recovered from any of the univariate measures in the paper.

Local explanations are not a global substitute (p. 13)

  • Saliency (Simonyan et al. 2013): derivatives with respect to .
  • LIME (Ribeiro et al. 2016): a kernel-localized LASSO approximation.
  • Local Shapley values (Lundberg & Lee 2017).

These query near observed , so they should not suffer from extrapolation, but Slack et al. (2020) show SHAP and LIME can be fooled by altering off the data distribution. They also do not give the global picture that permutation methods aim for. Example: if is a threshold whose transition lies away from all observed points, saliency is low everywhere even though predictions span a large range.

Examples

Example: two collinear channels in a linear MMM-style regression

Suppose sales and search spend is 90% predictable from TV spend (). By Theorem 1, PaP importance of TV is and ignores the overlap. By Theorem 3, LOCO, relearn and conditional importances scale with , so TV’s importance drops about tenfold. Neither number is “wrong”: PaP answers “what if TV moved alone?”, while the alternatives answer “what does TV add beyond search?“. To credit the pair, drop or permute both together and refit.

Connections

See Also