Abstract
Recent advances in generative modeling-particularly diffusion models and flow matching-have been widely used for synthesizing discrete data such as images and videos. However, adapting these models to physical applications remains challenging, as the quantities of interest are continuous functions governed by complex physical laws. To address this, we introduce FunDiff, an efficient and robust framework for generative modeling in function spaces. FunDiff combines a latent diffusion process with a function autoencoder architecture to handle input functions with varying discretizations, generates continuous functions that can be evaluated at arbitrary locations, and seamlessly incorporate physical priors. These priors are enforced through architectural constraints or physics-informed loss functions, ensuring that generated samples satisfy fundamental physical laws. We theoretically establish minimax optimality guarantees for density estimation in function spaces, demonstrating that diffusion-based estimators achieve optimal convergence rates under suitable regularity conditions. We further demonstrate the practical effectiveness of FunDiff across diverse applications in fluid dynamics and solid mechanics. Empirical results indicate that our method can generate physically consistent samples with high fidelity to the target distribution, and exhibit robustness to noisy and low-resolution data.
Subject terms: Computational science, Computer science
Generative AI excels at images and video, but many scientific problems involve continuous physical fields. Here, authors introduce FunDiff, a function-space generative model that produces high-fidelity, physics-consistent function samples.
Introduction
Generative modeling, a cornerstone of modern machine learning, aims to learn and sample complex data distributions P(x) by constructing models that can generate new instances consistent with the learned distribution1,2. Among recent advances in this domain, diffusion models and flow matching have emerged as powerful frameworks that achieve state-of-the-art performance. Diffusion models3,4 learn to reverse a forward noising process by gradually denoising data through a Markov chain, which iteratively transforms random noise into high-quality samples. In parallel, flow matching5,6 provides an alternative approach by learning continuous normalizing flows via optimal transport theory, directly modeling probability paths that transform a tractable prior distribution into the target data distribution.
Diffusion models have shown strong performance across a wide range of applications, including high-resolution image synthesis7–9, audio generation10, protein structure prediction11, and molecular design12. Despite these advances, the focus has largely remained on discrete data types, such as images, text, and molecular graphs, whereas many scientific domains, especially in physics, demand the generation of continuous function data, where each sample represents a continuous function (e.g., a velocity or temperature field) defined over spatial and temporal domains. For instance, generating velocity fields in turbulent fluid dynamics, simulating deformation patterns in complex materials under external loadings, and forecasting temperature variations in climate models all require handling functions defined over continuous spatial and temporal domains. These problems inherently involve infinite-dimensional function spaces, a challenge that recent advances in operator learning frameworks have begun to address effectively13–19. This presents unique challenges:
How can we extend generative modeling to generate continuous functions that can be evaluated at arbitrary points, while preserving important structural or physical properties inherent in scientific problems?
Prior work in computer vision and graphics has extensively explored the concept of function-space generation through implicit neural representations and generative models, such as DeepSDF20, NeRF21, From Data to Functa22, and SIREN23, as well as their diffusion-based extensions including 3DShape2VecSet24, Shap-E25, and HyperDiffusion26. These methods treat signals such as shapes, radiance fields, or signed distance functions as continuous functions parameterized by neural networks, establishing an important foundation for generative modeling in continuous domains. Furthermore, recent works have attempted to extend the framework of generative models to function space, either by adapting existing algorithms to operate on discretized function data in or by transforming input functions into a finite-dimensional latent space22,27–31. Dupont et al.32 pioneered this direction by treating data points as continuous functions and learning distributions over them using adversarial training. Multiple theoretical frameworks have emerged for function diffusion models, including Gaussian measures on Hilbert spaces33, dimension-independent bounds for infinite-dimensional models34, generalized diffusion processes in function spaces35, and denoising diffusion operators with rigorous Gaussian processes and Langevin dynamics36.Although these studies have demonstrated promising results for fixed discretizations, they generally struggle to scale to higher resolutions or to handle variable discretizations consistently, as those encountered in scientific computing, partial differential equation (PDE) modeling, or operator learning14,37–40.
In parallel, diffusion models have emerged as powerful tools for tackling inverse problems and modeling dynamical systems governed by PDEs. Recent work has developed methods for reconstructing spatiotemporal fields from sparse observations and partial supervision41–43. To address resolution limitations, several approaches have integrated neural operators with diffusion models44–46, demonstrating improved performance in turbulence modeling and capture of multiscale phenomena. Furthermore, various strategies have attempted to incorporate physical priors directly into diffusion processes42,47–52. For instance, DiffusionPDE42 introduces physics-based guidance during the posterior sampling stage, whereas PIDM49 embeds PDE residuals directly into the training objective. However, enforcing PDE residuals is highly sensitive to solution accuracy; small numerical errors can destabilize both training and inference. Moreover, physical constraints are inherently defined in continuous space, but these diffusion models operate on discretized representations. This mismatch introduces discretization artifacts, often leading to inaccurate or ill-posed PDE residuals, especially in inverse problems where key state variables are only partially observed. These challenges underscore a fundamental gap between current data-driven generative models and the objective of producing physically consistent, continuous functions.
To address these challenges, we propose FunDiff, a machine learning framework for physics-informed generative modeling over function spaces. Our contributions are as follows. We introduce a unified architecture that combines latent diffusion processes with function autoencoders, enabling high-quality data generation in a function-space representation. This design supports evaluation at arbitrary spatial locations while seamlessly incorporating physical priors via the function-space representation. We establish theoretical guarantees for our approach by proving that diffusion-based models attain minimax-optimal rates for density estimation in infinite-dimensional spaces under mild smoothness assumptions. We demonstrate the practical effectiveness of FunDiff across diverse applications in fluid dynamics and solid mechanics. Our experiments show that the method generates physically consistent samples with high fidelity to target distributions while maintaining robustness to noisy and low-resolution input data. Taken together, our framework bridges the gap between theoretical guarantees in function spaces and practical neural network algorithms, establishing a principled approach to physics-informed generative modeling.
Results
In this section, we present theoretical results on generative models in function spaces, which establish the mathematical foundation of our work. Building on this theory, we introduce FunDiff, a practical framework for generating functions while incorporating physical priors. We then demonstrate the effectiveness of our proposed FunDiff framework through a series of experiments across diverse physical systems. Specifically, we present four case studies with increasing complexity: (1) the Burgers’ equation, showcasing the incorporation of PDE constraints; (2) Kolmogorov flow, highlighting divergence-free field generation; (3) linear elasticity, illustrating symmetry preservation; and (4) turbulent mass transfer, demonstrating conditional generation capabilities. For notations, interested readers are encouraged to refer to the Supplementary Table S1. It is important to emphasize that in all examples, FunDiff does not act as a neural PDE solver; rather, it learns to generate physically consistent continuous functions that approximate the distributions of solutions to selected PDE-governed systems when trained on such data.
Generative models over function spaces
In this section, we introduce a framework for generative modeling in function spaces. Given the inherently challenges of handling directly with infinitely-dimensional spaces, we begin by reducing the problem to a finite-dimensional setting, with preliminaries in Supplementary Section B. By embedding functions into a finite-dimensional vector space, the task of generating new functions can be reformulated as a well-studied vector generation task.
To formalize this idea, let us begin with a vector space generative oracle , which, given n i.i.d. samples from an underlying distribution , produces an estimate of μ. This oracle is assumed to achieve the minimax statistical estimation rate
where the expectation is taken over the randomness of the samples, and ε(d, n) aligns with the known minimax estimation rates53,54. For the continuous density class , we have a minimax density estimation rate
for d > 2, where is generated by diffusion models in this paper. It is a special case for the minimax rate when the smoothness α = 0. Therefore, for the entire continuous density class , we have ε(d, n) = n−1/d.
Building upon this oracle, we seek to develop a generative modeling method that operates over a space of functions. Suppose that we have n functions , drawn i.i.d. from an unknown distribution , where is a subset of the continuous function space . Our goal is to devise a theoretically sound methodology for generating new function samples from P, given only these observed samples.
To achieve this, we introduce a function autoencoder (FAE) framework. We define an encoder , which maps a function to a finite-dimensional vector representation, and a decoder , which maps these vectors back to functions. Applying to the given functions f(1), f(2), …, f(n) yields vector samples . We then use the vector-space generative oracle on these vectors to obtain an estimated distribution . Finally, we can sample new vectors from and apply to generate new functions , the distribution of these newly generated functions is indicated by and serves as an estimation of P. This construction effectively leverages the theoretical foundations of vector-space generative modeling and extends them to the realm of infinite-dimensional function spaces.
In order to measure the distribution loss, we apply an analogy of the Wasserstein distance . Notice that for distributions over the function space, the Wasserstein distance is defined similarly as
where is a functional and its Lipschitz constant means:
In the next part, we propose an upper bound of and explain all its factors.
Density estimation loss decomposition
Suppose the vector representations are drawn from a distribution p = E♯P, which stands for the pushforward of P under the encoder . Applying the vector-space generative oracle to these samples yields an estimated distribution . We then feed into the decoder , producing , an estimate of the original distribution P in the function space. For the estimation loss, we have the bound
| 1 |
Here, the first term represents the generalization error for the autoencoder . The second term stands for the Lipschitz constant of the decoder , defined by the inequality
This quantity measures the robustness of with respect to perturbations in the input vector space. The third term, , reflects the accuracy of the density estimation for vector space, highlighting the performance of the oracle in estimating the true distribution p. The dimension of the feature space D must be chosen judiciously to strike a balance between ensuring accurate autoencoder reconstruction and mitigating the effects of the curse of dimensionality for the vector-space generative oracle. The proof of (1) can be seen in Supplementary Section C.1. Next, we propose some simple examples to help us understand the theoretical framework.
Illustrative example 1: reproducing kernel Hilbert space (RKHS)
For a reproducing kernel Hilbert space (RKHS) , we denote its eigenvalues as μ1 ⩾ μ2 ⩾ …, and their corresponding eigenfunctions as ψ1, ψ2, …. For any function , its eigen-decomposition has the form and its RKHS norm is defined as . Define the RKHS unit ball as .
Given n sample functions , assume their eigen-decomposition is
We define the encoder as the truncation of D coefficients and the decoder as the linear combination:
Hence, the autoencoder effectively serves as a projection (truncation) onto the subspace spanned by the first D eigenfunctions. Next, in order to upper bound the density estimation loss , we introduce two different assumptions corresponding to the polynomial and exponential eigenvalue decay of the RKHS .
Assumption 1
(2β-polynomial decay) Assume that the RKHS is embedded to a β-th order Sobolev space where . It leads to the property that the eigenvalues with respect to the kernel function K( ⋅ , ⋅ ) have the property of 2β-polynomial decay as μi ≍ i−2β for all i ⩾ 1. To be more specific, we assume that
holds for ∀ i ⩾ 1, where and are constants.
Assumption 2
(γ-exponential decay) Assume that the eigenvalues with respect to the kernel function K( ⋅ , ⋅ ) have the property of γ-exponential decay as for all i ⩾ 1 where C1 > 0 is a positive constant. To be more specific, we assume that
holds for ∀ i ⩾ 1, where and are constants.
Then, the reconstruction loss represents the truncation loss under the RKHS eigen-decomposition, and the robustness is directly related to the RKHS norm bound of .
Theorem 1
(Density estimation over RKHS space) Assume P is a distribution supported on the RKHS unit ball . By using the generative oracle and the function autoencoder (FAE) framework introduced above, the density estimation loss over RKHS space can be bounded as follows: Under the polynomial decay setting:
Under the exponential decay setting:
after we choose an optimal latent dimension D.
Proof
The proof is provided in Supplementary Section C.2.
Illustrative example 2: Barron space
First, we introduce the concept of Barron space55. For function , we aim to recover f using a fully connected two-layer neural network with ReLU activation:
Here, σ( ⋅ ) is the component-wise ReLU activation , for k ∈ [m], and the whole parameter set is to be learned, and m is the width of the network. As we can see, . To control the magnitude of the learned network, we use the following scale-invariant norm.
Definition 1
(Path norm56) For a two-layer ReLU network, the path norm is defined as
Definition 2
(Spectral norm) Given f ∈ L2(Ω), denote by an extension of f to . Let be the Fourier transform of F, then
We define the spectral norm of f by
Assumption 3
We consider all functions with a bounded value and a bounded spectral norm.
We let the function class , which makes the distribution P supported on Barron space .
In the following analysis, we mainly rely on the approximation property for two-layer ReLU networks over the Barron space , which are proposed in Refs. 55,57,58.
Lemma 1
For any , there exists a two-layer network of width m such that:
Furthermore, the parameter can be bounded as:
In the context of the FAE framework, we set our encoder as . If there exist multiple valid for f ∈ Fs, we can choose any one of them as the encoder’s output. As we see, the encoder maps the function of the Barron space to a parameter set with bounded path norm. The decoder is simply a parameter injection of a two-layer ReLU network. Hence, the autoencoder effectively serves as a two-layer ReLU network approximation. Next, we upper-bound the density estimation loss .
Theorem 2
(Density estimation over Barron space) Assume P is a distribution supported on the Barron space . By using the generative oracle and the function autoencoder (FAE) framework introduced above, the density estimation loss over Barron space can be bounded as
Proof
The proof is provided in Supplementary Section C.3.
Now we have proved the statistical upper bound of density estimation over the RKHS ball and Barron space. To further show the optimality of such an upper bound, we provide a statistical lower bound of density estimation over the RKHS ball, which matches its upper bound with only a negligible gap.
Theorem 3
(Minimax lower bound for Wasserstein estimation over an RKHS ball) Assume is an RKHS following 2β-polynomial eigenvalue decay (Assumption 1)
and define the RKHS unit ball . We observe n i.i.d. samples X1, X2, …, Xn ~ P, where the unknown distribution P is supported on the RKHS ball . Let the statistical minimax rate
Then there exists a constant K(β, c, C) > 0, depending only on pure constants β, c, C in the eigenvalue decay assumption, such that for all sufficiently large n,
Proof
The proof is provided in Supplementary Section C.4.
Notice that its corresponding statistical upper rate is according to our results in Theorem 1. It means that our upper and lower bounds only have a gap, which is negligible to our statistical rate.
FunDiff in practice
To realize the framework of function generative models outlined above, we propose FunDiff (Fig. 1), which consists of a FAE and a latent diffusion model to generate continuous functions. The FAE learns the mapping from discrete to continuous function representations while also enabling the enforcement of prior physical constraints. The latent diffusion model is then trained directly on the latent manifold learned by the pretrained FAE encoder. Our generation process follows a simple two-step procedure: we first sample latent codes by integrating the reverse-time ODE from Gaussian noise to the target data distribution, and then transform these codes into continuous functions via the FAE decoder.
Fig. 1. Overview of the function generative framework.
The framework comprises three main steps. (1) We first train a function autoencoder (FAE) that maps discretized function data into a continuous latent space while preserving physical constraints. The encoder employs a Perceiver module to handle variable discretizations and project them into a unified latent representation. A Vision Transformer (ViT) processes the discretized inputs, and the decoder enables continuous function evaluation via cross-attention between query coordinates x and encoded features. When known physical priors are available, the decoder is modified accordingly. (2) Next, we train a Diffusion Transformer (DiT) in the learned latent space to generate diverse function samples. For conditional generation, partial observations are encoded using the pretrained transformer and incorporated into the diffusion model inputs. The diffusion model is trained using rectified flow. (3) During inference, latent codes are sampled by solving a reverse-time ODE from Gaussian noise, and then decoded into continuous functions via the decoder. The framework naturally supports various physical constraints through its continuous latent representation, enabling applications in super-resolution, flow reconstruction, data purification, and non-intrusive prediction.
Physical prior integration
The FAE framework enables flexible integration of physical priors through multiple mechanisms of either soft or hard constraints. For general PDE constraints, we augment the loss with a residual term:
where represents the PDE residual and is the reconstructed function. The continuous representation of FAE enables automatic differentiation to compute all required derivatives, allowing constraint enforcement across the entire domain. It is worth noting that these physics-informed terms serve as regularizers rather than numerical solvers of the governing equations; they guide the learned FAE to produce output functions that are physically consistent.
Furthermore, some physical properties can be incorporated through architectural modifications. For periodic boundary conditions, one approach is to modify the coordinate embedding with Fourier bases of specific frequencies59. When handling divergence-free fields, particularly important in fluid dynamics applications, the FAE can be configured to learn a stream function ψ, from which velocity field components are derived as , thereby ensuring divergence-free flow. Symmetry constraints can be incorporated when needed through modifications to the decoder’s final layer.
Related work
We emphasize that our approach fundamentally differs from existing physics-informed diffusion models42,47–52, which impose physical constraints either by modifying the diffusion model’s training objective or by guiding the posterior sampling process. These methods operate on discretized outputs, where physical laws-typically enforced through PDE residuals-are subject to discretization errors. This not only leads to inaccurate constraint enforcement but also introduces additional optimization challenges. Moreover, in inverse problems where key physical variables are unobserved, such residuals may be undefined at inference time, further limiting the applicability of these approaches. In contrast, our method enforces physical constraints within the FAE, which is fully decoupled from the training and inference processes of the latent diffusion model. Since the FAE provides a continuous neural representation, we can compute PDE residuals by automatic differentiation when needed. This design enables both exact and soft enforcement of constraints in continuous space, mitigating discretization-induced errors, and enabling more stable and physically consistent generation. Details on how to impose these constraints are provided in the following examples through comprehensive numerical experiments, demonstrating that our framework can generate diverse function samples while naturally preserving the underlying physical principles.
Learning 1D damped sinusoidal functions
To validate our theoretical analysis and demonstrate the training pipeline of the proposed framework, we first present a pedagogical example using a simple distribution of one-dimensional damped sinusoidal signals. The target functions are defined as
| 2 |
where the parameters are sampled from uniform distributions: amplitude , decay rate , angular frequency , and vertical offset .
We employ an FAE with a 6-layer encoder and a 2-layer decoder, each with a hidden dimension of 256 and 8 attention heads. The FAEs are trained on datasets of varying sizes, with function samples discretized at 128 uniform grid points. We train the FAE by minimizing the loss using the Adam optimizer for 5 × 104 iterations. The learning rate follows a warmup and exponential decay schedule: it linearly increases from 0 to 10−3 over the first 1,000 steps, then exponentially decays every 1,000 steps with a decay rate of 0.9. Following the FAE training, we train the latent diffusion model by minimizing (9) using an identical learning rate schedule.
For evaluation, we generate 8,192 sample functions using our inference procedure with 100 denoising steps. We assess the quality of these generated samples through parameter estimation, leveraging the analytical form of damped sinusoidal functions. Specifically, for each generated sample, we perform a least-squares fitting using (2) to obtain the inferred parameters and reconstruct the corresponding signal. This approach enables a rigorous quantitative assessment of our model’s ability to capture the underlying function space using two metrics: comparisons between reconstructed and generated signals, and analyses of inferred parameter distributions against target uniform distributions.
We provide a comprehensive evaluation of our model’s generative performance across varying training dataset sizes (Fig. 2). The top row illustrates the worst-case generated samples alongside their reconstructions via parameter estimation. As the number of training samples increases, the generation quality improves accordingly. The bottom row analyzes the parameter distributions, revealing the evolution of our model’s capacity to capture the underlying function space. With limited training data (16 or 32 samples), the estimated parameter distributions exhibit narrower ranges or noticeable deviations from the target uniform distributions, indicating insufficient coverage of the parameter space. As the size of training dataset increases, the estimated parameter distributions progressively converge to the target uniform distributions, with the model trained on 256 samples achieving notably better alignment with the true distributions. This improvement is quantitatively validated by the decreasing mean squared error (MSE) between the generated samples and their reconstructions. These empirical results strongly support our theoretical analysis.
Fig. 2. Damped sinusoidal functions.
Analysis of generative quality across models trained with different numbers of samples (n = 16, 32, 64, 128, 256). (Top) Comparison between the worst-case generated samples (blue dots) and their reconstructed signals (red dashed lines) obtained through parameter estimation. (Bottom) The first four panels show the estimated parameter distributions for amplitude (A), damping coefficient (γ), angular frequency (ω), and vertical shift (b). Red dashed lines indicate the true parameter bounds from the underlying uniform distributions. The rightmost panel displays the MSE of the reconstructed signal. The results demonstrate that models trained with more samples generate functions that better align with the true distributions and achieve lower reconstruction error.
Kolmogorov flow
In this example, we use the proposed FunDiff to generate divergence-free velocity fields, a fundamental requirement for ensuring the physical consistency of incompressible flow simulations in computational fluid dynamics. We consider two scenarios: unconditional flow generation and flow reconstruction from partial observations. To evaluate our approach, we use the two-dimensional Kolmogorov flow, a well-established benchmark for analyzing transition to turbulence and the stability of incompressible fluid systems. The governing equations are formulated in the vorticity-velocity representation as follows:
where ω is the vorticity, u = (u, v) is the velocity field, and is the Reynolds number, set to 1000. The forcing term f(x) drives the flow and x = [x1, x2]. The equations are defined with periodic boundary conditions in the spatial domain x ∈ (0, 2π)2 and time interval t ∈ (0, T]. The forcing term is defined as
where the additional drag force term 0.1ω(x, t) prevents energy accumulation on large scales.
To strictly impose periodic boundary conditions and ensure the divergence-free condition, we modify the forward pass of the FAE decoder as follows:
| 3 |
where denotes the forward pass of the decoder, and the coordinate embedding γ is defined as
| 4 |
This embedding guarantees that the output functions have a periodicity of 2π within [0, 2π]2. An incompressible velocity field is then computed as (u, v) = (∂ψ/∂y, − ∂ψ/∂x).
Unconditional flow generation
Following the training procedure in the Method section, we present our results in Fig. 3a, which displays representative generated samples along with their corresponding divergence fields, computed via automatic differentiation. The predicted divergence values are negligible, confirming the effectiveness of our approach. We also compare the spectral energy distributions between the training dataset and 1,000 generated samples (Fig. 3b). The spectra show good agreement up to wavenumbers of . However, the model leads to some artificial high-frequency components at larger wavenumbers.
Fig. 3. Kolmogorov flow.
a Unconditional generation with enforced divergence-free constraint. b Comparison of spectral energy distributions between models constrained with and without divergence-free conditions. c Flow field reconstruction from noisy, low-resolution observations. Visualization of reconstructed velocity fields using different methods with input data of 64 × 64 resolution corrupted by 20% Gaussian noise. d Comparative analysis of reconstruction errors across methods at various downsampling factors. Error bars indicate the standard deviation across test samples. e Relative L2 error of reconstructed velocity fields across varying noise levels (σ) for different spatial resolution reductions (1x, 2x, and 4x downsampling). Dashed lines show mean performance with (blue) and without (red) PDE constraints, while shaded regions indicate one standard deviation.
To demonstrate the importance of the divergence-free constraint, we conduct a comparative study using an unconstrained FAE trained directly on the velocity field. In this case, the forward pass is formulated as
This unconstrained approach results in higher divergence values (Supplementary Fig. S1). Additionally, the spectral energy shows some discrepancies compared to the model constrained by the exact divergence-free condition.
Flow reconstruction from partial observations
For our second case study, we evaluate the model’s capability to reconstruct flow fields from corrupted partial observations. We use 90% of the data for training and the rest for testing. To improve resolution-invariant reconstruction capabilities, we implement a dynamic downsampling strategy during the training of the FunDiff components. Specifically, at each training iteration, the input velocity field is randomly downsampled by factors of 1, 2, or 4. We first examine the impact of the divergence-free constraint by comparing FunDiff models with and without this condition (Fig. 3e). Both variants demonstrate robust performance across different downsampling factors and noise levels. Notably, the divergence-constrained FunDiff model consistently achieves lower test errors, validating the importance of physical constraints in the reconstruction process.
Furthermore, we benchmark our approach against several state-of-the-art neural operators and PDE surrogate models, including FNO13, ViT8, and UNet60, as well as more recent architectures such as CViT61, DPOT62, CNextU-Net63, and AViT64. To further evaluate performance under inverse problem settings, we also include three diffusion-based baselines: Diffusion Posterior Sampling (DPS)65, DiffusionPDE42, and Spatially-Aware Diffusion51. Detailed implementation specifications for these baseline models are provided in Supplementary Section D.1. Fig. 3c presents reconstructed flow fields from various models, where the input consists of 64 × 64 resolution velocity fields corrupted by 20% Gaussian noise. It can be observed that neural operator baselines tend to produce highly discontinuous or spatially inconsistent patterns, whereas diffusion-based models recover coherent large-scale structures but often lose fine-scale features. The results demonstrate that our model uniquely achieves both smooth and accurate reconstructions. Additional visualizations of our model’s predictions, with and without the divergence-free condition imposed in FAE decoder, are shown in Supplementary Fig. S2 and Fig. S3, respectively. The quantitative comparison using relative L2 errors across different downsampling factors is presented in Fig. 3e. These results confirm that our FunDiff model maintains consistent performance across all tested resolutions while exhibiting strong resilience to noise.
Burgers’ equation
As our next example, we demonstrate the effectiveness and flexibility of our framework for generating physically consistent samples by incorporating physical laws as soft constraints during FAE training. To this end, we consider the Burgers’ equation, which serves as a fundamental prototype for conservation laws that can develop discontinuities. The governing equation is given by
| 5 |
| 6 |
with periodic boundary conditions, where ν = 0.001 denotes the viscosity coefficient, and the initial condition a(x) is sampled from a Gaussian random field (GRF) satisfying periodic boundary conditions.
Let uθ denote the FAE output. We define the PDE residual as
The FAE is trained by minimizing a composite loss
Here, for each sample ui, we randomly sample query coordinates from the uniform grid during each gradient descent iteration. All network derivatives are computed using automatic differentiation. Specifically, we set wdata = 100, wphysics = 1 and randomly downsample ui by a factor of 1, 2, 5 at each iteration of gradient descent.
Similar to the Kolmogorov flow example, our objective here is to train a FunDiff model to reconstruct the solution field from sparse observations. We evaluate our model against established baseline methods. We show three examples in Fig. 4a. Neural operator baselines generally produce blurry and discontinuous reconstructions, whereas diffusion-based approaches yield smoother results but often exhibit small oscillations near sharp gradients. By contrast, FunDiff produces sharp, smooth reconstructions that agree well with the reference numerical solutions, with relative L2 errors below 10%. Fig. 4b presents a quantitative comparison of model performance across inputs with varying downsampling factors and 20% Gaussian noise corruption. Notably, FunDiff outperforms all baselines. Additional examples of our model’s predictions are shown in Supplementary Fig. S4. Their physical consistency is confirmed by low PDE residuals, remaining on the order of across the entire domain. We also systematically examine the effect of noise and data sparsity (Fig. 4c). As expected, reconstruction error increases with higher noise levels, but FunDiff demonstrates strong robustness to data sparsity, maintaining stable performance even under aggressive downsampling (factors up to 5).
Fig. 4. Burgers’ equation.
a Solution reconstruction from noisy, low-resolution observations. Visualization of reconstructed solutions using different methods with input data of 40 × 40 resolution corrupted by 20% Gaussian noise. b Comparative analysis of reconstruction errors across methods at various downsampling factors. Error bars indicate the standard deviation across test samples. c Relative L2 error of reconstructed solutions across varying noise levels (σ) for different spatial resolution reductions (1x, 2x, and 5x downsampling). Dashed lines show mean performance with (blue) and without (red) PDE constraints, while shaded regions indicate one standard deviation. d Histogram of PDE residual norms, comparing the physical consistency of solutions with and without PDE constraints, demonstrating improved physical consistency when PDE constraints are incorporated.
To rigorously evaluate the impact of physical constraints, we conduct an ablation study by training the function encoder without the physics loss term . The absence of PDE-based regularization leads to higher predictive errors and PDE residuals in the generated solutions (Fig. 4d). This degradation in physical consistency is further visualized through the generated samples in Supplementary Fig. S5, underscoring the crucial role of physics-informed training in our framework.
Linear elasticity
Symmetries play an important role in physics, providing a framework for understanding conservation laws and invariances that govern natural phenomena. This example demonstrates how to embed prior symmetries into FunDiff models. To this end, we consider linear elasticity in computational micromechanics, which involves solving the Lippmann-Schwinger equation66 in a 2D periodic representative volume element (RVE) microstructural domain with spatial coordinates x = (x, y) under plane strain conditions. The problem is formulated as
| 7 |
These relations represent balance and constitutive equations, respectively, which are written in a component-wise manner (1 ≤ i, j, k, l ≤ 2) using the Voigt notation. x and denote a pair of target and source points inside the RVE domain Ω. σij, εij and Cijkl denote stress, strain, and fourth-order elastic tensor, respectively. Cijkl(x) is expressed in terms of local Young’s modulus E(x) and Poisson ratio ν(x) as
where δij denotes the Kronecker delta function. denotes Green’s operator corresponding to the homogeneous reference material with elastic tensor 67. denotes the far-field strain used to apply the strain-controlled boundary condition, equal to the average strain over the RVE domain Ω. In this example, we model the point-wise strain concentration tensor , which linearly maps to εij(x) independent of loading conditions:
Aijkl(x) can be computed by triply solving (7) subject to three orthogonal unit far field strain as
| 8 |
Due to the intrinsic symmetry of the RVE configuration, the resulting strain concentration tensor field Aijkl(x) exhibits a symmetric pattern with respect to both and . We aim to train a FunDiff model to reconstruct the strain concentration tensor field from sparse observations while respecting the inherent symmetry priors. To this end, we modify the forward pass of the decoder to enforce these constraints. Let z denote the FAE encoder output latents. The symmetry-preserved decoder is then constructed as
It can be easily shown that this formulation ensures that generates functions with perfect symmetry about the lines x = 1/2 and y = 1/2. Although here we only focus on such a relatively simple symmetry for illustration purposes, it is worth noting that more general symmetries can be embedded in a similar manner68.
Figure 5 a presents reconstructed samples generated by our FunDiff model from a coarse strain concentration field corrupted by 10% Gaussian noise. The results show that our model preserves underlying symmetries and accurately resolves sharp material interfaces. To assess robustness against different types of noise, we report test errors in Fig. 5b. The consistently low errors across all noise configurations highlight the framework’s reliability in practical applications.
Fig. 5. Linear elasticity.
a Comparison of diagonal strain concentration tensor distributions (Voigt notation) between provided coarse measurements (32 × 32) and reconstructions from the trained FunDiff model. The generated samples maintain enforced symmetry constraints and achieve a relative L2 error of 5.12% when compared to ground truth data at 256 × 256 resolution. b Comparison of reconstruction errors under different noise types and downsampling rates. Dashed lines represent the mean reconstruction error, and shaded bands denote one standard deviation across test samples.
To further demonstrate the critical role of the continuous decoder in our framework, we implement a baseline using a discrete autoencoder with a Vision Transformer encoder and an MLP decoder projecting to the target pixel space. We train a diffusion transformer under identical conditions, with representative generated samples shown in Supplementary Fig. S6. Unlike our approach, the baseline fails to preserve symmetry or enforce physical continuity in strain fields, instead producing piecewise discontinuous predictions.
Turbulence mass transfer
In the last example, we examine the model's capacity to infer non-intrusive quantities, such as pressure, in turbulent problems. Specifically, we consider turbulent mass transfer in a rectangular channel. This phenomenon plays a critical role in the chemical engineering process, directly influencing reaction kinetics, conversion efficiency, and product purity. Our study focuses on a computational domain Ω = {(x, y)∣0.006 < x < 0.018, 0 < y < 0.01}. Within this domain, we are interested in training a FunDiff model to infer the obstacle topology and pressure field given the sparse and noisy velocity measurements.
The simulation employs a two-equation model for turbulent mass transfer based on the Reynolds-averaged Navier-Stokes (RANS) equations69, which can be expressed as
where p, ui, xi are the pressure, velocity and location, respectively; the subscript i represents the coordinate direction which can take x and y for the two-dimensional system. Here, C is the time-averaged concentration; ρ, μm and Dm are density, laminar viscosity, and laminar mass diffusivity, which are physical property constants and fixed to 1000 kg/m3, 1.003 × 10−6 m2/s, 1.003 × 10−8 m2/s, respectively. μt and Dt are the turbulent viscosity and turbulent mass diffusivity, respectively.
We begin by training an FAE to reconstruct the key physical variables: velocity field, pressure field, and the signed distance function (SDF) representing obstacle geometry. To enhance the capacity of the model to handle inputs of varying resolutions, we augment training by randomly downsampling inputs by factors of 1, 2, and 4 while preserving the target resolution. The latent diffusion model is then trained with latent representations of the pressure and SDF, conditioned on the encoded representations of the velocity field, obtained from the trained autoencoder’s latent space.
Representative generated samples (Fig. 6a) validate the model’s ability to infer pressure fields and reconstruct obstacle geometries despite heavily corrupted input velocity measurements. The reconstructions align closely with numerical estimations. Fig. 6b presents the test error across various downsampling factors, noise levels, and noise types. The results indicate that our model remains robust even under severe noise corruption and low-resolution inputs. Our results demonstrate the model’s effectiveness in preserving critical flow features and geometric details, and highlight the framework’s potential for real-world applications where high-fidelity reconstructions are required from sparse or noisy measurements.
Fig. 6. Turbulent mass transfer.
a Left: Input velocity fields at low resolution with 10% noise corruption. Middle: Comparison between reference and generated pressure fields. Right: Comparison between reference and generated obstacle geometry. b Relative L2 error comparison between generated samples and reference solutions across varying input resolutions and noise levels. Dashed lines represent the mean reconstruction error, and shaded bands denote one standard deviation across test samples.
Discussion
In this work, we propose FunDiff, a flexible and efficient framework for generative modeling in function spaces that addresses fundamental challenges in generating continuous function data while preserving physical constraints. Our primary contributions are twofold: (1) a rigorous theoretical foundation establishing conditions for function distribution approximation via autoencoders, and (2) a constrained function autoencoder (FAE) that inherently enforces physical principles. Through extensive experimentation across diverse physical systems, we have demonstrated that our approach successfully generates physically valid samples while maintaining high fidelity to the target PDE solution distributions.
While our current work lays a strong foundation for physics-informed generative modeling, several promising directions for future research emerge. One particularly interesting direction is to develop not purely data-driven, but physics-informed diffusion-based PDE solvers. This could be achieved by incorporating PDE residuals directly into the score function of diffusion models and by using additional initial and boundary conditions to guide sampling, thereby steering generated samples toward the corresponding PDE solutions. Another natural extension would be to adapt our framework to handle more complex geometries, thereby enabling broader applicability in real-world scientific and engineering problems. Handling complex domains necessitates incorporating geometric inductive biases, such as mesh-based representations, implicit neural surfaces, or graph-based function approximations. Moreover, extending our approach to multiphysics applications represents a critical and exciting frontier. Many engineering and scientific challenges involve the interplay of multiple physical processes, such as fluid-structure interactions, thermo-mechanical coupling, and electromagnetic-thermal phenomena, which require models that can simultaneously capture and reconcile diverse physical constraints. These advancements will expand the scope of generative modeling for physical systems and ultimately contribute to more accurate and efficient simulation-based design across disciplines.
Methods
To realize our theoretical framework for generative modeling in function spaces, we develop FunDiff, a practical implementation that addresses the key challenges of handling infinite-dimensional function distributions while preserving physical constraints. Our approach must accommodate discretized functions at varying resolutions, enable continuous evaluation at arbitrary coordinates, and flexibly incorporate domain-specific physical priors without compromising the generative modeling process. The architecture is designed to decouple the enforcement of physical constraints from diffusion training, ensuring stable optimization while maintaining mathematical rigor in constraint satisfaction. We detail the FunDiff network architecture, training procedures, and mechanisms for integrating constraints that enable robust function generation across diverse scientific domains.
Network architecture
The FAE processes discretized functions , where n denotes the spatial discretization resolution and d the codomain dimension. The FunDiff architecture comprises three core components: (1) a resolution-invariant encoder combining a Vision Transformer (ViT)8 and a Perceiver module9, (2) a latent diffusion model operating on the compact latent space, and (3) a physics-aware decoder that reconstructs continuous functions.
Encoder
The encoder employs a ViT backbone to extract features and a Perceiver module to handle functions of different discretizations. Input functions are first processed by ViT-style patchification, resulting in flattened patches , where represents the length of the sequence, P is the size of the patch, and D denotes the embedding dimension. To accommodate varying resolutions, trainable positional embeddings (PE) are dynamically interpolated to match the input sequence length L, yielding position-aware patch embeddings fpe = fp + Interp(PE, L).
A perceiver-style cross-attention module maps these variable-length inputs to fixed-dimensional latent representations. Specifically, we learn a predefined number of latent input queries . These queries serve as learnable parameters in a cross-attention module, which processes the visual features of our input as follows
where MHA, LN, and MLP represent multi-head self-attention, layer normalization, and a multi-layer perceptron, respectively. We further process the aggregated tokens zagg using a sequence of L pre-norm Transformer blocks70,71,
where MSA is a standard multi-head self-attention module used to model long-range dependencies across the sequence.
Decoder
The decoder module draws inspiration from the Continuous Vision Transformer (CViT)72, which enables continuous evaluation at any query coordinate through a cross-attention mechanism between query coordinates and encoded features. We start by embedding coordinates into the latent space, which can be efficiently achieved through either random Fourier features73 or grid-based embeddings72.
The core of our decoder uses embedded coordinates as queries, with the encoder output zL serving as both keys and values in a series of K cross-attention Transformer blocks:
Finally, a small feedforward network projects the features xK to the desired output dimension. This architecture naturally extends to other function representations (e.g., point clouds via PointNet74 or meshes via graph neural networks75) through appropriate input processing modules.
Latent diffusion with conditional diffusion transformer
We implement the diffusion process in the learned latent space using a Diffusion Transformer (DiT)76. We condition the model on coarse solution measurements c by encoding them through the pretrained FAE encoder . The resulting latent-space guidance vectors are additively combined with the diffusion inputs:
The DiT backbone consists of a sequence of Transformer blocks that utilize AdaLN-Zero modulation76, an enhanced variant of Adaptive Layer Normalization designed for stable time-dependent conditioning. For each block, the modulation parameters are computed as
where t represents the timestep. Following the approach in ref. 76, we incorporate element-wise scaling factors α, initialized to zero, in the residual pathways:
By initializing these scaling factors to zero, each Transformer block initially acts as an identity transform. This strategy enables gradual learning of temporal and conditional modulations while maintaining stable gradient flow during the early stages of training.
Training
Our training procedure consists of two stages. In the first stage, we train an FAE to learn a compact and expressive latent representation of functions. We consider a set of ground truth functions , where each function maps input coordinates to scalar outputs. For training, each function fi is discretized at a fixed set of input locations , resulting in a vector of evaluations . The reconstruction loss is given by
where and denote the encoder and decoder, respectively and fi(xj) represents the value of a ground truth function fi at query point xj. During training, we randomly sample functions {fi} and query coordinates at each iteration.
In the second stage, we freeze the pre-trained FAE and train the DiT model in the induced latent space. Following the rectified flow framework, the training objective is formulated as
| 9 |
where z1 is obtained by encoding the input function through the pre-trained FAE encoder, is sampled from the standard normal distribution, and g(zt, t) is parameterized by our DiT model predicting the velocity field. In practice, we approximate the time integral by uniformly sampling at each training step.
Inference
At inference, we follow a straightforward two-step generation process. First, we sample latent codes from our learned diffusion model by solving the ODE using a standard ODE solver (e.g., Runge-Kutta method):
starting from a sample of standard Gaussian noise and integrating backward to obtain z0. This process is deterministic and typically requires 20–50 function evaluations for high-quality samples. Second, we decode the sampled latent codes through the FAE decoder to obtain the final continuous function. Importantly, since our decoder operates on arbitrary query points, we can evaluate the generated function at any desired resolution or location in the domain.
Implementation details
We maintain consistent architectural choices and training procedures across all experiments unless explicitly stated otherwise. Our FAE architecture comprises an 8-layer encoder and a 4-layer decoder, both utilizing an embedding dimension of 256 and MLP width of 512. The encoder’s patch size is adaptively selected based on input resolution. The DiT employs 8 Transformer blocks with an embedding dimension of 256 and MLP width of 512. All attention operations use 8 heads.
Training protocol
For the FAE training, we employ the AdamW optimizer77 with a weight decay of 10−5. The learning rate follows a two-phase schedule: an initial linear warm-up from zero to 10−3 over 2000 steps, followed by exponential decay with a factor of 0.9 every 2000 steps. Each training batch contains 16 samples, with 4096 query coordinates and their corresponding outputs randomly sampled from the grid. To enhance the model’s resolution invariance, we randomly downsample inputs by different factors (e.g., 1, 2, 4, 8) during training while optimizing the model to reconstruct the original high-resolution input function by minimizing the MSE loss.
The DiT follows a similar optimization strategy but operates with larger batches of 128 samples over 105 iterations. For training the conditioned diffusion models, we generate conditions by randomly downsampling input functions and encoding them through the pretrained FAE encoder. Detailed hyperparameters for all experiments are provided in Supplementary Section D.1.
Supplementary information
Acknowledgements
LL acknowledges support from the U.S. Department of Energy, Office of Advanced Scientific Computing Research, under Grants No. DE-SC0025593 and No. DE-SC0025592, and the U.S. National Science Foundation under Grants No. DMS-2347833 and No. DMS-2527294. SW acknowledges support from the NVIDIA Academic Grant Program. We thank Dr. Chenhui Kou for providing the turbulence mass transfer dataset and Dr. Mingyuan Zhou for insightful discussions.
Author contributions
S.W., Z.D., and L.L. conceived the project and developed the main methodology. S.W. implemented the core algorithms and conducted the experiments. Z.D. contributed to the theoretical analysis. T.L. and S.S. assisted with numerical simulation. L.L. supervised the project and provided critical revisions. All authors discussed the results and contributed to writing the manuscript.
Peer review
Peer review information
Nature Communications thanks the anonymous reviewers for their contribution to the peer review of this work. A peer review file is available.
Data availability
The datasets generated in this study have been deposited in the Zenodo database 10.5281/zenodo.18911353. These data are openly available without restriction.
Code availability
All code used to train the models, run the numerical experiments, and reproduce the results in this study is publicly available at https://github.com/sifanexisted/fundiff.
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
These authors contributed equally: Sifan Wang, Zehao Dou.
Supplementary information
The online version contains supplementary material available at 10.1038/s41467-026-72292-0.
References
- 1.Kingma, D. P. & Welling, M. Auto-encoding variational Bayes. In International Conference on Learning Representations (2014).
- 2.Goodfellow, I. et al. Generative adversarial networks. Commun. ACM63, 139–144 (2020). [Google Scholar]
- 3.Ho, J., Jain, A. & Abbeel, P. Denoising diffusion probabilistic models. Adv. Neural Inf. Process. Syst.33, 6840–6851 (2020). [Google Scholar]
- 4.Song, Y. et al. Score-based generative modeling through stochastic differential equations. In International Conference on Learning Representations (2021).
- 5.Lipman, Y., Chen, R. T. Q., Ben-Hamu, H., Nickel, M. & Le, M. Flow matching for generative modeling. In International Conference on Learning Representations (2023).
- 6.Liu, X., Gong, C. & Liu, Q. Flow straight and fast: learning to generate and transfer data with rectified flow. In International Conference on Learning Representations (2023).
- 7.Saharia, C. et al. Photorealistic text-to-image diffusion models with deep language understanding. Adv. Neural Inf. Process. Syst.35, 36479–36494 (2022). [Google Scholar]
- 8.Dosovitskiy, A. et al. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations (2021).
- 9.Jaegle, A. et al. Perceiver: General perception with iterative attention. In International Conference on Machine Learning, 4651–4664 (PMLR, 2021).
- 10.Kong, Z., Ping, W., Huang, J., Zhao, K. & Catanzaro, B. DiffWave: a versatile diffusion model for audio synthesis. In International Conference on Learning Representations (2021).
- 11.Wu, K. E. et al. Protein structure generation via folding diffusion. Nat. Commun.15, 1059 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Xu, M. et al. GeoDiff: a geometric diffusion model for molecular conformation generation. In International Conference on Learning Representations (2022).
- 13.Li, Z. et al. Fourier neural operator for parametric partial differential equations. In International Conference on Learning Representations (ICLR, 2021). [PMC free article] [PubMed]
- 14.Lu, L., Jin, P., Pang, G., Zhang, Z. & Karniadakis, G. E. Learning nonlinear operators via DeepONet based on the universal approximation theorem of operators. Nat. Mach. Intell.3, 218–229 (2021). [Google Scholar]
- 15.Jin, P., Meng, S. & Lu, L. MIONet: learning multiple-input operators via tensor product. SIAM J. Sci. Comput.44, A3490–A3514 (2022). [Google Scholar]
- 16.Lu, L. et al. A comprehensive and fair comparison of two neural operators (with practical extensions) based on FAIR data. Comput. Methods Appl. Mech. Eng.393, 114778 (2022). [Google Scholar]
- 17.Jiao, A., He, H., Ranade, R., Pathak, J. & Lu, L. One-shot learning for solution operators of partial differential equations. Nat. Commun.16, 8386 (2025). [DOI] [PMC free article] [PubMed]
- 18.Wu, Z. et al. COAST: Intelligent time-adaptive neural operators. arXiv preprint arXiv:2502.08574 (2025).
- 19.Zhang, H., Liu, L., Weng, K. & Lu, L. Federated scientific machine learning for approximating functions and solving differential equations with data heterogeneity. IEEE Trans. Neural Netw. Learn. Syst.36, 18104–18117 (2025). [DOI] [PubMed]
- 20.Park, J. J., Florence, P., Straub, J., Newcombe, R. & Lovegrove, S. Deepsdf: Learning continuous signed distance functions for shape representation. In Proc. IEEE/CVF conference on computer vision and pattern recognition, 165-174 (2019).
- 21.Mildenhall, B. et al. NeRF: Representing scenes as neural radiance fields for view synthesis. Commun. ACM65, 99–106 (2021). [Google Scholar]
- 22.Dupont, E., Kim, H., Eslami, S. M. A., Rezende, D. J. & Rosenbaum, D. From data to functa: your data point is a function and you can treat it like one. In Proceedings of the 39th International Conference on Machine Learning, 5694–5725 (2022).
- 23.Sitzmann, V., Martel, J., Bergman, A., Lindell, D. & Wetzstein, G. Implicit neural representations with periodic activation functions. Adv. Neural Inf. Process. Syst.33, 7462–7473 (2020). [Google Scholar]
- 24.Zhang, B., Tang, J., Niessner, M. & Wonka, P. 3dshape2vecset: A 3d shape representation for neural fields and generative diffusion models. ACM Trans. Graph. (TOG)42, 1–16 (2023). [Google Scholar]
- 25.Jun, H. & Nichol, A. Shap-E: Generating conditional 3D implicit functions. arXiv preprint arXiv:2305.02463 (2023).
- 26.Erkoç, Z., Ma, F., Shan, Q., Nießner, M. & Dai, A. Hyperdiffusion: generating implicit neural fields with weight-space diffusion. In Proceedings of the IEEE/CVF international conference on computer vision, 14300–14310 (2023).
- 27.Dutordoir, V., Saul, A., Ghahramani, Z. & Simpson, F. Neural diffusion processes. In International Conference on Machine Learning, 8990-9012 (PMLR, 2023).
- 28.Phillips, A. et al. Spectral diffusion processes. In NeurIPS 2022 Workshop on Score-Based Methods (2022).
- 29.Hui, K.-H., Li, R., Hu, J. & Fu, C.-W. Neural wavelet-domain diffusion for 3d shape generation. In SIGGRAPH Asia 2022 Conference Papers, 1-9 (2022).
- 30.Bautista, M. A. et al. GAUDI: a neural architect for immersive 3D scene generation. Adv. Neural Inf. Process. Syst.35, 25102–25116 (2022). [Google Scholar]
- 31.Chou, G., Bahat, Y. & Heide, F. Diffusion-SDF: conditional generative modeling of signed distance functions. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2262–2272 (2023).
- 32.Dupont, E., Teh, Y. W. & Doucet, A. Generative models as distributions of functions. In Proceedings of The 25th International Conference on Artificial Intelligence and Statistics, 2989–3015 (2022).
- 33.Kerrigan, G., Ley, J. & Smyth, P. Diffusion generative models in infinite dimensions. In Proceedings of The 26th International Conference on Artificial Intelligence and Statistics, 9538–9563 (2023).
- 34.Pidstrigach, J., Marzouk, Y., Reich, S. & Wang, S. Infinite-dimensional diffusion models. J. Mach. Learn. Res.25, 1–52 (2024).
- 35.Franzese, G. et al. Continuous-time functional diffusion processes. In Advances in Neural Information Processing Systems 36 (2024).
- 36.Lim, J. H. et al. Score-based diffusion models in function space. J. Mach. Learn. Res.26, 1–62 (2025).
- 37.Kovachki, N. et al. Neural operator: learning maps between function spaces with applications to PDEs. J. Mach. Learn. Res.24, 1–97 (2023). [Google Scholar]
- 38.Jiang, Z., Zhu, M. & Lu, L. Fourier-MIONet: Fourier-enhanced multiple-input neural operators for multiphase modeling of geological carbon sequestration. Reliab. Eng. Syst. Saf.251, 110392 (2024). [Google Scholar]
- 39.Yin, M. et al. A scalable framework for learning the geometry-dependent solution operators of partial differential equations. Nat. Comput. Sci.4, 928–940 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 40.Lee, J. E. et al. Efficient and generalizable nested Fourier-DeepONet for three-dimensional geological carbon sequestration. Eng. Appl. Comput. Fluid Mech. 18, 2435457 (2024). [Google Scholar]
- 41.Li, Z. et al. Learning spatiotemporal dynamics with a pretrained generative model. Nat. Mach. Intell.6, 1566–1579 (2024). [Google Scholar]
- 42.Huang, J., Yang, G., Wang, Z. & Park, J. J. DiffusionPDE: generative PDE-solving under partial observation. In Advances in Neural Information Processing Systems (2024).
- 43.Shysheya, A. et al. On conditional diffusion models for PDE simulations. Adv. Neural Inf. Process. Syst.37, 23246–23300 (2024). [Google Scholar]
- 44.Rahman, M. A., Florez, M. A., Anandkumar, A., Ross, Z. E. & Azizzadenesheli, K. Generative adversarial neural operators. Trans. Mach. Learn. Res. (2022).
- 45.Oommen, V., Bora, A., Zhang, Z. & Karniadakis, G. E. Integrating neural operators with diffusion models improves spectral representation in turbulence modelling. Proc. R. Soc. A481, 20240819 (2025).
- 46.Hu, P. et al. Wavelet diffusion neural operator. In International Conference on Learning Representations (2025).
- 47.Shu, D., Li, Z. & Farimani, A. B. A physics-informed diffusion model for high-fidelity flow field reconstruction. J. Comput. Phys.478, 111972 (2023). [Google Scholar]
- 48.Qiu, J. et al. Pi-fusion: Physics-informed diffusion model for learning fluid dynamics. arXiv preprint arXiv:2406.03711 (2024).
- 49.Bastek, J.-H., Sun, W. & Kochmann, D. M. Physics-informed diffusion models. In International Conference on Learning Representations (2025).
- 50.Gao, H. et al. Bayesian conditional diffusion models for versatile spatiotemporal turbulence generation. Comput. Methods Appl. Mech. Eng.427, 117023 (2024). [Google Scholar]
- 51.Zhuang, Y., Cheng, S. & Duraisamy, K. Spatially-aware diffusion models with cross-attention for global field reconstruction with sparse observations. Comput. Methods Appl. Mech. Eng.435, 117623 (2025). [Google Scholar]
- 52.Jacobsen, C., Zhuang, Y. & Duraisamy, K. CoCoGen: physically consistent and conditioned score-based generative models for forward and inverse problems. SIAM J. Sci. Comput.47, C399–C425 (2025). [Google Scholar]
- 53.Weed, J. & Bach, F. Sharp asymptotic and finite-sample rates of convergence of empirical measures in Wasserstein distance. Bernoulli25, 2620–2648 (2019). [Google Scholar]
- 54.Dou, Z., Kotekal, S., Xu, Z. & Zhou, H. H. From optimal score matching to optimal sampling. Preprint at https://arxiv.org/abs/2409.07032 (2024).
- 55.Barron, A. R. Universal approximation bounds for superpositions of a sigmoidal function. IEEE Trans. Inf. Theory39, 930–945 (1993). [Google Scholar]
- 56.Neyshabur, B., Tomioka, R. & Srebro, N. Norm-based capacity control in neural networks. In Conference on Learning Theory, 1376-1401 (2015).
- 57.Breiman, L. Hinging hyperplanes for regression, classification, and function approximation. IEEE Trans. Inf. Theory39, 999–1013 (1993). [Google Scholar]
- 58.Klusowski, J. M. & Barron, A. R. Risk bounds for high-dimensional ridge function combinations including neural networks. arXiv preprint arXiv:1607.01434 (2016).
- 59.Lu, L. et al. Physics-informed neural networks with hard constraints for inverse design. SIAM J. Sci. Comput.43, B1105–B1132 (2021). [Google Scholar]
- 60.Ronneberger, O., Fischer, P. & Brox, T. U-Net: convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention—MICCAI 2015 234–241 (Springer, 2015).
- 61.Wang, S. et al. CViT: continuous vision transformer for operator learning. In The Thirteenth International Conference on Learning Representations (2025).
- 62.Hao, Z. et al. DPOT: auto-regressive denoising operator transformer for large-scale PDE pre-training. In International Conference on Machine Learning (2024).
- 63.Ohana, R. et al. The Well: a large-scale collection of diverse physics simulations for machine learning. Adv. Neural Inf. Process. Syst.37, 44989–45037 (2024). [Google Scholar]
- 64.McCabe, M. et al. Multiple physics pretraining for spatiotemporal surrogate models. In Advances in Neural Information Processing Systems (2024).
- 65.Chung, H., Kim, J., Mccann, M. T., Klasky, M. L. & Ye, J. C. Diffusion posterior sampling for general noisy inverse problems. In The Eleventh International Conference on Learning Representations (2023).
- 66.Lippmann, B. A. & Schwinger, J. Variational principles for scattering processes. I. Phys. Rev.79, 469–480 (1950). [Google Scholar]
- 67.Moulinec, H. & Suquet, P. A numerical method for computing the overall response of nonlinear composites with complex microstructure. Computer Methods Appl. Mech. Eng.157, 69–94 (1998). [Google Scholar]
- 68.Gao, Y., Kolouri, S. & Duddu, R. Energy loss informed cell-based multilayer perceptron for solving elliptic pdes with multiscale features. Available at SSRN 4997989 (2024).
- 69.Kou, C. et al. Neural topology optimization via active learning for efficient channel design in turbulent mass transfer. Adv. Sci.12, e08386 (2025). [DOI] [PMC free article] [PubMed]
- 70.Vaswani, A. et al. Attention is all you need. In Advances in neural information processing systems 30 (2017).
- 71.Xiong, R. et al. On layer normalization in the transformer architecture. In International Conference on Machine Learning, 10524-10533 (PMLR, 2020).
- 72.Wang, S. et al. Bridging operator learning and conditioned neural fields: a unifying perspective. arXiv preprint arXiv:2405.13998 (2024).
- 73.Tancik, M. et al. Fourier features let networks learn high frequency functions in low dimensional domains. Adv. Neural Inf. Process. Syst.33, 7537–7547 (2020). [Google Scholar]
- 74.Qi, C. R., Su, H., Mo, K. & Guibas, L. J. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proc. IEEE Conference on Computer Vision and Pattern Recognition, 652-660 (IEEE, 2017).
- 75.Pfaff, T., Fortunato, M., Sanchez-Gonzalez, A. & Battaglia, P. Learning mesh-based simulation with graph networks. In International Conference on Learning Representations (ICML, 2020).
- 76.Peebles, W. & Xie, S. Scalable diffusion models with transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 4195-4205 (ICML, 2023).
- 77.Kingma, D. P. & Ba, J. Adam: a method for stochastic optimization. In International Conference on Learning Representations (2015).
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The datasets generated in this study have been deposited in the Zenodo database 10.5281/zenodo.18911353. These data are openly available without restriction.
All code used to train the models, run the numerical experiments, and reproduce the results in this study is publicly available at https://github.com/sifanexisted/fundiff.






