- The paper introduces the LLM Sparsity Prior framework that integrates LLM-derived weights into Bayesian variable selection, dynamically discounting inaccurate priors.
- It uses hierarchical hyperpriors and efficient sampling techniques, reducing ℓ1 error up to fourfold and achieving near-perfect F1 scores with high-quality weights.
- Empirical results in AKI prediction demonstrate robust performance in low-data settings, identifying key clinical features missed by traditional methods.
LLM Sparsity Prior for Robust Feature Selection: An Expert Analysis
Motivation and Context
Classical feature selection struggles in low-data, high-dimensional scenarios where informative signal is sparse and prior information is crucial. LLMs have recently been leveraged to encode domain expertise into statistical pipelines, particularly through the extraction of feature importance weights from natural language descriptions. However, prior approaches such as LLM-Lasso inject LLM weights directly into regularization terms, leading to strong sensitivity to weight quality and instability under misaligned or noisy weights.
This paper addresses this challenge by formalizing a framework for quantifying LLM-generated weight quality, proposing a robust mechanism—the LLM Sparsity Prior (LSP)—that integrates these weights into a hierarchy of Bayesian variable selection models. The approach emphasizes dynamic discounting of inaccurate priors, interpretable hyperparameterization, and practical robustness, validated in clinically relevant low-data settings for acute kidney injury (AKI) prediction.
Quantifying LLM Weight Quality
Given the inherent variability in LLM output and the diversity of prompting strategies, rigorous evaluation of LLM-generated weights is essential before their integration into model pipelines. The paper adapts established feature importance evaluation metrics for this purpose:
- ℓ1 Weight Agreement: Measures normalized ℓ1 distance between min-max-scaled LLM weights and ground truth inclusion vectors, yielding values in [0,1] where 0.5 corresponds to random guessing and 1.0 indicates perfect alignment.
- Pairwise Weight Agreement: Adapts Kendall's τ rank correlation for binary ground truth, measuring alignment in orderings across all feature pairs.
Empirical plug-in estimators are proposed when ground truth is unavailable, guiding model and prompt selection even when the true feature set is unknown.
LLM Sparsity Prior Model
The LSP framework incorporates LLM-derived weights into prior inclusion probabilities for Spike-and-Slab (SS) and Spike-and-Slab Lasso (SSL) regression models. Each feature's prior inclusion probability is parameterized as:
θj=sp1∑k=1pwkηwjη
where s controls baseline sparsity, and η governs the concentration/contrast of weight influence. Hierarchical hyperpriors (Beta for s, zero-inflated discrete uniform for η) allow the model to revert to an uninformative configuration when weights are misaligned, dynamically calibrating the influence of LLM priors.
Posterior inference leverages coordinate descent and MCMC schemes, adapting acceptance ratios and initialization to heterogenous prior probabilities induced by LLM weights. Efficient sampling is maintained by discretizing η and incorporating it into Gibbs updates.
Comprehensive simulations are conducted in high-dimensional (ℓ10), low-sample (ℓ11) regimes. The LSP methods and LLM-Lasso are contrasted against classical baselines under controlled weight quality variation (ℓ12 from 0.5 to 1.0):
Application: Acute Kidney Injury Prediction
The proposed framework is applied to a large (~1000 features), private medical dataset predicting AKI post-cardiac surgery in five subpopulations. Feature weights are elicited from GPT-5.2o via rigorously engineered prompts with clinical context, task definition, redundancy controls, and scoring rubrics.
Empirical results:
Prompt engineering sensitivity studies reveal LSP’s stability: LSP (SS) excels across multiple prompt variants and LLM stochastic draws, minimizing variance and rarely performing worse than baselines. Subsampling experiments show performance gains amplify as training sample size decreases, solidifying LSP’s utility in low-data settings.
Hyperparameter and Structural Sensitivity
The impact of the concentration parameter ℓ17 and its prior is closely examined. Structure recovery error is minimized at intermediate ℓ18 values; the zero-inflated discrete prior achieves performance near the optimum, validating the hierarchical design.
Figure 3: Structure recovery error across fixed ℓ19 values, with zero-inflated prior matching optimal performance.
Implications, Limitations, and Future Directions
The practical implications are clear: LSP enables injection of scalable, domain-aware prior information into Bayesian feature selection without sacrificing robustness. Its effectiveness depends on the role of inclusion probabilities in the target model; in SSL, where sparsification is largely governed by penalty parameter [0,1]0, LLM weights are less influential.
Theory calls for further exploration of continuous priors on [0,1]1, integration of LLM-informed weights into the penalization path, and broader application to Bayesian tree ensembles, graphical models, and symbolic regression.
Prompt engineering remains a critical bottleneck; principled evaluation and aggregation of LLM-generated weights are necessary to tame output stochasticity and guide model selection in real-world deployments.
Conclusion
The LLM Sparsity Prior framework offers substantial practical and theoretical advances for robust, scalable, and interpretable feature selection in high-dimensional, low-data settings. By dynamically discounting low-quality LLM priors and amplifying their influence when aligned with data, LSP achieves consistent gains in prediction accuracy and clinically meaningful feature discovery. Its hierarchical hyperprior design and computational tractability lay a foundation for future integration with advanced Bayesian regularization techniques and broader scientific discovery tasks.