Hooker Mentch Zhou 2021 - Relearning Hypothesis Tests and Bike-Share Application

Summary

§5.1: refitting fixes importance rankings, but it is not enough for hypothesis tests of importance if the muted features are replaced by unconditional permutations. In a simulation with pure-noise features, each correlated 0.7 with one of 10 real features (so the noise is independent of given the real features), a permute-and-relearn test rejects the null far above the nominal 5%, increasingly so as grows. Replacements drawn from the true conditional distribution, or Model-X knockoffs, keep rejections near 5%. §5.2: on hourly bike-share data, out-of-bag permutation importance ranks temp highly while permute-and-relearn ranks it low. Screening on OOB importance might keep temp and drop yr.

Overview

The two subsections cover two distinct uses of importance. One is ordering, where features are ranked or screened. The other is testing: is feature set predictively significant? §5.1 shows that a method can be good enough for the first and not for the second. §5.2 shows that the choice of measure changes conclusions on real data.

Main Content

Tests for variable importance (§5.1, pp. 14-15)

Formal importance tests for random forests began with Mentch & Hooker (2016). Coleman et al. (2019) gave a scalable nonparametric alternative, and Williamson et al. (2020) a model-agnostic one. These tests take an importance measure as given and ask whether a feature set matters more than chance would allow.

Definition: Generic importance null hypothesis (§5.1, p. 14)

Partition the features into . Test

on an external test set. is a forest fit on the original features. is a forest fit with dropped or replaced by a non-important randomized substitute: a permutation, or a draw conditional on . These correspond to the importance measures . If matters, and is rejected.

Mentch & Zhou (2020) showed that how is built matters a lot: permute-and-relearn can declare significant even when it is conditionally independent of given .

Simulation design (§5.1, p. 15)

Example: Noise-feature test simulation (§5.1, Fig. 8)

  • Signal model: the same linear model as eq. (2), .
  • Features: with (an AR(1)-type correlation; the value of is not stated in the text).
  • Noise: , with set to give a target SNR. Figure legend values: 0.05, 0.25, 0.71, 2.07.
  • Extra noise features: of them, each standard normal and correlated at 0.7 with one of the 10 originals chosen uniformly at random. Given the 10 originals they are independent of , so is true. ranges over roughly 0-250 (Fig. 8 x-axis).
  • Test: the procedure of Williamson et al. (2020), applied to bagging and to random forests, with = the noise features; .
  • Substitutes :
    1. random permutation of (permute-and-relearn);
    2. draws from the true conditional distribution (known in simulation);
    3. Model-X knockoffs (Candès et al. 2018): second-order multivariate Gaussian knockoffs, approximate semidefinite-program construction, R package knockoff.
  • Replication: 100 runs per setting combination. The reported rate is the proportion of runs that reject .

Figure 8 (p. 15; y-axis “Probability of Rejection”): empirical rejection probability vs number of extra noise features , by SNR and model (bagging, RF). Panels: left = permutation, middle = MX knockoffs, right = true conditional. The authors call this last panel “Truth”, for the true conditional distribution.

SubstituteRejection rate under a true Reading
Permutation (permute-and-relearn)Well above 0.05 in many settings, rising with and with SNR. Approximate readings at : SNR 2.07 ≈ 0.7, SNR 0.71 ≈ 0.4-0.5, SNR 0.25 ≈ 0.25-0.3, SNR 0.05 ≈ 0.05-0.1, with RF (dotted) usually above bagging (solid)Permuting breaks the noise features’ correlation with real features as well as with
Model-X knockoffsAbout 0.05An estimated conditional law is enough here
True conditionalVery near 0.05The reference

Figure 8, full transcription. Values were read from the rendered plot points (p. 15, 400 dpi) and are approximate to about ±0.01-0.02. Panel titles: “Permute−and−Relearn”, “Knockoff”, “Truth”. Y-axis label in all panels: “Probability of Rejection” (0 to about 0.75). X-axis: ”# of Extra Noise Features (q)“. A dashed horizontal reference line marks 0.05. Legends: SNR ∈ {0.05, 0.25, 0.71, 2.07}; Model: Bagging (solid), RF (dotted). The grid of is dense below 50 (about every 5: roughly 5, 10, …, 45) and then 50, 100, 150, 200, 250.

Left panel, permute-and-relearn (rejection rate under a true ).

SNRModel (range)100150200250
2.07Bagging0.03-0.240.230.380.430.580.70
2.07RF0.04-0.200.320.450.570.700.71
0.71Bagging0.03-0.220.110.240.340.360.41
0.71RF0.03-0.190.160.340.430.530.48
0.25Bagging0.02-0.150.150.140.200.180.26
0.25RF0.02-0.120.150.130.200.180.32
0.05Bagging0.01-0.090.070.100.100.070.09
0.05RF0.02-0.080.070.040.090.110.09

Where the curves first leave the nominal level: for SNR 2.07 the RF curve already reaches about 0.16-0.20 at -20; for SNR 0.71 and 2.07 every curve is above 0.10 from on (except bagging at SNR 0.71, 0.11 at , then 0.24); for SNR 0.25 the rates sit at about 0.13-0.20 from to 200 and rise to 0.26-0.32 at 250; for SNR 0.05 they stay at about 0.04-0.11, close to nominal. RF is above bagging at SNR 0.71 and 2.07 for most ; at SNR 0.25 and 0.05 the two are nearly identical.

Middle panel, Model-X knockoffs, and right panel, true conditional.

SubstituteAll 8 curves, All 8 curves, Notable points
Knockoff0.01-0.110.01-0.10Max about 0.10 (SNR 0.25 bagging, ); max at about 0.09 (SNR 2.07 RF); min about 0.01 (SNR 0.71 bagging, )
Truth0.00-0.120.02-0.09Max about 0.12 (SNR 2.07 bagging, ); 0.08 (SNR 0.05 bagging, ); 0.09 (SNR 2.07 RF, )

Monte Carlo context (vault calculation, not in the paper). With 100 replications per setting, the Monte Carlo standard error of an estimated rejection rate whose true value is 0.05 is . The knockoff and truth ranges of about 0.01-0.12 are therefore consistent with a true size of 0.05 (about ±2.5 SE at the extremes, across many settings). The permute-and-relearn values of 0.3-0.7 are 10-30 SE above nominal. See Morris White Crowther 2019 - Simulation Studies (ADEMP) - Overview for Monte Carlo SE of rejection rates.

Mechanism. Permuting breaks its relationship with the response and its correlation with the other features. The authors stress that this is not specific to this test or hypothesis. Any test of conditional independence that compares model performance after dropping or permuting a subset of features has the same problem. Replacements that preserve the between-feature dependence do not appear to.

Claim: Ordering is not testing (§5.1, p. 16)

Relearning after permuting fixes many of the ranking problems of permute-and-predict, but “relearning alone does not fully resolve the issues associated with permutation-based variable importance.” For valid tests, replacements must preserve the joint feature distribution: conditional draws or knockoffs. Mentch & Zhou (2020) give an extended discussion.

Bike-sharing application (§5.2, pp. 16-17)

Example: hourly bike-share importance ranks (§5.2, Fig. 9)

  • Data: hourly bike-share data of Fanaee-T & Gama (2013), from the UCI repository.
  • Target: log number of rentals per hour. Features: 14. Model: randomForest in R.
  • Measures: (a) the default OOB permutation importance; (b) , which permutes feature and refits before measuring the change in accuracy. (b) was chosen because it reuses the same learner and keeps the feature dimension.
  • Fig. 9 (p. 17): a scatter of OOB rank (x-axis) against permute-and-relearn rank (y-axis), ranked from least to most important.
  • Result: many features get similar ranks, but there are notable disagreements. temp looks important under OOB and “quite unimportant otherwise”. A screen based on OOB importance “might have selected this rather than yr”, which could harm later analysis.

Figure 9, transcribed. Ranks were read off the plotted label positions (1 = least important, 14 = most), so treat them as approximate. The figure title is “BikeShare Feature Importance Comparison”, and a 45° line marks agreement.

FeatureOOB rank (x) rank (y)Gap
registered14140
hr1312−1
casual1213+1
atemp115−6
temp101−9
hum97−2
workingday810+2
season78+1
yr611+5
mnth54−1
weekday49+5
windspeed36+3
weathersit220
holiday13+2

Reading. temp and atemp (feels-like temperature) are almost collinear. Under OOB permute-and-predict both rank high (10 and 11). Under permute-and-relearn, each one’s information is still available through the other, so both fall (to 1 and 5). This is the compensation effect of Theorem 3 on real data. A further point the paper does not make: registered and casual are the two components of the total rental count, so including them as features leaks the target. That explains why they top both rankings.

Examples

Example: testing a block of derived marketing features (generic illustration)

An analyst adds 40 engineered features (lags and rolling means of existing spend series) to a forest that predicts weekly conversions, then tests whether the block adds predictive value by permuting it and refitting. The lags are strongly correlated with the raw spend columns. Per §5.1, the test can reject even when the block adds nothing beyond the raw series. Generating the block conditionally on the raw features (for example with knockoffs) keeps the test near its nominal size.

Connections

See Also