arXiv:2609.03343math.NASep 2026

Manuscript Offprint

arXiv:2609.03343

Learning Informative Prior with Infinite-Dimensional Continuous Normalizing Flow for Bayesian Inverse Problem

Yang Zhao, Junxiong Jia, Tao Zhou

YANG ZHAO*, JUNXIONG JIA†, AND TAO ZHOU‡

Abstract. This paper addresses infinite-dimensional Bayesian inference for inverse problem of partial differential equations with model parameters in infinite-dimensional Hilbert space. To effectively incorporate prior information, we propose a novel continuous normalizing flows based infinite-dimensional model. Specifically, by introducing a well-defined neural ordinary differential equation in infinite-dimensional space, a simple reference measure can be transformed into a more complex measure which encodes the prior information. A corresponding theoretical framework is established to ensure the well-posedness of our proposed Bayesian prior in infinite-dimensional space. We also provide training methods of the prior for two distinct data settings, along with two sampling algorithms for the resulting Bayesian posterior. The proposed framework is applied to three representative inverse problems: the simple smooth inverse problem, inverse scattering problem, and the inverse heat conduction problem. Numerical experiments support the theoretical analysis and demonstrate the efficiency of the proposed algorithms.

Key word. functional continuous normalizing flow, inverse problems for partial differential equation, infinite-dimensional Bayesian analysis, prior learning.

AMS subject classifications. 65L09, 49N45, 62F15

  1. Introduction. Estimating infinite-dimensional parameters for inverse problems governed by partial differential equations (PDEs) from measurement data is a fundamental problem in various scientific and engineering fields [24, 4]. In recent years, there has been growing emphasis on statistical approaches that not only provide approximate solutions but also quantify the associated uncertainties, a capability crucial for tasks such as artifact detection [44].

Unlike deterministic approaches, Bayesian inference offers a unified framework to quantify uncertainty in inverse problems [5, 22, 13], originally developed in finite-dimensional spaces [5, 22]. However, finite-dimensional methods often fail to characterize the continuous nature of inverse problems of PDEs. To retain the inherent infinite-dimensional structure of PDE-based inverse problems, defining Bayesian inference directly in infinite-dimensional spaces has been widely advocated [21, 11, 20, 37, 32, 33, 13]. This paper concerns infinite-dimensional Bayesian inversion [13, 36], whose core research consists of prior construction and efficient numerical algorithms, both essential for accurate and feasible inversion in infinite dimensions. In this work, we focus specifically on the construction of prior measures.

Effective priors are essential for algorithmic efficiency, as they act as regularizers and encode prior information about model parameters. A common strategy for constructing structured priors uses convergent series expansions with coefficients sampled from finite-dimensional distributions, yielding priors such as uniform and Gaussian priors [13, 36]. Another popular choice is the edge-preserving Besov prior [25], often employs Haar wavelet bases, which can impose restrictive assumptions [1]. As an alternative, Markkanen et al. proposed the Cauchy difference prior [29], which can

*School of Mathematics and Statistics, Xi'an Jiaotong University, Xi'an 710049, China; (zhaoyangxt@xjtu.edu.cn). †Corresponding author. School of Mathematics and Statistics, Xi'an Jiaotong University, Xi'an 710049, China; (jjx323@xjtu.edu.cn). ‡Academy of Mathematics and Systems Sciences, Chinese Academy of Sciences, Beijing, 100190, China; (tzhou@lsec.cc.ac.cn).

YANG ZHAO, JUNXIONG JIA, TAO ZHOU

better adapts to complex geometric structures in inverse problems. Although these priors characterize the smoothness of function-valued parameters, they often fail to fully capture the problem-specific structures and the historical information inherent in certain inverse problems.

To overcome the limitations of handcrafted priors, data-driven prior-learning schemes have been proposed, most of which demand explicit parameter samples in Euclidean settings. For example, Asim et al. employ normalizing flow based invertible networks as learned image priors to capture realistic signals and mitigate reconstruction bias for denoising, compressive sensing and inpainting [2]. Cai et al. propose NF-ULA, a normalizing flow-driven unadjusted Langevin algorithm that learns explicit image priors for stable Bayesian sampling with theoretical convergence guarantees [7]. These generative learning methods excel at modeling complex distributions and have become widely adopted replacements for traditional handcrafted priors. Nevertheless, these methods rely on an experimental setup where full training samples of underlying model parameters can be collected. This favorable data condition is sometimes hard to realize within practical PDE inverse problems: model parameters cannot be directly measured in some physical systems, and we can only acquire indirect observational outputs produced by forward mapping operators.

To tackle this problem, many studies have focused on indirect prior learning, which extracts shared prior knowledge from measurement data across related inverse problems governed by the same PDE [12, 18, 45]. For example, Akyildiz et al. [45] developed a scalable framework to learn priors from noisy indirect measurements. It leverages generative models and the sliced-Wasserstein distance for distribution matching, and employs neural operators to reduce the heavy computational cost of PDE simulations. Jia et al. [19] proposed a nonparametric Bayesian prior learning approach based on meta-learning and PAC-Bayesian theory. It constructs data-adaptive priors directly from observations and establishes generalization bounds for both linear and nonlinear PDE systems, leading to improved efficiency in posterior sampling and more reliable uncertainty quantification.

Beyond the design of training schemes with direct and indirect dataset, constructing well-posed prior distributions over infinite-dimensional spaces is another critical task. Since the Lebesgue measure is not well defined on infinite-dimensional spaces, conventional probability density functions-interpreted as the Radon-Nikodym (RN) derivative of a target measure with respect to Lebesgue measure-no longer exist in such settings. However, density functions are indispensable for both posterior sampling (e.g., Markov chain Monte Carlo (MCMC) algorithms) and prior learning (e.g., learning the prior via negative log-likelihood). This motivates us to seek a valid surrogate for Lebesgue-type densities on infinite-dimensional spaces. A standard approach is to introduce a common reference measure μ0\mu_0, with respect to which our target μ\mu is absolutely continuous, allowing μ\mu to be formulated via the RN derivative [13]. Notably, infinite-dimensional measures frequently exhibit mutual singularity [6], breaking absolute continuity. Hence, constructing valid infinite-dimensional priors becomes challenging, as they must be absolutely continuous with respect to the reference measure.

In this paper, we propose a novel modeling framework: infinite-dimensional functional continuous normalizing flows (f-CNFs). This framework is naturally tailored to the construction of Bayesian priors. By learning from historical datasets of the PDE model, the generated prior (hereafter referred to as the f-CNF prior) enables the Bayesian framework to yield a more accurate posterior, particularly when the likelihood is uninformative. Our f-CNF architecture is rigorously constructed to transform a simple reference measure into a complex target measure (served as the prior) via a parameterized neural ordinary differential equation (ODE). This construction preserves measure equivalence, allowing the resulting prior to be effectively characterized by the RN derivative. By optimizing the f-CNF parameters, we are able to incorporate historical information into the Bayesian prior.

In our numerical experiments, we design the learning of infinite-dimensional priors for two data types: direct parameter samples and indirect observational data. Learning from direct data constructs an infinite-dimensional generative model, which subsequently serves as a Bayesian prior. Consequently, unlike existing infinite-dimensional generative models [14, 31], we must guarantee absolute continuity and ensure that the corresponding RN derivative is analytically tractable; see Subsection 2.2 for details. For indirect-data training, we adopt a Wasserstein loss similar to [45]. While their work optimizes a limited set of parameters, we train the full f-CNF network to achieve improved flexibility. Upon completing the learning of the f-CNF prior, we combine it with the preconditioned Crank-Nicolson (pCN) [11] and the Sequential Monte Carlo with Gaussian Mixture (SMC-GM) [28] algorithms to construct dedicated posterior samplers. Three numerical experiments verify the efficacy of our prior-learning and sampling schemes.

In summary, this work mainly contains three contributions:

  1. Extending our previous work [39], we introduce the first Neural ODE framework in infinite-dimensional spaces. The measure equivalence theorem from [39] is then generalized to a broader class of flow mappings, ensuring measure equivalence and yielding an explicit RN derivative for our f-CNF model. This establishes a rigorous foundation for using f-CNF as Bayesian priors in prior learning and posterior sampling.

  2. We generalize the finite-dimensional log-likelihood loss [8, 7] to infinite dimensions by replacing the ill-defined Lebesgue measure with a reference measure, deriving a rigorous loss function via RN derivatives for direct data training. This novel loss function preserves the structure of infinite-dimensional function spaces, thereby ensuring the stability of the training process for the f-CNF model.

  3. We verify the well-posedness of Bayes' formula under the trained f-CNF priors. Furthermore, by integrating existing pCN and SMC-GM algorithms, we develop customized posterior sampling algorithms tailored to the proposed f-CNF priors. Numerical experiments on three typical PDE inverse problems—including simple smooth inversion, an inverse scattering problem, and an inverse heat conduction problem—demonstrate the effectiveness and generality of the proposed method.

The remainder of this paper is organized as follows. Section 2 introduces the f-CNF framework. Section 3 reviews the infinite-dimensional Bayesian inverse problem, specifies the f-CNF prior, constructs tailored samplers, and develops f-CNF training schemes. Section 4 analyzes posterior well-posedness with the f-CNF prior. Section 5 validates our algorithms via three canonical PDE inverse problems. Section 6 summarizes the work and outlines future research directions.

  1. Functional Continuous Normalizing Flows. In this section, we establish the theoretical framework of f-CNF in infinite-dimensional space. To circumvent the obstacle posed by the singularity of measures in infinite-dimensional space, and enable the 'density estimation', we present a novel theoretical framework for the proposed f-CNF model and provide explicit computations of the corresponding RN derivative.

YANG ZHAO, JUNXIONG JIA, TAO ZHOU

2.1. Basic Setting. The generative model for data x∈RD\mathbf{x} \in \mathbb{R}^D proposed by Chen et al., known as continuous normalizing flows [8], is formulated through continuous-time dynamics. The generative process begins by sampling z0\mathbf{z}_0 from a base distribution pz0(z0)p_{\mathbf{z}_0}(\mathbf{z}_0). This z0\mathbf{z}_0 then serves as the initial value for an ODE defined by a parametric function h(z(t),t;θ)h(\mathbf{z}(t), t; \theta). By solving the initial value problem ∂z(t)∂t=h(z(t),t;θ)\frac{\partial \mathbf{z}(t)}{\partial t} = h(\mathbf{z}(t), t; \theta) with z(t0)=z0\mathbf{z}(t_0) = \mathbf{z}_0 over the interval [t0,t1][t_0, t_1], we obtain z(t1)\mathbf{z}(t_1), which represents the transformed data. This concept readily extends to infinite-dimensional spaces. We consider the following ODE in infinite-dimensional space [43]:

(1)

{dv(t)dt=h(v(t),t;θ),v(0)=u0\left\{\begin{aligned}\frac{d v(t)}{d t}&=h(v(t),t;\theta),\\ v(0)&=u_{0}\end{aligned}\right.

where u0u_0 denotes an initial function sampled from a Gaussian measure μ0=N(0,C0)\mu_0 = \mathcal{N}(0, \mathcal{C}_0) on a separable Hilbert space Hu\mathcal{H}_u, and hh denotes a mapping from Hu×R\mathcal{H}_u \times \mathbb{R} to Hu\mathcal{H}_u equipped with parameter θ∈Θ\theta \in \Theta (here Θ\Theta denotes the space of all trainable neural network parameters). The ODE (1) then propagates the initial function u0∈Huu_0 \in \mathcal{H}_u forward in time, producing the terminal solution v(T)=uT∈Huv(T) = u_T \in \mathcal{H}_u at time TT.

For a fixed parameter θ∈Θ\theta \in \Theta, when function h(v,t;θ)h(v,t;\theta) of ODE (1) satisfies the global Lipschitz condition (i.e. ∥h(u1,t;θ)−h(u2,t;θ)∥Hu≤L∥u1−u2∥Hu\|h(u_1,t;\theta)-h(u_2,t;\theta)\|_{\mathcal{H}_u} \leq L \|u_1-u_2\|_{\mathcal{H}_u} for u1,u2∈Huu_1, u_2 \in \mathcal{H}_u, where LL is a constant independent of tt), and is bounded (i.e., ∥h(v,t;θ)∥Hu≤K\|h(v,t;\theta)\|_{\mathcal{H}_u} \leq K for any (v,t)∈Hu×R(v,t) \in \mathcal{H}_u \times \mathbb{R}, where KK is a constant independent of uu and tt), the ODE (1) admits a unique solution [43]. In this situation, the entire ODE propagates process, transforming u0u_0 to uTu_T, can be regard as a mapping, denoted fθf_\theta, from the infinite-dimensional Hilbert space Hu\mathcal{H}_u to itself:

(2)

fθ(u0)=uT,f_{\theta}(u_{0})=u_{T},

and uTu_T can be regard as a sample from the measure μfθ=fθ#μ0\mu_{f_\theta} = f_{\theta\#}\mu_0. Here fθ#μ0f_{\theta\#}\mu_0 denotes the pushforward measure fθf_\theta induced by μ0\mu_0 [6]. For any Borel set B\mathcal{B}, the pushforward measure is rigorously defined as (fθ#μ0)(B):=μ0(fθ−1(B))(f_{\theta\#}\mu_0)(\mathcal{B}) := \mu_0(f_\theta^{-1}(\mathcal{B})), where fθ−1(B)={u∣fθ(u)∈B}f_\theta^{-1}(\mathcal{B}) = \{u \mid f_\theta(u) \in \mathcal{B}\} stands for the preimage of B\mathcal{B} under fθf_\theta. Furthermore, fθf_\theta admits an inverse mapping governed by a backward ODE [43], defined via

(3)

{dv(t)dt=h(v(t),t;θ),v(T)=uT.\left\{\begin{aligned}\frac{d v(t)}{d t}&=h(v(t),t;\theta),\\ v(T)&=u_{T}.\end{aligned}\right.

This backward flow maps uTu_T to u0=v(0)u_0 = v(0), denoted gθ(uT)=u0g_\theta(u_T) = u_0. It is straightforward to verify that gθg_\theta and fθf_\theta are mutual inverses, since the solutions of the ODEs (1) and (3) exist and are unique.

Via the mapping fθf_\theta on the infinite-dimensional Hilbert space Hu\mathcal{H}_u, we construct a parameterized measure μfθ\mu_{f_\theta} over Hu\mathcal{H}_u. Varying θ∈Θ\theta \in \Theta endows μfθ\mu_{f_\theta} with rich approximation capacity. Our core strategy is to embed historical information of PDE inverse problems into μfθ\mu_{f_\theta} and employ μfθ\mu_{f_\theta} as the Bayesian prior to enhance posterior accuracy. Before elaborating on this concept, we must first address a fundamental issue concerning infinite-dimensional spaces in the following subsection.

2.2. The Radon-Nikodym Derivative. Due to its infinite-dimensional nature, an infinite-dimensional Hilbert space does not admit a translation-invariant Lebesgue measure. Consequently, the Lebesgue density functions commonly utilized in Euclidean space do not exist in infinite-dimensional space Hu\mathcal{H}_{u}. As a substitute,

RN derivative with respect to another common measure is frequently employed in place of the Lebesgue density function to characterize a measure within an infinite-dimensional space [13]. Specifically, suppose we wish to characterize a target measure μtarget\mu_{\mathrm{target}}. A common approach involves first identifying a reference measure μsimple\mu_{\mathrm{simple}}, ensuring that μtarget\mu_{\mathrm{target}} is absolutely continuous with respect to μsimple\mu_{\mathrm{simple}} (or satisfying the stronger condition that μtarget\mu_{\mathrm{target}} and μsimple\mu_{\mathrm{simple}} are equivalent). Under these conditions, μtarget\mu_{\mathrm{target}} can be described via the RN derivative dμtargetdμsimple(u)\frac{d\mu_{\mathrm{target}}}{d\mu_{\mathrm{simple}}}(u).

It is noteworthy that the RN derivative is meaningful only if the measure μtarget\mu_{\mathrm{target}} is absolutely continuous with respect to the measure μsimple\mu_{\mathrm{simple}}. Considering the push-forward measure μfθ=fθ#μ0\mu_{f_\theta} = f_{\theta\#} \mu_0 constructed in Subsection 2.1, characterizing it via the RN derivative requires identifying a reference measure with the absolutely continuous property. A natural candidate is the pre-transformed measure μ0\mu_0 of our f-CNF model fθf_\theta. Consequently, a pertinent question arises: can we design the ODE flow fθf_\theta such that μfθ\mu_{f_\theta} is absolutely continuous with respect to μ0\mu_0?

In contrast to measures in Euclidean spaces, measures in infinite-dimensional spaces are inherently prone to mutual singularity. For m∉H(μ0)m \notin \mathcal{H}(\mu_0) (here H(μ0)\mathcal{H}(\mu_0) denotes the Cameron-Martin space of μ0\mu_0 [6]), the shifted pushforward μm=fm#μ0\mu_m = f_m\# \mu_0 with fm(u)=u+mf_m(u) = u + m is singular to μ0\mu_0. Likewise, the scaled pushforward μ2=f2#μ0\mu_2 = f_2\# \mu_0 for f2(u)=2uf_2(u) = 2u also yields a singular measure relative to μ0\mu_0. These examples illustrate that shifts and scalings generally produce singular Gaussian measures on infinite-dimensional spaces [6]. Although simple, the transformations fmf_m and f2f_2 map μ0\mu_0 to singular measures, violating the absolute continuity required for the RN derivative. Consequently, constructing expressive flows that preserve absolute continuity is non-trivial. We resolve this issue with the general theorem below, which guarantees that μfθ\mu_{f_\theta} is equivalent to μ0\mu_0.

It is noteworthy that continuous normalizing flows can be regarded as the continuous time extension of discrete normalizing flows [8]. Consequently, our approach consists of first establishing the equivalence of normalizing flows in infinite-dimensional space and then extending the theory to continuous normalizing flows in infinite-dimensional space by taking limits of the measures. The theoretical framework is divided into three parts. First, we develop the measure-equivalence theory for functional normalizing flows; while similar results appeared in our previous work [39], we provide a critical generalization here. Second, we establish a limit theorem for measures that enables the generalization of the equivalence theory from the discrete case (functional normalizing flows) to the continuous case (model f-CNF we proposed in this paper). Finally, we present the corresponding theory for continuous normalizing flows in infinite-dimensional space. All of the proofs are given in the supplemental materials.

First, we establish conditions ensuring the equivalence of measures before and after transformation for functional normalizing flows. This result refines our previous conclusions in [39], as detailed below.

LEMMA 1. Let Hu\mathcal{H}_u be a separable Hilbert space equipped with the Gaussian measure μ0=N(0,C0)\mu_0 = \mathcal{N}(0, \mathcal{C}_0), and H=H(μ0)\mathcal{H} = \mathcal{H}(\mu_0) be the Cameron-Martin space of the measure μ0\mu_0. For each n=1,2,…,Nn = 1, 2, \ldots, N, let fθn(n)(u)=u+Fθn(n)(u)f_{\theta_n}^{(n)}(u) = u + \mathcal{F}_{\theta_n}^{(n)}(u), where Fθn(n)\mathcal{F}_{\theta_n}^{(n)} is an operator from Hu\mathcal{H}_u to Hu\mathcal{H}_u. The composite transformation fθf_\theta is given by fθ(u)=fθN(N)∘fθN−1(N−1)∘⋯∘fθ1(1)(u)f_\theta(u) = f_{\theta_N}^{(N)} \circ f_{\theta_{N-1}}^{(N-1)} \circ \cdots \circ f_{\theta_1}^{(1)}(u), and μfθ\mu_{f_\theta} denotes its corresponding push-forward measure by μfθ=fθ#μ0\mu_{f_\theta} = f_{\theta\#} \mu_0. For any θ∈Θ\theta \in \Theta, assume that for all n=1,2,…,Nn = 1, 2, \ldots, N the following conditions hold:

  • The space Im(Fθn(n))⊂HIm(\mathcal{F}_{\theta_n}^{(n)}) \subset \mathcal{H}, where Im(Fθn(n))Im(\mathcal{F}_{\theta_n}^{(n)}) denotes the image of Fθn(n)\mathcal{F}_{\theta_n}^{(n)}.

YANG ZHAO, JUNXIONG JIA, TAO ZHOU

• For any u∈Huu \in \mathcal{H}_u, DFθn(n)(u)D\mathcal{F}_{\theta_n}^{(n)}(u) is a trace class operator.

• The operator fθn(n)f_{\theta_n}^{(n)} is bijective.

• For any u∈Huu \in \mathcal{H}_u, all point spectrum of DFθn(n)(u)D\mathcal{F}_{\theta_n}^{(n)}(u) are not in (−∞,−1](-\infty, -1].

Then μfθ\mu_{f_{\theta}} is equivalent with μ0\mu_{0}, and the RN derivative of μfθ\mu_{f_{\theta}} with respect to μ0\mu_{0} is given by:

dμfθdμ0(fθ(u))=∏n=1N∣det1(Dfθn(n)(un−1))∣−1exp⁡(12⟨Tθ(u),Tθ(u)⟩H+⟨u,Tθ(u)⟩H),\frac{d\mu_{f_{\theta}}}{d\mu_{0}}(f_{\theta}(u))=\prod_{n=1}^{N}\left|\mathrm{d e t}_{1}(D f_{\theta_{n}}^{(n)}(u_{n-1}))\right|^{-1}\exp\left(\frac{1}{2}\langle\mathcal{T}_{\theta}(u),\mathcal{T}_{\theta}(u)\rangle_{\mathcal{H}}+\langle u,\mathcal{T}_{\theta}(u)\rangle_{\mathcal{H}}\right),

where un=fθn(n)∘fθn−1(n−1)∘⋯∘fθ1(1)(u)u_{n}=f_{\theta_{n}}^{(n)}\circ f_{\theta_{n-1}}^{(n-1)}\circ\cdots\circ f_{\theta_{1}}^{(1)}(u) for each n=1,2,…,Nn=1,2,\ldots,N, Tθ(u)=fθ(u)−u\mathcal{T}_{\theta}(u)=f_{\theta}(u)-u and det⁡1(Dfθn(n)(un−1))\det_{1}(Df_{\theta_{n}}^{(n)}(u_{n-1})) is the Fredholm-Carleman determinant [6] of the linear operator Dfθn(n)(un−1)Df_{\theta_{n}}^{(n)}(u_{n-1}) (A rigorous definition can be found in supplemental materials).

The f-CNF represents the continuous-time limit of its discrete counterparts. Discretizing the ODE in (1) using an Euler scheme recovers a standard functional normalizing flow; allowing the step size to vanish refines this discrete flow into the f-CNF. Below, we develop the accompanying measure-theoretic limit theory, which guarantees that the desirable properties of normalizing flows in infinite-dimensional space persist throughout this limiting procedure.

THEOREM 2. Let μ0\mu_0 be a Gaussian measure on a separable Hilbert space Hu\mathcal{H}_u, and let {fN}N∈N+\{f_N\}_{N\in\mathbb{N}^+} be a sequence of measurable mappings from Hu\mathcal{H}_u to itself. Suppose the following conditions hold:

  • There exists a mapping f:Hu→Huf : \mathcal{H}_u \to \mathcal{H}_u such that lim⁡N→∞∥fN(u)−f(u)∥Hu=0\lim_{N \to \infty} \|f_N(u) - f(u)\|_{\mathcal{H}_u} = 0 for any u∈Huu \in \mathcal{H}_u.

  • The measure μ0\mu_0 is equivalent to fN#μ0f_{N\#}\mu_0 for any N∈N+N \in \mathbb{N}^+, with RN derivative dfN#μ0dμ0(u)=WN(u)\frac{df_{N\#}\mu_0}{d\mu_0}(u) = \mathcal{W}_N(u).

  • There exists a μ0\mu_0-integrable function gg such that ∣WN(u)∣≤g(u)|\mathcal{W}_N(u)| \leq g(u) holds μ0\mu_0-almost surely for all NN.

  • The limit lim⁡N→∞WN(u)=W(u)\lim_{N \to \infty} \mathcal{W}_N(u) = \mathcal{W}(u) exists μ0\mu_0-almost surely, with the limiting function satisfying W(u)>0\mathcal{W}(u) > 0.

Then μ0\mu_{0} is equivalent to f#μ0f_{\#}\mu_{0}, with RN derivative given by

df#μ0dμ0(u)=W(u).\frac{d f_{\#}\mu_{0}}{d\mu_{0}}(u)=\mathcal{W}(u).

Finally, combining Lemma 1 and Theorem 2, we derive conditions for continuous normalizing flows to preserve measure equivalence on infinite-dimensional spaces. The necessary function-space definitions are introduced prior to the main theorem.

DEFINITION 3. (See [6] for detail) Let H\mathcal{H} be the Cameron-Martin space of μ0\mu_0. Denote by HC1(μ0,H)\mathcal{HC}^1(\mu_0, \mathcal{H}) the class of all μ0\mu_0-measurable mappings F:Hu→H\mathcal{F} : \mathcal{H}_u \to \mathcal{H} such that for almost every u∈Huu \in \mathcal{H}_u, the mapping h↦F(u+h)h \mapsto \mathcal{F}(u + h) is Fréchet differentiable along H\mathcal{H}, and its derivative is a Hilbert-Schmidt operator such that the mapping h↦DF(u+h),H→H∗h \mapsto D\mathcal{F}(u + h), \mathcal{H} \to \mathcal{H}^*, is continuous. Here DF(u)D\mathcal{F}(u) stands for the Fréchet derivative of F(u)\mathcal{F}(u) at point uu, and H∗\mathcal{H}^* denotes the dual space of H\mathcal{H}.

DEFINITION 4. Let μ0\mu_0 be the Gaussian measure N(0,C0)\mathcal{N}(0,\mathcal{C}_0) on Hu\mathcal{H}_u, and let H\mathcal{H} denote its Cameron-Martin space. We define T(μ0,[0,T],H)\mathcal{T}(\mu_0,[0,T],\mathcal{H}) as the collection of functions h(u,t)h(u,t) mapping Hu×[0,T]\mathcal{H}_u\times[0,T] into Hu\mathcal{H}_u such that the following conditions hold:

• For each t∈[0,T]t \in [0, T], h(⋅,t)∈HC1(μ0,H)h(\cdot, t) \in \mathcal{H}\mathcal{C}^1(\mu_0, \mathcal{H});

∙sup⁡t∈[0,T],u∈Hu∥O0−1h(u,t)∥Hu≤M1<∞;\bullet \quad \operatorname*{s u p}_{t\in[0,T],u\in\mathcal{H}_{u}}\left\|\mathcal{O}_{0}^{-1}h(u,t)\right\|_{\mathcal{H}_{u}}\leq M_{1}<\infty; ∙sup⁡t∈[0,T],u∈Hu∥Dh(u,t)∥1≤M2<∞, where ∣∣⋅∣∣1=tr⁡(∣⋅∣);\bullet \quad \operatorname*{s u p}_{t\in[0,T],u\in\mathcal{H}_{u}}\|D h(u,t)\|_{1}\leq M_{2}<\infty,{~w h e r e~}||\cdot||_{1}=\operatorname{t r}(|\cdot|);

• For each t∈[0,T]t \in [0, T], h(⋅,t)h(\cdot, t) is Lipschitz continuous, i.e.,

∥h(u1,t)−h(u2,t)∥Hu≤L∥u1−u2∥Hu.\|h(u_{1},t)-h(u_{2},t)\|_{\mathcal{H}_{u}}\leq L\|u_{1}-u_{2}\|_{\mathcal{H}_{u}}.

Here, the constants M1M_{1}, M2M_{2}, and LL are independent of uu and tt, and tr(∣⋅∣)\mathrm{tr}(|\cdot|) denote the trace norm [34].

Subsequently, we present the measure equivalence theorem for the f-CNF model and derive the corresponding expression for the RN derivative.

THEOREM 5. Consider the following ODE:

(4)

{dv(t)dt=h(v(t),t;θ),v(0)=u.\left\{\begin{array}{l}\frac{d v(t)}{d t}=h(v(t),t;\theta),\\ v(0)=u.\end{array}\right.

Suppose that h(u,t;θ)∈T(μ0,[0,T],H)h(u,t;\theta)\in\mathcal{T}(\mu_0,[0,T],\mathcal{H}) for all θ∈Θ\theta\in\Theta, and let fθf_\theta denote the push-forward map defined analogously to (2). Then, fθ#μ0f_{\theta\#}\mu_0 is equivalent to μ0\mu_0. Letting Tθ(u)=u−fθ(u)\mathcal{T}_\theta(u)=u-f_\theta(u), the RN derivative is given by

dfθ#μ0dμ0(fθ(u))=Wθ(fθ(u))=exp⁡(12∥Tθ(u)∥H2+⟨u,Tθ(u)⟩H−∫0TTrDh(v(t),t;θ)dt),\begin{align*}\frac{d f_{\theta\#}\mu_{0}}{d\mu_{0}}(f_{\theta}(u))&=\mathcal{W}_{\theta}(f_{\theta}(u))\\&=\exp\left(\frac{1}{2}\|\mathcal{T}_{\theta}(u)\|_{\mathcal{H}}^{2}+\langle u,\mathcal{T}_{\theta}(u)\rangle_{\mathcal{H}}-\int_{0}^{T}\mathrm{Tr}D h(v(t),t;\theta)dt\right),\end{align*}

where v(t)v(t) denotes the solution to (4) with initial condition v(0)=uv(0) = u.

Under the conditions guaranteed by Theorem 5, provided that the ODE (4) is well-posed, the transformation fθf_{\theta} pushes the prior measure μ0\mu_{0} forward to a new measure μfθ=fθ#μ0\mu_{f_{\theta}} = f_{\theta\#}\mu_{0} that is equivalent to μ0\mu_{0}. Moreover, the corresponding RN derivative can be computed explicitly. In the remainder of this paper, we demonstrate how the proposed f-CNF can be deployed across a variety of PDE inverse problems.

3. Inverse Problem and Bayesian Prior

3.1. Bayesian Approach for Inverse Problem. For a large class of inverse problems involving PDEs, sparse measurement data are practically adopted [10, 30], as such data are more easily acquired. In this subsection, we introduce the foundational concepts of infinite-dimensional Bayesian inverse problems with finite-dimensional sparse data.

Let Hu\mathcal{H}_{u} and Hw\mathcal{H}_{w} be separable Hilbert spaces representing the parameter space and the solution space, respectively, and let NdN_{d} be a positive integer. Since the measurement is often perturbed by noise, we consider the observation model

(5)

d=SG(u)+ϵ,\boldsymbol{d}=\mathcal{S}\mathcal{G}(u)+\boldsymbol{\epsilon},

where d∈RNd\boldsymbol{d} \in \mathbb{R}^{N_d} denotes the measurement data, u∈Huu \in \mathcal{H}_u is the parameter of interest, G\mathcal{G} is the PDE solution operator from Hu\mathcal{H}_u to Hw\mathcal{H}_w, S\mathcal{S} is the measurement operator from Hw\mathcal{H}_w to RNd\mathbb{R}^{N_d}, and ϵ\boldsymbol{\epsilon} is Gaussian noise. Based on the framework of infinite-dimensional

YANG ZHAO, JUNXIONG JIA, TAO ZHOU

Bayesian inference [38], we are able to preserve the fundamental Bayes' formula for the inverse problem:

(6)

dμdμprior(u)=1ZμL(d∣⋅),\frac{d\mu}{d\mu_{\mathrm{p r i o r}}}(u)=\frac{1}{Z_{\mu}}\mathbb{L}(\boldsymbol{d}|\cdot),

where L(d∣⋅):=exp⁡(−Φ(d∣⋅)):Hu→R\mathbb{L}(\boldsymbol{d}|\cdot) := \exp(-\Phi(\boldsymbol{d}|\cdot)) : \mathcal{H}_u \to \mathbb{R} is the likelihood function, and ZμZ_\mu is a positive finite constant given by Zμ=∫Huexp⁡(−Φ(d∣u))μprior(du)Z_\mu = \int_{\mathcal{H}_u} \exp(-\Phi(\boldsymbol{d}|u)) \mu_{\text{prior}}(du).

The selection of an appropriate prior distribution μprior\mu_{prior} is essential for obtaining an appropriate Bayesian posterior. In this section, we propose a prior based on the f-CNF model introduced in Subsection 2.1. This prior can incorporate information from historical data, enabling the Bayesian framework to yield a more accurate posterior, particularly when the likelihood function provides limited information.

3.2. Functional Continuous Normalizing Flows as Prior. In this subsection, we propose applying the pushforward measure from the f-CNF model as a suitable prior over infinite-dimensional spaces ( μprior=μfθ\mu_{prior} = \mu_{f_\theta}, where μfθ\mu_{f_\theta} is the transformed measure illustrated in Subsection 2.1). By training the f-CNF on the existing historical dataset, we can encode the historical information into the prior (we refer to it as the f-CNF prior in the remainder of this article). In this configuration, the Bayesian prior effectively encodes historical information, while the likelihood component L(d∣u)\mathbb{L}(\boldsymbol{d}|u) of the Bayes' formula accounts for the measurement data from the inverse problem. Leveraging Theorem 5, we impose the RN estimation of the f-CNF prior: dμfθdμ0(u)=exp⁡(Wθ(u))\frac{d\mu_{f_\theta}}{d\mu_0}(u) = \exp(\mathcal{W}_\theta(u)). Under this choice, Bayes' formula becomes

(7)

dμdμfθ(u)=1Zμθexp⁡(−Φ(d∣u)).\frac{d\mu}{d\mu_{f_{\theta}}}(u)=\frac{1}{Z_{\mu}^{\theta}}\exp(-\Phi(\boldsymbol{d}|u)).

where ZμθZ_{\mu}^{\theta} is a positive finite constant given by Zμθ=∫Huexp⁡(−Φ(d∣u))μfθ(du)Z_{\mu}^{\theta}=\int_{\mathcal{H}_{u}}\exp(-\Phi(\boldsymbol{d}|u))\mu_{f_{\theta}}(du).

Recovering model parameters requires posterior inference from (7), routinely accomplished via MCMC sampling. However, since classical infinite-dimensional MCMC sampling algorithm (e.g., pCN [11, 13]) are typically based on a Gaussian prior, it is necessary to express the Bayesian formulation (7) in terms of the pre-transformed Gaussian measure μ0\mu_{0} of the f-CNF as

(8)

dμdμ0(u)=1Zμθexp⁡(−Φ(d∣u)+Wθ(u)).\frac{d\mu}{d\mu_{0}}(u)=\frac{1}{Z_{\mu}^{\theta}}\exp\left(-\Phi(\boldsymbol{d}|u)+\mathcal{W}_{\theta}(u)\right).

It can be observed from formula (8) that, compared with directly applying measure μ0\mu_{0} as the prior, formulation (8) yields a new prior distribution transformed from μ0\mu_{0} via the trained f-CNF model fθf_{\theta}, where the transformation is implicitly reflected by the term Wθ(u)\mathcal{W}_{\theta}(u). This term directly depends on fθf_{\theta} and can effectively incorporate useful information from the historical dataset.

Our f-CNF prior exhibits a framework similar to the TV-Gaussian prior [42]. The TV-Gaussian prior constructs its RN density using a handcrafted TV regularizer dμpxdμ0(u)∝exp⁡(−λ∥u∥TV)\frac{d\mu_{\mathrm{px}}}{d\mu_0}(u) \propto \exp(-\lambda \|u\|_{\mathrm{TV}}), while our prior adopts Wθ(u)\mathcal{W}_\theta(u) coupled with the neural flow fθf_\theta for density characterization. Specifically, the TV-Gaussian prior focuses on accurately fitting functions with local jumps and sharp discontinuities, while our data-driven f-CNF prior is able to learn general prior knowledge from diverse historical dataset. Furthermore, when applying the pCN algorithm, similar to the splitting acceleration strategy widely used in the TV-Gaussian framework [42], our f-CNF based posterior can also be accelerated with the same technique, see supplemental materials for details.

Although the pCN algorithm delivers accurate posterior approximations given sufficient samples [32, 33, 11] and is directly applicable via the Bayes' formula (8), it suffers from an extremely long mixing time, especially when paired with expensive forward solvers. Therefore, motivated by [28], we adopt a tailored sequential Monte Carlo with Gaussian mixture (SMC-GM) algorithm for our f-CNF prior to accelerate sampling.

SMC-GM is an efficient sequential Monte Carlo algorithm for infinite-dimensional Bayesian inverse problems. It adopts Gaussian mixture mutations to replace standard MCMC updates, adjusts particle weights via potential functions, and conducts resampling to avoid particle degeneracy. With a tempering schedule that gradually incorporates measurement information, the algorithm iteratively transforms prior samples from μfθ\mu_{f_\theta} into posterior samples. We refer readers to [28] for complete algorithmic extensions and theoretical analysis, and provide full implementation details of the pCN and SMC-GM algorithms in the supplemental materials.

3.3. Training with Direct Dataset. The previous section discusses posterior sampling with the f-CNF prior. This and subsequent subsections will present two f-CNF prior learning strategies tailored to different data scenarios. Specifically, this subsection focuses on the learning approach using direct dataset of the model parameters.

For example, consider a large historical dataset D1={un}n=1Ntotal\mathbb{D}_1 = \{u_n\}_{n=1}^{N_{\text{total}}} defined on Hu\mathcal{H}_u, where each unu_n is a sample drawn from the data-generating measure μdata\mu_{\text{data}} of the model parameters. To construct a data-informed prior from these empirical samples, we adopt a generative flow model. Concretely, we train the f-CNF pushforward measure μfθ\mu_{f_\theta} such that D1\mathbb{D}_1 approximately follows μfθ\mu_{f_\theta}. This embeds all information from D1\mathbb{D}_1 into the learned prior μfθ\mu_{f_\theta}, which can later serve as a valid Bayesian prior for newly observed data dd. The training procedure mirrors the standard setting of continuous normalizing flows for generative modeling on Euclidean spaces [8].

We take the infinite-dimensional negative log-likelihood with the RN derivative as the loss function:

L1(θ)=−Eμdata(ln⁡(dμfθdμ0)(u))≈L^1(θ)=−1Ntotal∑n=1Ntotalln⁡(dμfθdμ0)(un).\mathcal{L}_{1}(\theta)=-\mathbb{E}_{\mu_{\mathrm{d a t a}}}\left(\ln\left(\frac{d\mu_{f_{\theta}}}{d\mu_{0}}\right)(u)\right)\approx\widehat{\mathcal{L}}_{1}(\theta)=-\frac{1}{N_{\mathrm{t o t a l}}}\sum_{n=1}^{N_{\mathrm{t o t a l}}}\ln\left(\frac{d\mu_{f_{\theta}}}{d\mu_{0}}\right)(u_{n}).

The specific training algorithm can be found in Algorithm 1.

REMARK 6. Euclidean models fit μdata\mu_{\mathrm{d a t a}} via minimizing −Eμdata[ln⁡pθ(x)]-\mathbb{E}_{\mu_{\mathrm{d a t a}}}[\ln p_{\theta}(x)]. By contrast, infinite-dimensional spaces admit no Lebesgue measure, so losses will employ the RN derivative with respect to a reference measure μ0\mu_0, whose choice does not affect optimization. For any measure μ1\mu_1 equivalent to μ0\mu_0, it holds that:

(9)

−Eμdataln⁡(dμfθdμ1(u))=−Eμdata[ln⁡(dμfθdμ0(u))+ln⁡(dμ0dμ1(u))],-\mathbb{E}_{\mu_{\mathrm{d a t a}}}\ln\left(\frac{d\mu_{f_{\theta}}}{d\mu_{1}}(u)\right)=-\mathbb{E}_{\mu_{\mathrm{d a t a}}}\left[\ln\left(\frac{d\mu_{f_{\theta}}}{d\mu_{0}}(u)\right)+\ln\left(\frac{d\mu_{0}}{d\mu_{1}}(u)\right)\right],

where the term Eμdataln⁡(dμ0dμ1(u))\mathbb{E}_{\mu_{\mathrm{d a t a}}}\ln\left(\frac{d\mu_{0}}{d\mu_{1}}(u)\right) is independent of θ\theta and can be omitted during optimization.

3.4. Training with Indirect Dataset. In prior distribution learning, true model parameters are generally unobservable in practical applications. In most cases,

YANG ZHAO, JUNXIONG JIA, TAO ZHOU

Algorithm 1 f-CNF for Direct Data

1: Initialize parameters θ←θ0\theta \leftarrow \theta_0, batch size NN, iteration number KK, learning rate schedule αk\alpha_k, and set iteration counter k←0k \leftarrow 0.

2: repeat

3: Sample a mini-batch of NN functions {ui}i=1N\{u_i\}_{i=1}^N from the full dataset D1={un}n=1Ntotal\mathbb{D}_1 = \{u_n\}_{n=1}^{N_{\text{total}}}.

4: Update parameters via gradient descent:

θk+1=θk−αk∇θkL^1(θk).\theta_{k+1} = \theta_k - \alpha_k \nabla_{\theta_k} \widehat{\mathcal{L}}_1(\theta_k).

Stochastic gradient-based optimizers, such as Adam [23], can be readily adopted in this step.

5: Set k←k+1k \leftarrow k + 1.

6: until k=Kk = K

7: Return the learned parameter θ=θK\theta = \theta_K.

available historical records are physical measurements from real world processes, rather than direct samples of the unknown parameters of interest. To address this issue, various indirect prior learning methods have been developed to infer a prior from observational measurements instead of explicit parameter samples. In this subsection, we adopt the framework and data construction strategy in [45] to develop a practical application of our f-CNF model.

The work in [19, 45] considers settings with abundant historical measurement data aggregated as D2={dn}n=1Ntotal\mathbb{D}_2 = \{\boldsymbol{d}_n\}_{n=1}^{N_{\text{total}}}. All measurements in D2\mathbb{D}_2 are generated via the observation model d=SdataG(u)+ϵdata\boldsymbol{d} = \mathcal{S}_{\text{data}}\mathcal{G}(u) + \boldsymbol{\epsilon}_{\text{data}}, where ϵdata\boldsymbol{\epsilon}_{\text{data}} denotes the observation noise and Sdata\mathcal{S}_{\text{data}} represents the observation operator acting on the solution of the PDE. Specifically, there exists a latent set of model parameters Dhid={ui}i=1Ntotal\mathbb{D}_{\text{hid}} = \{u_i\}_{i=1}^{N_{\text{total}}} such that: D2={di∣di=SdataG(ui)+ϵdata,ui∈Dhid}\mathbb{D}_2 = \{\boldsymbol{d}_i \mid \boldsymbol{d}_i = \mathcal{S}_{\text{data}}\mathcal{G}(u_i) + \boldsymbol{\epsilon}_{\text{data}}, u_i \in \mathbb{D}_{\text{hid}}\}. Evidently, all accessible information about Dhid\mathbb{D}_{\text{hid}} is contained within the observable dataset D2\mathbb{D}_2. Our objective is to train an f-CNF prior μfθ\mu_{f_\theta} using the observational information from D2\mathbb{D}_2, such that μfθ\mu_{f_\theta} can accurately approximate the latent dataset Dhid\mathbb{D}_{\text{hid}}.

In such scenarios, the f-CNF prior μfθ\mu_{f_\theta} can no longer be trained using the negative log-likelihood loss. Here, similar to [45], our loss builds on the Sinkhorn distance, an entropy-regularized Wasserstein variant devised to bypass the original Wasserstein's computational bottlenecks and provide efficient differentiable loss for deep learning. The specific form of the loss function is as follows:

L2(P,Q)=Wα2(P,Q)=min⁡π∈Π(P,Q)E(x,y)∼π[∥x−y∥RNd2]+αH(π).\mathcal{L}_{2}(P,Q)=W_{\alpha}^{2}(P,Q)=\min_{\pi\in\Pi(P,Q)}\mathbb{E}_{(\boldsymbol{x},\boldsymbol{y})\sim\pi}\left[\|\boldsymbol{x}-\boldsymbol{y}\|_{\mathbb{R}^{N_{d}}}^{2}\right]+\alpha H(\pi).

Here, PP and QQ represent two distributions for which only samples are available, while their exact densities remain unknown. H(π)H(\pi) denotes the entropy of the transport plan π\pi. For further details on this distance, please refer to [17].

Under assumptions of this subsection, historical parameter information is encoded via abundant measurements D2={dn}n=1Ntotal\mathbb{D}_2 = \{\boldsymbol{d}_n\}_{n=1}^{N_{\text{total}}}. Let ν\nu denote the law of {dn}n=1Ntotal\{\boldsymbol{d}_n\}_{n=1}^{N_{\text{total}}}. Suppose we have dˉn=SdataG(un)+ϵdata\bar{\boldsymbol{d}}_n = \mathcal{S}_{\text{data}}\mathcal{G}(u_n) + \boldsymbol{\epsilon}_{\text{data}}, where {un}n=1Ntotal\{u_n\}_{n=1}^{N_{\text{total}}} are samples from μfθ\mu_{f_\theta}, and let νˉ\bar{\nu} denote the law of {dˉn}n=1Ntotal\{\bar{\boldsymbol{d}}_n\}_{n=1}^{N_{\text{total}}}. Our objective is to ensure that νˉ\bar{\nu} is close to ν\nu in some appropriate sense. It is worth noting that while the explicit forms of measures ν\nu and νˉ\bar{\nu} remain unknown, their associated samples are readily available. In practice, such measures are often represented by their empirical counterparts. To effectively and efficiently compare these empirical measures, we employ L2\mathcal{L}_2 as the loss function for training.

Let ∗* denote the convolution of measures. By introducing a distance L2\mathcal{L}_2 between probability measures in the measurement space, we define the loss function in this subsection as:

J(θ)=L2(ν,νˉ)=L2(ν,η∗(SG)#μfθ),\mathcal{J}(\theta)=\mathcal{L}_{2}(\nu,\bar{\nu})=\mathcal{L}_{2}\Big(\nu,\eta*(\mathcal{S}\mathcal{G})_{\#}\mu_{f_{\theta}}\Big),

where η\eta denotes the Gaussian distribution of the data noise ϵdata\epsilon_{\mathrm{data}}, i.e., ϵdata∼η\epsilon_{\mathrm{data}} \sim \eta. Detailed theoretical analysis of the loss function can be found in [45], and the specific training algorithm is presented in Algorithm 2.

Algorithm 2 f-CNF for Indirect Data

1: Initialize parameters θ←θ0\theta \leftarrow \theta_0, batch size NN, total iterations KK, learning rate schedule {αk}\{\alpha_k\}, and set iteration counter k←0k \leftarrow 0.

2: repeat

3: Draw NN functions {ui}i=1N\{u_i\}_{i=1}^N from μfθk\mu_{f_{\theta_k}}.

4: For i=1,…,Ni=1,\ldots,N, compute the simulated observations dˉi=SG(ui)+ϵ\bar{d}_i = \mathcal{S}\mathcal{G}(u_i) + \epsilon.

5: Sample a mini-batch of NN measurement data {di}i=1N\{d_i\}_{i=1}^N from the full dataset {di}i=1Ntotal\{d_i\}_{i=1}^{N_{\text{total}}}.

6: Compute the loss J(θk)=L2(ν,νˉ)\mathcal{J}(\theta_k) = \mathcal{L}_2(\nu,\bar{\nu}) by approximating the exact expectations with the empirical means computed from {di}i=1N\{d_i\}_{i=1}^N and {dˉi}i=1N\{\bar{d}_i\}_{i=1}^N.

7: Update parameters via gradient descent:

θk+1=θk−αk∇θkJ(θk).\theta_{k+1} = \theta_k - \alpha_k \nabla_{\theta_k} \mathcal{J}(\theta_k).

Stochastic gradient-based optimizers, such as Adam [23], can be readily adopted in this step.

8: Set k←k+1k \leftarrow k+1.

9: until k=Kk = K

10: Return the learned parameters θK\theta_K.

It is noteworthy that, compared to training the f-CNF prior using extensive historical dataset of model parameter as discussed in Subsection 3.3, learning the prior from historical measurement data {dn}n=1Ntotal\{d_n\}_{n=1}^{N_{\text{total}}} is often considerably more challenging. Specifically, consider the forward problem d=SdataG(u)+ϵdata\mathbf{d} = \mathcal{S}_{\text{data}}\mathcal{G}(u) + \epsilon_{\text{data}}. When excessive information loss occurs in the forward PDE process (associated with G\mathcal{G}), the number of measurement points is insufficient (associated with Sdata\mathcal{S}_{\text{data}}), or the measurement noise is excessively large (associated with ϵdata\epsilon_{\text{data}}), the information about uu contained in the dataset {dn}n=1Ntotal\{d_n\}_{n=1}^{N_{\text{total}}} diminishes, thereby introducing significant difficulties in training the parameters of the f-CNF.

3.5. Other Settings. In the previous two subsections, we present the applications of the proposed f-CNF model with either a large set of model parameters D1={un}n=1Ntotal\mathbb{D}_1 = \{u_n\}_{n=1}^{N_{\text{total}}} or abundant measurement data D2={dn}n=1Ntotal\mathbb{D}_2 = \{d_n\}_{n=1}^{N_{\text{total}}}. In fact, the f-CNF prior is applicable to broader scenarios and can be combined with various existing methods. For example, it can be embedded into meta-learning paradigms. As studied in [19], an infinite-dimensional PAC-Bayesian framework is established to learn data-adaptive priors, which yields more task-specified priors and improves sampling efficiency. Nevertheless, their work only focuses on Gaussian priors. Substituting the Gaussian prior with our f-CNF prior in such a framework constitutes a valuable research direction for future investigation.

YANG ZHAO, JUNXIONG JIA, TAO ZHOU

Our model also exhibits connections to diffusion models, which we briefly discuss in what follows. Infinite-dimensional score based diffusion models are well-established on infinite-dimensional spaces [31]. However, these models are constructed based on stochastic differential equations (SDEs) without explicit density formulations, and hence cannot be directly used as standard prior distributions in Bayesian inference, consistent with the limitation of their finite-dimensional counterparts [35, 15].

A research for finite-dimensional diffusion models [15] shows that the SDE of a diffusion model can be reduced to a deterministic probability flow ODE. Interpreting this ODE as a continuous normalizing flow allows one to apply the change-of-variable theorem to compute the exact log-density, which enables diffusion models to act as rigorous Bayesian priors. This approach provides a clear guideline for developing RN estimation for diffusion models on infinite-dimensional spaces.

In the infinite-dimensional setting [31], the generative model is governed by a reverse SDE that maps a Gaussian distribution back to the data distribution:

(10)

dut=12utdt+sθ(t,ut)dt+dWtc,du_{t}=\frac{1}{2}u_{t}dt+s_{\theta}(t,u_{t})dt+dW_{t}^{c},

where sθ(t,u)s_{\theta}(t,u) denotes the approximate score function, WtcW_{t}^{c} denote the C\mathcal{C}-Wiener processes, and u0∼N(0,C)u_{0}\sim \mathcal{N}(0,\mathcal{C}) is the initial Gaussian measure. Analogous to [15], we hypothesize that the Brownian motion term dWtcdW_{t}^{c} can be eliminated while preserving marginal distributions. This yields the probability flow ODE associated with the infinite-dimensional forward process:

(11)

dutdt=fθ(ut,t).\frac{\mathrm{d}u_{t}}{\mathrm{d}t}=f_{\theta}(u_{t},t).

The conjecture is established strictly following the framework in [15], and the explicit form of fθ(ut,t)f_{\theta}(u_{t},t) for the reverse SDE (10) requires further investigation. Such deterministic flow defines an f-CNF model. Even though Lebesgue densities are not well-defined in infinite-dimensional spaces, this model admits a rigorous RN derivative as the generalized density relative to the Gaussian reference measure N(0,C)\mathcal{N}(0,\mathcal{C}), whenever the ODE (11) satisfies the assumptions stated in Theorem 5.

In summary, the f-CNF model proposed here is not limited to the two prior construction methods presented in this paper. Its integration with prior learning approaches in broader contexts remains a subject for future research.

  1. Well-Posedness of Bayesian Inverse Problems. In the Bayesian approach to inverse problems, the uncertain model parameter is represented as a random variable governed by a prior measure that encodes initial uncertainty. The observation of data constitutes an event upon which this prior is conditioned. The solution to the Bayesian inverse problem is the resulting posterior measure, defined as this conditional probability distribution. A key concern is whether small perturbations in observational data induce significant changes in the posterior measure, namely, whether the posterior is stable with respect to data perturbations. Reference [26] has investigated this issue under various settings. Based on the results established in [26], we further analyze the well-posedness of the Bayesian inverse problem equipped with the newly proposed f-CNF prior. Consistent with the framework in [26], we introduce the following definitions.

DEFINITION 7. Assume that all the probability measures on Hu\mathcal{H}_u combines the set P\mathbb{P}, and ρ\rho is a metric on P\mathbb{P}. The Bayesian inverse problem with respect to (6) is ρ\rho-well-posed if

  • The Bayes' formula (6) has a unique posterior in P\mathbb{P} (existence and uniqueness).

  • The posterior of (6) depends continuously on the data d\mathbf{d}, i.e., (Y,∥⋅∥Y)∋d→μd∈(P,ρ)(Y, \|\cdot\|_Y) \ni \mathbf{d} \to \mu_{\mathbf{d}} \in (\mathbb{P}, \rho) is a continuous function (stability).

It is noteworthy that the definition of well-posedness in Definition 7 concerns the continuity of the measures with respect to the observed data d\mathbf{d}. Consequently, by employing different metrics ρ\rho between probability measures, we can formulate distinct notions of well-posedness. Following the exposition in [26], we present several classical definitions of well-posedness below.

DEFINITION 8. We classify (P,ρ)(\mathbb{P},\rho) well-posedness according to the choice of the metric ρ\rho as follows:

weak well-posedness, if ρ\rho is the Prokhorov metric;

• total variation well-posedness, if ρ\rho is the total variation distance;

• Hellinger well-posedness, if ρ\rho is the Hellinger distance;

• Wasserstein(p) well-posedness, if ρ\rho is the Wasserstein(p) distance.

For the Bayesian formulation associated with the f-CNF prior μfθ\mu_{f_{\theta}} constructed herein, as given in formula (7), Bayesian well-posedness can be established provided that the likelihood function satisfies certain suitable conditions.

THEOREM 9. Consider the Bayesian problem with f-CNF prior with the following assumptions hold:

  • the ODE corresponding to f-CNF satisfied all the conditions of Theorem 5;

• The likelihood component L(⋅∣u)\mathbb{L}(\cdot|u) is continuous;

  • There exist a constant MM independent of uu and d\mathbf{d} with 0<L(d∣u)≤M0 < \mathbb{L}(\mathbf{d}|u) \leq M; then the Bayesian inverse problem is weakly, Hellinger, total variation, and Wasserstein( pp) well-posed.

The detailed proof is provided in the supplementary material.

  1. Numerical Experiments. In the study [35], finite-dimensional continuous planar flows were introduced as canonical continuous normalizing flows; this construction extends naturally to the infinite-dimensional setting of the present work:

(12)

{dv(t)dt=∑i=1Lui(t)σ(⟨v(t),wi(t)⟩Hu+bi(t)),v(0)=u0,\left\{\begin{array}{l}\displaystyle\frac{d v(t)}{d t}=\sum_{i=1}^{L}u_{i}(t)\sigma(\langle v(t),w_{i}(t)\rangle_{\mathcal{H}_{u}}+b_{i}(t)),\\ v(0)=u_{0},\end{array}\right.

where, for any fixed t∈[0,T]t \in [0, T] and i∈N+i \in \mathbb{N}^+, ui(t)u_i(t), wi(t)∈Huw_i(t) \in \mathcal{H}_u, bi(t)∈Rb_i(t) \in \mathbb{R}, σ(x)=tanh⁡(x)\sigma(x) = \tanh(x), and the parameter set is given by θ={ui(t),wi(t),bi(t)}i=1L\theta = \{u_i(t), w_i(t), b_i(t)\}_{i=1}^L.

Since the flow model parameters ui(t)u_i(t), wi(t)w_i(t), and bi(t)b_i(t) are functions, their efficient parameterization is essential for computational efficiency and for satisfying the conditions of Theorem 5. Let {ϕj}j=1M\{\phi_j\}_{j=1}^M be the first MM eigenfunctions of the covariance operator associated with μ0\mu_0 in Theorem 5. We expand ui(t)u_i(t) and wi(t)w_i(t) as

(13)

ui(t)=∑j=1Mαi(j)(t)ϕj,wi(t)=∑j=1Mβi(j)(t)ϕj.u_{i}(t)=\sum_{j=1}^{M}\alpha_{i}^{(j)}(t)\phi_{j},\qquad w_{i}(t)=\sum_{j=1}^{M}\beta_{i}^{(j)}(t)\phi_{j}.

For brevity, denote αi(t)=(αi(1)(t),…,αi(M)(t))\boldsymbol{\alpha}_i(t) = (\alpha_i^{(1)}(t), \ldots, \alpha_i^{(M)}(t)) and βi(t)=(βi(1)(t),…,βi(M)(t))\boldsymbol{\beta}_i(t) = (\beta_i^{(1)}(t), \ldots, \beta_i^{(M)}(t)). Since αi,βi:R→RM\boldsymbol{\alpha}_i, \boldsymbol{\beta}_i : \mathbb{R} \to \mathbb{R}^M and bi:R→Rb_i : \mathbb{R} \to \mathbb{R} share the real-valued input t∈Rt \in \mathbb{R} and their combined output lies in RM×L×2+L\mathbb{R}^{M \times L \times 2+L}, these mappings can be jointly parameterized by

YANG ZHAO, JUNXIONG JIA, TAO ZHOU

a fully connected neural network. We verify that the network (12) constructed via the aforementioned approach satisfies the conditions of Theorem 5 (see the supplementary material for details).

In our experiment, unless noted otherwise, model (13) will employ a fully connected neural network with three hidden layers (12 neurons per layer), tanh⁡(⋅)\tanh(\cdot) activation function, and fixed M=20M = 20, L=12L = 12.

The generic neural ODE (12) yields f-CNF priors for a wide range of PDE inverse problems. In addition to (12), Householder-type and other ODE-driven f-CNF architectures can also satisfy Theorem 5 and are provided in the supplement. We omit numerical validation for these alternatives owing to the great performance of (12) in our experiment. Moreover, although generic ODE architectures are effective in general settings, designing task-specific neural ODE structures for particular inverse problems may further improve model performance. Future work may therefore focus on developing specialized neural ODE architectures for complex inverse problems while ensuring that the constraints in Theorem 5 are satisfied.

In the following subsections, we evaluate the performance of the proposed f-CNF prior μfθ\mu_{f_{\theta}} using historical datasets. The proposed method is validated on three canonical inverse problems: a simple smooth inverse problem, an inverse scattering problem, and an inverse heat conduction problem. For the simple smooth inverse problem, we use both direct and indirect datasets to illustrate the priors learned by different strategies. For the inverse scattering problem, the f-CNF prior is trained with a direct dataset, whereas for the inverse heat conduction problem, the prior is learned with an indirect dataset. The numerical experiments show that incorporating the learned f-CNF prior μfθ\mu_{f_{\theta}} into the Bayesian formulation leads to significantly improved inversion results compared with directly applying the uninformed pre-transformed measure μ0\mu_{0} as the prior.

5.1. Simple Smooth. Consider the inverse source problem studied in [37], governed by the following elliptic equation:

(14)

−αΔw+w=u,inΩ,∂w∂n=0,on∂Ω,\begin{align*}-\alpha\Delta w+w&=u,\quad in\Omega,\\\frac{\partial w}{\partial\boldsymbol{n}}&=0,\quad on\partial\Omega,\end{align*}

where Ω=(0,1)⊂R\Omega = (0,1) \subset \mathbb{R}, α>0\alpha > 0 is a positive constant, and nn denotes the outward unit normal vector. The forward operator is defined by

(15)

SGu=(w(x1),w(x2),…,w(xNd))T,\mathcal{S}\mathcal{G}u=(w(x^{1}),w(x^{2}),\ldots,w(x^{N_{d}}))^{T},

where G\mathcal{G} denotes the PDE solution operator from Hu:=L2(Ω)\mathcal{H}_u := L^2(\Omega) to Hw:=H2(Ω)\mathcal{H}_w := H^2(\Omega), S\mathcal{S} denotes the measurement operator from Hw\mathcal{H}_w to RNd\mathbb{R}^{N_d}, u∈Huu \in \mathcal{H}_u is the source function, w∈Hww \in \mathcal{H}_w is the solution to the elliptic equation (14), and xi∈Ωx^i \in \Omega for i=1,2,…,Ndi = 1,2,\ldots,N_d. The data dd are related to uu through the forward model

(16)

d=SGu+ϵ.d=\mathcal{S}\mathcal{G}u+\epsilon.

In this subsection, the noise ϵ\epsilon is taken to be 5% Gaussian random noise, i.e., ϵ∼N(0,Γnoise)\epsilon \sim \mathcal{N}(0, \Gamma_{\text{noise}}), where Γnoise=τ−1I\Gamma_{\text{noise}} = \tau^{-1} \mathbf{I} and τ−1=(0.05∥SGu∥∞)2\tau^{-1} = (0.05 \|\mathcal{S} \mathcal{G} u\|_{\infty})^2.

By applying the Bayesian framework introduced in Subsection 3.1, we reformulate the inverse problem under consideration as a posterior inference problem on infinite-dimensional space. In this setting, an appropriate prior must be specified in the Bayes' formula (6). A conventional choice is to employ a weakly informed Gaussian prior μ0=N(0,C0)\mu_0 = \mathcal{N}(0, \mathcal{C}_0), as considered in [13, 36, 11]. However, such priors may fail to produce satisfactory inversion results when the measurement information contained in the likelihood function of (6) is limited. To address this issue, we employ the f-CNF model presented in Sections 2 and 3, where the weakly informed reference prior μ0\mu_0 is pushed forward through a trained f-CNF network fθf_\theta, yielding a problem-adapted prior μfθ\mu_{f_\theta} that is better suited to the target inverse problem. Here, the covariance operator of the baseline Gaussian measure μ0\mu_0 is defined as C0=(I−αΔ)−2\mathcal{C}_0 = (\mathbf{I} - \alpha\Delta)^{-2}, where α=0.05\alpha = 0.05 is a constant. The Laplace operator Δ\Delta is defined on the domain Ω\Omega and is equipped with homogeneous Neumann boundary conditions.

To train the f-CNF network, we construct direct dataset Dtrain1\mathbb{D}_{\text{train}}^1 and indirect dataset Dtrain2\mathbb{D}_{\text{train}}^2 similar to those in [27, 45], with the detailed definitions given below:

∙ Let u=cos⁡(2πx)+cos⁡(4πx)+0.3∑k=120ξkcos⁡(kπx)/(1+k), where ξk∼N(0,1).\bullet \text{ Let } u=\cos(2\pi x)+\cos(4\pi x)+0.3\sum_{k=1}^{20}\xi_{k}\cos(k\pi x)/(1+k),\text{ where }\xi_{k}\sim\mathcal{N}(0,1).

The direct training dataset of model parameters is then defined as Dtrain1={ui}i=15000\mathbb{D}_{\text{train}}^{1}=\{u_{i}\}_{i=1}^{5000}, where the samples are generated according to the above sampling strategy.

  • Define the indirect training dataset by Dtrain2={di∣di=SdataG(ui)+ϵdata,ui∈Dtrain1}\mathbb{D}_{\text{train}}^{2} = \{d_i \mid d_i = \mathcal{S}_{\text{data}} \mathcal{G}(u_i) + \epsilon_{\text{data}}, u_i \in \mathbb{D}_{\text{train}}^{1}\}, where the measurement points of Sdata\mathcal{S}_{\text{data}} are specified as {w(xi)∣i=1,2,…,10}\{w(x^i) \mid i = 1,2,\ldots,10\} with xi=i/10x^i = i/10, and ϵdata\epsilon_{\text{data}} denotes Gaussian white noise with variance 0.01.

Subsequently, the ground truth u†u^\dagger of the model (16) is generated using the same sampling strategy as that used for the training dataset Dtrain1\mathbb{D}_{\text{train}}^1. To better illustrate the advantages of the learned f-CNF prior μfθ\mu_{f_\theta} over μ0\mu_0, the measurement points associated with the measurement operator S\mathcal{S} in (16) are chosen to be relatively sparse, namely, {xi}i=15\{x^i\}_{i=1}^5 with xi=0.1+0.2(i−1)x^i = 0.1 + 0.2(i-1). The corresponding measurement data are then generated by

d†=SG(u†)+ϵ.\boldsymbol{d}^{\dagger}=\mathcal{S}\mathcal{G}(u^{\dagger})+\boldsymbol{\epsilon}.

We train the f-CNF prior μfθ1\mu_{f_{\theta}^{1}} on the direct dataset Dtrain1\mathbb{D}_{\mathrm{train}}^{1} via Algorithm 1. Likewise, μfθ2\mu_{f_{\theta}^{2}} is trained on the indirect dataset Dtrain2\mathbb{D}_{\mathrm{train}}^{2} using Algorithm 2. Samples are then drawn from these two learned priors and the baseline measure μ0\mu_{0} for comparison against the ground truth u†u^{\dagger}. The corresponding results are presented in Figure 1. It can be observed that samples drawn from μfθ1\mu_{f_{\theta}^{1}} and μfθ2\mu_{f_{\theta}^{2}} exhibit greater similarity to u†u^{\dagger} than those generated from μ0\mu_{0}.

Figure

(a) Samples from μ0\mu_{0}

Figure

(b) Samples from μfθ1\mu_{f_{\theta}^{1}} (direct)

Figure

(c) Samples from μfθ2\mu_{f_{\theta}^{2}} (indirect)

Figure 1: Samples from μ0\mu_0 and trained f-CNF priors μfθ1\mu_{f_\theta^1} and μfθ2\mu_{f_\theta^2}. The red solid line represent the background truth u†u^\dagger. (a): Samples from μ0\mu_0. (b): Samples from μfθ1\mu_{f_\theta^1} trained with direct dataset. (c): Samples from μfθ2\mu_{f_\theta^2} trained with indirect dataset.

YANG ZHAO, JUNXIONG JIA, TAO ZHOU

Subsequently, we adopt μ0\mu_0, μfθ1\mu_{f_\theta^1}, and μfθ2\mu_{f_\theta^2} as the prior measures in the Bayes' formula (6). For this simple inverse problem, we generate posterior samples via the pCN algorithm. The step size is set to β=0.05\beta = 0.05 for μ0\mu_0, and β=0.02\beta = 0.02 for μfθ1\mu_{f_\theta^1} and μfθ2\mu_{f_\theta^2} (note that the prior μ0\mu_0 admits a larger step size than μfθ\mu_{f_\theta}; the underlying reasons are elaborated in the supplementary material). For all three priors, we run 5×1075 \times 10^7 iterations and discard the first 1×1061 \times 10^6 samples as burn-in.

For clarity, we recall the definition of the covariance function. Let uu be a random field defined on a domain Ω\Omega, with mean function uˉ\bar{u} and covariance function c(x,y)c(x,y). Here c(x,y)c(x,y) characterizes the covariance between u(x)u(x) and u(y)u(y):

c(x,y)=E((u(x)−uˉ(x))(u(y)−uˉ(y))),forx,y∈Ω.c(x,y)=\mathbb{E}((u(x)-\bar{u}(x))(u(y)-\bar{u}(y))),\quad\mathrm{f o r}x,y\in\Omega.

The corresponding covariance operator C\mathcal{C} is defined by

(Cϕ′)(x)=∫Ωc(x,y)ϕ′(y)dy,(\mathcal{C}\phi^{\prime})(x)=\int_{\Omega}c(x,y)\phi^{\prime}(y)d y,

where ϕ′\phi' is a sufficiently regular function defined on Ω\Omega. To visualize the Bayesian posterior, we plot the posterior mean and credible region in Figures 2(a)–(c). The posterior covariance functions, displayed in panels (d)–(f), further quantify the uncertainty of the inversion results. Additionally, we compute the L2L^{2} error between the posterior mean and the background truth, with the results summarized in Table 1.

Figure

(a) Posterior μ0\mu_{0} prior

Figure

(b) Posterior μfθ1\mu_{f_{\theta}^{1}} prior

Figure

(c) Posterior μfθ2\mu_{f_{\theta}^{2}} prior

Figure

(d) Posterior covariance μ0\mu_{0}

Figure

(e) Posterior covariance μfθ1\mu_{f_{\theta}^{1}}

Figure

(f) Posterior covariance μfθ2\mu_{f_{\theta}^{2}}

Figure 2: The comparison of the Bayesian posteriors with μ0\mu_0, μfθ1\mu_{f_\theta^1}, μfθ2\mu_{f_\theta^2} priors. (a)(b)(c): The corresponding Bayesian posteriors with μ0\mu_0, μfθ1\mu_{f_\theta^1}, μfθ2\mu_{f_\theta^2} priors. The blue solid line denotes the background truth u†u^\dagger, the red dashed line represents the mean of the posterior, and the green shaded region indicates the 95% credible interval of the posteriors. (d)(e)(f): The covariance function of posteriors with μ0\mu_0, μfθ1\mu_{f_\theta^1}, μfθ2\mu_{f_\theta^2} priors.

Table 1: The relative errors between the background truth and the mean of posteriors.

Relative Errorposterior (μ0\mu_0)posterior (μfθ1\mu_{f_\theta^1})posterior (μfθ2\mu_{f_\theta^2})
Background Truth u†u^\dagger0.037430.003630.00421

From the numerical results in Table 1 and the graphical illustrations in Figure 2, we observe that the posterior mean obtained by the Bayesian method with μ0\mu_0 as the prior exhibits a relatively large error compared with the background truth u†u^\dagger. This indicates that the measurement information contained in the likelihood function is insufficient for accurately recovering the true source function u†u^\dagger. In contrast, the proposed f-CNF priors μfθ1\mu_{f_\theta^1} and μfθ2\mu_{f_\theta^2}, trained using direct and indirect data, respectively, effectively mitigate this deficiency by incorporating additional prior information.

This phenomenon can be further understood by examining the covariance function of the Bayesian posterior. Subfigure (d) of Figure 2 shows that the covariance function of the posterior associated with the prior μ0\mu_0 remains relatively large, indicating that sparse measurements lead to high uncertainty in the inversion results. In comparison, Subfigures (e) and (f) of Figure 2 show the posterior covariance functions corresponding to the Bayesian formulations equipped with the priors μfθ1\mu_{f_\theta^1} and μfθ2\mu_{f_\theta^2}, respectively, where additional information is incorporated through the learned f-CNF priors. These learned priors enable the posterior distributions to produce narrower credible region and smaller covariance values. Moreover, since direct data inherently contain more information about the target parameter than indirect data, the prior μfθ1\mu_{f_\theta^1} yields better performance than μfθ2\mu_{f_\theta^2}.

5.2. Inverse Scattering Problem. In this subsection, we investigate the application of the f-CNF prior to the inverse scattering problem [40, 41] using the available direct dataset Dtrain\mathbb{D}_{\text{train}}. We first briefly introduce the sound-soft inverse scattering problem considered here. Let Ω\Omega denote an obstacle, and assume that Ω⊂R2\Omega \subset \mathbb{R}^2 is a bounded, simply connected domain with a C2C^2 smooth boundary ∂Ω\partial\Omega. In R2\mathbb{R}^2, define S1={ξ∈R2:∣ξ∣=1}\mathbb{S}^1 = \{\xi \in \mathbb{R}^2 : |\xi| = 1\}. Consider the illumination of Ω\Omega by the following plane wave:

(17)

wi(x):=eikx⋅ν,x∈R2, ν∈S1,w^{i}(x):=e^{ikx\cdot\nu},\quad x\in\mathbb{R}^{2},\,\nu\in\mathbb{S}^{1},

where k>0k>0 is the wavenumber and ν\nu denotes the incident direction. Given the obstacle Ω\Omega and the incident direction ν\nu, the PDE solution operator determines the scattered field wsw^s, or equivalently the total field w=wi+wsw=w^i+w^s, such that ww satisfies

(18)

Δw+k2w=0,in R2\Ω‾,(19)\Delta w+k^{2}w=0,\quad \text{in } \mathbb{R}^{2}\backslash\overline{\Omega}, \tag{19} w=0,on ∂Ω,(20)w=0,\quad \text{on } \partial\Omega, \tag{20} lim⁡r→∞r(∂w∂r−ikw)=0,\lim_{r\to\infty}\sqrt{r}\left(\frac{\partial w}{\partial r}-ikw\right)=0,

where (18) is the Helmholtz equation [40, 41, 9], (19) is the sound-soft boundary condition, and (20) is the Sommerfeld radiation condition.

Assume that the scatterer Ω\Omega is a star-shaped domain. The boundary Γ\Gamma of the scatterer Ω\Omega can be parameterized as

(21)

Γ:=r(θ)(cos⁡θ,sin⁡θ)=exp⁡(u(θ))(cos⁡θ,sin⁡θ),θ∈[0,2π),\Gamma:=r(\theta)(\cos\theta,\sin\theta)=\exp(u(\theta))(\cos\theta,\sin\theta),\quad \theta\in[0,2\pi),

YANG ZHAO, JUNXIONG JIA, TAO ZHOU

where u(θ)=ln⁡r(θ)u(\theta) = \ln r(\theta) and r(θ)>0r(\theta) > 0. For a fixed wavenumber k=5k = 5, the incident field is defined as wi(x):=eikx⋅νw^i(x) := e^{ikx \cdot \nu}.

The forward problem is formulated by illuminating the obstacle with plane waves from eight distinct incident directions

ν∈{(cos⁡θi,sin⁡θi)|θi=(i−1)π4,i=1,2,…,8}.\nu\in\left\{\left(\cos\theta_{i},\sin\theta_{i}\right)\middle|\theta_{i}=\frac{(i-1)\pi}{4},i=1,2,\ldots,8\right\}.

For each incident direction, the corresponding scattered field is computed by solving the governing PDE that describes the interaction between the incident wave and the target obstacle.

For each incident direction, we collect phaseless noisy scattered-field measurements at three observation points {(6,0),(33,33),(0,6)}\{(6,0),(3\sqrt{3},3\sqrt{3}),(0,6)\}. Let Gi\mathcal{G}_i denote the solution operator for the ii-th incident wave, which maps u∈Huu \in \mathcal{H}_u to the scattered field wi∈Hww_i \in \mathcal{H}_w, i.e., wi=Gi(u)w_i = \mathcal{G}_i(u). Let S\mathcal{S} stands for the measurement operator that extracts phaseless data of the total field at the three fixed points. The measurement model for the ii-th incident wave is given by di=SGi(u)+ϵi\boldsymbol{d}_i = \mathcal{S}\mathcal{G}_i(u) + \boldsymbol{\epsilon}_i, where ϵi\boldsymbol{\epsilon}_i represents Gaussian noise. By collecting the solution operators corresponding to all incident waves, we define the combined solution operator G\mathcal{G} by G(u)=(G1(u),G2(u),…,G8(u))\mathcal{G}(u) = (\mathcal{G}_1(u), \mathcal{G}_2(u), \ldots, \mathcal{G}_8(u)). The complete measurement vector can then be written as

d=SG(u)+ϵ,\boldsymbol{d}=\mathcal{S}\mathcal{G}(u)+\boldsymbol{\epsilon},

where d\boldsymbol{d} is a vector of length 3×83 \times 8. The potential function in Bayes' formula (6) is defined as

(22)

Φ(u):=12∥SG(u)−d∥Γnoise2,\Phi(u):=\frac{1}{2}\|\mathcal{S}\mathcal{G}(u)-\boldsymbol{d}\|_{\Gamma_{\mathrm{n o i s e}}}^{2},

where Γnoise\Gamma_{\mathrm{noise}} denotes the covariance matrix of the noise. Our objective is to infer the possible values of uu from the observation d\boldsymbol{d} within the Bayesian framework. To this end, we introduce the following basic assumptions in this subsection:

  • Assume that Gaussian random noise ϵ∼N(0,Γnoise)\epsilon \sim \mathcal{N}(0, \Gamma_{\mathrm{noise}}) is added, where Γnoise=τ−1I\Gamma_{\mathrm{noise}} = \tau^{-1} \mathbf{I} and τ−1=(0.05∥SGu∥∞)2\tau^{-1} = (0.05 \|\mathcal{S} \mathcal{G} u\|_{\infty})^2.

  • Let μ0=N(0,C0)\mu_0 = N(0, \mathcal{C}_0). The operator C0\mathcal{C}_0 is given by C0=(I−αΔ)−2\mathcal{C}_0 = (I - \alpha \Delta)^{-2}, where α=0.5\alpha = 0.5 is a fixed constant. Here, the Laplace operator is defined on Ω=[0,2π]\Omega = [0, 2\pi] with periodic boundary conditions.

We next select appropriate priors for the Bayes' formula. In this numerical example, we consider two distinct priors: the reference prior μ0\mu_0 before the f-CNF transformation and the f-CNF measure μfθ\mu_{f_\theta} obtained through direct data-driven training.

To train the f-CNF network, we construct a direct dataset Dtrain1\mathbb{D}_{\mathrm{train}}^{1}, similar to that in [27], with the detailed definition given below:

u(θ)=ln⁡(sin⁡(3θ)+53)+ξ022π+∑k=110ξk2(1+k2)(sin⁡(kθ)+cos⁡(kθ)),u(\theta)=\ln\left(\frac{\sin(3\theta)+5}{3}\right)+\frac{\xi_{0}}{2\sqrt{2\pi}}+\sum_{k=1}^{10}\frac{\xi_{k}}{2(1+k^{2})}\big(\sin(k\theta)+\cos(k\theta)\big),

where ξk\xi_k (k=0,1,…,10k=0,1,\ldots,10) are independent standard normal random variables, i.e., ξi∼N(0,1)\xi_i \sim \mathcal{N}(0,1). We generate 2000 realizations by sampling {ξk}k=010\{\xi_k\}_{k=0}^{10} to construct the training set Dtrain\mathbb{D}_{\mathrm{train}}. The ground truth u†u^\dagger is generated using the same sampling procedure.

We employ Algorithm 1 to train the f-CNF prior μfθ\mu_{f_\theta} on the training dataset Dtrain\mathbb{D}_{\text{train}} in infinite-dimensional space. Figure 3 presents the ground truth u†u^\dagger, together with

Figure

(a) Samples from μ0\mu_{0}

Figure

(b) Samples from μfθ\mu_{f_{\theta}}

Figure 3: Samples from μ0\mu_0 and trained f-CNF prior μfθ\mu_{f_\theta}. The green solid line represent the background truth u†u^\dagger, and the red dashed line represent the mean of the priors. The blue discrete points represent the position of the observation points (O.P) of our inverse problem. (a): Samples from μ0\mu_0. (b): Samples from f-CNF prior μfθ\mu_{f_\theta}.

samples drawn from the initial prior μ0\mu_0 and the learned prior μfθ\mu_{f_\theta}. It can be observed that, compared with those from μ0\mu_0, the samples from μfθ\mu_{f_\theta} exhibit greater similarity to the background truth u†u^\dagger. This indicates that μfθ\mu_{f_\theta} provides more informative prior information for the posterior distribution.

We then draw posterior samples via the SMC-GM method (introduced in Subsection 3.2) under both the Gaussian prior μ0\mu_0 and the trained prior μfθ\mu_{f_\theta}. For both methods, we generate 20000 samples. Numerical results are shown in Figure 4. We also compute the L2L^2 error between the posterior mean and ground truth u†u^\dagger for quantitative evaluation, as summarized in Table 2.

Table 2: The relative errors between the background truth and the mean of posteriors.

Relative Errorposterior ( μ0\mu_{0} prior)posterior ( μfθ\mu_{f_{\theta}} prior)
Background Truth u†u^{\dagger}0.124120.01179

From Table 2 and Figure 4, the posterior associated with μ0\mu_0 yields accurate reconstructions and tight credible region near the three upper-right observation points, where the likelihood is informative. By contrast, in the unobserved lower-left region with limited likelihood information, reconstructions degrade and posterior uncertainty rises. The posterior derived from the learned f-CNF prior μfθ\mu_{f_\theta} alleviates this limitation to some extent, yielding higher predictive accuracy and reduced uncertainty compared with the posterior of μ0\mu_0.

5.3. Inverse Heat Conduction Problem. For many scientific and engineering applications, inverse heat conduction problems have been studied for decades [3]. In such problems, the temperature or heat flux on an inaccessible boundary is inferred from temperature data measured inside a solid body [16]. This constitutes our final numerical example. In this numerical experiment, we consider the following heat

YANG ZHAO, JUNXIONG JIA, TAO ZHOU

Figure

(a) Posterior μ0\mu_{0} prior

Figure

(b) Posterior μfθ\mu_{f_{\theta}} prior

Figure

(c) Posterior covariance μ0\mu_{0}

Figure

(d) Posterior covariance μfθ\mu_{f_{\theta}}

Figure 4: The comparison of the Bayesian posteriors with μ0\mu_{0}, μfθ\mu_{f_{\theta}} priors. (a)(b): The corresponding Bayesian posteriors with μ0\mu_{0} and μfθ\mu_{f_{\theta}} priors. The blue solid line denotes the background truth u†u^{\dagger}, the red dashed line represents the mean of the posteriors. The green shaded region represents the 95% credibility region of estimated posteriors, and the blue discrete points represent the position of the observation points (O.P). (c)(d): The covariance function of posteriors with μ0\mu_{0} and μfθ\mu_{f_{\theta}} priors.

equation:

∂w∂t=∂∂x(h(x)∂w∂x)\frac{\partial w}{\partial t}=\frac{\partial}{\partial x}\left(h(x)\frac{\partial w}{\partial x}\right)

with initial condition w(x,0)=0w(x,0) = 0. Here, x and t denote the spatial and temporal variables, respectively, w(x,t)w(x,t) is the temperature, h(x)h(x) is the thermal conductivity at each location, and L is the length of the medium. All variables are given in dimensionless units. In this numerical experiment, the thermal conductivity h(x)h(x) is defined as h(x)=0.5+0.15exp⁡(−(x−0.50.2)2)h(x) = 0.5 + 0.15 \exp\left(-\left(\frac{x-0.5}{0.2}\right)^2\right).

We assume that a heat flux is imposed on the left boundary (x=0)(x=0) for t∈[0,T1]t \in [0, T_1], leading to the Neumann boundary condition: ∂w∂x(0,t)=uall(t)\frac{\partial w}{\partial x}(0, t) = u_{\text{all}}(t), where

uall(t)={u(t),t∈[0,T1],0,t>T1.u_{\mathbf{a l l}}(t)=\begin{cases}u(t),&t\in[0,T_{1}],\\ 0,&t>T_{1}.\end{cases}

Furthermore, we assume that the right end of the rod is insulated, which gives the boundary condition: ∂w∂x(L,t)=0\frac{\partial w}{\partial x}(L,t)=0.

Suppose that a temperature sensor is placed at the right end of the medium, i.e., x=Lx = L. The goal is to infer the heat flux u(t)u(t) for t∈[0,T1]t \in [0, T_1] from the temperature measured by the sensor over the time interval t∈[0,T2]t \in [0, T_2]. The corresponding PDE governing this process is given by

{∂w∂t=∂∂x(h(x)∂w∂x),forx∈[0,L],t∈[0,T2],∂w∂x(0,t)=uall(t),fort∈[0,T2],∂w∂x(L,t)=0,fort∈[0,T2].\begin{cases}\frac{\partial w}{\partial t}=\frac{\partial}{\partial x}\left(h(x)\frac{\partial w}{\partial x}\right),&for x\in[0,L],t\in[0,T_{2}],\\\frac{\partial w}{\partial x}(0,t)=u_{\mathbf{all}}(t),&for t\in[0,T_{2}],\\\frac{\partial w}{\partial x}(L,t)=0,&for t\in[0,T_{2}].\end{cases}

We now summarize the formulation of the above inverse heat conduction problem. Let u(t)u(t) denote the model parameter, and let G:u(⋅)↦w(L,⋅)\mathcal{G}: u(\cdot) \mapsto w(L,\cdot) denote the solution operator of the heat equation. The measurement operator S\mathcal{S} maps the solution w(L,t)w(L,t) to its temporal observations at discrete instants t∈[0,T2]t \in [0,T_2], namely

S:w(L,t)↦(w(L,t1),w(L,t2),…,w(L,tP)),\mathcal{S}:w(L,t)\mapsto\big(w(L,t_{1}),w(L,t_{2}),\ldots,w(L,t_{P})\big),

where t1,t2,…,tP∈[0,T2]t_1, t_2, \ldots, t_P \in [0, T_2] denote the measurement time instants. The noisy data vector d\boldsymbol{d} follows the forward mapping

(23)

d=SG(u)+ϵ,\boldsymbol{d}=\mathcal{S}\mathcal{G}(u)+\boldsymbol{\epsilon},

where ϵ\epsilon corresponds to additive Gaussian measurement noise.

For the inverse problem (23), the heat flux u(t)u(t) takes time to propagate along the rod from left to right. Consequently, to accurately recover u(t)u(t) over the entire interval [0,T1][0, T_1], it is typically necessary to take T2>T1T_2 > T_1 and observe w(t)w(t) over the full interval [0,T2][0, T_2]. Here, we choose T1=1T_1 = 1 and T2=1.2T_2 = 1.2. Consistent with Subsections 5.1 and 5.2, we solve this problem within the Bayesian framework on infinite-dimensional spaces, using μ0=N(0,C0)\mu_0 = \mathcal{N}(0, \mathcal{C}_0) as the reference prior, where C0=(I−αΔ)−2\mathcal{C}_0 = (I - \alpha \Delta)^{-2} and α=0.05\alpha = 0.05 is a prescribed constant. The Laplace operator is defined on Ω\Omega with homogeneous Neumann boundary conditions.

In this numerical experiment, we assume access to a large indirect dataset. Our objective is to train an f-CNF prior μfθ\mu_{f_\theta} suitable for the inverse problem using Algorithm 2, and to demonstrate the effectiveness of the proposed method through comparison with the baseline prior μ0\mu_0. We construct the indirect training dataset Dtrain2\mathbb{D}_{\text{train}}^2 similar to [27, 45], with their detailed definitions given below.

• Sample the parameter functions according to

u(t)=cos⁡(3πt)+0.2∑k=120ξkcos⁡(kπt)1+k,ξk∼N(0,1).u(t)=\cos(3\pi t)+0.2\sum_{k=1}^{20}\frac{\xi_{k}\cos(k\pi t)}{1+k},\quad\xi_{k}\sim\mathcal{N}(0,1).

The set {ui}i=110000\{u_i\}_{i=1}^{10000} constitutes the parameter training dataset D1\mathbb{D}^1 generated by this sampling strategy.

  • Define the indirect training dataset as Dtrain2={di∣di=SdataG(ui)+ϵdata,ui∈D1}\mathbb{D}_{\text{train}}^2 = \{d_i \mid d_i = \mathcal{S}_{\text{data}} \mathcal{G}(u_i) + \epsilon_{\text{data}}, u_i \in \mathbb{D}^1\}. The measurement points of the operator Sdata\mathcal{S}_{\text{data}} are taken as {w(ti)∣i=1,2,…,20}\{w(t_i) \mid i = 1, 2, \ldots, 20\} with ti=0.1+11190(i−1)t_i = 0.1 + \frac{11}{190}(i - 1). Here, ϵdata\epsilon_{\text{data}} denotes Gaussian white noise with fixed variance 0.01.

The background truth u†(t)u^{\dagger}(t) is generated using the same sampling procedure as that used to construct D†\mathbb{D}^{\dagger}.

YANG ZHAO, JUNXIONG JIA, TAO ZHOU

Figure

(a) Samples from μ0\mu_{0}

Figure

(b) Samples from μfθ\mu_{f_{\theta}}

Figure 5: Samples from μ0\mu_{0} and trained f-CNF prior μfθ\mu_{f_{\theta}}. The red solid line represent the background truth of our inverse problem. (a): Samples from μ0\mu_{0}. (b): Samples from f-CNF prior μfθ\mu_{f_{\theta}}.

Using Dtrain2\mathbb{D}_{\mathrm{train}}^{2}, we train an f-CNF prior μfθ\mu_{f_{\theta}} via Algorithm 2. To visualize the learned prior, Figure 5 presents samples drawn from μ0\mu_{0} and μfθ\mu_{f_{\theta}}, together with their comparison against the background truth u†u^{\dagger}. It can be observed that the samples from μfθ\mu_{f_{\theta}} exhibit greater similarity to the background truth u†u^{\dagger} than those from μ0\mu_{0}.

Figure

(a) Full measurement posterior

Figure

(b) Posterior μ0\mu_{0} prior

Figure

(c) Posterior μfθ\mu_{f_{\theta}} prior

Figure

(d) Posterior covariance (full)

Figure

(e) Posterior covariance μ0\mu_{0}

Figure

(f) Posterior covariance μfθ\mu_{f_{\theta}}

Figure 6: Comparison of Bayesian posteriors: full measurements with μ0\mu_{0} prior, sparse measurements with μ0\mu_{0}, μfθ\mu_{f_{\theta}} priors (a): The Bayesian posterior with full measurement and μ0\mu_{0} prior. The blue solid line denotes the background truth u†u^{\dagger}, the red dashed line represents the mean of the posteriors. The green shaded region represents the 95% credibility region of estimated posteriors. (b)(c): The corresponding Bayesian posteriors of sparse measurements with μ0\mu_{0}, μfθ\mu_{f_{\theta}} priors. (d)(e)(f): Posterior covariance functions under full measurements with μ0\mu_{0} prior and sparse measurements with μ0\mu_{0} and μfθ\mu_{f_{\theta}} priors, respectively.

We next perform Bayesian inversion using both μ0\mu_0 and the learned f-CNF prior μfθ\mu_{f_\theta}. To further demonstrate the effectiveness of the trained prior μfθ\mu_{f_\theta}, we conduct three numerical experiments.

In the first numerical experiment, the measurement operator fully observes the solution w(L,t)w(L,t) for t∈[0,T2]t \in [0,T_2], denoted by S1:w(L,t)↦(w(L,t1),…,w(L,t20))\mathcal{S}_1: w(L,t) \mapsto (w(L,t^1), \ldots, w(L,t^{20})), where ti=0.1+11190(i−1)t^i = 0.1 + \frac{11}{190}(i-1) for i=1,2,…,20i=1,2,\ldots,20. Meanwhile, we assume that the measurements are contaminated by 5% Gaussian random noise ϵ1∼N(0,Γnoise1)\epsilon_1 \sim \mathcal{N}(0,\Gamma_{\mathrm{noise}}^1), where Γnoise1=τ−1I\Gamma_{\mathrm{noise}}^1 = \tau^{-1}\mathbf{I} and τ−1=(0.05∥S1Gu∥∞)2\tau^{-1} = (0.05\|\mathcal{S}_1\mathcal{G}u\|_\infty)^2. The measurement process is given by

d=S1G(u)+ϵ1.d = \mathcal{S}_1\mathcal{G}(u) + \epsilon_1.

We choose μ0\mu_0 as the prior and solve the inverse problem using SMC-GM. In the SMC-GM algorithm, 20,000 samples are generated, and the results are shown in Figure 6. It can be observed that, when sufficient observational information is available, the prior μ0\mu_0 yields accurate inversion results.

In the second and third numerical experiments, we shorten the measurement time interval. Specifically, we assume that the measurement operator observes the solution w(L,t)w(L,t) only for t∈[0,T3]t \in [0,T_3], where T3=0.9T_3 = 0.9. This implies that no observational information is available after t=0.9t = 0.9, and thus the values of u(t)u(t) for t∈[0.9,1]t \in [0.9,1] cannot be accurately estimated from the measurements alone. We denote the corresponding measurement operator by S2:w(L,t)↦(w(L,t1),…,w(L,t20))\mathcal{S}_2: w(L,t) \mapsto (w(L,t^1), \ldots, w(L,t^{20})) where ti=0.1+8190(i−1)t^i = 0.1 + \frac{8}{190}(i-1). Meanwhile, we assume that the measurements are contaminated by 5% Gaussian random noise ϵ2∼N(0,Γnoise2)\epsilon_2 \sim \mathcal{N}(0,\Gamma_{\mathrm{noise}}^2), where Γnoise2=τ−1I\Gamma_{\mathrm{noise}}^2 = \tau^{-1}\mathbf{I} and τ−1=(0.05∥S2Gu∥∞)2\tau^{-1} = (0.05\|\mathcal{S}_2\mathcal{G}u\|_\infty)^2.

In the second and third numerical experiments, we use μ0\mu_0 and μfθ\mu_{f_\theta} as the priors, respectively, and solve the inverse problem using SMC-GM algorithm. For both priors, 20,000 samples are generated, and the results are presented in Figure 6.

In addition to the graphical results, we also compute the L2L^2 errors between the posterior means obtained in the three experiments and the background truth u†u^\dagger. The results are reported in Table 3. Combining the results in Table 3 and Figure 6, we

Table 3: The relative errors between the background truth and the mean of posteriors.

Relative Errorposterior (full)posterior (μ0\mu_0)posterior (μfθ\mu_{f_\theta})
Background Truth u†u^\dagger0.027340.231190.05285

observe that, in the time intervals not covered by the measurements, the posterior corresponding to the prior μ0\mu_0 exhibits extremely high uncertainty, and its posterior mean also deviates significantly from the background truth u†u^\dagger. In contrast, the learned prior μfθ\mu_{f_\theta} effectively compensates for this deficiency, thereby demonstrating the effectiveness of the proposed prior learning method.

  1. Conclusion. In this work, we propose an f-CNF model defined on infinite-dimensional spaces, thereby providing an effective tool for prior measure construction in infinite-dimensional Bayesian inverse problems. The model constructs a transformation that preserves measure equivalence while retaining substantial flexibility in the induced measure, which lays a rigorous theoretical foundation for computing the corresponding Radon–Nikodym derivative.

The proposed f-CNF model lends itself naturally to infinite-dimensional Bayesian

YANG ZHAO, JUNXIONG JIA, TAO ZHOU

inverse problems, where the choice of prior distribution occupies a central role. We verify its performance across three representative test setups: (1) a smooth linear inverse problem, (2) an inverse scattering problem, and (3) an inverse heat conduction problem. For test cases (1) and (2), f-CNF priors are trained using direct datasets of underlying model parameters; for cases (1) and (3), training proceeds with indirect observational measurements.

Nevertheless, training f-CNFs requires heavy ODE computations, which incur considerable computational overhead when dealing with sophisticated models. Our future research directions are threefold: (1) extending the f-CNF framework to broader real-world applications; (2) developing more expressive network architectures; and (3) studying measure equivalence within infinite-dimensional diffusion models [14, 31] in the context of Bayesian inverse problems.

Acknowledgments. This research was partially funded by the National Natural Science Foundation of China (Grant Nos. 12322116 and 12271428).