[Paper Review] Large Language Models Can Automatically Engineer Features for Few-Shot Tabular Learning
FeatLLM is a novel in-context learning framework that leverages large language models (LLMs) to automatically engineer high-quality, rule-based features for few-shot tabular learning. By generating binary features from LLM-inferred rules and using a simple downstream model like linear regression, FeatLLM achieves state-of-the-art performance with significantly reduced inference cost and no need for fine-tuning or per-sample LLM calls.
Large Language Models (LLMs), with their remarkable ability to tackle challenging and unseen reasoning problems, hold immense potential for tabular learning, that is vital for many real-world applications. In this paper, we propose a novel in-context learning framework, FeatLLM, which employs LLMs as feature engineers to produce an input data set that is optimally suited for tabular predictions. The generated features are used to infer class likelihood with a simple downstream machine learning model, such as linear regression and yields high performance few-shot learning. The proposed FeatLLM framework only uses this simple predictive model with the discovered features at inference time. Compared to existing LLM-based approaches, FeatLLM eliminates the need to send queries to the LLM for each sample at inference time. Moreover, it merely requires API-level access to LLMs, and overcomes prompt size limitations. As demonstrated across numerous tabular datasets from a wide range of domains, FeatLLM generates high-quality rules, significantly (10% on average) outperforming alternatives such as TabLLM and STUNT.
Motivation & Objective
- Address the high computational cost and training dependency of existing LLM-based tabular learning methods in low-shot regimes.
- Overcome limitations of prompt length and API-only access in LLM inference for tabular data.
- Enable efficient, low-latency inference by decoupling feature engineering from prediction, using only a simple downstream model.
- Leverage LLMs' reasoning and prior knowledge to generate high-quality, interpretable features without fine-tuning.
- Mitigate prompt size constraints through feature bagging and ensemble techniques in the feature engineering pipeline.
Proposed method
- Use in-context learning with few-shot demonstrations to guide LLMs in inferring decision rules that distinguish target classes.
- Parse generated rules into executable code to apply them to tabular data, creating binary features indicating rule adherence.
- Apply feature bagging to reduce prompt length and improve robustness by sampling subsets of features and examples.
- Train a lightweight downstream model (e.g., linear regression) on the engineered binary features to estimate class probabilities.
- Employ ensemble learning by repeating the feature engineering process multiple times with different bagged subsets to improve generalization.
- Restrict inference to only the downstream model after feature generation, eliminating per-sample LLM calls at inference time.

Experimental results
Research questions
- RQ1Can LLMs effectively generate high-quality, rule-based features for tabular data without fine-tuning?
- RQ2Does using LLMs as feature engineers lead to better few-shot performance compared to end-to-end LLM prediction?
- RQ3Can prompt size limitations be mitigated through feature bagging and ensemble strategies in LLM-based feature engineering?
- RQ4Does the proposed framework maintain high performance with only API-level access to LLMs and no fine-tuning?
- RQ5How does the performance of FeatLLM compare to state-of-the-art baselines like TabLLM and STUNT in low-shot settings?
Key findings
- FeatLLM outperforms existing methods such as TabLLM and STUNT by an average of 10% across 13 diverse tabular datasets in few-shot learning settings.
- On the NHANES dataset, FeatLLM achieves 99.79% accuracy with 64 shots, significantly outperforming other methods under the same conditions.
- The framework achieves 99.67% accuracy on the Sequence-type dataset with 32 shots, demonstrating strong generalization across domains.
- FeatLLM maintains high performance even on challenging datasets like Myocardial (61.47% accuracy with 64 shots) and Credit-g (66.43% with 64 shots), where other models underperform.
- The use of feature bagging and ensembling reduces prompt length and improves robustness, enabling stable performance despite variable input sizes.
- By eliminating per-sample LLM inference, FeatLLM achieves low-latency inference, making it suitable for real-world deployment with restricted LLM APIs.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.