arXiv:2608.27256math.NAAug 2026

Manuscript Offprint

arXiv:2608.27256

Enforcing Dirichlet Boundary Conditions in Operator Learning

Andrew M. Stuart, Margaret Trautner

ANDREW M. STUART AND MARGARET TRAUTNER

ABSTRACT. Operator learning in scientific machine learning is concerned with approximation of maps between infinite-dimensional function spaces; such maps frequently arise as the solution operators of partial differential equations (PDEs). Neural operators have demonstrated broad empirical success at approximating such maps from data. However, most existing neural operator architectures enforce boundary conditions indirectly through training from data even though the boundary condition is often known exactly. Furthermore, existing modifications and approaches that do enforce boundary conditions explicitly suffer from impractical restrictions, including boundary smoothness, uniform grids, and separable, box-like domains. In this work, we propose an architecture which, independently of training, satisfies homogeneous Dirichlet boundary conditions, whilst simultaneously retaining the expressivity of existing kernel-integral neural operator architectures. This is achieved by enforcing the property that the output of each layer is contained in the span of a subset of the homogeneous Dirichlet eigenfunctions of the Laplacian on the output domain. The method requires only that the output domain be bounded with Lipschitz boundary and places no restriction on the choice of discretization, making it applicable to arbitrary mesh data and general geometries. We prove universal approximation for the resulting architecture; furthermore the approach we adopt in the analysis proves universality for a broad class of kernel-integral neural operators thereby uniting existing theory for a variety of operator learning methods. We validate the proposed method on maps defined by the coefficient to solution map in 2D PDEs: Darcy flow on a square domain and the Helmholtz equation on a circular domain. Comparisons are made with alternative methods.

1. INTRODUCTION

1.1. Motivation and Literature Review. Interest in, and the use of, neural network-based models for problems in science and engineering has exploded in the past decade. For many of these problems, the underlying phenomena are governed by partial differential equations (PDEs), which map input functions to output functions via an infinite-dimensional operator. Operator learning encompasses a branch of machine-learning models that generalize to this infinite-dimensional function

Date: August 28, 2026.

2010 Mathematics Subject Classification. Primary 68T01, 65N99, 35J05.

Key words and phrases. Operator learning, Dirichlet boundary conditions, Laplacian eigenfunctions, scientific machine learning.

The first author was supported by the Department of Defense Vannevar Bush Faculty Fellowship N00014-22-1-2790.

The second author, the majority of whose work was done whilst at Caltech, was also supported by the Department of Defense Vannevar Bush Faculty Fellowship N00014-22-1-2790 awarded to the first author. The second author is grateful to ETH Zürich Department of Mathematics for support during the completion of the manuscript.

ANDREW M. STUART AND MARGARET TRAUTNER

space setting; the models themselves are termed neural operators and early examples include DeepONet [31], PCA-Net [21, 8], random features [35] and the Fourier Neural Operator (FNO) [28]. For overviews of the field see [25, 3, 26].

Operator learning has proved empirically useful in two main cases. First, when the underlying equations of the system are known, operator learning can accelerate scientific computing by serving as a surrogate model for computationally expensive numerical simulations [37, 7, 3]. The second case is where a model is learned from data alone, as the governing equations are unknown [45, 46, 15]. However, in many settings, the reality falls in between these two cases; some information is known about the system, such as a boundary condition or conservation law [20], but the full descriptive equations remain unknown. In these cases, it is natural to want to enforce the known information without impeding the expressivity of the architecture or the ability to learn an approximator through stochastic optimization. It is this setting which largely motivates the present work: we enforce boundary conditions for neural operators that hold even without training while retaining the expressivity of the architecture. Furthermore, we develop the method in a manner that can act on arbitrary mesh data and thus on general geometries in any dimension.

Commonly used neural operator architectures rely on data to learn the boundary condition and thus enforce it only approximately. For instance, the DeepONet architecture multiplies two neural networks, one of which, the “branch” network, constructs basis functions from the input function, and the second, the “trunk” network, serves as a means to evaluate the output function on any point in the domain. Thus, the “trunk” network is largely responsible for learning the boundary condition; any point on the boundary should evaluate to match the boundary condition. However, there is no current mechanism to enforce this explicitly without fundamentally altering the expressivity of the architecture. Similarly, the FNO processes the input function through finite-dimensional neural networks acting pointwise both on the function and on a learned reweighting of the function in Fourier space via a kernel-integral operator [28]. By design, this architecture is natural for periodic boundary conditions on box-like domains with uniform grids. In practice, a positional encoding, or simply the coordinates (x1,…,xd)(x_{1},\ldots,x_{d}) of the input domain, are appended to the input function values at that point. Thus, enforcement of non-periodic boundary conditions comes only by learning a map from this input positional encoding to the boundary value from data, and once again there is currently no mechanism to enforce this explicitly. These two architectures are representative of the larger class of neural operator architectures which enforce boundary conditions in a similar manner: PCA-Net, various modifications of DeepONet [1, 19], and other architectures involving kernel-integral operators, including wavelet neural operators [42] and the Laplace neural operator [10] all require data to enforce boundary conditions through approximation.

Several lines of research have made efforts to enforce boundary conditions explicitly in both operator learning and scientific machine learning (SciML) more broadly. Most notably, work on orthogonal polynomial neural operators (OPNOs) [29] uses a Shen transform [40] of Chebyshev polynomials to replace the Fourier basis and transform in the FNO with a basis that naturally satisfies Dirichlet, von Neumann, or Robin boundary conditions. The work also develops an efficient algorithm for computing these transforms and demonstrates that the resulting architecture satisfies boundary conditions to machine precision. A drawback of this work is that it requires data to be evaluated on Chebyshev-Gauss-Lobatto points, a variant of Gaussian grids [9]. This issue is remedied by the follow-up work [30] that develops an algorithm to extend the previous method to uniform grids. Both works prove universal approximation properties of their architecture and demonstrate machine precision satisfaction of the boundary conditions in various PDE examples. However, limitations of these methods are that they may only be generalized to separable domains; i.e. domains that can naturally be viewed as a d-dimensional box with uniform or Gaussian grids as opposed to arbitrary mesh coordinate points. A similar approach also appears in recently proposed work that is capable of enforcing the boundary conditions on arbitrarily curved quadrilateral domains only [14]. These caveats prevent the methods from extending to more complex geometries, which may well be the setting when direct enforcement of the boundary condition is most valuable.

Other approaches to enforce boundary conditions in operator learning include BOON [39], which uses a physics-informed refining procedure to enforce the constraint, as well as a method based on Q-learning that proposes an algorithm that refines the boundary conditions iteratively during training [12]. In non-operator learning approaches to SciML, boundary conditions have also been encoded explicitly in graph neural networks [22] and physics-informed neural networks [6]. Furthermore, the boundary condition problem has been considered in work that predates most current approaches in SciML, including for data-driven models based on kernel learning [18] and standard feedforward neural networks [32]. The approach in this latter work involves multiplication by a known function that satisfies a zero boundary condition and has also been carried forward to more recent work on convergence of Deep Galerkin Methods (DGMs) to approximate PDEs in SciML [24, 11]. Another very recent method proposes to learn function extensions separately from the main neural operator model, which allows additional domain generality [33].

1.2. Contributions. We make the following contributions to the state-of-the-art, in relation to enforcing Dirichlet boundary conditions within operator learning, as overviewed in the preceding subsection:

(C1) We propose an operator learning methodology that automatically satisfies Dirichlet boundary conditions, independent of training, by using the Dirichlet eigenfunctions of the Laplacian as a central part of the architecture.

(C2) We prove universal approximation for a general class of nonlocal neural operators, subsuming the proposed Dirichlet eigenfunction based architecture as a special case; these approximation results may be of independent interest beyond the application to enforcing Dirichlet boundary conditions. This general class includes neural operators using only a single hidden layer and single basis function as well as neural operators that perform approximation in a particular basis of interest. Sufficient conditions on such basis functions are provided.

(C3) We implement the proposed method to approximate two representative operators defined by coefficient-to-solution maps arising in PDE problems: the Darcy flow equation on a square domain and the Helmholtz equation on a circular domain. We demonstrate the advantage of the proposed method over FNO, as well as over three possible alternative operator learning approaches that also automatically satisfy the boundary condition.

ANDREW M. STUART AND MARGARET TRAUTNER

Specifically, we introduce a new, kernel-integral based, operator learning architecture in which the output space of each layer builds an approximation in the basis of Dirichlet eigenfunctions of the Laplacian in the output domain, contribution (C1). These eigenfunctions satisfy a zero boundary condition and thus, coupled with a zero-preserving activation function and an appropriate fixed bias, create an architecture that automatically satisfies the Dirichlet boundary condition of a PDE. In fact, replacing the final hidden layer of any kernel-integral neural operator, including FNO, with this Laplacian eigenfunction layer achieves the desired boundary condition without training. In addition, as a departure from previous work that automatically satisfies the boundary condition, this approach is applicable to complex geometries and domains; we assume only that the domain is bounded, with Lipschitz boundary. Furthermore, the method requires no restriction on choice of discretization or grid; it may be used on functions defined on arbitrary meshes. Beyond the choice of the eigenfunctions of the Laplacian as the basis elements, we establish universal approximation for a much broader class of potential basis functions, contribution (C2). The approach we adopt suggests practical extensions of the method to other classical basis choices, including various finite element bases. Numerical results demonstrate the practicality and competitiveness of the proposed approach, contribution (C3).

The remainder of the paper is organized as follows. In Section 2, we define the nonlocal neural operator, as well as the Dirichlet-boundary condition enforcing variant, and detail the assumptions on our choice of basis. In Section 3, we present the main theorems as well as critical lemmas supporting the conclusions; we defer the detailed proofs of the lemmas to the appendix. In Section 4, we showcase the results of various numerical experiments supporting the practical application of the proposed Laplacian eigenfunction layer. We make concluding remarks in Section 5. The more technical proofs, and some useful supplementary lemmas, are contained in the appendix. Appendix A contains lemmas describing finite-dimensional feedforward neural networks; Appendix B contains proofs that various familiar application settings satisfy the assumptions of our main theorems; Appendices C and D contain the proofs of the two main lemmas underlying our main results, Theorem 3.4 and Theorem 3.5; and Appendix E contains key results on the behavior of the eigenfunctions of the Laplacian.

References (19)