Introduction
Tabular data—the structured rows and columns found in medical records, financial logs, and spreadsheets—remains a "final frontier" for deep learning. While Large Language Models (LLMs) have shown promise in few-shot learning, existing approaches for tabular data suffer from high inference latency, context window limitations, and a lack of interpretability. FeatLLM addresses these challenges by using LLMs as automated feature engineers rather than end-to-end predictors.
The FeatLLM Framework
FeatLLM leverages the "expert knowledge" of LLMs to generate high-quality binary features, which are then used by simple, fast downstream models. The framework operates in three distinct stages:
- Rule Extraction: The LLM acts as a domain expert, analyzing causal relationships and generating "if-then" rules (e.g.,
if age > 60 and cholesterol > 200) based on internal knowledge and few-shot examples. - Automated Parsing: These natural language rules are converted into executable Python code to transform raw data into binary features (1 if the rule is met, 0 otherwise).
- Linear Prediction: A simple linear model with non-negative weights is trained on these features, ensuring high inference speed and transparency.
To handle high-dimensional datasets, FeatLLM employs feature bagging—running the LLM on subsets of features and ensembling the results. This bypasses prompt size limitations and improves robustness against noise.
Experimental Evaluation
The authors evaluated FeatLLM on 13 diverse datasets, including classic benchmarks (e.g., Adult, Bank), high-dimensional data (e.g., Communities), and "leakage-proof" benchmarks released after the LLM's training cutoff to ensure the model wasn't simply recalling training data.
Key Results
FeatLLM consistently outperformed specialized tabular learning methods like TabLLM and STUNT by an average of 10% in few-shot settings (4, 8, and 16 shots).
Beyond accuracy, FeatLLM offers significant advantages:
- Massive Speedup: Inference is orders of magnitude faster than standard in-context learning. For example, on the Adult dataset, FeatLLM's inference takes 0.006 milliseconds, compared to 463 milliseconds per sample for standard LLM prompting.
- Robustness to Noise: By relying on the LLM's "common sense" reasoning, the framework effectively filters out spurious correlations that often plague small datasets.
Conclusion and Future Work
FeatLLM demonstrates that LLMs are highly effective at describing the logic of a problem, even when raw computation is outsourced to simpler models. While the current implementation relies on descriptive feature names and can occasionally encounter syntactic errors in code generation, future work aims to scale the system for larger datasets and more complex feature types beyond binary rules.
Summary updated