TL;DR
This paper introduces "LLM Processes" (LLMPs), a method that turns Large Language Models into zero-shot, multi-dimensional probabilistic regressors. By allowing users to condition numerical predictions on plain English text, LLMPs make it incredibly easy to inject expert prior knowledge into complex data problems—like telling a model a stock "goes out of business" and watching the predicted numerical trajectory drop to zero.
What Problem Does This Paper Address?
In machine learning, incorporating human intuition or expert prior knowledge into probabilistic models (like Gaussian Processes) is notoriously difficult. If you know that a sensor saturates at a specific value, or that a financial trend will eventually level off, translating that plain-English fact into strict mathematical priors requires deep statistical expertise.
The authors propose that Large Language Models (LLMs) are perfectly positioned to bridge this gap. Because LLMs possess vast amounts of latent knowledge and naturally interface with text, the authors ask: Can we build a regression model that processes numerical data, but is guided by natural language descriptions of the user's prior knowledge?
Methods
The authors develop a framework to elicit continuous, joint predictive distributions from LLMs without any fine-tuning.
- Eliciting Continuous Likelihoods: Instead of just asking the LLM to generate a number, they discretize the continuous number line into fine bins. By looking at the LLM's token probabilities (logits) for each digit, they calculate the exact probability mass of each bin. Crucially, they keep numbers at their original scale (e.g.,
12.3stays12.3) to preserve real-world context, and they append a terminal token to prevent the model from confusing prefixes (like12vs120). - Defining the LLM Process (LLMP): They propose two ways to predict multiple target points:
- Independent Marginal (I-LLMP): Predicts each target point independently based on the training data. It is mathematically valid as a stochastic process but ignores dependencies between the target points.
- Autoregressive (A-LLMP): Predicts targets sequentially, feeding previous predictions back into the prompt. This yields much richer, more accurate joint distributions.
- Prompt Engineering: They systematically tested how to feed data to the LLM. They found that formatting pairs as
x, y\nworks best, and that ordering the training data by spatial distance to the target point drastically improves performance.
Datasets
The authors evaluated LLMPs across a wide variety of domains:
- 1D Synthetic Functions: 12 standard mathematical functions (Linear, Sine, etc.) adapted from previous work (LLMTime).
- Weather Dataset: Real-world daily temperature, precipitation, and wind speed from London (queried from OpenWeather after the LLMs' training cutoffs to prevent data leakage).
- Canadian Historical Precipitation: Used to test in-context learning of seasonal trends.
- American Housing Prices: A Kaggle dataset used to test if LLMs can leverage text labels for features.
- Fashion-MNIST: Used to test 2D multi-dimensional input (image reconstruction).
- Black-Box Optimization: 6 standard benchmark functions (e.g., Branin, Gramacy).
Key Insights and Ideas
- Distance is a powerful inductive bias: Simply sorting the prompt's training data so that points physically closer to the target query appear last (closest to the generation step) gave the LLM a massive performance boost.
- Words actively shape numerical distributions: The most exciting finding is how text alters the math. When given identical numerical data for a stock price but prompted with the text "the company goes out of business," the LLMP correctly shifted its predictive distribution toward zero.
- Labels unlock latent knowledge: When predicting housing prices, feeding the LLM raw numerical features (like
78729) didn't help much. But simply adding the text label"Zip Code: 78729"allowed the LLM to leverage its internal knowledge about that specific area's demographics, significantly improving prediction accuracy. - Extreme flexibility: Unlike standard time-series models, LLMPs naturally handle irregularly spaced data, missing values, and multi-dimensional inputs without needing complex imputation or architectural changes.
Key Results
- Beats Gaussian Processes: On the 1D synthetic datasets, the Mixtral-8x7B A-LLMP achieved lower Negative Log-Likelihoods (better uncertainty calibration) than a tuned Gaussian Process on 10 out of 12 functions.
- State-of-the-Art LLM Forecasting: LLMPs outperformed LLMTime (a leading LLM time-series method) on weather forecasting, particularly when large chunks of training data were randomly removed.
- Superior Black-Box Optimization: In a benchmark against Optuna (a commercial hyperparameter optimization framework), the Llama-2-7B LLMP found as good or better maximums in fewer trials across all 6 test functions.
- Multi-dimensional capability: The model successfully reconstructed 2D Fashion-MNIST images when given only 20% to 50% of the original pixels as training points.
Limitations and Future Work
- Compute Cost: Generating these distributions via LLM inference is vastly more computationally expensive and slower than running standard regression models like Gaussian Processes.
- Context Limits: The approach is bounded by the LLM's maximum context window, restricting the size of the datasets and the amount of textual prior knowledge you can include.
- Interpretability: LLMPs are black boxes. While they produce well-calibrated uncertainties empirically, they lack the strict mathematical interpretability of explicitly encoded priors.
- Future Work: The authors suggest extending this framework to condition numerical predictions on other modalities, such as images or audio, alongside text.
Summary updated