LLM-FE: Automated Feature Engineering for Tabular Data with LLMs as Evolutionary Optimizers

Nikhil Abhyankar, Parshin Shojaee, Chandan K. Reddy

TL;DR

LLM-FE is a novel automated feature engineering framework that treats feature discovery as an iterative program search problem. By combining the domain knowledge of Large Language Models (LLMs) with an evolutionary multi-population ("island") optimization strategy, it automatically generates complex, context-aware Python code for feature transformations. Guided by data-driven feedback, LLM-FE consistently outperforms state-of-the-art classical and LLM-based baselines across diverse tabular classification and regression tasks.

What Problem Does This Paper Address?

Feature engineering is one of the most critical yet time-consuming steps in the tabular machine learning workflow. Historically, Automated Feature Engineering (AFE) methods have relied on brute-force mathematical combinations or fixed search spaces. While effective to a degree, these classical approaches completely lack domain knowledge—they don't know what "glucose" or "income" actually means in the real world.

Recently, researchers have turned to LLMs to inject domain expertise into feature generation. However, existing LLM-based methods suffer from two major flaws: they rely on naive direct prompting (which often yields oversimplified features like basic addition or subtraction) or they evaluate candidates in isolation without leveraging insights from prior successful experiments. LLM-FE bridges this gap by turning the LLM into a knowledge-guided evolutionary optimizer that iteratively refines feature transformation programs based on actual model performance.

Methods

LLM-FE structures feature engineering as an evolutionary program search problem executed in a closed loop:

  1. New Feature Generation: The LLM is provided with a structured prompt containing dataset metadata (task descriptions, feature names, and meanings), serialized data samples, an evaluation function, and successful code snippets from previous iterations as in-context examples. The LLM then generates new feature transformation hypotheses written as Python code.
  2. Feature Engineering & Evaluation: The generated Python code is executed to augment the dataset. A downstream machine learning model (such as XGBoost) is trained on this modified dataset to compute a validation score, which serves as the evolutionary fitness signal.
  3. Experience Management (The Island Model): To maintain diversity and prevent the LLM from getting stuck in local optima, LLM-FE uses a multi-population "island" model. The program population is divided into $m$ independent islands that evolve separately. Programs are clustered by their validation scores, and a Boltzmann sampling strategy is used to select high-performing programs from these clusters to serve as the next iteration's in-context demonstrations. This implicitly drives mutation and crossover operations through prompt conditioning.
Overview of the LLM-FE Framework

Datasets

The authors evaluated LLM-FE across a robust suite of 19 classification datasets and 10 regression datasets sourced from OpenML, the UCI Machine Learning Repository, and Kaggle. Crucially, to stress-test the framework against LLM memorization, the evaluation included several datasets released after the LLM training cutoff date (e.g., datasets from Bordt et al., 2024), ensuring the performance gains stem from genuine reasoning rather than data recall.

Key Insights and Ideas

  • Implicit Evolution via Prompting: Unlike classical genetic algorithms that require explicit, hardcoded mutation and crossover operators, LLM-FE achieves evolution implicitly. By feeding successful prior programs back into the prompt, the LLM naturally creates variants and combines successful features.
  • Mitigating Operator Bias: LLMs inherently prefer simple arithmetic operators (addition, subtraction) when prompted naively. However, by introducing data-driven feedback and evolutionary pressure, LLM-FE forces the LLM to discover highly complex, domain-specific operations such as groupbythenmean, sigmoid, and residual transformations.
  • Cross-Architecture Transferability: Features discovered using a computationally efficient model like XGBoost transfer remarkably well to entirely different architectures, including Multilayer Perceptrons (MLPs) and transformer-based foundation models like TabPFN.

Key Results

LLM-FE achieved outstanding results across both classification and regression tasks:

  • State-of-the-Art Performance: In classification tasks, LLM-FE achieved the lowest mean rank (1.42) compared to top baselines like OpenFE (3.63) and CAAFE (3.47). For regression tasks, it dominated with a mean rank of 1.10.
Performance of XGBoost on Classification Datasets
  • Excellent Efficiency Trade-off: As shown in the Pareto analysis, LLM-FE sits firmly on the Pareto frontier. It delivers significantly higher predictive accuracy than OCTree in roughly the same runtime, and matches or beats CAAFE while requiring a fraction of the computational time.
Pareto Plot: Time vs Performance
  • Ablation Validation: Ablation studies confirmed that removing either the domain knowledge or the evolutionary refinement component caused substantial drops in accuracy, proving that both components are vital to the framework's success.

Limitations and Future Work

While highly effective, the authors note a few limitations:

  • Privacy Concerns: Serializing raw data samples into the LLM prompt can pose privacy risks in sensitive domains (e.g., healthcare or finance). However, this can be mitigated by deploying local, open-source LLMs or utilizing synthetic data samples.
  • Future Directions: The authors propose extending this evolutionary LLM framework beyond feature engineering to automate other critical phases of the data pipeline, such as data augmentation, automated data cleaning (imputation and outlier detection), and downstream hyperparameter tuning.

Summary updated

BibTeX
@inproceedings{abhyankar2026llm,
  author = {Nikhil Abhyankar and Parshin Shojaee and Chandan K. Reddy},
  title = {{LLM-FE: Automated Feature Engineering for Tabular Data with LLMs as Evolutionary Optimizers}},
  booktitle = {RSI @ ICLR},
  year = {2026},
  url = {https://openreview.net/forum?id=KbGkWv7VEk},
}
Figure