TL;DR
Large Language Models (LLMs) are surprisingly capable at regression—especially when given helpful text hints like "monthly precipitation in San Diego"—but they suffer from severe error cascades when predicting long sequences one point at a time. This paper introduces LLM Flow Processes (LLM-FP), a method that marries the semantic world-knowledge of an LLM with the smooth, mathematically grounded trajectories of a flow-matching Neural Process. By combining them via a clever, gradient-free math trick, you get fast, coherent, and well-calibrated curve predictions guided by plain English.
What Problem Does This Paper Address?
Suppose you have a handful of data points and want to predict what happens next. Classic probabilistic models (like Neural Processes) are great at generating smooth, realistic curves, if your test data matches their training distribution. However, they are completely blind to rich, unstructured metadata—they can't read a sticky note that says, "Expect a seasonal spike in winter."
Pre-trained LLMs can read that note and use their vast implicit world knowledge to inform numerical predictions. Unfortunately, using LLMs for regression presents a catch-22:
- Autoregressive prediction (predicting point-by-point, feeding each prediction back in) is slow and suffers from "exposure bias." Errors compound rapidly, causing trajectories to go completely off the rails in sequences of fewer than 100 points.
- Independent marginal prediction (predicting each point separately in parallel) avoids cascading errors, but loses all sense of local smoothness—producing jagged, disconnected, and overly broad uncertainty bands.
The authors ask: How can we combine an LLM’s ability to understand text prompts with a Neural Process's ability to draw coherent, locally consistent curves?
Methods
The authors combine two distinct models—a modernized Neural Diffusion Process (NDP) (built with a Diffusion Transformer backbone and a flow-matching objective) and an Independent LLM (Qwen-3.6-27B)—using a Product-of-Experts (PoE) framework. Under PoE, a predicted curve is only considered probable if both the flow model and the LLM agree on it.
Normally, guiding a flow or diffusion model with an external "expert" requires either taking gradients through the expert (impossible or prohibitively expensive for a 27B LLM) or running noisy Monte Carlo simulations at every generation step.
What's new: The authors introduce a gradient-free, exact-convolution guidance method. During the flow model's denoising process, the math requires smoothing the expert's probability distribution with Gaussian noise. Because the independent LLM outputs probabilities in discrete, piecewise-constant bins, convolving those bins with a Gaussian has an exact, closed-form analytical solution (using standard Gaussian cumulative distribution functions). This allows the NDP's flow network to steer trajectories toward regions favored by the LLM's text-conditioned probabilities—all without ever backpropagating through the LLM.
Datasets
- NDP Training: A purely synthetic dataset of 1D Gaussian Process samples drawn from a mixture of kernel types (such as RBF and periodic kernels) and varying length-scales. Neither the LLM nor the base NDP is trained on real-world task data.
- Evaluation Scenarios: Four benchmarks testing text-faithfulness and extrapolation (no new datasets were introduced, instead drawing on established setups):
- Synthetic Change-Point: Piecewise linear functions with a sudden slope change.
- Synthetic San Diego Rainfall: Seasonal precipitation extrapolation from 2 or 3 data points.
- Synthetic Periodic + Linear Trend: Testing out-of-distribution trend extrapolation.
- Real-World Mauna Loa $\text{CO}_2$: Weekly atmospheric $\text{CO}_2$ measurements from 2019–2021.
Key Insights and Ideas
- Text acts as a "function-space filter": Think of the NDP as holding a massive library of plausible mathematical shapes (waves, smooth curves), while the LLM reads the text prompt and tells the NDP which shelf to pull from. On the San Diego rainfall task, the text prompt suppresses non-periodic curves in the NDP prior, locking onto realistic seasonal cycles.
- Mutual regularisation: The NDP fixes the LLM's blind spots, and vice versa. When independent LLM predictions produce bizarre single-point outliers, the NDP's local smoothness irons them out. Conversely, when a task features an upward linear trend not present in the NDP's zero-mean training prior, the LLM nudges the trajectories upward near the boundary of the NDP's support.
- Autoregressive regression has "attractor states": Much like how LLMs get stuck repeating text phrases, autoregressive LLM regression often collapses into rigid, deterministic templates or linear trends, ignoring actual context data as prediction resolution increases.
Key Results
Across multi-point tasks requiring both numerical structure and semantic context, LLM-FP outperforms standalone NDP and LLM baselines in accuracy (MAE) and calibration (CRPS and Negative Log Predictive Density, NLPD):
- Mauna Loa $\text{CO}_2$: LLM-FP achieves the best performance across the board, with an MAE of 0.51 (vs. 0.60 for LLM-Independent, 0.87 for NDP, and 1.05 for autoregressive LLM-Direct) and an NLPD of 0.69 (where LLM-Direct's sharp overconfidence inflates its NLPD to 1.95).
- Periodic + Linear: LLM-FP halves the error of standalone baselines, scoring 0.15 MAE and -0.73 NLPD (compared to 0.27 MAE for both NDP and LLM-Independent).
- Efficiency: Because the lightweight NDP handles fine-grained curve resolution (256 points), the heavy LLM only needs to evaluate probabilities at 51–64 sparse anchor points—yielding a ~4x computational saving in LLM calls while completely avoiding high-resolution autoregressive collapse. (Note: On the purely text-dominated Change-Point task, autoregressive LLM-Direct still wins with 0.03 MAE vs. LLM-FP's 0.13, as sharp corners lie outside the smooth GP prior of the NDP).
Limitations and Future Work
- Prior Support Boundaries: Product-of-experts can only reweight behaviors that the NDP already considers remotely possible; if the target function is completely alien to the NDP's training prior (like a sharp kink), LLM-FP struggles to invent that geometry from scratch.
- Double-Counting Evidence: PoE assumes the LLM and NDP are independent experts. In ultra-sparse regimes ($n \le 5$ context points) or when using weaker, poorly calibrated LLMs, multiplying probabilities can lead to overconfident, overly narrow uncertainty bands.
- Future Directions: The authors suggest training the NDP on richer synthetic causal-graph data and using linear attention to scale to larger datasets. Most excitingly, their closed-form Gaussian convolution trick isn't limited to regression—it works for any binned or piecewise-polynomial expert, opening doors for quantized inverse problems and guiding image diffusion models with tokenized vision-language experts.
Summary updated