GUIDING CONTINUOUS OPERATOR LEARNING THROUGH PHYSICS-BASED BOUNDARY CONSTRAINTS

Abstract

Boundary conditions (BCs) are important groups of physics-enforced constraints that are necessary for solutions of Partial Differential Equations (PDEs) to satisfy at specific spatial locations. These constraints carry important physical meaning, and guarantee the existence and the uniqueness of the PDE solution. Current neural-network based approaches that aim to solve PDEs rely only on training data to help the model learn BCs implicitly. There is no guarantee of BC satisfaction by these models during evaluation. In this work, we propose Boundary enforcing Operator Network (BOON) that enables the BC satisfaction of neural operators by making structural changes to the operator kernel. We provide our refinement procedure, and demonstrate the satisfaction of physicsbased BCs, e.g. Dirichlet, Neumann, and periodic by the solutions obtained by BOON. Numerical experiments based on multiple PDEs with a wide variety of applications indicate that the proposed approach ensures satisfaction of BCs, and leads to more accurate solutions over the entire domain. The proposed correction method exhibits a (2X-20X) improvement over a given operator model in relative L 2 error (0.000084 relative L 2 error for Burgers' equation). Code available at:

1. INTRODUCTION

Partial differential equations (PDEs) are ubiquitous in many scientific and engineering applications. Often, these PDEs involve boundary value constraints, known as Boundary Conditions (BCs), in which certain values are imposed at the boundary of the domain where the solution is supposed to be obtained. Consider the heat equation that models heat transfer in a one dimensional domain as shown schematically in Figure 1 . The left and right boundaries are attached to an insulator (zero heat flux) and a heater (with known heat flux), respectively, which impose certain values for the derivatives of the temperature at the boundary points. No-slip boundary condition for wall-bounded viscous flows, and periodic boundary condition for modeling isotropic homogeneous turbulent flows are other examples of boundary constraints widely used in computational fluid dynamics. Violating these boundary constraints can lead to unstable models and non-physical solutions. Thus, it is critical for a PDE solver to satisfy these constraints in order to capture the underlying physics accurately, and provide reliable models for rigorous research and engineering design. In the context of solving PDEs, there has been an increasing effort in leveraging machine learning methods and specifically deep neural networks to overcome the challenges in conventional numerical methods (Adler & Öktem, 2017; Afshar et al., 2019; Guo et al., 2016; Khoo et al., 2020; Zhu & Zabaras, 2018) . One main stream of neural-network approaches has focused on training models that predict the solution function directly. These methods typically are tied to a specific resolution and PDE parameters, and may not generalize well to different settings. Many of these approaches may learn physical constraints implicitly through training data, and thus do not guarantee their satisfaction at test time (Greenfeld et al., 2019; Raissi et al., 2019; Wang et al., 2021) . Some previous works also attempt to formulate these physics-based constraints in the form of a hard constraint 1 ). Violation of the left boundary constraint by an existing neural operator (FNO), even when trained on data satisfying boundary constraint, suggests heat flowing across the insulator, which is not aligned with the underlying physics. Disagreement at the right boundary violates energy conservation. The proposed boundary corrected model (BOON) produces physically relevant solution along with better overall accuracy (see Section 4.2.1). optimization problem, although they could be computationally expensive, and may not guarantee model convergence to more accurate results (Xu & Darve, 2020; Krishnapriyan et al., 2021; Lu et al., 2021b; Donti et al., 2021) . Neural Operators (NOs) are another stream of research which we pursue in our study here that aim to learn the operator map without having knowledge of the underlying PDEs (Li et al., 2020a; Rackauckas et al., 2020; Tran et al., 2021; Li et al., 2020b; Guibas et al., 2021; Bhattacharya et al., 2021; Gupta et al., 2021) . NO-based models can be invariant to PDE discretization resolution, and are able to transfer solutions between different resolutions. Despite the advantages NO-based models offer, they do not yet guarantee the satisfaction of boundary constraints. In Figure 1 , the variation of heat flux is shown at the boundary regions for a vanilla NO-based model (FNO) and our proposed model (BOON) . FNO violates both boundary constraints, and results in a solution which deviates from the system underlying physics. Physics-based boundary conditions are inherent elements of the problem formulation, and are readily available. These constraints are mathematically well-defined, and can be explicitly utilized in the structure of the neural operator. We show that careful leverage of this easily available information improves the overall performance of the neural operator. We propose Boundary enforcing Operator Network (BOON), which allows for the use of this physical information. Given an integral kernelbased NO representing a PDE solution, a training dataset D, and a prescribed BC, BOON applies structural corrections to the neural operator to ensure the BC satisfaction by the predicted solution. Our main contributions in this work can be summarized as follows: (i) A systematic change to the kernel architecture to guarantee BC satisfaction. (ii) Three numerically efficient algorithms to implement BC correction in linear space complexity and no increase in the cost complexity of the given NO while maintaining its resolution-independent property. (iii) Proof of error estimates to show bounded changes in the solution. (iv) Experimental results demonstrating that our proposed BOON has state-of-the-art performance on a variety of physically-relevant canonical problems ranging from 1D time-varying Burgers' equation to complex 2D time-varying nonlinear Navier-Stokes lid cavity problem with different BC, e.g. Dirichlet, Neumann, and periodic. Fu(x, t) = 0, x ∈ Ω ⊂ R n , u(x, 0) = u 0 (x), x ∈ Ω, Gu(x, t) = 0, x ∈ ∂Ω,    , ∀ t ≥ 0, where F denotes a time-varying differential operator (non-linear, in general), Ω the spatial domain with boundary ∂Ω, u 0 (x) the initial condition, G the boundary constraint operator, and u(x, t) the solution at time t. Formally, given the domain Ω, we denote the interior as Ω , which is the space of points x ∈ Ω such that there exists an open ball centered at x and completely contained in Ω. The boundary of Ω is defined as ∂Ω = {x|x ∈ Ω ∩ x / ∈ Ω}. In a given boundary domain ∂Ω, the boundary conditions (BCs) are specified through Gu = 0, where G is taken to be linear in the current work. Three types of BCs which are widely used to model physical phenomena are: (1) Dirichlet, (2) Neumann, and (3) periodic.  = u(x0, t) -u(xN-1, t) = 0, x0, xN-1 ∈ ∂Ω, ∀x ∈ Ω, ∀t ≥ 0} Ω = [x 0 , x N -1 ] with boundary ∂Ω = {x 0 , x N -1 } is shown for simplicity, and an extension to a high-dimensional domain is straight-forward (see Section 4).

2.2. OPERATORS

The solution of a PDE can be represented as an operator map, from either a given initial condition, forcing function, or even PDE coefficients (input a) to the final solution u. Formally, an operator map T is such that T : A → U, where A and U denote two Sobolev spaces H s,p , with s > 0. Here, we choose p = 2. For simplicity, when T is linear, the solution can be expressed as an integral operator with kernel K : Ω × Ω → L 2 : u(x, t) = T a(x) = Ω K(x, y)a(y)dy, where a(x) ∈ A, u(x, t) ∈ U with specified t > 0. In this work, a(x) is equivalent to the initial condition, u 0 (x) in eq. ( 1). Note: For a given PDE, the operator T is non-linear in general, and we concatenate multiple linear operators along with non-linearities (e.g., GeLU) to model a non-linear operator (as done in Li et al. (2020a) , Gupta et al. (2021) ). We refer to Section 4 for more details. Consider a BVP of the form in eq. ( 1), we denote the true operator between initial condition to the solution at time t as P : A → U bdy with U bdy = U ∩∂U, where U bdy denotes the function space of solutions to the BVP, as illustrated in Figure 2 (See Appendix A for a summary of the notations).

2.3. BOUNDARY-CONSTRAINED OPERATORS

For an operator T : A → U bdy (learned from the data), the incurred boundary error is denoted as E bdy (T ) = 1 |D| (a,.)∈D ||GT (a) -GP(a)|| ∂H s,p , where ||.|| ∂H s,p is taken as the L 2 error at the boundary, or ( ∂Ω ||.|| 2 dx) 1/2 , D ⊂ (A, U bdy ) is a given dataset (for example, evaluation data), and G is a linear boundary operator (see eq. ( 1)). Although the operator T is trained using the data with samples drawn from U bdy , it is not guaranteed to have small boundary errors over the evaluation dataset. In this work, we aim to develop a correction mechanism such that the resulting operator T : A → U bdy satisfies E bdy ( T ) < ϵ over given data D, for an arbitrary small ϵ > 0. Remark: Emphasizing small boundary error through model modification serves two purposes, first (i) satisfaction of boundary values which are necessary for physical importance of the problem, second and more importantly (ii) to act as guiding mechanism for obtaining a correct solution profile (see Section 4 and Figure 3 ).

3. BOON: MAKING KERNEL CORRECTIONS FOR OPERATOR

We have seen in our motivating example in Figure 1 that even though a neural operator is provided with the training data which implicitly obeys the boundary constraints, the boundary conditions may be violated in the final solution. Explicit knowledge of the given boundary conditions can be exploited to guide the solution profiles, and ensure lower boundary errors in the evaluation. Section 3.1 provides motivation for an explicit BC satisfaction procedure, and Section 3.2 discusses the computational algorithms for an efficient implementation.

3.1. MOTIVATION: KERNEL MANIPULATION

The integral kernel K(x, y) in eq. ( 2) is the fundamental block in operator learning. We observe that the boundary conditions in Table 1 can be exactly satisfied by an appropriate kernel adjustment using the following result. Proposition 1. For an integral operator T : H s,p → H s,p with kernel K(x, y) mapping an initial condition u 0 (x) to u(x, t), the boundary conditions listed in Table 1 are satisfied, if 1. Dirichlet: K(x 0 , y) = αD(x0,t) αD(x0,0) 1(y = x 0 ), x 0 ∈ ∂Ω, ∀y ∈ Ω ⇒ u(x 0 , t) = α D (x 0 , t). 2. Neumann: K x (x 0 , y) = αN(x0,t) u0(x0) 1(y = x 0 ), x 0 ∈ ∂Ω, ∀y ∈ Ω ⇒ u x (x 0 , t) = α N (x 0 , t). 3. Periodic: K(x 0 , y) = K(x N -1 , y), x 0 , x N -1 ∈ ∂Ω, ∀y ∈ Ω ⇒ u(x 0 , t) = u(x N -1 , t). The corner cases, α D (x 0 , 0) = 0 for Dirichlet and u 0 (x 0 ) = 0 for Neumann, are considered in the proof of Proposition 1 in Appendix B. Proposition 1 motivates a key idea that kernel manipulation can propagate certain properties, e.g. boundary constraints from the input function u 0 (x) (a(x) in eq. ( 2)) to the output u(x, t), t > 0. For example, if the input u 0 (x) is periodic, or u 0 (x 0 ) = u 0 (x N -1 ), x 0 , x N -1 ∈ ∂Ω, then changing the kernel through Proposition 1 ensures that u(x 0 , t) = u(x N -1 , t), t > 0 as well, i.e. the output is periodic. Since boundary conditions need to be satisfied by all u(x, t) , ∀t (see formulation in eq. ( 1)), we can leverage kernel manipulation to communicate boundary constraints from the known input function at t = 0 to the unknown output at t > 0.

3.2. KERNEL CORRECTION ALGORITHMS

The previous discussion motivates that we should perform a kernel manipulation for boundary constraint satisfaction. From a computational perspective, the input and the output functions are evaluated over a discretized grid (see Section 4). We show that Gaussian elimination followed by normalization allows for Dirichlet and Neumann, and weighted averaging allows for periodic boundary corrections. We establish the boundary correction of a given neural operator (or BOON) using the following result. Theorem 1. Refinement: Given a grid with resolution N , and an operator T : A → U bdy , characterized by the kernel K(., .) as in eq. (2). For every ∂U in Table 1 , there exists a kernel correction such that the resulting operator T : A → U bdy satisfies E bdy ( T ) ≈ 0, evaluated over the grid. Figure 5 (in Appendix C) intuitively explains the existence of a solution for Theorem 1, where for a given grid resolution N , the discretized version K = [K i,j ] 0:N -1,0:N -1 ∈ R N ×N , shown in the blue grid, of the continuous kernel K(x, y) is corrected by applying transformations for the boundary corrections. See Appendix C.1 for the choice and correctness of these transformations. To efficiently implement our BOON boundary correction, we utilize a given module K, such that y = K(x) := Kx. In Appendix C.2, we show that matrix vector multiplications are the only operations that our kernel correction requires. As common with other Neural Operator implementations, we take K, for example to be Fourier-based in Li et al. (2020a) , or multiwavelet-based in Gupta et al. (2021) , to efficiently perform these matrix vector multiplications. The computational efficiency of BOON is established through the following result. Theorem 2. Computation complexity. Given a grid resolution N , a kernel evaluation scheme K for eq. (2) with cost N K , the kernel corrections in Theorem 1 can be reduced to at most 3 kernel calls, requiring only O(N K ) operations and O(N ) space. The proof is provided in Appendix C.2, where we provide arithmetic expansions of the terms in Appendix C.1. These derivations lead to Algorithms 1, 2, 3 for Dirichlet, Neumann, and periodic corrections, respectively. A straight-forward translation of these algorithms to a neural operator architecture with module K is provided in the Figure 6 (see Appendix C.3).

Algorithm 1: Dirichlet

Input: K, u 0 , α D (x 0 , t) Output: Corrected Dir u(t) 1: K 0,0 ← K(e 0 )[0], with e 0 = [1, 0, 0, ...] T 2: z ← K(u 0 ) 3: u ← u 0 4: u[0] ← 2u 0 [0] -z[0]/K 0,0 5: u ← K(u) 6: u[0] ← α D (x 0 , t) Algorithm 2: Neumann Input: K, u 0 , α N (x 0 , t), c ∈ R N , c 0 ̸ = 0 Output: Corrected Neu u(t) 1: K 0,0 ← K(e 0 )[0], with e 0 = [1, 0, 0, ...] T 2: z ← K(u 0 ) 3: u ← u 0 4: u[0] ← 2u 0 [0] -z[0]/K 0,0 5: u ← K(u) 6: u[0] ← α N (x 0 , t)/c 0 -k>0 (c k /c 0 )u[k] Algorithm 3: Periodic Input: K, u 0 , α, β ∈ R + , α + β = 1 Output: Corrected Per u(t) 1: u ← K(u 0 ) 2: u[0] ← αu[0] + βu[-1] 3: u[-1] ← u[0] Note: If the given kernel module K is grid resolution-independent, i.e., train and evaluation at different resolution, then the boundary correction algorithms 1,2, and 3 are resolution-independent as well by construction. Lastly, we show that the kernel correction in Theorem 1, implemented to guide the operator T through boundary conditions, does not yield unrestricted changes to solution in the interior using the following result which is proved in Appendix C.4. Theorem 3. Boundedness: For any a ∈ A, and an operator T , with its refinement T (Theorem 1), such that u = T a and ũ = T a, ||u -ũ|| 2 is bounded. Interestingly, when the given operator T is FNO, then Theorem 3 can be combined with the results of Kovachki et al. (2022) to bound the error between the refined operator T and the true solution. With a straightforward modification, the refinement results and algorithms presented for a 1D domain in this section can be extended to higher dimensions (and multi-time step predictions) as we demonstrate empirically in Section 4.

4. EMPIRICAL EVALUATION

In this section, we evaluate the performance of our BOON model on several physical BVPs with different types of boundary conditions. For learning the operator, we take the input as a(x) := u 0 (x) in eq. ( 1), and the output as T : u 0 (x) → [u(x, t 1 ), . . . , u(x, t M )] for the given ordered times t 1 < . . . < t M ∈ R + . For single-step prediction, we take M = 1, and for multi-step prediction, we take M = 25.

Data generation:

We generate a dataset D = {(a i , u i,j ) k } ndata k=1 , where a i := a(x i ), u i,j := u(x i , t j ) for x i ∈ Ω, i = 0, . . . , N -1, and t j < t j+1 ∈ R + , j = 1, . . . , M for a given spatial grid-resolution N , and number of output time-steps M . Each data sample has size (N, N × M ) (See Appendix D). The train and test datasets, D train and D test are disjoint subsets of D with sizes n train and n test , respectively (See Table 7 ).

Benchmark models:

We compare BOON model with the following baselines: (i) Fourier neural operator (FNO) (Li et al., 2020a) , (ii) physics informed neural operator (PINO) (Li et al., 2021) in the multi-step prediction case or our adapted PINO (APINO) in the one-step prediction casefoot_0 , (iii) multi-pole graph neural operator (MGNO) (Li et al., 2020c) , and (iv) DeepONet (Lu et al., 2021a) . Note that MGNO requires a symmetric grid, and is valid only for single-step predictions. We use FNO as the kernel-based operator in our work, and MGNO and DeepONet as the non-kernel based operators. See Appendix F.5 for a study of applying BOON to the multiwavelet-based neural operator (Gupta et al., 2021) . Training: The models are trained for a total of 500 epochs using Adam optimizer with an initial learning rate of 0.001. The learning rate decays every 50/100 epochs (1D/rest) with a factor of 0.5. We use the relative-L 2 error as the loss function (Li et al. (2020a) ). We compute our BOON model by applying kernel corrections (see Section 3) on four stacked Fourier integral operator layers with GeLU activation (Li et al. (2020a) ) (See Table 8 ). We use a p3.8xlarge Amazon Sagemaker instance (Liberty et al., 2020) in the experiments. See Appendix E for details. 

4.1. DIRICHLET BOUNDARY CONDITION

We here present our experimental results for BVPs with Dirichlet boundary conditions including one-dimensional Stokes' second problem (2D including time), one-dimensional Burgers' equation (2D including time), and two-dimensional lid-driven Cavity Flow (3D including time).

4.1.1. 1D STOKES' SECOND PROBLEM

The one-dimensional Stokes' second problem is given by the simplified Navier-Stokes equation (White (2006) ) in the y-coordinate as follows, u t = νu yy , y ∈ [0, 1], t ≥ 0, u 0 (y) = U e -ky cos(ky), y ∈ [0, 1], u(y = 0, t) = U cos(ωt), t ≥ 0, where U ≥ 0 denotes the maximal speed of the oscillatory plate located at y = 0, ν ≥ 0 denotes the viscosity, ω denotes the oscillation frequency, and k = ω/(2ν) (See Appendix D.1 for the parameter values). We compute the multi-step prediction with final time t M = 2 for M = 25. We also apply an exponential mollifier after the last layer in the model's architecture to avoid numerical oscillations in the boundary regions.  u t + (u 2 /2) x = νu xx , x ∈ [0, 1], t ≥ 0, u 0 (x) = u L , if x ≤ 0.5, u R , if x > 0.5, x ∈ [0, 1], u(0, t) = u exact (0, t), t > 0, u(1, t) = u exact (1, t), t > 0, where ν ≥ 0 denotes the viscosity, u exact (x, t) is the exact solution given in eq. ( 53) and u L > u R ∈ R. For the initial condition values given in Appendix D.2.1, the exact solution involves the formation of sharp interface, known as a shock wave, which propagates towards the right boundary. We compute the single-step prediction at final time t M = 1.2 (M = 1) when the shock hits the right boundary. Figure 4 indicates that the relative error of FNO is higher than BOON model throughout the domain and it grows significantly near the right boundary x N -1 = 1 at t M = 1.2, while the relative error of BOON model stays relatively flat. 

4.1.3. 2D NAVIER-STOKES EQUATION: LID-DRIVEN CAVITY FLOW

The two-dimensional Navier-Stokes equation for a viscous and incompressible fluid with no-slip boundary conditions can be written in terms of vorticity as follows: w t + ⃗ u • ∇w = (1/Re)∇ 2 w, x, y ∈ [0, 1] 2 , t ≥ 0, ∇ • ⃗ u = 0, x, y ∈ [0, 1] 2 , t ≥ 0, w 0 (x, y) = ∇ × U 0 1(y = 1) , x, y ∈ [0, 1] 2 , w(x, 0, t) = -u (1) y (x, 0, t), w(x, 1, t) = -u (1) y (x, 1, t), x ∈ [0, 1], t ≥ 0, w(0, y, t) = u (2) x (0, y, t), w(1, y, t) = u (2) x (1, y, t), y ∈ [0, 1], t ≥ 0, where  ⃗ u = u (1) , u (2) T denotes the 2D velocity vector, w = (∇ × ⃗ u) • [0, 0, 1] T denotes

4.2. NEUMANN BOUNDARY CONDITION

In this subsection, we present our experimental results for BVPs with Neumann boundary conditions considering one-dimensional heat equation (2D including time), and two-dimensional wave equation (3D including time). We use finite difference scheme to estimate the given Neumann boundary conditions and enforce them in our operator learning procedure (See Lemma 2).

4.2.1. 1D HEAT EQUATION

The one-dimensional inhomogenous heat equation is given as: u t -ku xx = f (x, t), x ∈ [0, 1], t ≥ 0, u 0 (x) = cos(ωπx), x ∈ [0, 1], u x (0, t) = 0, u x (1, t) = U sin πt, t ≥ 0, where k > 0 denotes the conductivity, f (x, t) = U π x 2 2 cos πt denotes the heat source, and U, ω ∈ R. The exact solution and more details about the choice of different parameters can be found in Appendix D.4. We compute the multi-step solutions of the heat equation with final time t M = 2 and M = 25. Table 5 shows that BOON performs significantly better than the benchmark models in terms of both relative L 2 and the L 2 boundary errors. In particular, the large boundary errors of baseline models indicates their violation of the physical constraints of the problem, the zero flux on the left boundary (x = 0) imposed by the insulator, and the conservation of system total energy that is controlled by the heat source on the right boundary (x = 1). As illustrated in Figure 1 , by enforcing the exact boundary constraints, BOON corrects the solution profile near the boundary and leads to more accurate result in the interior domain as well. 

4.2.2. 2D WAVE EQUATION

The wave equation models the vibrations of an elastic membrane with Neumann BC at the boundary points (Cannon & Dostrovsky (1981) ). The mathematical formulation of this problem is as follows: u tt = c 2 (u xx + u yy ), x, y ∈ [0, 1] 2 , t ≥ 0, u 0 (x, y) = k cos(πx) cos(πy), x, y ∈ [0, 1] 2 , u t (x, y, 0) = 0, x, y ∈ [0, 1] 2 , u x (0, y, t) = u x (1, y, t) = u y (x, 0, t) = u y (x, 1, t) = 0, t ≥ 0, where the parameters c ∈ R ≥0 denotes the wavespeed and k ∈ R. The details of our experiment setup can be found in Appendix D.5. We compute the multi-step solution of the wave equation at final time t M = 2 with M = 25 Table 6 shows that BOON obtains the lowest relative L 2 error compared to the benchmark models, and enforces the exact physical constraints at the boundary points while capturing the displacement of the membrane with the highest accuracy. 

4.3. ADDITIONAL RESULTS

See Appendix F for the following additional experiments. Single-step and multi-step predictions: We include the corresponding single-step prediction results for Stokes' (Dirichlet), Burgers' (periodic) and heat (Neumann) in Tables 9, 11 , 13, respectively. We also include the multi-step time-varying prediction results for the Riemann problem of viscous Burgers' with Dirichlet boundary conditions in 7)), e.g. N = 256, can predict the output at finer resolutions, e.g. N = 512, 1024 and 2048 (See Table 14 ). BOON applied to MWT: In Appendix F.5, we show that BOON can be successfully applied to other state-of-the-art kernel-based operators, e.g. the multiwavelet-based neural operator (MWT) (Gupta et al., 2021) .

5. CONCLUSION

In this work, we propose BOON which explicitly utilizes prescribed boundary conditions in a given neural operators' structure by making systematic changes to the operator kernel to enforce their satisfaction. We propose a refinement procedure to enforce common BCs, e.g. Dirichlet, Neumann, and periodic. We also provide error estimates of the procedure. We show empirically, over a range of physically-informative PDE settings, that the proposed approach ensures the satisfaction of the boundary conditions, and leads to better overall accuracy of the solution in the interior of the domain. The appendix is organized as follows. Section A summarizes all the notations used in this work. Section B provides proof of Proposition listed in Section 3.1. The proofs of main Theorems are provided in Section C. The details of data generation process is provided in Section D. Section E further expands the experimental setup in addition to what described in Section 4. Finally, additional experiments to supplement the main findings in Section 4 of the paper are provided in Section F.

A NOTATIONS

PDEs, Boundary value problem (BVP) and operators u 0 (x) Initial condition of the given PDE. A Function space of initial conditions. u(x, t) Solution of the PDE at time t > 0. U Function space of solutions of a given PDE.

L p

Function spaces such that the absolute value of the p-th power of the element functions is Lebesgue integrable. H s,p Sobolev spaces that are subspaces of L p such that the element functions and their weak derivatives up to order s > 0 also belong to L p .

Boundary constrained operators

∂U Function space such that each element function satisfies a given boundary condition. U bdy Function space such that each element function is a solution to given a BVP, and satisfies a given boundary condition, i.e. U bdy = U ∩ ∂U. ||.|| ∂H s,p L p -norm computed at the boundary points.

E bdy (T )

Boundary error incurred by a given operator T .

K

Kernel matrix K ∈ R N ×N for a given resolution N > 0. K Kernel matrix-vector multiplication computing module y = K(x) := Kx. K bdy Boundary corrected Kernel matrix K bdy ∈ R N ×N for a given resolution N > 0. K bdy will differ for different boundary conditions.

B PROOF OF PROPOSITION 1

Proof. Dirichlet: Given a boundary location x 0 ∈ ∂Ω, a boundary value function α D (x 0 , t), an input u 0 (x) satisfying u 0 (x 0 ) = α D (x 0 , 0), we obtain u(x 0 , t) using the integral kernel in eq. ( 2) with a(x) := u 0 (x) as: u(x 0 , t) = T u 0 (x 0 ) = Ω K(x 0 , y)u 0 (y)dy = Ω α D (t) α D (0) 1(y = x 0 )u 0 (y)dy = α D (x 0 , t) α D (x 0 , 0) u 0 (x 0 ) = α D (x 0 , t). For the corner case of α D (x 0 , 0) = 0, the division is not defined. In such cases, we can still obtain the boundary corrected solution with an arbitrary precision ϵ > 0. First, we note that, the operator is such that T : A → U, where A, U are H s,2 . Therefore, the operator is compact, or it maps bounded norm subspaces. The operator kernel is K : Ω × Ω → L 2 . We first define sup x ||K(x, .)|| L 2 = M . Next, let u 0 ϵ ′ (x) be the ϵ ′ -perturbed version of a given input u 0 (x) such that ||u 0 ϵ ′u 0 || L 2 ≤ ϵ ′ and u 0 ϵ ′ (x 0 ) = ϵ ′ , where ϵ ′ > 0. By taking the kernel K such that K(x 0 , y) = α D (xt,t) ϵ ′ 1(y = x 0 ), we obtain an ϵ-perturbed output u ϵ (x), ϵ > 0 such that u ϵ (x 0 ) = Ω α D (x 0 , t) ϵ ′ 1(y = x 0 )u 0,ϵ ′ (y)dy = α D (x 0 , t). For any x ̸ = x 0 , we denote u(x) as the solution obtained by original input u 0 (x), and |u(x) -u ϵ ′ (x)| = | Ω K(x, y)(u 0 (y) -u 0,ϵ ′ (y))dy| (a) ≤ ||K(x, .)|| L 2 ||u 0 -u 0,ϵ ′ || L 2 ≤ sup x ||K(x, .)|| L 2 ||u 0 -u 0,ϵ ′ || L 2 ≤ M ϵ ′ , where, (a) uses Hölder's inequality. Given an output-approximation ϵ, we take ϵ ′ = ϵ/M . Therefore, sup x |u(x)u ϵ (x)| = ϵ, or we obtain solution for any given precision ϵ such that u ϵ (x 0 ) = α D (x 0 , t). Note that, for the computational purpose, when we evaluate the functions and kernels on a discretized grid (see Appendix C.2.1), we simply replace the appropriate locations with the boundary values, and the modified kernel takes care of the continuity over a given input resolution. Neumann: Given a boundary location x 0 ∈ ∂Ω, a boundary function α N (x 0 , t), and an input u 0 (x), we obtain the derivative of the output u x (x 0 , t) by differentiating the integral kernel in eq. ( 2) with a(x) = u 0 (x) as: u x (x 0 , t) = ∂ ∂x T u 0 (x) x=x0 = Ω ∂ ∂x K(x, y)u 0 (y)dy x=x0 = Ω K x (x 0 , y)u 0 (y)dy = Ω α N (x 0 , t) u 0 (x 0 ) 1(y = x 0 )u 0 (y)dy = α N (x 0 , t) u 0 (x 0 ) u 0 (x 0 ) = α N (x 0 , t). Note that, a similar ϵ, ϵ ′ argument can be provided to deal with the special case of u 0 (x 0 ) = 0 as we did above for the Dirichlet BC. Periodic: Given boundary locations x 0 , x N -1 ∈ ∂Ω, and an input u 0 (x) satisfying periodicity, i.e. u 0 (x 0 ) = u 0 (x N -1 ), we obtain u(x 0 , t) using the integral kernel in eq. ( 2) with a(x) = u 0 (x) as: u(x 0 , t) = T u 0 (x 0 ) = Ω K(x 0 , y)u 0 (y)dy = Ω K(x N -1 , y)u 0 (y)dy = T u 0 (x N -1 ) = u(x N -1 , t).

C PROOF OF THE THEOREMS C.1 REFINEMENT THEOREM

We first present the supporting Lemmas in Section C.1.1 and then the proof in Section C.1.2.

C.1.1 KERNEL CORRECTION LEMMAS

We have a given resolution N , finite grid x 0 , x 1 , . . . , x N -1 , and discretized version of the continuous kernel K(x, y) as K = [K i,j ] 0:N -1,0:N -1 such that K ∈ R N ×N . The operation in eq. ( 2) is discretized as u(t) = Ku 0 , where u 0 ∈ R N denotes the values of the initial condition evaluated at the gridpoints, and u(t) ∈ R N denotes the approximated output at the gridpoints for some t > 0. Lemma 1. Given a Dirichlet boundary condition u(x 0 , t) = α D (x 0 , t), let β = αD(x0,t) αD(x0,0) , the operator kernel can be modified for satisfying the boundary condition as follows: K bdy = T 1 Dirichlet KT 2 Dirichlet , where, T 1 Dirichlet = β K0,0 0 T 0 I -1 , T 2 Dirichlet = 1 - K T 0,1:N -1 K0,0 0 I N -1 . ( ) Proof. The K bdy is computed as: K bdy = β K0,0 0 T 0 I N -1 K 0,0 K T 0,1:N -1 K 1:N -1,0 K 1:N -1,1:N -1 1 - K T 0,1:N -1 K0,0 0 I N -1 = β 0 T K 1:N -1,0 K 1:N -1,1:N -1 -1 K0,0 K 1:N -1,0 K T 0,1:N -1 . With u 0 [0] = α D (x 0 , 0), the output using modified kernel is u(t) = K bdy u 0 such that u(t )[0] = βu 0 [0] = α D (x 0 , t). Lemma 2. The continuous Neumann boundary condition u x (x 0 , t) = α N (x 0 , t) after discretization through a general one-sided finite difference scheme, u x (x 0 , t) ≈ k>0 c k u[k](t) + c 0 u[0](t) for given coefficients c k ∈ R for k > 0 and c 0 ∈ R\{0}, and the following condition for discretized kernel K 0,j = -k>0 c k c0 K k,j , j ̸ = 0, -k>0 c k c0 K k,j + αN(t) c0 u0[0] , j = 0, are sufficient for a K to satisfy discretized Neumann boundary condition. Proof. We show sufficiency through the discretized Neumann boundary condition, u x (x 0 , t) ≈ k>0 c k u[k](t) + c 0 u[0](t) as u x (x 0 , t) ≈ k>0 c k u[k](t) + c 0 u[0](t) = k>0 c k (Ku 0 )[k] + c 0 (Ku 0 )[0] = k>0 N -1 j=0 c k K k,j u 0 [j] + c 0 N -1 j=0 K 0,j u 0 [j] = N -1 j=0 c 0 k>0 c k c 0 K k,j + K 0,j u 0 [j] = c 0 α N (x 0 , t) c 0 u 0 [0] u 0 [0] = α N (x 0 , t), where we used eq. ( 11) to obtain the last equality. Lemma 3. Given a Neumann boundary condition u x (x 0 , t) = α N (x 0 , t) and its discretization through a general one-sided finite difference scheme, u x (x 0 , t) ≈ k>0 c k u[k](t) + c 0 u[0](t) for given coefficients c k ∈ R, c 0 ̸ = 0, and β = αN(x0,t) c0 u0(x0) , the operator kernel can be modified through following operations to satisfy discretized Neumann boundary conditions. K bdy = T 1 Neumann KT 2 Neumann , where, T 1 Neumann = β K0,0 -c1 c0 . . . -c N -1 c0 0 I N -1 , T 2 Neumann = 1 - K T 0,1:N -1 K0,0 0 I N -1 . Proof. The K bdy is evaluated as K bdy = β K0,0 -c1 c0 . . . -c N -1 c0 0 I N -1 K 0,0 K T 0,1:N -1 K 1:N -1,0 K 1:N -1,1:N -1 1 -1 K0,0 K T 0,1:N -1 0 I N -1 = β -1 c0 k>0 c k K k,0 -1 c0 k>0 c k (K T k,1:N -1 -1 K0,0 K k,0 K T 0,1:N -1 ) K 1:N -1,0 K 1:N -1,1:N -1 -1 K0,0 K 1:N -1,0 K T 0,1:N -1 . Now, (K bdy ) i,0 = K i,0 , ∀ i > 0, therefore, (i) (K bdy ) 0,0 = β -1 c0 k>0 c k (K bdy ) k,0 . Next, (K bdy ) i,j = K i,j -1 K0,0 K i,0 K 0,j ∀ i, j > 0, therefore, (ii) (K bdy ) 0,j = k>0 c k c0 (K bdy ) k,j . Using Lemma 2, K bdy satisfies discretized Neumann boundary condition. Lemma 4. Given a periodic boundary condition u[0](t) = u[N -1](t) ∀ t, the operator kernel can be modified to satisfy the periodicity as follows. K bdy = T periodic K, ( ) where, T periodic =   α 0 T β 0 I N -2 0 α 0 T β   , α, β ∈ R + , α + β = 1. Proof. The K bdy is computed as K bdy = T periodic K =   α 0 T β 0 I N -2 0 α 0 T β     K T 0,0:N -1 K 1:N -2,0:N -1 K T N -1,0:N -1   =   α K T 0,0:N -1 + β K T N -1,0:N -1 K 1:N -2,0:N -1 α K T 0,0:N -1 + β K T N -1,0:N -1   . With periodic input, i.e., u 0 [0] = u 0 [N -1], the output through modified kernel in eq. ( 15) or u(t) = K bdy u 0 is such that u[0](t) = u[N -1](t).

C.1.2 PROOF OF THEOREM 1

Proof. Lemma 1 and Lemma 4 ensure sufficient condition for Dirichlet and periodic boundary conditions, respectively. An approximate satisfaction, through one-sided discretization of derivative, is shown in Lemma 3 for Neumann boundary condition. Therefore, Theorem 1 holds. 

C.2 COMPLEXITY THEOREM

Given a resolution N , the kernel matrix K ∈ R N ×N is, in-general, dense. Therefore, for an input u 0 , the operation u = K bdy (u 0 ) using the proposed kernel corrections in Lemma 1, 3, and 4 have a cost complexity of O(N 3 ), and space complexity of O(N 2 ) through a naive implementation. We show that if an efficient implementation exists for the matrix-vector operation y = Kx, say y := K(x) which has cost complexity O(N K ) (for example, Fourier bases in Li et al. (2020a) , multiwavelets in Gupta et al. ( 2021)), then an efficient implementation exists for our kernel correction (BOON) as we show in the following sections.

C.2.1 DIRICHLET

To implement the correction operation of Lemma 1, we proceed with eq. ( 9) as follows. u = T 1 Dirichlet KT 2 Dirichlet u 0 . First, let ỹ = T 2 Dirichlet u 0 , therefore ỹ =      u 0 [0] -1 K0,0 K T 0,1:N -1 u 0 [1 : N -1] u 0 [1] . . . u 0 [N -1]      (17) =      2u 0 [0] -1 K0,0 K T 0,0:N -1 u 0 u 0 [1] . . . u 0 [N -1]      (18) =      2u 0 [0] - 1 (Ke0)[0] (Ku 0 )[0] u 0 [1] . . . u 0 [N -1]      , where e 0 = [1, 0, . . . , 0] T is the first eigenvector, therefore, K 0,0 = (Ke 0 )[0]. Now, if z = Ku 0 , then ỹ in eq. ( 19) is written as ỹ =      2u 0 [0] - 1 (Ke0)[0] z[0] u 0 [1] . . . u 0 [N -1]      . Next, let ŷ = KT 2 Dirichlet u 0 , or ŷ = Kỹ. Finally, we denote u = T 1 Dirichlet ŷ, or u =      α D (x0,t) α D (x0,0) 1 (Ke0)[0] ŷ[0] ŷ[1] . . . ŷ[N -1]      (21) =      α D (x0,t) u0[0] (Ke0)[0] ŷ[0] ŷ[1] . . . ŷ[N -1]      , Further, we observe that ŷ[0] = K T 0,0:N -1 ỹ = K 0,0 (u 0 [0] - 1 K 0,0 K T 0,1:N -1 u 0 [1 : N -1]) + K T 0,1:N -1 u 0 [1 : N -1] = K 0,0 u 0 [0]. We finally express u as u =     α D (x 0 , t) ŷ[1] . . . ŷ[N -1]     , Note: For the above kernel correction implementation, we never require an explicit knowledge of the kernel matrix K but only a matrix-vector multiplication module y = K(x) := Kx. Therefore, the above operations for Dirichet correction can be implemented with 3 kernel K calls and O(N ) space complexity. The steps are summarized in the Section 3.2 of main text as Algorithm 1. Remark: For the special case when α D (x 0 , 0) = 0, we note that β in Lemma 1 is not defined but due to eq.( 23), we can omit the division and still obtain boundary satisfied output through eq.( 24).

C.2.2 NEUMANN

The correction using Lemma 3 is implemented via eq. ( 12) as follows. u = T 1 Neumann KT 2 Neumann u 0 . Since T 2 Neumann = T 2 Dirichlet , therefore, we follow the same initial steps as outlined in Section C.2.1 to first obtain ỹ = T 2 Neumann u 0 as ỹ =      2u 0 [0] - 1 (Ke0)[0] z[0] u 0 [1] . . . u 0 [N -1]      , where, K 0,0 = (Ke 0 )[0] and z = Ku 0 , as mentioned in Section C.2.1. Next, let ŷ = Kỹ and denote u = T 1 Neumann ŷ, or u = β K0,0 -c1 c0 . . . -c N -1 c0 0 I N -1 ŷ (27) =      β (Ke0)[0] ŷ[0] -k>0 c k c0 ŷ[k] ŷ[1] . . . ŷ[N -1]      (28) =      αN(x0,t) c0 (Ke0)[0]u0[0] ŷ[0] -k>0 c k c0 ŷ[k] ŷ[1] . . . ŷ[N -1]      , where the last equality uses β from Lemma 3. Similar to Section C.2.1, we observe that ŷ[0] = K T 0,0:N -1 ỹ = K 0,0 (u 0 [0] - 1 K 0,0 K T 0,1:N -1 u 0 [1 : N -1]) + K T 0,1:N -1 u 0 [1 : N -1] = K 0,0 u 0 [0] Therefore, we finally express u as u =      αN(x0,t) c0 ŷ[0] -k>0 c k c0 ŷ[k] ŷ[1] . . . ŷ[N -1]      Note: Similar to Section C.2.1, the Neumann kernel corrections also do not require an explicit knowledge of the kernel matrix and only a matrix-vector multiplication module y = Kx := K(x). Three calls to the kernel module K are sufficient and can be implemented in O(N ) space with finite-difference coefficients c 0 ̸ = 0, c k k > 0 as an input. The steps are outlined in the Section 3.2 as Algorithm 2. Remark: For the special case when u 0 [0] = 0, we note that β in Lemma 3 is not defined. But due to eq.( 30), we can omit the division and still obtain boundary satisfied output through eq.(31).

C.2.3 PERIODIC

The periodic kernel correction is implemented using Lemma 4 and eq.( 13) as follows. u = T Periodic Ku 0 . Let ŷ = Ku 0 , therefore, u is written as u = T Periodic ŷ, or u = T Periodic ŷ (33) =   α 0 T β 0 I N -2 0 α 0 T β   ŷ (34) =       αŷ[0] + β ŷ[N -1] ŷ[1] . . . ŷ[N -2] αŷ[0] + β ŷ[N -1]       . ( ) The steps are outlined as Algorithm 3 in Section 3.2. Note that, periodic kernel correction only requires one matrix-vector multiplication which can be obtained via y = Kx := K(x).

C.3 KERNEL CORRECTION ARCHITECTURE

The neural architectures of BOON using Algorithm 1,2, and 3 for Dirichlet, Neumann, and Periodic, respectively, are shown in Figure 6 . ) . Each correction stage uses a kernel computing module K from the base neural operator, for example, FNO (Li et al., 2020a) , MWT (Gupta et al., 2021) . The multiple appearances of K within each boundary correction architecture share the same parameters θ K . The MLP layers at the beginning and end are used to upscale and downscale, respectively, the channel dimensions for better learning. See Section 4 for more details. C.4 BOUNDEDNESS THEOREM C.4.1 PERIODIC Lemma 5. For a given continuous input u 0 (x) ∈ L 2 , the output obtained by original operator T and kernel corrected T through Proposition 1 for periodic are u(x, t) and ũ(x, t), respectively. The new kernel K(x, y) is such that K(x, y) = α K(x 0 , y) + β K(x N -1 , y) x = x 0 , x 0 ≤ y ≤ x N -1 , α K(x 0 , y) + β K(x N -1 , y) x = x N -1 , x 0 ≤ y ≤ x N -1 , where α, β ∈ R + , α + β = 1. The solutions are bounded in L 2 -norm as follows. ∥u(x, t) -ũ(x, t)∥ L 2 = (1 -α) 2 + (1 -β) 2 • |u(x 0 , t) -u(x N -1 , t)|. Additionally, if α = β = 0.5, then the upper bound in ( 37) is minimized and we have, ∥u(x, t) -ũ(x, t)∥ L 2 ≤ 1 2 |u(x 0 , t) -u(x N -1 , t)|. Proof. We take the continuous input domain Ω = [x 0 , x N -1 ], the difference between the solutions is written as. Moreover, from Proposition 1, the kernels differ as ∥u(x, t) -ũ(x, t)∥ 2 L2 = Ω (u(x, t) -ũ(x, t)) 2 dx = Ω Ω K(x, K(x, y) -K(x, y) =    0, x 0 < x < x N -1 , x 0 ≤ y ≤ x N -1 , (1 -α)K(x 0 , y) -βK(x N -1 , y), x = x 0 , x 0 ≤ y ≤ x N -1 , -αK(x 0 , y) + (1 -β)K(x N -1 , y), x = x N -1 , x 0 ≤ y ≤ x N -1 . (39) Therefore, using eq. ( 39), we have ∥u(x, t) -ũ(x, t)∥ 2 L 2 = (u(x 0 , t) -ũ(x 0 , t)) 2 + (u(x N -1 , t) -ũ(x N -1 , t)) 2 = (1 -α)u(x 0 , t) -βu(x N -1 , t) 2 + -αu(x 0 , t) + (1 -β)u(x N -1 , t) 2 (a) = (1 -α) 2 (u(x 0 , t) -u(x N -1 , t)) 2 + (1 -β) 2 (u(x 0 , t) -u(x N -1 , t)) 2 = (1 -α) 2 + (1 -β) 2 (u(x 0 , t) -u(x N -1 , t)) 2 . where in (a) we use α + β = 1. Again, the bound can be further tightened as ∥u(x, t) -ũ(x, t)∥ L 2 ≤ 1 -2α + 2α 2 • |u(x 0 , t) -u(x N -1 , t)|, which attains a minimum at α = 0.5. Corollary 1. A discretized input u 0 ∈ R N through discretized kernels K and K bdy (from Lemma 4) results in u(t) and ũ(t) such that ∥u(t) -ũ(t)∥ 2 ≤ 1 2 |u[0](t) -ũ[0](t)|. C.4.2 DIRICHLET Lemma 6. For a given continuous input u 0 (x) ∈ L 2 , the output obtained by original operator T and kernel corrected T through Proposition 1 for Dirichlet are u(x, t) and ũ(x, t), respectively. We take x0,0) , the new kernel is written as C = α D (x0,t) α D ( K(x, y) = C 1(y = x 0 ) x = x 0 , x 0 ≤ y ≤ x N -1 K(x, y) o/w , The outputs are bounded as ∥u(x, t) -ũ(x, t)∥ L2 = u(x 0 , t) -α D (x 0 , t) 2 + u(x 0 , t) -K(x 0 , x 0 )u 0 (x 0 ) 2 Ω K 2 (x, x 0 )dx K 2 (x 0 , x 0 ) -1 Proof. The difference between outputs is written as ∥u(x, t) -ũ(x, t)∥ 2 L 2 = Ω (u(x, t) -ũ(x, t)) 2 dx = Ω Ω K(x, y) -K(x, y) u (y)dy 2 dx. The kernels differ as follows K(x, y) -K(x, y) =    K(x 0 , x 0 ) -C x = x 0 , y = x 0 K(x 0 , y) x = x 0 , x 0 < y ≤ x N -1 0 o/w . Using eq. ( 44), we can bound the difference between u(x 0 , t) and ũ(x 0 , t) as ∥u(x, t) -ũ(x, t)∥ 2 L 2 = Ω K(x 0 , y)u 0 (y)dy -Cu 0 (x 0 ) 2 = (u(x 0 , t) -α D (x 0 , t)) 2 . Corollary 2. A discretized input u 0 ∈ R N through discretized kernels K and K bdy (from Lemma 1) results in u(t) and ũ(t) such that ∥u(t) -ũ(t)∥ 2 = (u[0](t) -α D (x 0 , t)) 2 + (u[0](t) -K 0,0 u 0 [0]) 2 i K 2 i,0 K 2 0,0 -1 . (45) Proof. Let C = α D (x 0 , t)/α D (x 0 , 0). The difference between the kernels, K and corrected version K bdy from Lemma 1 is K i,j -K bdy i,j =      K 0,0 -C i = 0, j = 0 K i,j i = 0, 1 ≤ j ≤ N -1 1 K0,0 K i,0 K 0,j o/w . Now, estimating the difference between u(t) and ũ(t), we have u(t) -ũ(t) = Ku 0 -K bdy u 0 = (K 0,0 -C)u 0 [0] + K T 0,1:N -1 u 0 [1 : N -1] 1 K0,0 K 1:N -1,0 K T 0,1:N -1 u 0 [1 : N -1] = u[0](t) -α D (t) 1 K0,0 K 1:N -1,0 K T 0,1:N -1 u 0 [1 : N -1] , Therefore, the norm of difference is written as ∥u(t) -ũ(t)∥ 2 2 = (u[0](t) -α D (x 0 , t)) 2 + 1 K 2 0,0 ∥K 1:N -1,0 K T 0,1:N -1 u 0 ∥ 2 2 = (u[0](t) -α D (x 0 , t)) 2 + ( N -1 j=1 K 0,j u 0 [j]) 2 N -1 i=1 K 2 i,0 K 2 0,0 = (u[0](t) -α D (x 0 , t)) 2 + (u[0](t) -K 0,0 u 0 [0]) 2 N -1 i=0 K 2 i,0 K 2 0,0 -1 . Note: When the kernel is diagonally dominant, i.e., N -1 i=0 K 2 i,0 ≈ K 2 0,0 , then the overall difference between the solutions is boundary error.

C.4.3 NEUMANN

Lemma 7. A discretized input u 0 ∈ R N through discretized kernels K and K bdy (from Lemma 7) results in u(t) and ũ(t) such that ∥u(t) -ũ(t)∥ 2 ≤ f 2 1 + f 2 2 , where, where ⃗ u = u (1) , u (2) T denotes the 2D velocity vector, p the pressure and ν the viscosity. The initial condition is given as u 0 (x, y) = [U, 0] T 1(y = 1) for x, y ∈ [0, 1] 2 . We enforce Dirichlet conditions, i.e. ⃗ u(x, 1, t) = [U, 0] T for U > 0, ⃗ u(x, 0, t) = ⃗ u(0, x, t) = ⃗ u(1, y, t) = ⃗ 0. 54). We use the projection method (Chorin (1968)) on a staggered grid with N 2 grid points (x i , y j ) with i, j = 1, ..., N to compute the reference solution. The pressure field is computed by solving a Poisson equation using a second order central discretization, to enforce the incompressibility condition. For the time-stepping schemes, we use a second-order Adams-Basforth method for the non-linear term and a Crank-Nicolson method for the diffusive term (LeVeque (1992)) for N t = 30 timesteps over the interval [0, 2]. Lastly, we compute w = ∂u (2) /∂x -∂u (1) /∂y using finite differences. f 2 1 = u[0](t) - α N (x 0 , t) c 0 + 1 c 0 k>0 c k u[k](t) + k>0 c k K k,0 c 0 K 0,0 (K 0,0 u 0 [0] -u[0](t)) 2 , f 2 2 = (u[0](t) -K 0,0 u 0 [0]) 2 N -1 i=0 K 2 i,0 K 2 0,0 -1 . ! (") = #, ! ($) = 0 ! (") = 0, ! ($) = 0 ! (") = 0, ! ($) = 0 ! (") = 0, !

D.4 1D HEAT EQUATION

The one-dimensional heat equation is given as: u t -ku xx = f (x, t), x ∈ [0, 1], t ≥ 0, u 0 (x) = cos(ωπx), x ∈ [0, 1], where k > 0 denotes the conductivity, f (x, t) denotes a heat source, and ω ∈ R. We prescribe Neumann boundary conditions, i.e. u x (0, t) = 0 and u x (1, t) = U sin πt with U ∈ R, and choose f (x, t) = U π x 2 2 cos πt. The exact solution of eq. ( 55) is given as: u exact (x, t) = U x 2 2 sin(πt) - U k π (cos(πt) -1) + sin(ωπ) ωπ + ∞ n=1 a n cos(nπx)e -k(nπ) 2 t , (56) where a n = sin[(ω + n)π]/[(ω + n)π] + sin[(ω -n)π]/[(ω -n)π], if ω ̸ = n, 1, if ω = n, We construct the dataset D by sampling ω uniformly in [2.01, 3.99] with fixed k = 0.01 and U = 5 to obtain the input and output pairs, consisting of the corresponding discretizations of the initial condition and exact solution in eq. ( 56), respectively on a grid with resolution N . The temporal resolution is given by N t on the time interval [0, 2].

D.5 2D WAVE EQUATION

The two-dimensional wave equation is given as: u tt = c 2 (u xx + u yy ), x, y ∈ [0, 1] 2 , t ≥ 0, where c ∈ R ≥0 denotes the wavespeed. We impose the following Neumann boundary conditions: u x (0, y, t) = u x (1, y, t) = u y (x, 0, t) = u y (x, 1, t) = 0, for t ≥ 0. The initial conditions are given as: u 0 (x, y) = k cos(πx) cos(πy), with k ∈ R and u t (x, y, 0) = 0. The exact solution of eq. ( 58) is given as: u exact (x, t) = k cos(πx) cos(πy) cos(c √ 2πt). (59) In this section, we evaluate the resolution extension property of BOON using the generated from heat equation with Neumann boundary conditions dataset (See Appendix D.4). We train BOON on a dataset D train with data of resolution N ∈ {256, 512, 1024}. We test our model using a dataset D test and finite difference coefficients c j generated using a resolution N ∈ {1024, 2048, 4096}. Table 14 shows that on training with a lower resolution, for example, N = 1024, the prediction error at 4X higher resolution N = 4096 is 0.01251 or 1.25%. Also, learning at an even coarser resolution of N = 512, the proposed model can predict the output of data with 8X times the resolution, i.e. N = 4096, with a relative l 2 error of 2.16%. 



PINO (Li et al., 2021) uses a PDE soft constraint fromRaissi et al. (2019), which only supports the multi-step prediction case. For single step prediction, we use our adapted APINO, which only uses the boundary loss term.



Figure 1: Heat equation with physical boundary constraints. Heat flow across a conductor with an insulator and a heater at the left and right boundary, respectively. The insulator physically enforces zero heat flux (∝ ∂u ∂x ), and the heater imposes a known heat flux α N (1, t) from the right boundary. Neumann denotes this derivative-based boundary constraint (see Table1). Violation of the left boundary constraint by an existing neural operator (FNO), even when trained on data satisfying boundary constraint, suggests heat flowing across the insulator, which is not aligned with the underlying physics. Disagreement at the right boundary violates energy conservation. The proposed boundary corrected model (BOON) produces physically relevant solution along with better overall accuracy (see Section 4.2.1). optimization problem, although they could be computationally expensive, and may not guarantee model convergence to more accurate results(Xu & Darve, 2020;Krishnapriyan et al., 2021; Lu et al.,  2021b;Donti et al., 2021).

Figure 2: Operator refinement. A given operator T and its refinement T .

Figure 3: Multi-time step prediction with boundary correction: The predicted output û(x, t) for BOON (top) and FNO (bottom). Four uniformly-spaced time snapshots (from a total 25, see Section 4.1.1) are shown from left to right in the spatial domain Ω = [0, 0.5]. The color indicates absolute error at each spatial location. FNO has high boundary error which propagates to the interior, and impacts the overall solution profile. BOON (FNO with boundary correction) uses boundary values to better learn the overall output across the entire time-horizon. Critical boundary mistake is visualized in a 4x zoomed window, where BOON correctly learns the trend.

Figure 5: Operator refinement procedure. Kernel correction for Dirichlet, Neumann, and periodic in (a), (b), and (c), respectively. The purple color in (b) represents pre-computed weights for a first-order derivative approximation (see Lemma 3).

Figure6: BOON architectures. Kernel correction architectures for Dirichlet, Neumann, and periodic using Algorithm 1, 2, and 3, respectively. The line numbers of the algorithms are shown at the corresponding locations. The complete BOON uses multiple corrected kernels K bdy in concatenation along with non-linearity σ(.). Each correction stage uses a kernel computing module K from the base neural operator, for example, FNO(Li et al., 2020a), MWT(Gupta et al., 2021). The multiple appearances of K within each boundary correction architecture share the same parameters θ K . The MLP layers at the beginning and end are used to upscale and downscale, respectively, the channel dimensions for better learning. See Section 4 for more details.

Figure 7: No-slip boundary conditions for the lid-driven cavity problem and streamlines showing the direction of the fluid flow.

Figure7illustrates that at the top boundary, a tangential velocity is applied to drive the fluid flow in the cavity, and the remaining three walls are defined as no-slip boundary conditions with 0 velocity. For computational efficiency, we express the Navier-Stokes equation in terms of the scalar z component of the vorticity w = (∇ × ⃗ u) • [0, 0, 1] T in eq. (6) as done inLi  et al. (2020a). We construct the dataset D by varying the value of U in the initial condition uniformly in [1, 1.5] to generate the different samples of the initial condition and the corresponding reference solution of eq. (

Table 1 describes the mathematical definition of each boundary condition.

Boundary conditions. Examples of the most useful canonical boundary conditions, i.e.

Multi-step prediction for Stokes' with Dirichlet BC. Relative L 2 error (L 2 boundary error) for Stokes' second problem with varying viscosities ν at resolution N = 500 and M = 25.

Table2shows that our boundary constrained method results in the smallest relative L 2 errors across various values of the viscosity ν by enforcing the exact boundary values. Figure3illustrates that our BOON model corrects the solution profile near the boundary area, and results in a more accurate solution in the interior of the domain. This observation demonstrates that the satisfaction of boundary constraints is necessary to predict an accurate solution that is consistent with the underlying physics of the problem.

Table 3 represents the L 2 errors obtained by our model as well as the benchmark models. BOON model exhibits a 4X -30X improvement in accuracy, and satisfies the prescribed boundary conditions exactly across various values of the viscosity ν.

Single

the z component of the vorticity, Re the Reynolds number and U > 0. See Appendix D.3 for the generation of the reference solution, and the choice of the different parameters. We compute the multi-step prediction for M = 25 with final time t M = 2. According to Table4, BOON results in the lowest errors compared to state-of-the-art models for multiple values of the Reynolds numbers, and additionally reduces the boundary errors to absolute 0.

Multi-step prediction for Navier-Stokes with Dirichlet BC. Relative L 2 error (L 2 boundary error) for various benchmarks on the lid-driven cavity problem with varying Reynolds numbers Re at resolution N = 100 and M = 25.

Multi-step prediction for the heat equation with Neumann BC. Relative L 2 error (L 2 boundary error) for various benchmarks with varying resolutions N and M = 25.

Multi-step prediction for the wave equation with Neumann BC. Relative L 2 error (L 2 boundary error) for various benchmarks with varying resolutions N and M = 25.

See Appendices F.1-F.3. Periodic boundary condition: We provide the periodic boundary condition results for Burgers' from Li et al. (2020a) in Appendix F.2. Resolution independence for Neumann BC: In Appendix F.4, we show that BOON trained at lower resolutions for the heat equation (eq. (

Single-step prediction for the heat equation with Neumann BC. Relative L 2 error (L 2 boundary error) for various benchmarks with varying resolutions N and M = 1.F.4 PREDICTION AT HIGH RESOLUTION FOR HEAT EQUATION

Resolution invariance for Neumann BC with single-step prediction. BOON trained at lower resolutions can predict the output at higher resolutions.F.5 KERNEL CORRECTION APPLIED TO MULTI-WAVELET BASED NEURAL OPERATORIn this section, we show our proposed approach of kernel correction can also be applied to other kernel-based neural operators, e.g. the Multiwavelet-based neural operator (MWT)(Gupta et al. (2021)). We evaluate the performance of MWT and MWT-BOON on Stokes' second problem and Burgers' equation with Dirichlet boundary conditions (See Appendices D.1, D.2.1, respectively). Table1516 show that BOON operations also improve the MWT-based neural operator.

Single-step prediction for Burgers' with Dirichlet BC. Relative L 2 test error (L 2 boundary error) for Burgers' equation with varying viscosities ν at resolution N = 500 and M = 1.

Single-step prediction for Stokes' with Dirichlet BC. Relative L 2 error (L 2 boundary error) for Stokes' second problem with varying viscosities ν at resolution N = 500 and M = 1.

annex

Proof. Using β = αN(x0,t) c0 u0 [0] , the difference between the kernels, K and corrected version K bdy from Lemma 3 isTherefore, difference between u(t) and ũ(t) is written asTherefore, the norm of difference is written as

C.4.4 PROOF OF THEOREM 3

Proof. Using Lemma 6, 5, and 7, Theorem 3 holds.

D DATA GENERATION

In this section, we discuss the data generation process to form the dataset D of size n data consisting of input and output pairs. We take the input in the mapping a(x) := u 0 (x) to be the initial condition. We first discretize the initial condition a(x) on a spatial grid of resolution N , i.e. a i := a(x i ) for x i ∈ Ω, i = 0, . . . N -1. We then discretize the exact or reference solution u(x, t) on a spatio-temporal grid of size N × N t , i.e. u i,j := u(x i , t j ) for x i ∈ Ω, i = 0, . . . , N -1, and t j < t j+1 ∈ R + , j = 1, . . . , N t with fixed spatial step sizes ∆x = (x N -1x 0 )/N , and temporal step size ∆t = t Nt /N t on a time interval [0, t Nt ]. We construct the dataset using the solution at the last M time steps, that is, at times t Nt-M +1 < • • • < t Nt ∈ R + . We take different N t based on the dimensionality of the problem (See Table 7 ). We take M = 1 for single-step predictions, and M = 25 for multi-step predictions. In the following subsections, we discuss the selection over various input and output pairs, by uniformly sampling different PDE parameters in the initial condition. The one-dimensional Stokes' second problem is given by the heat equation in the y-coordinate as:with viscosity ν ≥ 0, oscillation frequency ω, k = ω/(2ν), U ≥ 0, and analytical solution:We construct the dataset D by fixing ν ∈ {0.1, 0.02, 0.005, 0.002, 0.001}, U = 2 and sampling ω uniformly in [3, 4] to obtain the input and output pairs, consisting of the corresponding discretizations of the initial condition in eq. ( 49) and exact solution in eq. ( 50), respectively. The spatial resolution is N = 500, and temporal resolution is

D.2 1D BURGERS' EQUATION

The one-dimensional viscous Burgers' equation is given as:with non-linear and convex flux function f (u) = u 2 /2, and viscosity ν ≥ 0. The diffusive term νu xx on the right hand side of eq. ( 51) is added to smooth out the sharp transitions in u(x, t). Depending on the initial condition, the solution can contain shocks and/or rarefaction waves that can be easily seen with classical Riemann problems (LeVeque (1992)). In various applications, it is critical that the numerical solution has the correct shock speed dx/dt = f ′ (u) = u. For example, consider an aircraft wing flying at a high enough speed for the flow to develop sonic shocks. The pressure distribution on the aircraft wing, which determines the lift and drag forces, is highly sensitive to the shock location.

D.2.1 DIRICHLET BOUNDARY CONDITION

We consider various Riemann problems for which the initial condition u 0 (x) is given as:where u L , u R ∈ R. The exact solution of eq. ( 51), with initial condition in eq. ( 52) is given as:where s = (u L + u R )/2 denotes the shock speed. We prescribe time-varying Dirichlet boundary conditions on both boundaries, i.e. u(0, t) = u exact (0, t) and u(1, t) = u exact (1, t), ∀t ≥ 0. We choose u L > u R leading to the formation of a shock in the solution u(x, t) of eq. ( 51). We construct the dataset D by fixing u R = 0, and varying the value of u L = w + ϵµ, where w = 0.8, ϵ = 0.01 and µ ∼ N (0, 1) to generate different initial conditions in eq. ( 52), and exact solutions in eq. ( 51) for t ∈ [0, 1.2].

D.2.2 PERIODIC BOUNDARY CONDITION

We construct the dataset D using a finite difference reference solution of Burgers' equation for every random sample u 0 (x) and t ∈ [0, 1] as done in Li et al. (2020a) .

D.3 2D NAVIER-STOKES EQUATION

We consider a two-dimensional lid-driven cavity problem, which consists of a square cavity filled with fluid. The behavior of the fluid is described by the incompressible Navier-Stokes equations given as:We construct the dataset D by fixing c = 1, and sampling k uniformly in [3, 4] to obtain the input and output pairs, consisting of the corresponding discretizations of the initial condition and exact solution in eq. ( 59), respectively on a two-dimensional uniform mesh with resolution N 2 , i.e. (x i , y j ) with i, j = 1, ..., N . The temporal resolution is given by N t on the time interval [0, 2].

E EXPERIMENTAL SETUP

In this section, we list the detailed experiment setups and parameter searches for each experiment. We incorporate time into the problem dimension for multi-step predictions. Table 8 shows the parameters values selected for BOON and FNO. For PINO, we conduct a multi-dimensional grid search, over the values {0, 0.0001, 0.001, 0.01, 0.1, 1}, to find the optimal weights attributed to the PDE, boundary and initial condition losses and report the minimum L 2 errors in all our tables. We use the default hyper-parameters for the other benchmarks in our experiments. 

F ADDITIONAL EXPERIMENTS

In this section, we include additional experimental results, which show that our proposed BOON has the lowest relative L 2 error compared to the state-of-the-art baselines, and has the lowest absolute L 2 boundary errors on several single-step (M = 1) and multi-step (M = 25) predictions.F.1 DIRICHLET BOUNDARY CONDITIONWe are interested in learning the operator T : u 0 (y) → u(y, t), t = 2, where u 0 (y) = U e -ky cos(ky) and k = ω/2ν for the one-dimensional Stokes' second problem with Dirichlet boundary conditions (See Appendix D.1). Table 9 shows the results for single-step prediction (See Table 2 for the multi-step prediction results). 

F.1.2 1D BURGERS' EQUATION

We are interested in learning the operator T : u 0 (x) → u(x, t), t ∈ [0, 1.2], where u 0 (x) is defined in eq. ( 52) for the one-dimensional viscous Burgers' equation with Dirichlet boundary conditions (See Appendix D.2.1). Table 10 shows the multi-step prediction results, where we train our model to predict solutions at the last M = 25 time steps (See We are interested in learning the operator T : u 0 (x) → u(x, t), t = 2, where u 0 (x) = cos(ωπx) for the one-dimensional heat equation with Neumann boundary conditions (See Appendix D.4). Table 13 shows the results for the single-step prediction (See Table 5 for the multi-step prediction results).

