LLM-Lasso: A Robust Framework for Domain-Informed Feature Selection and Regularization

Erica Zhang, Ryunosuke Goto, Naomi Sagan, Jurik Mutter, Nick Phillips, Ash A. Alizadeh, Kangwook Lee, Jose Blanchet, Mert Pilanci, Robert TibshiraniarXiv 2025 · DOI

Abstract

LLM-Lasso is a novel framework designed to integrate domain expertise from Large Language Models (LLMs) into the classic Lasso regression algorithm. By utilizing cross-validation as a mathematical "safety net," the framework ensures that LLM-generated insights improve feature selection while guaranteeing that performance never falls below standard, data-only methods—even when the LLM provides incorrect or hallucinated information.

Introduction

In high-dimensional data scenarios, such as genomics, researchers often face the challenge of having thousands of variables (e.g., genes) but only a limited number of samples. Traditional feature selection tools like Lasso regression rely solely on numerical data, ignoring the vast wealth of human scientific literature. While previous attempts have been made to use LLMs for feature selection, they are often "brittle"; if an LLM suggests an irrelevant feature, standard filter methods may follow this advice, leading to degraded performance. LLM-Lasso addresses this by treating LLM knowledge as a guide within a rigorous statistical framework.

Methodology

LLM-Lasso transforms the LLM into a specialized "prior" for the optimization process through a multi-step pipeline:

  1. Penalty Factor Generation: The LLM (e.g., GPT-4o or Llama-3) reviews feature names and task descriptions to assign a "penalty factor" (between 0.1 and 1) to each. Features known to be relevant receive lower penalties, while others receive higher ones.
  2. Retrieval-Augmented Generation (RAG): To ground the LLM in factual evidence, an optional RAG pipeline fetches relevant scientific snippets from databases like OMIM before scoring.
  3. Robustness Transformation: The LLM's scores are processed through a tunable transformation family, $W = f(\text{penalties})$.
  4. Internal Cross-Validation: This is the framework's core safety mechanism. The system uses $k$-fold cross-validation to determine the optimal degree of trust in the LLM's advice. If the LLM's suggestions improve predictive accuracy on held-out data, the model utilizes them; if the advice is unhelpful, the system automatically reverts to a standard Lasso configuration.
The LLM-Lasso architecture, featuring the RAG pipeline, LLM penalty generation, and the Lasso component with internal cross-validation.

Experimental Evaluation

The authors evaluated LLM-Lasso across diverse domains and data scales:

  • Oncology: A Lymphoma dataset (1,592 genes) and a Lung Cancer dataset (1,000 genes).
  • Public Benchmarks: Standard datasets including Bank, Diabetes, Glioma, and Wine Quality.
  • Temporal Testing: A "Spotify 2024" dataset released after the LLM training cutoffs to test for data memorization.
  • Adversarial Testing: A corrupted Lymphoma dataset where gene names were replaced with random Base64 strings to test hallucination resistance.

Results and Discussion

LLM-Lasso demonstrated superior performance across various metrics and scenarios. In biomedical case studies, it consistently achieved lower misclassification errors and higher AUROC than standard Lasso. Notably, the framework reached peak performance using significantly fewer features; for instance, in cancer classification tasks, it outperformed standard Lasso within the first 10-20 selected features.

Comparative performance of LLM-Lasso against standard Lasso and other feature selection methods across diverse datasets.

The "No-Harm" Principle and Hallucination Resistance

A key insight is the framework's inherent robustness. In adversarial tests where gene names were replaced with random strings, the LLM often hallucinated biological justifications for these strings. However, because these features lacked actual predictive power in the data, the cross-validation step correctly ignored the LLM's advice, maintaining baseline Lasso performance. This confirms that the "identity" transformation in the search space effectively prevents the model from being misled by AI errors.

Conclusion

LLM-Lasso successfully bridges the gap between generative AI and classical statistics. While limitations exist regarding API query costs for massive feature sets and the static nature of the current knowledge extraction, the framework provides a reliable method for incorporating domain expertise into high-stakes modeling. Future work will explore more complex transformation families and fine-tuning LLMs specifically for feature importance tasks.

Summary updated

BibTeX
@misc{zhang2025llm,
  author = {Erica Zhang and Ryunosuke Goto and Naomi Sagan and Jurik Mutter and Nick Phillips and Ash A. Alizadeh and Kangwook Lee and Jose Blanchet and Mert Pilanci and Robert Tibshirani},
  title = {{LLM-Lasso: A Robust Framework for Domain-Informed Feature Selection and Regularization}},
  year = {2025},
  eprint = {2502.10648},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.10648},
}
Figure