Papers
Topics
Authors
Recent
Search
2000 character limit reached

Conditioning Gaussian Processes on Almost Anything

Published 20 May 2026 in stat.ML, cs.LG, and stat.ME | (2605.21041v1)

Abstract: Gaussian processes (GPs) offer a principled probabilistic model over functions, but exact inference is restricted to the linear-Gaussian regime. We establish an explicit equivalence between GPs and a class of linear diffusion models, recasting predictive sampling as an ODE with closed-form Gaussian dynamics and a likelihood-dependent guidance term that admits a simple Monte Carlo approximation. In the linear-Gaussian setting, we recover standard GP conditioning exactly; beyond conjugacy, the same machinery handles any conditioning statement admitting point-wise likelihood evaluation -- including non-linear physics, and, for the first time, natural language via LLMs. Whitening isolates the irreducible non-Gaussian dynamics, minimising Wasserstein-2 transport cost and eliminating numerical stiffness. The result is a general-purpose GP inference scheme requiring no bespoke derivations. Together, these results provide a general mechanism for incorporating the full richness of real-world knowledge as conditioning information, opening a new frontier for the probabilistic modelling of real-world problems.

Summary

  • The paper introduces FlowGP, a unified framework that conditions Gaussian Processes on arbitrary constraints, including natural language inputs.
  • It leverages an ODE-based sampling approach to incorporate linear, nonlinear, and non-Gaussian information without needing model retraining.
  • Empirical results demonstrate competitive performance in constrained regression, physics-informed modeling, and text-guided GP sampling with high computational efficiency.

Conditioning Gaussian Processes on Arbitrary Information: The FlowGP Framework

This paper introduces FlowGP, a unified framework that enables conditioning Gaussian Processes (GPs) on virtually any form of information—linear or nonlinear, Gaussian or non-Gaussian—including natural language constraints derived from LLMs. Leveraging an explicit connection between GPs and deterministic/probabilistic flows from diffusion models, the approach provides an ODE-based mechanism for conditional GP sampling with fixed computational costs and strong guarantees in the linear-Gaussian regime.


From Classical GP Inference to the Flow Perspective

Classically, GPs afford tractable inference only under linear-Gaussian observation models where conditioning reduces to closed-form updates of the mean and covariance. However, practical scenarios frequently demand conditioning on nonlinear or non-Gaussian constraints (e.g., monotonicity, boundedness, physics, or textual descriptions), traditionally requiring custom approximate inference (Laplace, EP, variational methods) or model engineering, with limited scalability and generality.

This work reinterprets GP predictive sampling as a deterministic transport from white noise to the GP posterior, akin to methods in diffusion and flow-matching generative models. The conditional GP distribution emerges as the terminal distribution of an ODE defined by the GP score function and, when applicable, guidance terms arising from additional constraints.


GP-Diffusion Equivalence and ODE Sampling

An explicit equivalence is established between GP inference and the simulation of a linear time-varying ODE:

dftdt=12β(t)A(t)1b(t)12β(t)(ImA(t)1)ft\frac{d\bm f_t}{dt} = -\frac{1}{2}\beta(t) \mathbf{A}(t)^{-1} \mathbf{b}(t) - \frac{1}{2}\beta(t) (\mathbf{I}_m - \mathbf{A}(t)^{-1}) \bm f_t

where A(t)\mathbf{A}(t) and b(t)\mathbf{b}(t) interpolate between the white noise base and the GP predictive distribution.

Conditioning under the linear-Gaussian regime is recovered exactly, with predictive samples obtained by integrating this ODE from white noise (t=1t=1) backward to t=0t=0. Figure 1

Figure 1: The ODE-based flow transports white noise via velocity fields toward the GP posterior, faithfully interpolating sample trajectories and predictive uncertainty.

This construction also admits a natural extension to the stochastic SDE (variance-preserving diffusion), but here, the score function is fully analytic, eliminating the need for score model learning inherent in neural generative modeling.


Arbitrary Conditioning via Guided ODEs

When moving beyond Gaussian-linear constraints, FlowGP augments the ODE with a guidance term representing the gradient of the log-likelihood (or constraint indicator) under general conditions:

dftdt=[linear GP velocity]12β(t)ftlogp(Cft,D)\frac{d\bm f_t}{dt} = [\text{linear GP velocity}] - \frac{1}{2}\beta(t) \nabla_{\bm f_t} \log p(\mathcal{C}|\bm f_t, \mathcal{D})

Here, C\mathcal{C} encodes arbitrary conditioning, ranging from monotonicity and boundedness to sophisticated physics or LLM-based text descriptions.

The intractable guidance gradient is efficiently estimated via Monte Carlo, leveraging the closed-form conditional of the underlying GP at every step. Importantly, no retraining or model-specific derivations are required, only pointwise likelihood evaluation (and, where possible, gradient computation). Figure 2

Figure 2

Figure 2

Figure 2

Figure 2

Figure 2

Figure 2

Figure 2

Figure 2

Figure 2

Figure 2

Figure 2

Figure 2: FlowGP samples (right) accommodate non-linear physical laws (top: known ODEs/PDEs) or natural language constraints (bottom: LLM-derived likelihoods), contrasting with statistically coherent but semantically agnostic unconstrained GP samples (left).


Whitening and Numerical Stability

A significant practical advance is the use of whitening, transforming the sampling dynamics to operate in the uncorrelated, standardized basis of the GP posterior. This eliminates numerical stiffness and decouples the non-Gaussian guidance from the transport of noise to correlated samples, minimizing the Wasserstein-2 transport cost and increasing solver stability as the problem size or informativeness of constraints grows. Figure 3

Figure 3

Figure 3: Extension of the ODE flow to non-Gaussian, nonlinear conditioning (e.g., monotonicity), with the whitened formulation yielding numerically stable, efficient sampling.


Empirical Performance

Constrained Regression: FlowGP matches or exceeds custom algorithms from the statistics literature for monotonic and bounded GP regression. It provides prior-consistent, fully probabilistic posteriors without surrogate latent variables or projection steps and with competitive runtimes.

Physics-Informed GPs: The framework seamlessly incorporates nonlinear PDE constraints by operating directly on ODE or residual likelihoods, achieving solution accuracy and uncertainty quantification competitive with recent variational and kernel-smoothing approaches, but with orders-of-magnitude reduced computation.

Text-Guided GPs: FlowGP is the first general-purpose framework to condition GP sample paths on natural language, via product-of-experts construction using LLM-derived likelihoods. The approach produces function draws that are both prior-consistent and semantically aligned with text prompts.

Computational Efficiency: Across evaluated domains, FlowGP delivers predictive samples within milliseconds to seconds, a speed-up over baseline methods that often require iterative optimization for each new form of conditioning. Figure 4

Figure 4: Comparative effect of guidance estimation and ODE discretization on constrained GP regression; the MC estimator enables accurate, diverse samples even with coarse discretization and minimal computational effort.


Theoretical Implications

The framework exposes a deeper equivalence between GP modeling and transport-based inference. This has far-reaching implications:

  • Unification: Any constraint expressible as a point-wise likelihood (or differentiable surrogate) is admissible; this covers constraints from convex geometry, physics, qualitative knowledge, and structured data.
  • Error Control: The decoupling of score computation from sampling ensures that the only sources of error are the Monte Carlo approximation to the guidance and ODE discretization, both independently controllable.
  • Scalability: Although scaling remains cubic in the discretization size (as with all full GPs), the method is compatible with sparse and structured GP approximations, allowing straightforward scalability in future work.

Future Prospects and Open Directions

FlowGP's generality enables new forms of probabilistic reasoning over functions under qualitative or domain-specific knowledge sources. The pivotal demonstration of LLM-guided conditioning suggests a future where GPs are routinely influenced by human-like descriptions, yielding data-driven models that integrate both hard constraints (physics, safety, shape) and soft, semantic priors. Integration with scalable GP approximations, extensions to infinite-dimensional settings, and adaptive Monte Carlo guidance strategies represent natural next steps.


Conclusion

FlowGP delivers a principled, computationally efficient, and highly flexible approach for conditional sampling in GPs. It provides a bridge between established probabilistic modeling and modern diffusion-based generative methods, facilitating the incorporation of arbitrary conditioning—including natural language—while preserving the foundational properties of GPs. This advances both the theory and practice of probabilistic modeling under rich, heterogeneous information.


Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 3 tweets with 9 likes about this paper.