TL;DR
Lu, Jin and Karniadakis (arXiv 2019; the journal version appeared in Nature Machine Intelligence in 2021) ask whether a neural network can learn an operator, a rule that takes a whole function and returns another function, rather than a single input-output function. They propose the deep operator network, or DeepONet, which reads the input function at a fixed set of sensor points and evaluates the output at any location the user asks for. On simple ordinary and partial differential equations it reaches small test errors from modest datasets, and the paper measures how those errors scale with data, sensors and horizon.
Builds on: Universal Approximation Theorem, Feedforward Neural Network · Leads to: Neural Operator
Why it mattered
Many engineering questions are operator questions. Given a load, a forcing term or an initial state, what is the resulting field? Solving a partial differential equation numerically for every new input is slow, and in design loops (aerodynamics, heat transfer, groundwater, structural analysis) that cost is paid again and again. A model that maps a new input function to the solution in a single forward pass can serve as a surrogate for the solver.
DeepONet made that mapping practical with a small, general architecture, and it was released in the DeepXDE scientific machine learning library, which the authors used for all their experiments. It became one of the reference points for the family of methods known as neural operators. Its main lasting contribution is the idea of splitting the network into two parts that encode the input function and the query location separately.
The problem
Universal approximation says that a network with one hidden layer can approximate any continuous nonlinear operator to any accuracy, if it is wide enough. That is an existence statement. It says nothing about how many parameters or data points are needed, or whether gradient descent finds the right network.
The practical difficulty is representation. An input function is infinite-dimensional, so the network must see it through finitely many values. Convolutional networks suit images on regular grids, and recurrent networks suit sequences, but an operator's input may be sampled at scattered points and its output may be needed at any point. The problem is to find an architecture that takes a function sampled at fixed sensors and a query location, and combines them in a way that is easy to train and generalises from few examples.
How it works
The data and the model follow one pipeline. Each input function is sampled at the same m sensor locations, the sampled vector goes through one network, a query location goes through a second network, and the two outputs are combined into a number.
flowchart LR A["Input function u sampled at m fixed sensors"] --> B["Branch network"] C["Query location y"] --> D["Trunk network"] B --> E["p branch outputs b"] D --> F["p trunk outputs t"] E --> G["Combine: dot product plus bias"] F --> G G --> H["Approximate output G of u at y"]
Each stage, traced on a tiny instance:
-
Sample the input function. Take the input and read its values at three sensors, , , . These three numbers, in fixed order, are the branch input. The sensor positions must be the same for every training example, otherwise position 2 in the vector would mean different things in different samples.
-
Run the branch network. It maps the three sensor values to numbers , the coefficients of the output. The paper uses p at least around 10 in practice; take p = 2 here, with branch output b = (0.5, −1).
-
Run the trunk network on the query. The trunk network takes the location y where the output is wanted, and returns numbers . These are the basis functions evaluated at . Say the trunk output at this y is t = (2, 0.5).
-
Combine. Multiply the matching pairs and add them: 0.5 times 2 plus (−1) times 0.5 is 1 − 0.5, which is 0.5. This is the predicted output G(u)(y). A bias term can be added at the end; here it is zero.
-
Change the query, keep the input. Move y to a new point, run only the trunk again, and take the same branch output. The same input function now gives a new output value at no extra cost for the branch. This is why one trained model can answer queries at any location.
-
Train on triplets. A training example is one triplet: the sensor values of u, a location y, and the true value G(u)(y) from a numerical solver. The network's prediction is compared with the true value, and both branch and trunk weights are updated by gradient descent.
-
Check the output on unseen inputs. The paper's test is whether the trained network predicts the solution for input functions it has not seen, including some that lie outside the training distribution.
The math
A DeepONet with p outputs is the pair of networks (branch, trunk) that together approximate an operator G. For an input function sampled at sensors to , and a query location , the output is a sum over the p paired products of branch and trunk outputs, plus an optional bias.
Step 4 in symbols: the sensor vector and the two networks
Write the sensor values as a vector, . The branch network maps it to . The trunk network maps the query location to . The approximation is
In the tiny example, , and , so the sum is .
The paper's original Theorem 1 is written with the same structure, a sum over p products of a branch term and a trunk term, and a sufficiently wide single hidden layer in each. The paper's point is that this form can be realised by two networks trained together, and that the trunk can be deeper than one layer while the branch remains a plain feedforward network. The trunk network also applies an activation function in its last layer, so its outputs are the last-layer activations, as the authors note.
Step 5 in symbols: the antiderivative example
The simplest operator the paper learns is the antiderivative. Let and
For the input the output is . A DeepONet trained on this operator should, for every sensor vector of ones, return at every query point. The linear problem therefore checks whether the architecture can express a simple operator at all, before nonlinearity enters.
Step 6 in symbols: the training loss
With N triplets , the loss that the paper trains on is the mean squared error
where is the DeepONet output. The paper uses the Adam optimizer with learning rate 0.001 and runs until the training error has converged.
Step 7 in symbols: how the error scales
The experiments fit simple laws to the errors. Writing m for the number of sensors, T for the prediction horizon and x for the number of training points, the reported fits are
These are empirical fits to the paper's runs, not theorems. The paper also gives an analytic bound on the sensor count, of the form that must be large enough to make a constant times small, where measures how well sensors represent functions in the input space. The authors state that this bound is loose compared with the measured behaviour.
Results
The numbers below are those stated in the text. Figures show more than the text does.
- Linear antiderivative. The best fully connected network tested reaches a test error of about , with depth 2, width 2560 and learning rate 0.001. The paper's main claim for this case is that DeepONets have much smaller generalisation error than the fully connected baseline, and that unstacked DeepONets with a bias give the best test error.
- Nonlinear ODE, . Across ten runs with different data and initialisation, the test MSE of unstacked DeepONets is almost linear in the training MSE, . The tight line means the generalisation error is predictable from the training error, though the test error is about ten times the training error. The paper shows predictions on three out-of-distribution input signals.
- Gravity pendulum with a force. For k = 1, T = 1 and length scale l = 0.2, the error falls like until about 10 sensors, after which more sensors barely help. Predicting to T = 5 needs about 25 sensors. The fits and describe how the sensor requirement grows with horizon and with roughness of the input.
- Error versus horizon. The error grows like , so long-time prediction is much harder.
- Dataset size. For fewer than about training points the test error falls exponentially, as . For larger datasets it falls as , while the generalisation error falls as .
- Diffusion-reaction PDE. With diffusion coefficient D = 0.01 and reaction rate k = 0.01, solved on a 100 by 100 grid, a DeepONet trained on 100 input functions and 1000 random points per solution reaches a test error of about . On average each grid location then has about 10 training points.
- Convergence rates. The abstract reports polynomial rates from half order to fourth order, and the authors say they observe exponential convergence in the training set size, which they describe as the first such observation in deep learning. The text does not explain the exponential coefficient, and the authors call for further study.
The limits matter as much as the numbers. The examples are one-dimensional ODEs and a single two-dimensional PDE with synthetic inputs from Gaussian random fields and Chebyshev polynomials. The sub-networks are plain fully connected networks with modest width, and no architecture search is reported. The training targets come from numerical solvers, so the model can be no more accurate than they are. The theoretical sensor bound and the fitted come from different analyses. The exponential rate has no full explanation in the text.
Reading guide
Read the paper in this order, with the prerequisites it needs in each part.
- 1 Introduction. The motivation and Theorem 1, the operator version of universal approximation. Needs Universal Approximation Theorem. The introduction also contrasts DeepONet with image-to-image CNN approaches; Convolutional Neural Network is the comparison.
- 2.1 DeepONets. The architecture: branch, trunk, stacked and unstacked versions. Needs Feedforward Neural Network and Activation Function. Read Figure 1C and 1D together.
- 2.2 Data generation. Gaussian random fields and Chebyshev polynomials as input spaces, and numerical solvers for the reference outputs. Needs Gaussian Random Field and Finite Difference Method.
- 3 Number of sensors. The ODE system and the sensor bound in Theorem 2. Needs Ordinary Differential Equation. You can skip the proof in Appendix B on a first reading.
- 4.1 A simple 1D dynamic system. The antiderivative and the nonlinear ODE, with training curves. Needs Mean Squared Error and Stochastic Gradient Descent.
- 4.2 Gravity pendulum. The main scaling experiments: sensors, horizon, dataset size and input space.
- 4.3 Diffusion-reaction system. The PDE case, which needs Partial Differential Equation. Read it with Figure 9.
- 5 Conclusion and the appendices. Appendix C gives the Gaussian random field bound. Read it only if you need the sensor argument.
Check yourself
QuestionIn a DeepONet, what does the branch network receive, what does the trunk network receive, and how are their outputs combined?Show answer
The branch network receives the input function sampled at the fixed sensor locations, as one vector. The trunk network receives the query location y. Both output p numbers. The predicted output is the sum of the p products of matching branch and trunk values, plus an optional bias.
QuestionA branch output is (1, 2, −1) and the trunk output at some query point is (0.5, −0.5, 3). With no bias, what is the predicted output?Show answer
The sum of matching products is 1 times 0.5, plus 2 times (−0.5), plus (−1) times 3, which is 0.5 − 1 − 3 = −3.5.
QuestionWhy does DeepONet need the sensor locations to be the same for every input function?Show answer
The branch network has a fixed input vector of length m, and each position in it is trained to mean one particular sensor value. If the sensors moved between samples, the same input position would carry different information, and the branch network could not learn a consistent map from input functions to coefficients.
QuestionYou want a surrogate for a heat-flow solver that takes a source function and returns the temperature at any position and time. Which parts of the paper's design apply, and what would you check first?Show answer
Sample each source at a fixed set of sensors for the branch network, and feed position and time to the trunk network. Train on triplets from the solver. Check the sensor count first, because the paper finds that the required number of sensors grows with the prediction horizon and with how rough the inputs are. A longer time window or rougher sources need more sensors.
Sources
- Lu, Jin and Karniadakis, DeepONet: Learning nonlinear operators for identifying differential equations based on the universal approximation theorem of operators, arXiv:1910.03193: https://arxiv.org/abs/1910.03193
- Lu, Jin, Pang, Zhang and Karniadakis, Learning nonlinear operators via DeepONet based on the universal approximation theorem of operators, Nature Machine Intelligence (2021): https://doi.org/10.1038/s42256-021-00302-5