cs.AINov 2, 2026

Variable names provide priors: semantic grounding enables data-efficient numerical prediction by large language models

Authors: Xin-Rui Ma, Shi-Zhi Chen, Hai-Yan Jiang, De-Cheng Feng, Michael Beer

Organizations: School of Highway, Chang’an University, Xi’an 710064, China · School of Civil Engineering, Southeast University, Nanjing 211189, China · Institute for Risk and Reliability, Leibniz University Hannover, Hannover, 30167, Germany · Department of Civil and Environmental Engineering, University of Liverpool, Liverpool, L69 3GH, United Kingdom · 

Abstract

Large language models (LLMs) have achieved strong performance across diverse tasks, from question answering to code generation. Recent studies have found that LLMs can perform numerical prediction on tabular datasets via in-context learning. However, it remains unclear under what conditions and how LLMs use variable names and in-context examples for numerical prediction. Here we show that semantic grounding, the match between variable names and the values they describe, allows five LLMs without task-specific training to match or outperform seven supervised machine learning (ML) models across 20 datasets from nine scientific domains, particularly when examples are scarce. Reasoning traces indicate that variable names allow LLMs to draw on domain-specific knowledge acquired during pretraining. Using controlled tasks based on physical formulas, we further show that LLMs integrate domain-specific knowledge with in-context examples in a way consistent with Bayesian updating. Specifically, when the relationship between the inputs and the target cannot be inferred from the examples alone, LLMs rely on domain-specific knowledge as the prior. Conversely, as contradicting examples accumulate, LLM predictions shift progressively towards these examples, which act as the likelihood. Our work reveals how LLMs use domain-specific knowledge in numerical prediction and positions them as data-efficient predictors for data-scarce scientific domains.

Figures & tables

Appendix figures & tables35 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

Apr 30, 2026

In-Context Examples Suppress Scientific Knowledge Recall in LLMs

Scientific reasoning rarely stops at what is directly observable; it often requires uncovering hidden structure from data. From estimating reaction constants in chemistry to inferring demand elasticities in economics, this latent structure recovery is what distinguishes scientific reasoning from curve fitting. Large language models (LLMs) can often recall and apply relevant scientific formulas, but we show that this ability is surprisingly easy to suppress. We show that adding in-context examples makes models rely less on pretrained domain knowledge, even when those examples are generated by the very same formula. Rather than reinforcing knowledge-driven derivation, examples shift computation toward empirical pattern fitting. We document this knowledge displacement on 60 latent structure recovery tasks across five scientific domains, 6,000 trials, and four models. This displacement is consistent across domains, but its accuracy consequences depend on how the displaced strategy compares to the one that replaces it: the same shift can lower accuracy, leave it unchanged, or appear to improve it. In all cases, however, the model shifts away from knowledge-driven reasoning. For practitioners deploying LLMs on scientific tasks, the message is cautionary: in-context examples may displace, rather than reinforce, the knowledge they are intended to support.
Mar 3, 2026

Eliciting Numerical Predictive Distributions of LLMs Without Autoregression

Large Language Models (LLMs) have recently been successfully applied to regression tasks -- such as time series forecasting and tabular prediction -- by leveraging their in-context learning abilities. However, their autoregressive decoding process may be ill-suited to continuous-valued outputs, where obtaining predictive distributions over numerical targets requires repeated sampling, leading to high computational cost and inference time. In this work, we investigate whether distributional properties of LLM predictions can be recovered without explicit autoregressive generation. To this end, we study a set of regression probes trained to predict statistical functionals (e.g., mean, median, quantiles) of the LLM's numerical output distribution directly from its internal representations. Our results suggest that LLM embeddings carry informative signals about summary statistics of their predictive distributions, including the numerical uncertainty. This investigation opens up new questions about how LLMs internally encode uncertainty in numerical tasks, and about the feasibility of lightweight alternatives to sampling-based approaches for uncertainty-aware numerical predictions.
May 7, 2026

Language models lack systematicity in generating and updating hypotheses

Large language models (LLMs) are increasingly applied to complex problems, from automated code debugging to science itself. Such problems require generating plausible hypotheses from sparse, noisy, and ambiguous data and updating them as more information arrives. Yet how closely LLMs approach optimal inductive reasoning remains unclear. We study this question in the classic number game, in which a learner infers a concept from a few ambiguous positive integers: {2,16,4,8}\{2, 16, 4, 8\}, for example, is explained both by powers of 2'' and by numbers up to 20.'' We probe the concepts LLMs hypothesize from the observed examples and use their behavioral patterns to understand how they generate and update hypotheses. We measure the LLM posterior over hypotheses in three tasks (prediction, evaluation, and generation) and compare LLM behavior with a Bayesian model and with humans. LLMs favor narrower hypotheses than humans and show a robust evaluation--generation gap: in evaluation they select hypotheses more consistent with the observed examples, whereas in generation they propose narrower hypotheses that are more often rules. They also update poorly: as examples accumulate, their accuracy declines while their confidence grows. Thinking reduces, and can even reverse, the gap; it also broadens the hypotheses LLMs favor, raising accuracy while lowering confidence. Whereas prior studies have shown that LLMs are good hypothesis proposers, our results and further comparisons with the Bayesian model show that LLM inductive reasoning lacks coherence across the three tasks, suggesting that LLMs do not maintain a stable representation shared across tasks that make the same demand. Our results highlight a limitation of LLMs in inductive inference, particularly in settings such as science, where hypotheses must go beyond the data.