Introduction
Feature engineering is often described as the "dark art" of machine learning. While deep learning has automated feature extraction for unstructured data like images and text, tabular data—the backbone of many industrial applications—still relies heavily on human intuition to transform raw columns into predictive signals.
Recently, Large Language Models (LLMs) have been applied to this domain, leveraging their vast world knowledge to suggest new features. However, as "Tabular Feature Discovery With Reasoning Type Exploration" demonstrates, LLMs often default to simple arithmetic (e.g., A + B) and fail to explore deeper, more complex relationships. To address this, the authors introduce REFEAT (Reasoning type Exploration for Feature discovery), a framework that guides LLMs through structured logical reasoning to discover high-impact features.
The REFEAT Framework
The core innovation of REFEAT is the Reasoning-Aware Prompt Library. Instead of generic prompts, REFEAT utilizes six distinct cognitive frameworks:
- Deductive: Applying known rules or mathematical principles.
- Inductive: Hypothesizing patterns based on few-shot examples.
- Abductive: Proposing plausible hidden causes for observed data.
- Analogical: Drawing parallels from similar domains.
- Counterfactual: Imagining "what-if" scenarios.
- Causal: Identifying direct cause-and-effect relationships.
To manage these strategies, REFEAT employs a Multi-Armed Bandit (MAB) agent. In each iteration, the agent selects a reasoning "arm" to generate a feature, evaluates its performance gain on a validation set, and uses this signal as a reward to update its strategy. Over 20 iterations, the bandit learns which reasoning type is most effective for a specific dataset.
Experimental Setup
The framework was evaluated on 59 real-world tabular datasets from OpenML, including 51 classification tasks (finance, health, sensor data) and 8 regression tasks (housing prices, physical simulations). This benchmark is significantly broader than those used in prior LLM-based feature engineering research, providing a robust look at how these methods generalize across diverse domains.
Key Results and Insights
REFEAT consistently outperformed both traditional automated feature engineering (AutoFE) tools (e.g., AutoFeat, OpenFE) and recent LLM-based methods (e.g., CAAFE, OCTree).
Performance Gains
On classification tasks, REFEAT achieved a mean performance gain of +5.42% for XGBoost and +5.66% for linear models relative to the original dataset. Qualitative analysis revealed that REFEAT produces highly interpretable, domain-relevant features, such as a "responsiveness index" for power grid data, which are more sophisticated than the generic mathematical transformations produced by brute-force methods.
The Reasoning Advantage
The study highlighted several critical insights:
- The Familiarity Paradox: While LLMs perform well on familiar datasets, REFEAT provides the highest relative gain on unfamiliar datasets, suggesting that structured reasoning can compensate for a lack of prior domain knowledge.
- Structural Complexity: Features generated via REFEAT exhibited higher operation counts and deeper nesting, allowing models to capture non-linear patterns that simpler methods missed.
- Adaptive Reasoning: Ablation studies showed that no single reasoning type (e.g., Causal or Abductive) dominated across all datasets, validating the use of the Multi-Armed Bandit to adapt the strategy to the task at hand.
Conclusion
REFEAT demonstrates that guiding LLMs with structured reasoning types significantly enhances their ability to discover complex, predictive features in tabular data. While the approach introduces some computational overhead due to the iterative LLM queries, it sets a new state-of-the-art for automated feature engineering. Future work may involve fine-tuning LLMs on "meta-examples" to predict the best reasoning strategy upfront, potentially streamlining the discovery process.
Summary updated