arXiv:2610.36806cs.LGOct 2026

Manuscript Offprint

arXiv:2610.36806

LLM knowledge for improved Out-of-Distribution Tabular Prediction - A Cross-Validated Regularisation Approach

Sølve Langseth, Kristoffer Herland Hellton, Hugo L. Hammer

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Prediction models degrade when the deployment population differs from the one used to train them, and training data cannot say which feature–response relationships will transfer. Expert elicitation is slow and unscalable. We ask whether coefficient priors elicited from large language models (LLMs) improve out-of-distribution (OOD) prediction as the shrinkage target of a regularised regression instead of zero, across five tabular datasets split on real covariates, selecting providers and prior structures by source-domain cross-validation alone. The priors help on four of five datasets, by up to 7.9% OOD mean squared error, and ten of twenty-four prior-informed results resolve the mean improvement at conventional confidence; single-deployment intervals are much wider. On classification the gain is in probabilistic accuracy, not ranking, and control tests with corrupted priors attribute the benefit to feature-specific content rather than scale. Two findings temper this. Variation across candidate priors exceeds the average benefit, yet cross-validation margins fall below their own noise, so selection avoids the worst prior rather than finding the best. On three datasets the prior improves in-domain accuracy as much as out-of-domain, making it better regularisation than shift correction. Only where the training data are large enough that the in-domain gain disappears does elicited knowledge demonstrably improve transfer. Code, priors and results: https://github.com/hugohammer/llm-priors-ood.

Keywords: prior elicitation, large language models, distribution shift, out-of-distribution prediction, regularised regression, model selection

1 Introduction

Prediction models are usually developed under the assumption that training and evaluation data are drawn from the same underlying distribution. Under this assumption, held-out test performance is a reliable proxy for the data a model will meet after deployment. In applied settings the assumption is often unrealistic, and performance can deteriorate when, for instance, the population encountered at prediction time differs from the one used for development [1]. As an example, a clinical prediction model trained at one hospital may perform worse at another because patient demographics, measurement routines, disease prevalence or treatment practices might differ.

Such changes are described as dataset or domain shift. We use domain shift for settings where the deployment population differs from the source population used for model development, the case most relevant here; it is closely related to covariate shift, where the feature distribution changes while the conditional outcome mechanism is assumed stable [2, 3, 1].

*Corresponding author: hugo.hammer@oslomet.no

Despite extensive work, there is no generally reliable remedy. Standard validation can fail precisely because the validation set is drawn from the source distribution. The dominant practical response is ensembling: deep ensembles [4] train several networks from different initialisations and average their predictive distributions, producing better-calibrated uncertainty than more involved Bayesian methods, with ensemble variance rising on inputs far from the training distribution. Ensembles have limitations, however. They require fitting many models, are expensive, and when built from complex learners are hard to interpret. More fundamentally, ensemble disagreement diagnoses predictive uncertainty, but does not reduce it: it tells the user how confident the model is, not how to make a better prediction.

One of the few principled ways to improve predictions when training data are limited or unrepresentative is to bring in information from outside the training set: external knowledge about which features should matter, in what direction, and with what plausible magnitude. Recent evidence that tabular foundation models excel on small-to-medium IID data but are still beaten by conventional models on non-IID problems [5] suggests that scale alone does not solve domain shift, and that simple, inspectable models guided by external knowledge remain worth studying.

Useful external information often exists outside the training data, in previous studies, biological pathways, clinical expertise or established domain theory [6, 7]. Appropriately encoded, it can improve estimation and prediction where observed data are limited, noisy or unrepresentative [8]. The established framework is Bayesian modelling, where prior beliefs are expressed as a distribution over parameters and updated with data [9, 8]. A closely related approach is regularisation, where the estimator is penalised so that estimates shrink toward preferred values [10]. Ridge regression shrinks coefficients toward zero, which is exactly a generic prior belief that effects are small unless the data say otherwise [11, 9].

This equivalence makes prior-informed regularisation a natural way to combine external knowledge with predictive modelling: instead of shrinking every coefficient toward the same uninformative target of zero, one may shrink toward values suggested by domain knowledge. Under domain shift this may be helpful, because source-domain data can overemphasise relationships that do not transfer, while domain knowledge may encode more stable information about plausible effects.

Obtaining that knowledge, however, is the bottleneck. O'Hagan [7] describes expert elicitation as a structured and demanding process of translating substantive knowledge into probability distributions. Domain experts are usually not statisticians, such that the elicitor typically must guide them through uncertainty, probability and numerical effect sizes. Elicitation is therefore slow, hard to scale, and offers no guarantee of a useful prior.

These constraints motivate interest in Large Language Models (LLMs) as an alternative. LLMs are trained on large text corpora and adapted to respond to natural-language prompts [12, 13], encoding broad statistical associations across many domains [13, 14]. They can be queried repeatedly and cheaply, applied across domains and feature sets, and constrained to emit structured numerical output. In a randomised trial of diagnostic reasoning the language model alone scored higher than physicians using conventional resources, even though giving physicians access to it did not improve their own reasoning [15], and LLM-derived priors have already been reported to be preferable to expert elicitation in an applied Bayesian survival analysis [16]. This does not make LLMs substitutes for human experts, but it does suggest they contain domain information worth eliciting.

The caveats are real. LLMs hallucinate, are sensitive to prompt wording, and reflect biases in their training data [17, 18, 19, 20]. These matter especially when the output is a numerical coefficient, since errors in sign, scale or uncertainty propagate directly into the fitted model.

We address three questions. First, can prior means estimated from repeated LLM coefficient samples improve OOD performance for regularised linear and logistic regression, relative to standard shrinkage toward zero? Second, does estimating prior uncertainty from the empirical distribution of LLM samples (as feature-specific variances or full covariance) help beyond the prior mean alone? Third, under what conditions do LLM priors help, do nothing, or harm? Our contributions are:

  1. An evaluation of LLM-elicited coefficient priors under domain splits defined by real covariates across five datasets, with a cross-provider, cross-family selection pipeline driven only by source-domain data.

  2. Placebo priors: priors re-indexed onto permuted features, and priors with randomly flipped signs, both preserving scale and correlation structure, establishing that the benefit derives from the priors' feature-specific content and not from shrinking toward an arbitrary nonzero target.

  3. A methodological negative result: Comparing classifiers using fixed decision thresholds (e.g., computing F1F_{1} at 0.5) substantially overstates performance gains whenever the domain split alters class balance. The reliable benefit of prior-informed regularisation lies in probabilistic calibration and proper scoring rules rather than threshold-dependent metrics [21].

  4. A separation of two aspects of the benefit: on three of five datasets the prior improves in-domain accuracy as much as out-of-domain accuracy and is therefore better regularisation, while on the one dataset with enough training data for the in-domain gain to disappear it improves transfer specifically.

  5. An assessment of the selection step itself: depending on the LLM variant and prior family, an elicited prior can either improve or degrade out-of-domain predictive performance relative to the zero-centred baseline. Yet the cross-validation margins separating candidates are smaller than their fold-level noise, so the selection procedure is better at avoiding poor candidates than at identifying the best one.

References (44)