- 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.
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:
dtdft=−21β(t)A(t)−1b(t)−21β(t)(Im−A(t)−1)ft
where A(t) and 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=1) backward to t=0.
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:
dtdft=[linear GP velocity]−21β(t)∇ftlogp(C∣ft,D)
Here, 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: 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: Extension of the ODE flow to non-Gaussian, nonlinear conditioning (e.g., monotonicity), with the whitened formulation yielding numerically stable, efficient sampling.
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: 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.