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

Nikhil Abhyankar, Parshin Shojaee, Chandan K. Reddy

TL;DR

LLM-FE casts automated feature engineering for tabular data as an evolutionary program search problem guided by Large Language Models (LLMs). By combining LLMs' embedded domain knowledge with an "islands-based" evolutionary memory and quantitative validation feedback, LLM-FE iteratively discovers interpretable, high-performing feature transformations that consistently outperform classical and existing LLM-based baselines across classification and regression tasks.

What Problem Does This Paper Address?

Feature engineering is one of the most critical yet labor-intensive steps in tabular machine learning. While tree-based models (like XGBoost) thrive on well-engineered features, traditional automated feature engineering (AFE) tools like AutoFeat or OpenFE rely on brute-force search over rigid, predefined mathematical transforms, ignoring domain context entirely.

Recent attempts to use LLMs for feature generation introduce domain awareness, but they suffer from significant limitations:

  1. Myopic refinement: They rely on direct one-shot prompting or simple greedy iterative refinement of single candidates, quickly getting trapped in local optima.
  2. Lack of evolutionary memory: They fail to track and recombine insights from diverse, previously successful transformations.
  3. Simplicity bias: Off-the-shelf LLMs naturally gravitate toward trivial arithmetic operations (e.g., adding or subtracting two columns) rather than meaningful, complex aggregations.

Methods

LLM-FE treats feature discovery as a closed-loop bilevel optimization and program synthesis problem:

                  ┌───────────────────────────────┐
                  │    LLM Program Generator      │◄───────────┐
                  │  (Task context + Data sample) │            │
                  └──────────────┬────────────────┘            │ In-Context
                                 │ Python Code                 │ Demonstrations
                                 ▼                             │ (Boltzmann
                  ┌───────────────────────────────┐            │  Sampling)
                  │ Dataset Feature Augmentation  │            │
                  └──────────────┬────────────────┘            │
                                 │ Augmented Data              │
                                 ▼                             │
                  ┌───────────────────────────────┐            │
                  │     Data-Driven Evaluator     │            │
                  │   (XGBoost / Validation)      │            │
                  └──────────────┬────────────────┘            │
                                 │ Score & Program             │
                                 ▼                             │
                  ┌───────────────────────────────┐            │
                  │     Island Memory Buffer      │────────────┘
                  │  (Multi-population clustering)│
                  └───────────────────────────────┘
  1. Context-Rich Prompting: Prompts supply the LLM with downstream task descriptions, feature metadata, serialized sample rows, and an explicit evaluation harness. To avoid simplistic arithmetic, prompts include curated instructions favoring advanced operators (e.g., GroupByThenMean, residual, sigmoid).
  2. Program Hypothesis Generation: The LLM outputs complete Python feature-transformation functions (modify_features), which are executed under strict runtime (30s) and memory (2GB) constraints.
  3. Data-Driven Feedback: The modified dataset is evaluated using a machine learning model (e.g., XGBoost) on validation splits. The resulting performance metric (accuracy or N-RMSE) serves as the fitness score.
  4. Multi-Population "Island" Experience Management: To avoid premature convergence, LLM-FE maintains an island model with $m=3$ independent populations. High-performing programs are clustered by performance signatures and sampled via Boltzmann selection to act as few-shot in-context demonstrations for subsequent mutation and refinement steps.

Datasets

The authors evaluated LLM-FE across a broad spectrum of benchmarks:

  • 19 Classification Datasets: Sourced from OpenML, Kaggle, and the UCI repository (including adult, bank-marketing, breast-w, blood-transfusion, covtype, and high-dimensional sets like arrhythmia and myocardial).
  • 10 Regression Datasets: Covering domains such as housing, diamond prices, bike sharing, and wine quality.
  • Memorization Benchmarks: Tested on datasets explicitly verified to be absent from pre-training sets (Bordt et al., 2024) and recent post-cutoff Kaggle datasets (pharyngitis, fico, acs-income) to confirm gains do not stem from training-set leakage.

Key Insights and Ideas

  • Evolutionary Search Beats One-Shot Reasoning: Trajectory analysis showed that LLM-based generation without evolutionary tracking plateaus early (within 5–7 iterations). Evolutionary memory with multi-island diversity allows the model to escape local optima.
  • Domain Knowledge Guides Meaningful Non-Linearities: In medical datasets like Breast Cancer Wisconsin, domain-guided prompts produced biologically sensible interactions (e.g., Normal_Nucleoli * Mitoses), whereas domain-agnostic prompts generated arbitrary averages of anonymized columns.
  • Cross-Architecture Transferability: Features discovered using a fast proxy model (XGBoost) directly transferred to and boosted neural networks (MLP) and transformer-based foundation models (TabPFN), proving that the learned features capture fundamental underlying data patterns rather than model-specific quirks.
  • Ablation Rankings: Removing evolutionary refinement caused the largest performance collapse (accuracy dropping to 0.587 normalized), followed by removing domain knowledge (0.626), proving that evolutionary search and semantic priors are mutually reinforcing.

Key Results

  • Classification Superiority: Across 19 classification benchmarks, LLM-FE achieved a mean rank of 1.47, outperforming OpenFE (3.26), CAAFE (3.31), OCTree (3.84), AutoFeat (4.89), and the raw Base model (4.26).
  • Regression Wins: On 10 regression tasks, LLM-FE took first place across all datasets with a mean rank of 1.00, beating OpenFE (2.20) and AutoFeat (3.10) in normalized RMSE.
  • SHAP Feature Attribution: In interpretability studies, 16.67% of features generated by LLM-FE ranked within the top-10 most important features, and over 62% placed in the top-50.
  • Computational Efficiency: On Pareto analysis (accuracy vs. runtime), LLM-FE achieved higher accuracy faster than heavier classical search libraries, balancing generation budgets and search depth.

Limitations and Future Work

  • Execution Overhead: Although constrained by timeouts, repeated sandbox code execution and downstream model fitting remain computationally heavier than single-pass heuristics.
  • Model Bias Toward Simplicity: Even with explicit prompt instructions, LLMs still display an inherent bias toward primitive mathematical transformations over structural aggregations.
  • Scope Limitations: The current pipeline focuses strictly on feature engineering; the authors note that expanding LLM-guided evolutionary search into upstream data-centric tasks—such as automated data cleaning, imputation, outlier detection, and hyperparameter tuning—remains an open research frontier.

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