Introduction
In machine learning, the quality of input features often dictates the upper bound of model performance. While Automated Feature Engineering (AFE) aims to streamline the creation of these features, traditional methods frequently suffer from two primary drawbacks: the "Black Box Problem," where deep learning transformations lack interpretability, and the "Rigidity Problem," where fixed mathematical strategies fail to adapt to the specific semantic context of a dataset.
Presented at IJCAI-25, "Dynamic and Adaptive Feature Generation with LLM" introduces the LFG (LLM Feature Generation) framework. This system leverages Large Language Models (LLMs) as intelligent agents capable of reasoning through feature spaces, generating explainable transformations, and iteratively optimizing performance through a feedback-driven search process.
The LFG Framework: LLM-Driven Feature Engineering
The LFG framework treats feature generation as a collaborative search problem. Unlike standard AFE tools that blindly apply operators, LFG utilizes the semantic reasoning of LLMs to propose meaningful transformations.
Core Components
- LLM Agents as Feature Creators: The system instantiates multiple LLM agents (e.g., GPT-3.5 Turbo) provided with the original feature set and a library of operations such as logarithmic scaling, multiplication, and trigonometric functions.
- Tree of Thoughts (ToT) Reasoning: Agents do not merely output formulas; they employ a "Tree of Thoughts" approach to generate natural language justifications for each step. This ensures that every new feature is accompanied by a human-readable rationale, solving the interpretability gap.
- Monte Carlo Tree Search (MCTS): To navigate the exponentially large space of possible feature combinations, LFG uses MCTS. This algorithm balances the exploration of novel feature sets with the exploitation of combinations that have already demonstrated high utility.
Search and Feedback Mechanisms
A critical innovation of LFG is its closed-loop optimization. After agents generate a candidate feature subset, the system evaluates its effectiveness on a downstream task, such as a Random Forest classifier or K-Nearest Neighbors (KNN).
The resulting performance metrics (e.g., Accuracy, F1-score) are fed back to the agents. This allows the agents to "communicate" and refine their strategies in subsequent iterations, effectively learning which types of transformations are most beneficial for the specific dataset at hand.
Experimental Evaluation
The researchers evaluated LFG across four diverse datasets: Ionosphere (radar classification), Amazon Commerce Reviews (high-dimensional text), Abalone (regression), and Diabetes Health Indicators (large-scale health data).
Key Results
- Performance Gains: LFG consistently outperformed raw data and traditional baselines like Lasso regression and Reinforcement Learning (RL) methods. On the Ionosphere dataset, LFG achieved 95.6% accuracy, compared to 89.2% for raw data.
- High-Dimensional Efficiency: On the Amazon dataset, which contains 10,000 features, LFG-3 (a three-iteration version) improved the KNN F1-score from 0.476 to 0.607.
- Semantic Intuition: By utilizing feature names and meanings, the LLM agents identified useful transformations faster than algorithms that ignore semantic context. This "semantic prior" allows for rapid convergence, with significant gains often appearing within the first few iterations.
Conclusion and Future Directions
LFG demonstrates that LLMs can serve as powerful, explainable engines for feature engineering. By combining semantic reasoning with the mathematical rigor of MCTS, the framework produces optimized feature sets that are both high-performing and auditable.
However, challenges remain regarding the computational cost of LLM API calls and the scalability of the agent-based approach to massive "Big Data" environments. Future work will focus on extending LFG beyond tabular data to more complex formats like raw signals and images, as well as mitigating potential biases inherent in the underlying LLMs.
Summary updated