Manuscript Offprint
arXiv:2610.22157The importance of tensor handling and implementation of physics-informed DeepONets
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Nahum Banks
Faculty of Engineering and Physical Sciences
University of Southampton
Southampton, UK
Gustavo A.M. de Almeida
Faculty of Engineering and Physical Sciences
University of Southampton
Southampton, UK
Sergio Maldonado
Faculty of Engineering and Physical Sciences
University of Southampton
Southampton, UK
October 16, 2026
Abstract
Physics-informed neural networks (PINNs) reduce or eliminate the need for large labelled datasets by enforcing governing equations during training. Physics-informed Deep Operator Networks (PI-DeepONets) extend this approach to learning solution operators, enabling rapid prediction across families of problems. Despite these advantages, we show that their application to higher-dimensional problems remains limited by the computational cost of training. To address this issue, we propose a modified PI-DeepONet architecture that reduces this cost by removing redundancy in how the Branch network processes input functions across collocation points. The proposed formulation is mathematically equivalent to the original architecture but reduces input tensor sizes and the number of Branch network evaluations. We analyse the computational complexity of both architectures and derive theoretical scaling laws for training time with respect to the number of collocation points and input functions. The proposed architecture is evaluated on 1D, 2D, and 3D linear advection problems. In all cases, it achieves comparable predictive accuracy to the original PI-DeepONet while consistently reducing training time. In 2D experiments, a maximum speed-up of is observed, with empirical training-time scaling agreeing with the predicted linear dependence on collocation points and input functions. Furthermore, training a 3D model on an NVIDIA A100 GPU is only feasible using the proposed architecture, as the original formulation exceeds memory limits. These results demonstrate that careful consideration of how PI-DeepONets are implemented can yield substantial gains, enhancing the practical performance of PI-DeepONets and enabling their application to otherwise intractable physics-informed learning problems.
Keywords Scientific machine learning, Physics-informed, Neural operator, Computational modelling
1 Introduction
Scientific Machine Learning (SciML) aims to make use of the vast amounts of prior knowledge that is often available about physical systems when training machine learning models [1, 2]. The seminal work by [3] introduced Physics-Informed Neural Networks (PINNs), which leverage automatic differentiation to compute derivatives appearing in the governing equations. PINNs encode the underlying Partial Differential
Equations (PDEs) governing a physical system, alongside the boundary and initial conditions directly into the loss function, reducing or even eliminating the requirements for labelled training data. Embedding physical constraints in the loss function greatly reduces the acceptable solution space without the need for labelled data [4]. In recent years, there has been an abundance of work applying PINNs, ranging from problems in fluid mechanics [5, 6, 7, 8, 9, 10, 11], molecular imaging [12], solid mechanics [13, 14, 15], and learning governing equations from data [16, 17, 15, 18], to cite only a few.
Despite their success, a critical limitation for the real-world application of PINNs for forward modelling is that they typically require retraining even for small changes to the domain, initial conditions, or — perhaps most importantly — boundary conditions. This stems from the fact that a conventional PINN takes only the independent variables of the PDE as input into the neural network, while the initial and boundary conditions are incorporated indirectly as soft constraints in the loss function. Consequently, the network is trained to output a solution corresponding to a fixed set of conditions, and does not naturally generalise to different initial or boundary conditions [19, 11]. As a result, the fast inference times of trained PINNs cannot be easily leveraged across different problem setups, limiting their practical utility in dynamic or rapidly changing scenarios [10].
A possible solution for this limitation is to use physics informed neural operators. Neural operators aim to learn mappings between infinite-dimensional function spaces [20]; for example, a mapping from boundary conditions to the PDE's solution across the whole spatiotemporal domain. One notable neural operator framework is the Deep Operator Network (DeepONet) [21], and its physics-informed variant, the PI-DeepONet [22].
DeepONet is grounded in the universal operator approximation theorem, which states that a neural network with a single hidden layer can approximate any non-linear continuous operator G to arbitrary accuracy [23]. The learned operator approximation maps an input function u to an output function , which can then be evaluated at collocation/query points y to produce . [21] extended this framework to use deep neural networks in their unstacked DeepONet. In a DeepONet a single Branch network encodes the input function at m sensor points , while a single Trunk network encodes the collocation/query point . For example, the input layer of the Branch network could depict a time-dependent boundary condition, whereas the Trunk network functions similarly to a conventional PINN, taking points within the spatiotemporal domain as input. The outputs of these subnetworks are then combined via a dot product to approximate the output function evaluated at the query point. This can be represented by the equation:
where, are the Branch network outputs, are the Trunk network outputs, both of which are of length s. The subnetworks require no specific architecture, allowing flexible integration of different networks like feedforward, convolutional, etc.
Owing to the simple, feedforward architecture of the subnetworks in the DeepONet, it is straightforward to integrate physics-informed techniques into DeepONet designs. A PI-DeepONet is trained using a loss function formulated in the same way as in PINNs [22]. A schematic of a PI-DeepONet can be seen in Figure 1. Derivative terms in the physics loss are calculated by automatic differentiation along the Trunk network, which encodes the collocation points of the output function space. The PI-DeepONet is especially attractive in scenarios where simulations are expensive, high-fidelity data are limited, and adherence to physical laws is critical for model reliability [24]. Such scenarios include real-time forecasting, uncertainty quantification, and digital twins. This is because the PI-DeepONet can be trained without labelled data, and can then efficiently generate predictions across a variety of problem configurations.
Overall, PI-DeepONet is one of the first physics-informed neural operator frameworks and has received substantial attention since its introduction [22], introducing a general approach that allows purely physics-informed operator learning, but broader adoption has been limited compared to data-driven neural operators. This is partly due to the extra computational burden of using automatic differentiation to calculate derivatives in the physics loss terms, which becomes more apparent for high-dimensional systems and when higher order derivatives are present. The high computational cost stems from the fact the number of Trunk evaluations scales exponentially with the number of dimensions (i.e. ), where N is the resolution of each coordinate axis and d is the number of spatiotemporal dimensions [25]. As a result, most research on PI-DeepONet to date has focused on low-dimensional problems, using hybrid approaches where physics constraints are combined with labelled data [26, 27, 28].
DeepONet

Figure 1: Schematic diagram of a physics-informed Deep Operator Network (PI-DeepONet). u is the input function discretised at m sensor points, and y is the query location for the output function of dimensionality d. Derivatives of the output with respect to the input coordinates are calculated via automatic differentiation; these operations are denoted by and , where o is the order of derivative. , , , and denote the PDE, boundary condition, initial condition, and labelled data loss terms, respectively.
Recent works have tried to overcome this hurdle by incorporating a separation-of-variables approach to help PINNs and PI-DeepONets scale to higher-dimensional problems [29, 25]. In the Separable PI-DeepONet, separate Trunk networks are employed to encode each coordinate axis (i.e. independent variable of the PDE). This PI-DeepONet structure reduces the number of Trunk network evaluations from to Nd, making it favourable for high-dimensional problems. However, this method achieves the best performance when the underlying physical system is compatible with a separation-of-variables approach, somewhat limiting the general applicability of the PI-DeepONet framework — one of its most compelling advantages. To the best of the authors' knowledge, the work by [25] is the only so far that has aimed to reduce the computational expense of training PI-DeepONets.
This work investigates an alternative Accelerated Tensor Handling (ATenH) PI-DeepONet architecture which aims to increase its computational efficiency. This architecture takes inspiration from those suggested in [30], and applies it in the physics-informed setting.
The main objectives of this paper are summarised as follows:
-
To introduce an alternative PI-DeepONet architecture, hereafter referred to as ATenH, that reduces the computational cost of training and inference.
-
To derive the theoretical computational speed-ups achieved by ATenH relative to the original PI-DeepONet architecture (Vanilla).
-
To evaluate the performance of ATenH through a set of increasingly challenging numerical experiments.
-
To demonstrate that extending PI-DeepONets to higher-dimensional problems presents significant computational challenges, and that architectural improvements such as ATenH are essential for making some problems computationally tractable.
In doing so, we demonstrate that these architectural modifications enable PI-DeepONets to be applied to higher-dimensional PDE systems at greater spatial and temporal resolutions than was previously possible. All numerical results for the Vanilla and ATenH architectures are obtained using PyTorch, demonstrating that these efficiency gains can be realised within standard, widely used, deep learning frameworks.
The remainder of this paper is structured as follows. Section 2.1 outlines the PI-DeepONet framework for operator learning and identifies important issues responsible for their limited computational performance; Sections 2.2 and 2.3 detail the different PI-DeepONet architectures investigated in this research; Section 2.4 derives some theoretical scaling laws for the different architectures; Section 3 reports training time and accuracy of the Vanilla and ATenH PI-DeepONets for linear advection problems for progressively increasing spatial dimensions; Section 4 provides a discussion of key findings, and Section 5 provides concluding remarks.
Notation
Table 1: Glossary of key variables used throughout this work.
| Symbol | Description |
|---|---|
| Number of input functions used during training | |
| Number of collocation points per input function | |
| Number of sensor (discretisation) points for input functions | |
| Dimension of the spatiotemporal domain | |
| Latent dimension (output size of Branch/Trunk networks) | |
| th input function | |
| Sensor point at which input functions are sampled | |
| Collocation point in the spatiotemporal domain | |
| Spatial coordinate | |
| Advection velocity vector | |
| Number of neurons in layer (Branch network) | |
| Number of neurons in layer (Trunk network) | |
| Number of layers in multilayer perceptron (Branch network) | |
| Number of layers in multilayer perceptron (Trunk network) | |
| Number of Branch networks in PI-DeepONet |
2.1 General PI-DeepONet framework
The DeepONet is rendered physics-informed (PI-DeepONet) by encoding the PDEs, boundary and initial conditions directly into the loss term, which can take the following form:
Here, represents a general differential operator, is a boundary operator, is the spatial coordinate, is the temporal coordinate, defines the initial condition, denotes the spatial domain, and denotes the upper limit of the temporal domain.
A composite loss function incorporates each of the conditions:
Here, enforces the differential equation by minimising the residual of at collocation points, inside the spatiotemporal domain, penalises violations of boundary conditions at boundary collocation points, and enforces the initial condition at initial-time collocation points; is an optional term that penalises the difference between the neural network's prediction and available observation data. In all of our tests, is not included, ensuring that training is labelled-data-free.
It is worth examining how input functions and collocation points are provided to the PI-DeepONet. The following architectural descriptions assume that the th function (where ) is discretised at sensor points, and the corresponding output function is evaluated at different -dimensional collocation points .
2.2 Vanilla architecture
We first introduce the original PI-DeepONet architecture from [22]. In this architecture, the data triplet (Branch and Trunk network inputs, DeepONet output) for a specific input-output function mapping is given by the following expression:
It is important to note that each input function is repeated times to match the number of collocation points it is evaluated at, enabling a pointwise inner product between the Branch and Trunk network outputs. In the most general setting, may vary across input functions, allowing each input–output mapping to be evaluated on a distinct amount of collocation points. However, in the labelled-data-free setting considered here, it is natural to use the same number of collocation points across all input functions, such that for all . As a result, the Branch network input shape is , the Trunk network input shape is , and the PI-DeepONet's final output has shape ; that is, every output function (which is a mapping of its corresponding input function) evaluated at each of its corresponding collocation points. The Vanilla architecture provides the greatest flexibility, as any number of collocation points can be used with each input function. Pseudocode for the Vanilla architecture can be seen in Algorithm 1.
Algorithm 1 Vanilla PI-DeepONet Training
Require: Input functions , collocation points
Ensure: Network outputs
1: Repeat each input function for all collocation points repeat
2: Tile collocation points for all input functions tile
3: Compute Branch network output
4: Compute Trunk network output
5: Compute final output via inner product
6: Evaluate physics-informed loss
7: Update model parameters via gradient-based optimisation
Next, we introduce an alternative architecture, ATenH (Accelerated Tensor Handling), which contains a modification that reduces the number of operations and the dataset sizes involved in a PI-DeepONet evaluation.
2.3 Accelerated Tensor Handling (ATenH) architecture
In the proposed alternative architecture, the number of Branch passes is reduced by a factor p by re-using the output of a single Branch network pass for all corresponding collocation points. In particular, the input size of the Branch network becomes and the output of the Branch network becomes , which contrasts with for the Vanilla architecture. Additionally, the input data for the Trunk network is reshaped as – rather than as in the Vanilla architecture. This formulation requires a constant amount of collocation points across all input functions, a constraint not imposed by the Vanilla version. The data triplet for a specific input-output function mapping is given by:
It is important to note that the input function is no longer repeated times, as was the case with the Vanilla architecture. As a consequence, the inner product cannot be performed in the same manner due to the subnetworks' output shapes no longer matching. Thus, the Branch network's output must be broadcasted beforehand. This operation can be performed efficiently in many Python libraries using an einsum (Einstein summation) operation. This results in the PI-DeepONet output having the desired shape , which may be trivially converted to the shape of the Vanilla architecture. Pseudocode for ATenH can be seen in Algorithm 2. A summary of the data shapes for the different architectures can be seen in Table 2.
Algorithm 2 ATenH (new proposal) PI-DeepONet Training
Require: Input functions , collocation points
Ensure: Network outputs
1: No need to repeat each input function for all collocation points, simply
2: Tile collocation points for all input functions tile()
3: Compute Branch network output
4: Compute Trunk network output
5: Compute final output via dot product over latent dimension
6: Evaluate physics-informed loss
7: Update model parameters via gradient-based optimisation
| Architecture | Branch input | Trunk input | Branch output | Trunk output | Combination method |
|---|---|---|---|---|---|
| Vanilla | Inner product | ||||
| ATenH | Inner product (with broadcasting) |
Table 2: A comparison of data processing choices in the two PI-DeepONet architectures herein presented. Here, is the number of discretisation points for the input functions (the number of sensor points), is the physical dimensionality of the collocation points, is the number of input functions, is the number of collocation points per function, and is the length of the output layer of the (Branch and Trunk) subnetworks.
2.4 Theoretical scaling laws for a full training step
We now analyse the computational cost of the different architectures over a training step, including automatic differentiation for first-order physics derivatives and gradients with respect to model parameters. The cost of computing the loss at the boundaries, where no physics derivatives are calculated (we only use Dirichlet boundary conditions), is not included, since the number of boundary collocation points is generally much less than the number of interior points used for calculating the physics loss.
2.4.1 Cost model
Throughout this section, computational cost is measured in units proportional to the number of input-weight products evaluated; i.e. scalar multiplications of the form , where and are weights and inputs, respectively. This choice highlights the dominant scaling behaviour.
For a neuron in layer l with inputs, the activation is given by:
where is the activation function and is the neuron's bias. Assuming the computational cost is dominated by the weighted sum and treating the cost of the activation function as a constant, evaluating this neuron processes weighted inputs and therefore has a cost proportional to . Bias additions and application of activation functions are pointwise scalar operations, which we therefore neglect.
A fully connected layer with inputs and neurons therefore has a cost proportional to:
Forward pass cost For an L-layer MLP, the total cost of a forward pass is
where denotes the size of the MLP's input layer.
This cost model is equivalent, up to a constant factor, to the conventional floating-point operation (FLOP) count. Each weighted input contributes one multiplication and one addition, which is commonly implemented as a fused multiply-add (FMA) instruction.
Dot product The DeepONet output is formed by the dot product
which processes s weighted inputs, where and are the Branch and Trunk network outputs, respectively. Thus, in accordance with this cost model, a single dot product has a cost proportional to s. A dot product is performed for every input functions and collocation point pairing, meaning the total cost is
Backward pass cost Reverse-mode automatic differentiation for a standard MLP involves two dominant operations per layer:
-
propagation of the error signal via matrix-vector multiplication, and
-
computation of weight gradients via matrix multiplication.
Both operations process weighted products, and a summation over inputs per layer. As a result, both operations have the same asymptotic cost when measured in units proportional to the number of weighted interactions, and each are roughly equal to the total of input-weight products performed during the forward pass. Therefore, the cost of computing gradients with respect to model parameters is approximately
This approximation neglects element-wise operations (Hadamard products and activation function derivatives), which contribute lower cost.
When automatic differentiation is used to compute physics derivatives, the computational graph is extended. The same backward-pass reasoning applies, but not every layer necessarily performs both dominant operations. In particular, when differentiating with respect to input or coordinate variables (rather than model parameters), the computation of weight gradients is not required. These distinctions are accounted for explicitly below.
2.4.2 Vanilla architecture
The Vanilla architecture uses Branch network inputs of shape and Trunk network inputs of shape .
The cost of a forward pass through the Branch network is
and for the Trunk network,
where and denote the number of neurons in the th layer of the Branch and Trunk networks, respectively, and and denote the corresponding number of layers. The Branch network has input dimension , and the Trunk network has input dimension .
The dot product contributes
Physics derivatives First derivatives treat the Branch network outputs as constants. Backpropagation therefore traverses only the Trunk network and the dot product. The cost of computing physics derivatives is
Loss gradients The loss depends on both u and . Backpropagation therefore traverses the entire computational graph. The Trunk network appears twice (forward and derivative paths), while the Branch network appears once. Applying the backward rule gives
where M is the number of Branch networks, which is relevant for problems with multiple input functions [31].
Total cost Summing all contributions yields
(17)
Factoring out the number of collocation points p, and the number of input functions, n,
Using the simplifications introduced in Section 2.5, namely , , , and , Equation 18 becomes
2.4.3 ATenH architecture
The ATenH architecture uses Branch network inputs of shape and Trunk network inputs of shape , such that
Physics derivatives and loss backpropagation follow the same structure as the Vanilla architecture, yielding
Factoring out the number of collocation points p, and the number of input functions, n,
Using the simplifications introduced in Section 2.5, namely , , , and , Equation 24 becomes
2.4.4 Theoretical Speed-up
The previous derivations allow us to estimate a theoretical speed-up factor, , between the optimised PI-DeepONet architecture (ATenH) and the original architecture (Vanilla).
With the simplifications from Section 2.5, Equation 26 becomes
The derived speed-up factor is independent of n, and reaches a constant (with all other parameters fixed) for a sufficiently large p.
2.5 Numerical tests
The numerical experiments in the following section compare the performance of the different PI-DeepONet architectures, focusing on training time and how this scales with key hyper parameters and spatial dimensionality. Since the two architectures share the same mathematical operations – the difference being exclusively in data handling – the optimal parameters should be common to both. Ensuring a fair and consistent hyperparameter selection is therefore essential, especially when assessing scaling with problem dimensionality.
Tests are based on the solution of the linear advection equation in one, two and three spatial dimensions, which provides progressively more stringent computational and memory demands, which is governed by the following PDE:
(28) where is the advected field, denotes the spatial and temporal coordinates, and is the constant advection velocity in each spatial dimension.
The problems are constrained by the following initial and boundary conditions:
where denotes the amplitude associated with the boundary , is the temporal standard deviation of the Gaussian profile, and is the standard deviation in the th spatial dimension.
The exact solutions can be expressed in a unified form using the method of characteristics. Define the backtracking times, ,
which correspond to the time at which the characteristic passing through intersects the boundary . The solution is then given by
where
and the contribution from each boundary is defined as
The solution is obtained by selecting the boundary contribution corresponding to the characteristic with the largest backtracking time.
We fix for all , , and allow to vary independently, producing a range of boundary conditions the PI-DeepONet must generalise to. Specifically, is randomly sampled from the uniform distribution yielding distinct boundary condition realisations which are fed to the Branch network during training. Although the model is therefore restricted to Gaussian boundary conditions and cannot extrapolate to qualitatively different boundary-condition families, this is appropriate for the purpose of evaluating computational performance.
The number of training epochs for each problem was determined via preliminary tests which included validation-loss monitoring for the 1D and 2D advection problems: the validation loss was computed at every epoch (without contributing to weight updates) and compared with the training loss to detect overfitting and identify the onset of loss plateauing, indicating diminishing returns from further training. The choice of epochs was based on observing no overfitting, and achieving a low loss, as seen in Fig 2. The same number of epochs was used for the Vanilla and ATenH architectures to allow for a fair comparison. 50,000 epochs, 100,000 epochs, and 200,000 epochs were selected for 1D, 2D, and 3D linear advection problems, respectively.
For all numerical experiments, collocation points are sampled independently from a uniform distribution over the computational domain. The number of collocation points was chosen so that the average spacing between randomly sampled points remained constant across dimensions, according to , where denotes the characteristic length of the domain in each dimension, and is the target average spacing between points. Accordingly, we set 10 collocation points per spatiotemporal dimension, since increasing this further (say, by a factor of 2) produced comparable accuracy while causing memory issues, thus preventing the Vanilla architecture from successfully completing beyond the 1D advection case. Failure to complete the relatively simple task of solving the 2D linear advection problem discretized with 20 points along each dimension sheds light onto the need for improved faster methods. In practice, separate collocation points
1D linear advection

2D linear advection
Figure 2: Training and validation loss profiles as a function of training epoch for 1D (left) and 2D (right) linear advection, trained using the ATenH PI-DeepONet. The training and validation loss curves remain closely aligned throughout training indicating no overfitting. The rate of decrease in the loss begins to plateau after approximately 50,000 epochs for 1D linear advection and 100,000 epochs for 2D linear advection.
must be sampled for evaluating the loss from the boundary conditions, the initial condition and physics loss. We denote their amounts as for , and , respectively. This dimensional scaling yielded higher predictive accuracy in 2D and 3D than alternative sampling strategies tested.
We use training input functions and testing input functions, consistent with prior PI-DeepONet studies (e.g. 26, 32, 25), which is sufficient to ensure generalisation. More complex problems may require larger datasets; for instance, [11] employ input functions. Each input function was discretised using sensor points per (spatiotemporal) dimension. Although we consider Gaussian inputs with varying amplitudes, this resolution reflects more general settings where inputs may contain finer-scale variations while keeping training costs manageable.
In the 2D and 3D linear advection problems there are multiple input functions, corresponding to the inflow boundaries for . Each boundary condition is parametrised by an independent amplitude , and therefore defines a distinct input function. To handle the multiple independent boundary condition inputs, we employ the Multiple-Input DeepONet (MIONet) structure [31], which uses separate Branch networks to process each input function. In all our experiments, both Branch networks adopt either the Vanilla or the ATenH architecture. The outputs from the separate Branch networks and the Trunk network are then combined via an inner product across all Branch networks and the Trunk network. As an illustrative example, in the 2D linear advection problem with spatial coordinates , there are two boundary inputs corresponding to and . For samples, each boundary condition is discretised using 50 points per spatial and temporal dimension, yielding input degrees of freedom per boundary. The boundary and initial condition losses are evaluated at collocation points each, while the interior physics loss is evaluated at collocation points.
Subnetwork depths and widths were selected via grid searches on the 1D and 2D advection problems, which can be seen in Fig 3. To avoid overcomplicating the hyperparameter space, both subnetworks used the same width and depth. In both cases, four hidden layers provided the best compromise between computational cost and accuracy. Similarly, we select widths of 40 neurons per hidden layer for 1D and 60 for 2D. A dedicated grid search for 3D advection was not performed due to the prohibitive computational cost; instead, we heuristically inferred subnetwork widths from the lower-dimensional results, setting 80 neurons for the 3D problem. All hidden and output layers were kept at the same width to avoid unnecessarily complication of the hyperparameter space. A large proportion of computational resources was not devoted to extensive hyperparameter optimisation, as the primary objective of this study is to assess the computational performance of different architectures rather than to maximise predictive accuracy. The configurations used were sufficient to reliably learn the solutions of all test problems, as demonstrated in the following section.
All models were trained in PyTorch using the Adam optimiser [33], with a learning rate of and tanh activation functions, on an NVIDIA A100 GPU.
To quantify the predictive accuracy of the architectures, we use the mean relative root mean squared error (MRRMSE), defined as


Figure 3: Grid searches exploring the depth and width of the subnetworks for (left) 1D linear advection and (right) 2D linear advection. The same width and depth was used across Branch and Trunk networks to reduce the complexity of the hyperparameter space, alongside keeping the layer widths constant across hidden layers
where denotes the exact solution associated with the th input function, is the corresponding model prediction, and denotes the discrete norm over the spatiotemporal evaluation grid. MRRMSE is only computed in regions of the domain where .
3 Results
3.1 1D Linear Advection
We first compare the PI-DeepONet architectures on the 1D linear advection problem. Ten separate Vanilla and ATenH PI-DeepONets are trained over 50,000 epochs to solve this problem in order to report means and assess sensitivity to random parameter initialisation. The solutions produced by a Vanilla and an ATenH PI-DeepONet for a representative test input function are shown in Figure 4.
Table 3 reports the mean training time and MRRMSE for the 1D linear advection problem. The two architectures exhibit comparable predictive accuracy, with closely matching MRRMSE values and similar standard deviations. The ATenH architecture reduces the mean training time by 12.1% relative to the Vanilla architecture, corresponding to a speed-up. For this case, the theoretical cost derived earlier (Eq. 27) predicts a speed-up scaling of .
3.2 2D Linear Advection
In this example, the training of Vanilla and ATenH PI-DeepONets are compared for the 2D linear advection problem. The PI-DeepONets are trained for 100,000 full-batch epochs and the average of ten different realisations is reported. An example solution produced by the ATenH implementation of a PI-DeepONet is shown in Fig. 5, demonstrating good agreement with the ground truth. The prediction of the Vanilla architecture is omitted due to its close visual similarity to the prediction of the ATenH architecture.
Table 3 also reports the mean training time and MRRMSE for linear 2D advection. The two architectures exhibit comparable predictive accuracy, with closely matching MRRMSE values and overlapping standard deviations.
3.2.1 Computational Performance and Scaling for 2D Linear Advection
Table 3 reports the mean training time for linear 2D advection. The ATenH architecture reduces the mean training time by 71.4%, corresponding to a speed-up. For this case, applying the theoretical cost

Figure 4: Representative comparison of the exact solution and the predictions of the Vanilla and ATenH PI-DeepONet architectures for a test input function in 1D linear advection. The models are trained with 10 collocation points per dimension and 500 training input functions. (a) The Vanilla PI-DeepONet's prediction. (b) The ATenH PI-DeepONet's prediction. (c) The exact solution. (d) The absolute error for the Vanilla architecture. (e) The absolute error for the ATenH architecture
derived earlier (Eq. 27) with the specified hyperparameters in Section 2.5 predicts a speed-up scaling of .
The difference in training computational time between both architectures is more pronounced in 2D relative to 1D. Therefore, we used the 2D problem to analyse the training time scaling for key hyperparameters. Fig. 6 shows the mean training time for both architectures for varying numbers of internal collocation points and input functions, respectively, along with the relative speed-up of the ATenH architecture compared to the Vanilla architecture. We use the internal, rather than total, collocation points due to the former being much greater in number than initial/boundary points in practice (specifically, ).
For both PI-DeepONet architectures, the training time increases linearly with the number of internal collocation points or input functions. These linear scalings are consistent with the theoretical cost analysis presented in Section 2.4. In particular, Equations 19 and 25 show that the computational cost of a training step is proportional to the number of collocation points and the number of input functions, leading to an overall and dependence. Moreover, the prefactors of these terms are smaller for the ATenH architecture compared to the Vanilla architecture, which explains the consistently lower training times observed for ATenH across all tested collocation point and input function counts.
Using the derived cost expressions in Equation 27 with the chosen hyperparameters yields the asymptotic theoretical speed-up factor as , while remaining independent of . The value of 7.5 is specific to the chosen values of , , , , , and .
3.3 3D Linear Advection
In this example, the training of both PI-DeepONet architectures is compared for the 3D linear advection problem. The Vanilla and ATenH PI-DeepONets are trained for 300,000 full-batch epochs and the average of five realisations is reported. Representative exact and PI-DeepONet predicted solutions are shown in Figure 7.
Table 3 shows that only the ATenH architecture successfully handled this problem, with an average training time of s (approximately 39 hours) and a mean predictive error of 5.438%. The Vanilla architecture

Figure 5: Comparison of the exact solution and the predictions of an ATenH PI-DeepONet for a representative combination of boundary inputs in 2D linear advection at two time instances. The Vanilla architecture yields qualitatively similar results and is therefore omitted for brevity. (a)–(c) Exact solution, prediction, and absolute error at t = 0.48. (d)–(f) Exact solution, prediction, and absolute error at t = 1.00

Number of internal collocation points,

Number of input functions, n
Figure 6: Mean training time of the Vanilla and ATenH architectures for 2D linear advection with (left) varying numbers of collocation points with a fixed number of input functions, and (right) varying numbers of input functions with a fixed number of collocation points. Solid lines indicate linear regression fits to the training times. Right y-axis shows the computed ratio of training times for both architectures (i.e. ATenH's speed-up factor). The two largest collocation-point data points are excluded for the Vanilla architecture due to insufficient memory (left)
failed during training due to insufficient memory, highlighting the need to review the implementation of algorithms such as DeepONet, particularly when using widely popular libraries like PyTorch. ATenh succeeds in training here, when the original implementation (Vanilla) fails, thanks to a less memory-intensive input

Figure 7: Comparison of the exact solution and the predictions of an ATenH PI-DeepONet for a representative combination of boundary inputs in 3D linear advection at and two time instances. The Vanilla architecture fails to train due to a memory error and is therefore omitted. (a)–(c) Exact solution, prediction, and absolute error at . (d)–(f) Exact solution, prediction, and absolute error at
tensor representation. Although an empirical comparison is not possible, Equation 27 predicts a theoretical speed-up factor of approximately for the ATenH architecture relative to the Vanilla architecture.
Table 3: Mean training time and MRRMSE scaling with spatial dimensionality in linear advection problems for the Vanilla and ATenH architectures. Standard deviations are not shown for the training times since they are negligible. There is no data for the Vanilla architecture in the 3D linear advection problem due to memory limitations during training. Also shown is the theoretical speed-up for ATenH when compared to the Vanilla PI-DeepONet architecture, for each problem with their corresponding hyperparameters, as specified in Section 2.5
| Spatial dimensionality | Vanilla | ATenH | Theoretical speed-up | ||
|---|---|---|---|---|---|
| Time (s) | MRRMSE (%) | Time (s) | MRRMSE (%) | ||
| 1D | 1.64 | ||||
| 2D | 7.46 | ||||
| 3D | — | — | 580 | ||
4 Discussion
Since the introduction of PI-DeepONets, research has largely focused on improving predictive accuracy and extending the range of problems to which they can be applied. Comparatively less attention has been paid to reducing the computational cost of training especially when scaling PI-DeepONets to computationally demanding, higher-dimensional problems. This work addresses this issue by introducing an architectural modification that preserves the defining advantages of PI-DeepONets – training without labelled solution data, generalisation across varying initial and boundary conditions, and flexibility across PDE classes – while substantially reducing computational cost.
In this work, we propose a modified PI-DeepONet architecture that changes how input functions are processed within the Branch network. The key observation is that, in the Vanilla implementation of PI-DeepONets, the Branch network is evaluated repeatedly at every collocation point, even though the input function itself does not change. Addressing this redundancy yields our proposed alternative (ATenH), in which the Branch network is evaluated once per input function and its encoding is reused across all collocation points.
This modification comes with the constraint that all output functions must be evaluated at the same number of collocation points. In a data-driven setting this may be restrictive because the amount of labelled training data that is available will likely vary between samples. However, DeepONets are increasingly being adopted within physics-informed frameworks (PI-DeepONets), where this limitation does not apply – collocation points can be freely generated and chosen.
By reducing the dimensionality of the Branch network input tensors, the number of operations required by this subnetwork is substantially decreased. As the Branch network encodes the input functions, which may have a high number of degrees of freedom to adequately represent boundary or initial conditions, this reduction directly lowers the dominant computational cost. Importantly, the modified architecture performs the same underlying mathematical operations as the original one and, as a result, achieves comparable predictive accuracy while significantly reducing training time. For 1D linear advection, the average training time is 314s and 276s for the Vanilla and ATenH architectures, respectively, while for 2D linear advection the corresponding times are 11800s and 3360s. Most notably, the 3D linear advection problem exposed a fundamental practical limitation of the Vanilla PI-DeepONet implementation. It exceeded the available GPU memory and could not be trained on an NVIDIA A100 GPU, whereas the ATenH architecture completed training in approximately 39 hours and achieved an average relative error of 5.44%. Equation 27 also predicts a theoretical speed-up factor of for this problem. The experimental results demonstrate that the proposed modification does more than reduce training time: by lowering memory requirements, it enables classes of higher-dimensional PI-DeepONet problems that are otherwise computationally infeasible on the same hardware. Consequently, extending PI-DeepONets to higher-dimensional problems is not simply a matter of applying the existing formulation to larger problems; careful architectural design is essential for maintaining computational tractability.
A theoretical cost model was developed to quantify the training-time scaling of both architectures with respect to the number of collocation points and the number of input functions. This model predicts linear scaling with both number of collocation points and input functions for both architectures, but with larger prefactors for the Vanilla architecture, implying steeper scaling. The empirical results for the 1D and 2D linear advection problems confirm this behaviour. The agreement between the theoretical scaling laws and the empirical measurements suggests that the observed performance gains arise primarily from differences in the computational structure of the two architectures rather than implementation-specific effects. The model also predicts an asymptotic constant speed-up factor, which is reinforced by the experimental profiles seen in Figure 6; however, the observed speed-ups are smaller than the theoretical values (1.14× vs. 1.64× in 1D, and 3.49× vs. 7.46× in 2D). Despite the quantitative discrepancies, the consistency in qualitative scaling behaviour reinforces the observation that the theoretical model captures the dominant computational trends governing both architectures. Some discrepancy is expected, as the cost model accounts only for the number of summed products in forward and backward passes and therefore neglects implementation-dependent overheads such as memory allocation, activation function evaluation, data movement, automatic differentiation graph construction, and optimiser updates.
5 Conclusion
This work demonstrates that modifying the Branch network input handling in PI-DeepONets can substantially reduce computational cost without sacrificing predictive accuracy. While the theoretical analysis captures the qualitative scaling behaviour, the empirical results quantify substantial practical gains, particularly in higher-dimensional settings.
A key outcome is that the ATenH architecture enables problems that are infeasible under the Vanilla formulation. In particular, while the Vanilla architecture failed on the 3D linear advection problem due to memory limitations, the ATenH architecture successfully completed training with a mean predictive error of 5.44%. This highlights the fact that implementation-level considerations can determine whether a problem is tractable in practice.
Overall, this work demonstrates that implementation choices can play a critical role in the practical performance of PI-DeepONets. ATenH provides significant improvements over the Vanilla PI-DeepONet formulation; however, it should not be viewed as a final design, but rather as evidence that careful consideration of how these models are implemented can yield substantial gains. This suggests that further improvements may be achievable through continued optimisation of existing architectures, particularly within widely used frameworks such as PyTorch. Furthermore, the agreement between theoretical and empirical scaling indicates that these findings are not tied to a specific hardware or software configuration, but are expected to generalise to other implementations. Future work should explore the application of similar architectural improvements to tackle problems that have so far proved intractable for PI-DeepONets.
Declarations
• Acknowledgements: The authors acknowledge the use of the IRIDIS High Performance Computing Facility, and associated support services at the University of Southampton, in the completion of this work.
• Funding: The first author was supported by UK Research and Innovation (UKRI) through a PhD studentship.
• Author contributions: NB: Conceptualisation, Methodology, Software, Visualisation, Analysis, Writing - Original Draft. GA and SM: Conceptualisation, Methodology, Supervision, Writing – Review & Editing. All authors discussed the results, contributed to the interpretation of the findings, and approved the final manuscript.
• Competing interests: The authors declare that they have no conflict of interest.
References
[1] Nathan Baker, Frank Alexander, Timo Bremer, Aric Hagberg, Yannis Kevrekidis, Habib Najm, Manish Parashar, Abani Patra, James Sethian, Stefan Wild, Karen Willcox, and Steven Lee. Workshop Report on Basic Research Needs for Scientific Machine Learning: Core Technologies for Artificial Intelligence. Technical report, USDOE Office of Science (SC), Washington, D.C. (United States), February 2019.
[2] Christopher Rackauckas, Yingbo Ma, Julius Martensen, Collin Warner, Kirill Zubov, Rohit Supekar, Dominic Skinner, Ali Ramadhan, and Alan Edelman. Universal Differential Equations for Scientific Machine Learning, November 2021.
[3] M. Raissi, P. Perdikaris, and G.E. Karniadakis. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational Physics, 378:686–707, February 2019.
[4] Klapa Antonion, Xiao Wang, Maziar Raissi, and Laurn Joshie. Machine Learning Through Physics-Informed Neural Networks: Progress and Challenges. Academic Journal of Science and Technology, 9(1):46–49, January 2024.
[5] Zhiping Mao, Ameya D. Jagtap, and George Em Karniadakis. Physics-informed neural networks for high-speed flows. Computer Methods in Applied Mechanics and Engineering, 360:112789, March 2020.
[6] Shengze Cai, Zhiping Mao, Zhicheng Wang, Minglang Yin, and George Em Karniadakis. Physics-informed neural networks (PINNs) for fluid mechanics: a review. Acta Mechanica Sinica, 37(12):1727–1738, December 2021.
[7] Taco de Wolff, Hugo Carrillo, Luis Marti, and Nayat Sanchez-Pi. Assessing Physics Informed Neural Networks In Ocean Modelling and Climate Change Applications. AI: Modeling Oceans and Climate Change Workshop at ICLR 2021, 2021.
[8] Qin Chen, Nan Wang, and Zhao Chen. Simultaneous mapping of nearshore bathymetry and waves based on physics-informed deep learning. Coastal Engineering, 183:104337, August 2023.
[9] Xin Qi, Gustavo A.M. De Almeida, and Sergio Maldonado. Physics-informed neural networks for solving flow problems modeled by the 2D Shallow Water Equations without labeled data. Journal of Hydrology, 636:131263, June 2024.
[10] James Donnelly, Alireza Daneshkhah, and Soroush Abolfathi. Physics-informed neural networks as surrogate models of hydrodynamic simulators. Science of The Total Environment, 912:168814, February 2024.
[11] Rüdiger Brecht, Elsa Cardoso-Bihlo, and Alex Bihlo. Physics-informed neural networks for tsunami inundation modeling. Journal of Computational Physics, 536, 2025.
[12] Bamidele O. Awojoyogbe and Michael O. Dada. Digital Molecular Magnetic Resonance Imaging. Series in BioEngineering. Springer Nature Singapore, Singapore, 2024.
[13] Somdatta Goswami, Cosmin Anitescu, Souvik Chakraborty, and Timon Rabczuk. Transfer learning enhanced physics informed neural network for phase-field modeling of fracture. Theoretical and Applied Fracture Mechanics, 106:102447, April 2020.
[14] Ehsan Haghighat, Danial Amini, and Ruben Juanes. Physics-informed neural network simulation of multiphase poroelasticity using stress-split sequential training. Computer Methods in Applied Mechanics and Engineering, 397:115141, July 2022.
[15] Chen Xu, Ba Trung Cao, Yong Yuan, and Günther Meschke. Transfer learning based physics-informed neural networks for solving inverse problems in engineering structures under different loading scenarios. Computer Methods in Applied Mechanics and Engineering, 405:115852, February 2023.
[16] Zhao Chen, Yang Liu, and Hao Sun. Physics-informed learning of governing equations from scarce data. Nature Communications, 12(1):6136, October 2021.
[17] Liu Yang, Xuhui Meng, and George Em Karniadakis. B-PINNs: Bayesian physics-informed neural networks for forward and inverse PDE problems with noisy data. Journal of Computational Physics, 425:109913, January 2021.
[18] Daniel R. Gurevich, Matthew R. Golden, Patrick A.K. Reinbold, and Roman O. Grigoriev. Learning fluid physics from highly turbulent data using sparse physics-informed discovery of empirical relations (SPIDER). Journal of Fluid Mechanics, 996:A25, October 2024.
[19] Lu Lu, Xuhui Meng, Zhiping Mao, and George Em Karniadakis. DeepXDE: A Deep Learning Library for Solving Differential Equations. SIAM Review, 63(1):208–228, January 2021.
[20] Nikola Kovachki, Zongyi Li, Burigede Liu, Kamyar Azizzadenesheli, Kaushik Bhattacharya, Andrew Stuart, and Anima Anandkumar. Neural Operator: Learning Maps between Function Spaces with Applications to PDEs. Journal of Machine Learning Research, 24(89):1–97, 2023.
[21] Lu Lu, Pengzhan Jin, and George Em Karniadakis. DeepONet: Learning nonlinear operators for identifying differential equations based on the universal approximation theorem of operators. Nature Machine Intelligence, 3(3):218–229, March 2021.
[22] Sifan Wang, Hanwen Wang, and Paris Perdikaris. Learning the solution operator of parametric partial differential equations with physics-informed DeepOnets. Science Advances, 7(40):eabi8605, 2021.
[23] Tianping Chen and Hong Chen. Universal approximation to nonlinear operators by neural networks with arbitrary activation functions and its application to dynamical systems. IEEE Transactions on Neural Networks, 6(4):911–917, July 1995.
[24] Kamyar Azizzadenesheli, Nikola Kovachki, Zongyi Li, Miguel Liu-Schiaffini, Jean Kossaifi, and Anima Anandkumar. Neural operators for accelerating scientific simulations and design. Nature Reviews Physics, 6(5):320–328, April 2024.
[25] Luis Mandl, Somdatta Goswami, Lena Lambers, and Tim Ricken. Separable physics-informed DeepONet: Breaking the curse of dimensionality in physics-informed machine learning. Computer Methods in Applied Mechanics and Engineering, 434:117586, February 2025.
[26] Somdatta Goswami, Aniruddha Bora, Yue Yu, and George Em Karniadakis. Physics-Informed Deep Neural Operator Networks, July 2022.
[27] Somdatta Goswami, Minglang Yin, Yue Yu, and George Em Karniadakis. A physics-informed variational DeepONet for predicting crack path in quasi-brittle materials. Computer Methods in Applied Mechanics and Engineering, 391:114587, March 2022.
[28] Mohammad Sadegh Eshaghi, Cosmin Anitescu, Manish Thombre, Yizheng Wang, Xiaoying Zhuang, and Timon Rabczuk. Variational Physics-informed Neural Operator (VINO) for solving partial differential equations. Computer Methods in Applied Mechanics and Engineering, 437:117785, March 2025.
[29] Junwoo Cho, Seungtae Nam, Hyunmo Yang, Seok-Bae Yun, Youngjoon Hong, and Eunbyung Park. Separable Physics-Informed Neural Networks. In Advances in Neural Information Processing Systems, volume 36, pages 23761–23788, 2023.
[30] Lu Lu, Xuhui Meng, Shengze Cai, Zhiping Mao, Somdatta Goswami, Zhongqiang Zhang, and George Em Karniadakis. A comprehensive and fair comparison of two neural operators (with practical extensions) based on FAIR data. Computer Methods in Applied Mechanics and Engineering, 393:114778, April 2022.
[31] Pengzhan Jin, Shuai Meng, and Lu Lu. MIONet: Learning multiple-input operators via tensor product, February 2022.
[32] Robert Keppler, Rasmus Fensholt, and Julian Koch. Learning 2D Shallow Water Equations with Physics-Informed Neural Operator Networks, 2025.
[33] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization, 2014.