TL;DR
This paper explores using Large Language Models (LLMs) for feature selection from a data-centric perspective, categorizing prompts into data-driven (in-context numeric samples) versus text-based (semantic descriptions of features and tasks). The authors discover that text-based selection consistently outperforms data-driven prompting, scales effectively with model size, and rivals traditional statistical selectors while requiring zero private data points.
What Problem Does This Paper Address?
Standard feature selection algorithms (e.g., Mutual Information, LASSO, MRMR) rely heavily on statistical calculations over abundant training data. However, in sensitive domains such as clinical medicine, strict privacy concerns and sparse data regimes often prevent researchers from centralizing or sharing data for feature selection.
While recent work has prompted LLMs to pick features in few-shot settings, it has remained unclear how they do this best: should we feed them numerical data points to infer statistical correlations, or should we feed them natural language descriptions to tap into their world knowledge? This paper systematically investigates this trade-off across data availability regimes and model scales.
Methods
The authors formalize a data-centric taxonomy for LLM-based feature selection:
- Data-Driven Feature Selection: Feeds pairs of numerical feature values and target values $(x_{f_i}, y)$ directly into the LLM prompt, asking the model to deduce statistical correlation and score the feature's importance between 0 and 1.
- Text-Based Feature Selection: Feeds high-level contextual text into the prompt—specifically dataset context (prediction goal, collection details) and descriptive feature names/definitions—asking the LLM to score relevance based on semantic reasoning.
- Retrieval-Augmented Feature Selection (RAFS): A specialized pipeline for domains where raw feature names are opaque strings (e.g., biological gene IDs like
ENSG...). RAFS queries external knowledge bases (e.g., the National Center for Biotechnology Information / NCBI) to retrieve descriptive summaries for each feature before feeding them to the LLM.
Downstream evaluation trains an $L_2$-regularized linear/logistic regression model using the top 30% selected features.
+-------------------------------------------------------------+
| Text-Based: [Task Description] + [Feature Semantic Context] | --> LLM --> Importance Score
+-------------------------------------------------------------+
| Data-Driven: Few-shot (feature_val, target_val) pairs | --> LLM --> Importance Score
+-------------------------------------------------------------+
Datasets
The authors evaluate classification and regression tasks across diverse tabular benchmarks:
- Classification (6 datasets): Adult, Bank, Communities, Credit-g, Heart, and Myocardial Infarction.
- Regression (4 datasets): Diabetes, NBA player stats, NYC Rideshare, and Wine Quality.
- Real-World Case Study: The Cancer Genome Atlas Lung Adenocarcinoma (TCGA-LUAD) benchmark, consisting of clinical indicators and ~20,000 gene expression features.
Key Insights and Ideas
- Semantic reasoning beats statistical inference in LLMs: Across nearly all model families and sample settings, text-based feature selection outperformed data-driven feature selection. LLMs are far better at leveraging pretrained general knowledge than computing numerical correlations in-context.
- More data hurts in-context data-driven selection: When sample sizes increased from 64 to 128 shots, the performance of data-driven selection degraded across all tested LLMs. LLMs struggle with long-sequence tabular reasoning ("lost in the middle" phenomena), making direct in-context numeric estimation brittle.
- Text-based selection obeys clear scaling laws: Feature quality improved monotonically as model capacity increased from LLaMA-2-7B $\rightarrow$ LLaMA-2-13B $\rightarrow$ ChatGPT $\rightarrow$ GPT-4. Data-driven methods showed no such clean scaling trend.
- Zero-sample privacy preservation: Text-based LLM selection requires zero patient data points, neatly dodging data governance and privacy barriers in sensitive domains.
Key Results
- Competitive with full-dataset traditional baselines: In full-data settings, zero-sample
GPT-4 w/ textachieved an AUROC of 0.783 across classification tasks, outperforming Recursive Feature Elimination (0.758) and performing competitively with Minimum Redundancy Maximum Relevance (MRMR, 0.798). On regression tasks, it achieved an average MAE rank of 2.50 (comparable to MRMR at 2.25). - Clinical survival prediction (TCGA-LUAD): Using PriorityLasso on 20,000+ features:
- Full feature set: Antolini’s C 0.6306, Integrated Brier Score (IBS) 0.1863, D-Calibration 1.8518.
- Random 30% subset: Antolini’s C 0.6516, IBS 0.1833, D-Calibration 2.0255.
- RAFS (Text + NCBI Retrieval): Achieved the best performance across all metrics: Antolini’s C 0.6566, IBS 0.1830, and D-Calibration 1.7666.
Limitations and Future Work
- Opaque or non-semantic features: Text-based selection relies on descriptive feature metadata. If features are heavily anonymized, hashed, or poorly documented, semantic scoring cannot function without auxiliary retrieval.
- No empirical validation: Text-based methods evaluate plausibility rather than dataset-specific quirks or label distributions.
- Future directions:
- Hybrid systems that combine semantic priors with traditional empirical filters.
- Agentic LLMs equipped with code interpreters and statistical packages (e.g., Python/R) to perform programmatic, data-driven feature analysis rather than raw in-context arithmetic.
- Tabular foundation models pretrained specifically for end-to-end automated feature engineering.
Summary updated