Skip to content

Explanation-Guided Evolution of LLM-driven Feature Engineering

Jiahuizi Luo, Thomas Bäck, Niki van Stein

cs.NE

Abstract

Large language models are increasingly used as evolutionary variation operators to write feature-engineering programs for tabular data. The state-of-the-art method, LLM-FE, shows the LLM only the code and score of earlier programs, so the search never learns which of the generated features the downstream model actually uses. We present SHAPEvo-FE, a (mu+lambda) evolution strategy in which TreeSHAP attributions of the fitted model are turned into a short feedback report that labels each generated feature &#34;keep&#34;, &#34;refine&#34; or &#34;replace&#34;, which is used in the next mutation prompt. We compare the two methods under a controlled protocol, with the same LLM backbone, budget, cross-validation splits, completion limit and evaluation code, on 22 datasets and three different backbones. With a capable backbone, SHAP guidance makes the search significantly cheaper. With DeepSeek-V4-Flash and Claude-Haiku-5.5, SHAPEvo-FE reaches LLM-FE&#39;s final validation level with 38 and 62 programs on the median dataset, against about 180 for LLM-FE, in a third to a half of the wall-clock time and with about a third of the LLM tokens, and its normalised area under the best-so-far curve is larger on 20 and 17 of 22 datasets respectively (Wilcoxon p<0.001p<0.001 (DeepSeek) and p=0.003p=0.003 (Haiku)). The same loop without the SHAP report needs about twice as many programs. With GPT-3.5, which ignores the report, LLM-FE searches faster. SHAP feedback helps when the backbone follows it and makes no difference when the backbone ignores it.

Create a lesson

Metadata

Categories
cs.NE, cs.LG
Comments
41 pages (14 pages main text plus references and appendix with the supplementary material). Preprint of a paper under review. Code, prompts, raw logs: https://doi.org/10.5281/zenodo.23750423