Evolutionary Large Language Model for Automated Feature Transformation

Nanxu Gong, Chandan K. Reddy, Wangyang Ying, Haifeng Chen, Yanjie Fu

Evolutionary Large Language Model for Automated Feature Transformation

Introduction

Feature Transformation (FT) is a critical step in the machine learning pipeline, aimed at creating new features from raw data to enhance model performance. While manual feature engineering requires significant domain expertise, automated methods often struggle with the "search space explosion"—the astronomical number of possible feature and operator combinations. Furthermore, traditional automated tools lack the heuristic intuition that human data scientists use to navigate these spaces. To address these challenges, we present ELLM-FT, a framework that integrates the reasoning capabilities of Large Language Models (LLMs) with the iterative optimization of Evolutionary Algorithms (EA).

Methodology

ELLM-FT operates through a two-stage process designed to bridge the gap between raw data and high-performing features.

The overall architecture of ELLM-FT, featuring a Reinforcement Learning-based data collector and an Evolutionary LLM-based transformation engine.

1. Reinforcement Multi-Population Data Collection

The first stage involves a Reinforcement Learning (RL) agent that explores the feature space to populate a database. This database is organized into multiple "populations," ensuring a diverse set of transformation sequences. This stage provides the high-quality "demonstrations" necessary for the LLM to understand the optimization direction.

2. Evolutionary LLM Generation

The core of the framework is the iterative evolution of features using an LLM (e.g., Llama-2-13B).

  • Sequential Prompting: The system feeds ranked examples from the database to the LLM. By presenting sequences ordered by performance, the LLM perceives an implicit "optimization direction."
  • Postfix Representation: Transformations are represented in postfix notation (e.g., f1 f2 +) to simplify mathematical processing for the LLM and avoid errors associated with nested parentheses.
  • Iterative Evolution: The LLM generates candidate features, which are then evaluated by a downstream model (e.g., Random Forest). Successful features are added back to the database, while underperforming ones are removed, mimicking natural selection.

Experimental Setup

The framework was evaluated across 12 diverse datasets, including six classification tasks (e.g., SpamBase, German Credit) and six regression tasks (OpenML datasets). These datasets range in size from 351 to over 32,000 samples, testing the framework's robustness across various scales and domains.

Key Results

ELLM-FT demonstrated superior performance, outperforming seven major baselines—including specialized RL and Neural Architecture Search (NAS) methods—on 11 out of 12 datasets. On average, the method achieved a 2.4% performance improvement over the best baseline.

Performance comparison of ELLM-FT against variants on SpamBase and Openml_616 datasets.

As shown in the results, ELLM-FT not only improves accuracy but also maintains a high number of valid samples during the generation process. The framework proved particularly effective on noisy datasets, where the LLM's pre-trained "common sense" helped it avoid overfitting to random fluctuations.

Discussion and Conclusion

The success of ELLM-FT highlights the potential of LLMs as sophisticated heuristic searchers. By combining the "general knowledge" of LLMs with the rigorous filtering of Evolutionary Algorithms, the framework efficiently navigates complex search spaces. While the computational overhead of large models remains a consideration, the "sharper optimization trajectory" observed suggests that ELLM-FT can find high-quality features in fewer iterations than traditional RL-only approaches. Future work will explore more complex operators and larger-scale open-environment datasets.

Summary updated

BibTeX
@inproceedings{gong2025evolutionary,
  author = {Nanxu Gong and Chandan K. Reddy and Wangyang Ying and Haifeng Chen and Yanjie Fu},
  title = {{Evolutionary Large Language Model for Automated Feature Transformation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i16.33851},
}
Figure