Demonstration 1 of 1
A stepwise interaction search, scored on its own folds and on fresh rows
As more candidate pairs are screened, does the search score keep describing what the selected features earn on new rows?
The true pair is easy to find and earns a real gain. Every other pair is noise, but some noise products raise the development AUC by chance, and the greedy rule keeps each of them. The more pairs are screened, the more of these chance gains are kept, so the search score keeps climbing while the fitted noise columns dilute the model on rows that were not used for the search.
keep c = x_a x_b iff S(F cup c) - S(F) > ε
Scroll sideways for the whole equation
S(F) is the development AUC (mean over the search folds) of a model using feature set F, c = x_a * x_b is a candidate product, and epsilon is the minimum gain (0.00001). A pair is kept when S(F plus c) - S(F) exceeds epsilon.
Predict first. When all 66 pairs of 12 features are screened, how does the gain the search reports compare with the gain on fresh rows?
Choose an example
Scroll sideways for the whole figure
Constructed example: seeded synthetic data, one built-in interaction and a logistic regression, measured by the chapter activity.
Calculated values
- Pairs screened
- 66
- Search score gain
- +0.071
- Gain on fresh rows
- +0.044
- True pair only
- +0.059
- Noise pairs kept
- 14.3
Screening 66 pairs, the search reports a gain of 0.071 AUC and the same recipe earns 0.044 on fresh rows, so 0.071 - 0.044 = 0.027 of the reported gain is selection bias (standard error 0.008 over 6 datasets). It kept 14.3 pairs other than the true one on average and found the true pair in 100% of datasets. Adding only the true pair earns 0.059, so the noise pairs cost 0.015 on fresh rows.
Worked steps
- Search gain minus fresh gain: 0.071 - 0.044 = 0.027 AUC.
- Fresh gain minus true-pair-only gain: 0.044 - 0.059 = -0.015 AUC.
- Pairs screened: 66; pairs other than the true one kept: 14.3 on average.
Use the idea
Treat the search score as a development result. Reserve a partition before the search, or rerun the whole search (including the top-feature screen and the stopping rule) inside each outer training fold, and report the gain of the frozen recipe there.
Where the conclusion applies
Constructed data, one real interaction that the search finds every time, and a logistic regression in place of the chapter's LightGBM. With a weak or absent true pair the picture is worse, because nothing real offsets the noise pairs. A fresh 20,000-row sample from the generator stands in for a reserved assessment partition, which in a competition would be far smaller and noisier.
Check your understanding: The true interaction is found at every screen size. Why does screening more pairs still make the selected recipe worse on fresh rows?
Chapter 10 source: section "Interaction Features: The Stepwise Approach".