Introduction
Large Language Models (LLMs) are increasingly deployed as functional approximators in diverse fields, from robotics to finance. While they demonstrate remarkable predictive capabilities, the underlying mechanism remains a subject of debate. Are LLMs developing a mathematical intuition for raw numerical patterns, or are they primarily leveraging the vast prior knowledge acquired during pre-training? This study, conducted by researchers from Cambridge and Microsoft, adopts a Bayesian perspective to disentangle these capabilities.
Methodology: A Bayesian Framework
The researchers frame the LLM's predictive process through the lens of Bayesian inference. In this view, a prediction is a balance between the likelihood (how well a hypothesis fits the observed data) and the prior (the plausibility of that hypothesis based on pre-existing knowledge).
To isolate these components, the study developed two distinct prompting strategies:
- Likelihood Evaluation (Decontextualized): Using
NUMERIZEandDECONTEXTUALIZEtechniques, features were normalized and stripped of semantic meaning. This forced the model to rely solely on raw numerical pattern recognition. - Posterior Evaluation (Contextualized): Using
VERBALIZEandCONTEXTUALIZE, data was presented with full semantic context (e.g., "Education: PhD"), and the model was explicitly prompted to utilize its domain knowledge.
Experimental Setup
The evaluation spanned three data regimes:
- Synthetic 1D Functions: Ten mathematical functions (e.g., Linear, Sine, Power Law) were used to test pure numerical modeling.
- Income Prediction: A modified UCI Adult dataset where features were renamed and noise was added to prevent direct retrieval from training memory.
- Climate Science: CO2 concentration data from the Mauna Loa Observatory, similarly perturbed to ensure the task required active reasoning rather than simple memorization.
Key Findings
The Tokenization Trap
A significant finding is that LLMs are fundamentally weak at processing raw numerical data. Due to tokenization—where numbers are often split into arbitrary sub-tokens—the models struggle to grasp mathematical relationships. In synthetic tests, GPT-4 was consistently outperformed by a simple 4-layer Multi-Layer Perceptron (MLP) on basic functions like sine waves, showing that LLMs cannot yet replace traditional regression models for "blind" data analysis.
LLMs as "Bayesian-by-Default"
The true strength of LLMs lies in their data efficiency when context is provided. On the income prediction task, providing domain context allowed GPT-4 to achieve 79.4% accuracy with only 100 examples. This performance matched an MLP trained on 10,000 samples—a 100x improvement in data efficiency.
Contextual Reasoning vs. Spurious Correlation
When context is absent, LLMs tend to latch onto spurious correlations present in small datasets. However, with domain knowledge, they identify robust, physically grounded features. For instance, in CO2 modeling, a contextualized LLM successfully designed a Gaussian Process kernel that captured both long-term trends and seasonal oscillations, matching expert-level performance.
Conclusion
This research suggests that LLMs function best not as "calculators" but as "Bayesian predictors" that excel at integrating sparse data with deep world knowledge. While they struggle with raw numbers, their ability to apply domain-specific context makes them powerful tools for few-shot learning. Future developments should focus on multimodal architectures that treat numerical data as "first-class citizens," combining precise numerical intuition with vast contextual reasoning.
Summary updated