Learning When to Trust LLM Priors: A Validated Framework for Semantic Prior Integration

Erica Zhang, Naomi Sagan, Danny Tse, Fangzhao Zhang, Mert Pilanci, Jose BlanchetNeurIPS 2026

TL;DR

Large Language Models (LLMs) know a lot about the world, which makes them tempting to use as automated domain experts for tabular machine learning—until they hallucinate and tank your model. This paper introduces Statsformer, a "statistical harness" that treats LLM feature-relevance guesses not as gospel, but as hypotheses to be tested against actual data. By blending LLM-guided models with standard, prior-free models via cross-validation, Statsformer extracts genuine predictive boosts when the LLM is right, and gracefully ignores it when it’s wrong.

What Problem Does This Paper Address?

Imagine you are trying to predict patient outcomes from a dataset with 1,000 genetic markers and only 150 patients. Purely data-driven models easily overfit in these high-dimensional, data-scarce regimes. Historically, we’ve stabilized them using human domain priors—like a biologist manually flagging which genes actually matter.

Recently, researchers realized LLMs can generate these priors at scale simply by reading column names and task descriptions. The catch? LLMs are erratic. Existing methods either blindly trust LLM feature scores (leaving your pipeline vulnerable to hallucinations) or put the LLM in the driver's seat as an AutoML agent. The few methods that do validate LLM priors against data (like LLM-Lasso) are locked into a single linear model class. The open challenge is figuring out how to safely extract inductive bias from an unreliable foundation model across any type of statistical learner, with formal guarantees that bad advice won't ruin your predictions.

Methods

Instead of building an engineering harness to constrain what an LLM can say, the authors build a statistical harness to calibrate how much its output is allowed to count.

Statsformer queries an LLM (primarily OpenAI’s o3) just once to get a vector of semantic relevance scores for each dataset feature. What’s novel is how it bridges those scores into a standard ensemble technique (out-of-fold stacking, or Super Learning):

  1. Monotone Prior Injection: A temperature-like parameter ($\alpha \ge 0$) controls how strongly the LLM's scores warp a base model's behavior. Crucially, setting $\alpha = 0$ flattens the scores completely, recovering the standard, prior-free algorithm.
  2. Model-Agnostic Adapters: Different algorithms absorb priors differently. Statsformer translates the transformed LLM scores into model-specific nudges across four base learners: penalty factors for Lasso, feature-sampling weights for XGBoost, feature/instance weights for Random Forests, and input feature scaling for Kernel SVMs.
  3. Out-of-Fold Validation: Statsformer trains a dictionary of models across all base learners and several prior strengths—always keeping the $\alpha = 0$ prior-free baselines in the mix. Using $K$-fold cross-validation, a meta-learner assigns convex combination weights to each candidate based on out-of-fold performance, before refitting the models on the full dataset.

Datasets

No new benchmarks are introduced; instead, the authors evaluate on existing tabular datasets that possess semantically meaningful feature names (so the LLM has something to read).

  • Primary Suite (8 datasets): Binary classification tasks spanning genomics, finance, marketing, and web analytics (Breast Cancer, Bank Marketing, ETP, Credit, Internet Ads, Lung Cancer, Nomao), plus one regression task (Superconductivity). Many are subsampled to emphasize low-sample, high-dimensional regimes (e.g., ETP has 1,000 features and just 189 instances).
  • Extended Suite (8 datasets): Larger-scale classification (full Bank Marketing, full Nomao, Diabetes Readmission) and additional regression benchmarks (King County House Sales, Liver Toxicity, GDSC Drug Response, Communities and Crime, County Health Rankings).

Key Insights and Ideas

  • Provable Safety ("The Floor"): Because prior-free ($\alpha=0$) models live inside the candidate pool, classical convex aggregation theory guarantees an oracle-style safety floor. Up to statistical error and a full-sample refitting gap, Statsformer performs at least as well as the best combination of standard, unguided models. When the authors fed Statsformer adversarial priors (deliberately inverting the LLM's scores to highlight junk features), it simply downweighted the corrupted models and matched the no-LLM baseline.
Win ratio of adversarial-prior Statsformer versus the no-prior baseline, showing corrupted priors degrade gracefully.
  • Quantified Headroom ("The Ceiling"): Using synthetic simulations with "oracle" (perfect ground-truth) priors, the authors show that semantic priors help immensely when features outnumber samples ($p \gg n$), yielding median AUROC boosts over 0.1. As data becomes plentiful ($n=500, p=30$), the data speaks for itself and the prior's advantage vanishes.
Performance gains from perfect oracle priors across different sample-to-feature regimes.
  • Better LLMs Yield Better Statistics: Swapping out LLMs reveals that stronger frontier models (like Claude Opus 4.5 and OpenAI o1/o3) generate noticeably better downstream predictions than smaller models (like Qwen2.5-7B), proving Statsformer is exploiting genuine semantic signal rather than just ensemble luck.

Key Results

Across datasets and training-set sizes, Statsformer consistently outperforms or ties strong baselines, including individual tree/linear learners, LLM-Lasso, AutoGluon, and AutoML-Agent (which occasionally suffered catastrophic overfitting).

Figure 1: Statsformer performance across datasets compared to baseline methods. Classification results report accuracy or AUROC (higher is better), while Superconductivity reports MSE (lower is better). Results show means over 10 stratified train/test splits with 95% confidence intervals. AutoML-Agent is included only for Bank Marketing, ETP, and Lung Cancer due to computational constraints; ETP training ratios are restricted to 0.3–0.7 due to class imbalance.

Compared directly against an identical stacking ensemble without LLM priors (Statsformer no-prior), adding validated semantic priors delivers clear wins—especially in data-scarce genomic tasks:

  • On the high-dimensional ETP dataset, Statsformer reduces relative classification error by 25.9% and error in AUROC ($1 - \text{AUROC}$) by 45.4%, achieving a 92% win rate across data splits.
  • On Lung Cancer and Internet Ads, it improves relative AUROC error by 12.2% and 8.53%, respectively.
Figure 2: Direct accuracy and AUROC comparison of Statsformer to Statsformer (no prior) for selected datasets. Gains are noticeable across all four examples, and significant for ETP. See Figure 14 in the Appendix for datasets not shown here.

Limitations and Future Work

  • Theoretical Caveats: The oracle safety guarantee bounds the aggregation loss (like log-loss or MSE) rather than ranking metrics like AUROC, and compares against the best model in the chosen library, not the theoretical Bayes-optimal predictor. Furthermore, the math relies on a "refit gap" shrinking to zero—a condition that can be tricky to verify for fixed tree ensembles.
  • Domain & LLM Dependencies: If your dataset columns are named feat_1 through feat_99, an LLM can't help you. Relying on proprietary LLMs also introduces API reproducibility headaches and potential pretraining biases.
  • Future Directions: The authors suggest expanding the base learner library, exploring richer semantic priors beyond simple per-feature scores (like feature interactions), and finding ways to inject foundation-model priors when explicit feature names are missing.

Summary updated

Abstract

Large language models (LLMs) encode rich semantic knowledge that can be useful for supervised learning, but their outputs are unreliable as statistical priors: they may be noisy, misspecified, or hallucinated. Existing LLM-informed learning methods either trust such signals directly, leaving predictions vulnerable to unreliable LLM guidance, or restrict semantic integration to a single model class. We introduce *Statsformer*, a validated framework for learning when to trust LLM-derived semantic priors in supervised statistical learning. Statsformer maps LLM-derived feature scores into a family of learner-specific prior-injection mechanisms across a heterogeneous library of linear and nonlinear predictors. It then uses out-of-fold validation to adaptively calibrate the influence of each prior-informed learner, allowing useful semantic information to improve prediction while attenuating weak, misspecified, or adversarial priors. This yields a guardrailed statistical learning system with an oracle-style guarantee: up to statistical error, the final predictor performs no worse than the best convex combination of its in-library candidates, including prior-free learners. Across diverse prediction tasks, informative LLM priors improve performance, while unreliable priors are automatically downweighted. These results position *Statsformer* as a reliability-oriented approach to LLM-informed statistical learning: rather than trusting LLM knowledge directly, it validates semantic priors against data before allowing them to influence the final predictor.
BibTeX
@inproceedings{zhang2026learning,
  author = {Erica Zhang and Naomi Sagan and Danny Tse and Fangzhao Zhang and Mert Pilanci and Jose Blanchet},
  title = {{Learning When to Trust LLM Priors: A Validated Framework for Semantic Prior Integration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=qNPH4iwOIZ},
}
Figure