Tabular, time-series, scientific, and geometric deep learning · Molecular and scientific deep learning · SPE014 · Architecture
DeepONet
DeepONet learns a mapping between functions, such as an input forcing field and a solution field, rather than a single fixed-input solution.
In CodeSplash
Running this needs images, audio, video, graphs or another data type CodeSplash doesn't load yet.
- Availability
- Needs a data type CodeSplash doesn't load yet
- Code example
- Component demo, not a trained model
- Who ran it
- CodeSplash's run and the reference's record
- CodeSplash's run
- The reference's example ran in Python and R here, and they agree.
- The reference's record
- Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.
Purpose
DeepONet learns a mapping between functions, such as an input forcing field and a solution field, rather than a single fixed-input solution. It is a neural-operator architecture intended to generalize across a family of problems.
Question / hypotheses
The operative question is whether the specified representation, symmetry, likelihood or physical constraint improves held-out behavior for this data domain. This is a learning framework, not a null-hypothesis test; losses, attention weights and predictive confidence are not statistical p-values.
Architecture / computational structure
A branch network encodes sampled values of the input function, while a trunk network encodes output query coordinates. Their featurewise inner product produces the predicted output function value at each query.
Assumptions
Fixed sensor observations can miss important input variation; generalization outside the training function distribution is not guaranteed. Operator universality is not a finite-data error certificate. Discretization, domain geometry and boundary changes need deliberate handling.
Formula / computational definition
. Here is an input function, branch sensors, an output coordinate, and p the latent expansion width.
Parameters and notation
Learned or estimated: Branch/trunk neural weights, optional output bias and encoders for function/parameter inputs.
Hyperparameters and effects: Sensor locations/count, branch/trunk architectures, latent width, output query sampling, normalization and supervised or physics-informed loss. Sensor coverage determines what input functions can be distinguished.
Fitting, fine-tuning, and adaptation
Train on independent input-function/solution pairs, splitting by functions rather than points from the same function. For transfer, adapt the branch or trunk according to which input distribution or output domain changed, starting with frozen complementary components and smaller rates. Validate both new and source function families to detect forgetting.
How to use and calibrate
Define the independent evaluation unit before preprocessing: row/entity, whole set/object, molecule/trajectory, input function or chronological forecasting origin. Keep target construction and normalization within permitted training data. Measure relative function error, derivative/physics consistency, unseen input-function generalization, sensor sensitivity and output-resolution transfer. Compare total data-generation and inference cost against numerical solvers.
Example application
Learn a surrogate mapping a family of forcing functions to PDE solutions at arbitrary query coordinates. This is a proposed use case, not a claim of validated performance on supplied real data.
Interpretation / pitfalls
Watch out
Assess model error against domain baselines and the stated assumptions. Component-level mathematical correctness does not establish paper reproduction or scientific validity. Use an independent validation design for model selection and a final held-out evaluation for claims; uncertainty and calibration require separate assessment.
Python and R code examples
Scope: Fixed branch/trunk inner-product operator approximation at several output coordinates. Use the shared setup. Dependencies: NumPy / base R. Validation: Python executed; R unexecuted.
Full-model route: Python: DeepXDE or custom branch/trunk networks. R: native torch composition or bridge. The example computes a fixed branch/trunk inner-product operator approximation at several query locations.
Python and R
The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.
Component demo, not a trained model — Fixed branch/trunk inner-product operator approximation at several output coordinates. Use the shared setup.
Shared setup for this chapter
import numpy as np
def sm(x):
x=np.asarray(x); e=np.exp(x-x.max(axis=-1,keepdims=True)); return e/e.sum(axis=-1,keepdims=True)
sensors=np.linspace(0,1,5); sampled_u=np.sin(np.pi*sensors)
W=np.arange(15.).reshape(5,3)/20; branch=np.tanh(sampled_u@W)
y=np.linspace(0,1,6); trunk=np.column_stack([np.ones_like(y),y,np.sin(np.pi*y)])
prediction=trunk@branch
print(prediction)
Component demo, not a trained model — Fixed branch/trunk inner-product operator approximation at several output coordinates. Use the shared setup.
Shared setup for this chapter
sm <- function(x) {
if(is.null(dim(x))) { e<-exp(x-max(x)); return(e/sum(e)) }
t(apply(x,1,function(v) { e<-exp(v-max(v)); e/sum(e) }))
}
sensors<-seq(0,1,length.out=5); sampled_u<-sin(pi*sensors)
W<-matrix(0:14,5,byrow=TRUE)/20; branch<-tanh(sampled_u%*%W)
y<-seq(0,1,length.out=6); trunk<-cbind(1,y,sin(pi*y))
prediction<-trunk%*%as.vector(branch); print(prediction)
Sources
- Source 1arxiv.org
From the CodeSplash reference, entry SPE014.