WorksMathematics
In-Context Learning for Multi-Fidelity Multiscale Model Closure and Cross-Operator Out-Of-Distribution Generalization
Abstract
Multi-fidelity learning uses low-fidelity information (coarse-scale PDE models) together with limited high-fidelity data (fine-scale solutions) to obtain high-accuracy PDE solutions. It is a data-driven approach to downscale reduced-order models to solve PDEs efficiently and accurately. Standard multi-fidelity learning focuses on one operator or PDE; given a new PDE, retraining using additional coarse-fine solution pairs may be required, which is costly. In this work, we propose an in-context multi-fidelity learning framework for learning multiple multi-fidelity operators with one shared model. The model is trained using paired low- and high-fidelity examples as demonstrations from multiple operators, together with a new coarse-scale solution query, to predict the corresponding fine-scale solution. Once trained, given a new PDE operator, a few (fewer than five) coarse-fine demonstration pairs, and a low-cost coarse query, the model predicts the corresponding fine-scale solution without fine-tuning. When the target operator appears in the training dataset but has a different prediction goal, such as predicting beyond the training time interval, no additional demonstrations are needed. Instead, the model uses training coarse-fine pairs from that PDE and information from other training operators. Testing then only requires generating a low-cost coarse-scale solution query, without fine-tuning. Notably, our smallest model contains only 255,364 trainable parameters, corresponding to approximately 456 parameters per training operator for 560 operators.
Introduction
Operator learning [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] aims to approximate mappings between function spaces and has become an important approach for learning solution operators of differential equations. Early studies
@references#+#+#+#+ established universal approximation results for continuous functionals and nonlinear operators using neural networks [17, 18, 19]. Subsequent work has provided further theoretical understanding of neural operators, including the convergence of the operator approximation error with respect to network size [20, 21, 22, 23, 24, 25]. Operator learning has also been extended to multi-operator learning [19], which goes beyond the setting of learning a single operator. Extending single-operator approaches to multiple operators can become costly when separate models or repeated training are required for different operators. To address this limitation, recent multi-operator learning approaches [8, 26, 27, 28, 29, 30, 31] use shared neural architectures to learn multiple operators within a single model, allowing information to be shared across related operator-learning tasks [26, 27]. A key advantage of such approaches is the ability to generalize to previously unseen operators at test time when these operators are drawn from a distribution similar to that of the training operators.
Multi-fidelity learning [10, 32, 33, 34, 35, 36] combines models with different levels of accuracy and computational cost. Low-fidelity solutions are typically cheaper to compute, while high-fidelity solutions are more accurate but more expensive. The goal is to use low-fidelity information together with limited high-fidelity data to improve prediction accuracy while reducing computational cost. A variety of approaches have been developed to model the relation between low- and high-fidelity data, including statistical, nonlinear, and neural-network-based methods.
Unlike model reduction [37, 38, 39, 40] or multiscale methods [41, 42, 43, 44, 45, 46], which compute a coarse-scale approximation to the fine-scale model, multi-fidelity learning downscales the coarse-scale solution to the fine scale using data. Hence, multi-fidelity learning provides a data-driven approach to computing fine-scale model solutions by improving the accuracy of solutions obtained from low-cost coarse-scale numerical simulations. However, data are not easy to obtain, so the goal is to train a model that can be reused for new PDEs or for the same PDE under different settings, such as times beyond the training range.
Multi-fidelity learning has also been combined with neural operators. Existing approaches include residual or discrepancy learning [32, 47], composite multi-fidelity operator models [33], and direct coarse-to-fine (multiscale downscaling) mappings [34]. These methods show that low-fidelity solutions can be used effectively to reduce the need for expensive high-fidelity data. However, many multi-fidelity operator-learning methods are developed for a specific coarse-to-fine relation or a single operator-learning task, making extension to multiple operators costly. Beyond this limitation, out-of-distribution (OOD) prediction presents another challenge, in which the testing query lies outside the input range covered by the training data for the target PDE. The coarse-to-fine relation learned within the training range may not remain accurate in a new setting, such as later times or different initial conditions.
In-context learning (ICL) [29, 48, 49, 50, 51, 52, 53, 54, 55, 56] uses a small number of input–output examples as demonstrations to help the model identify the relation relevant to a new query while keeping the model parameters fixed. Popularized by large language models [48], ICL has also been studied for learning functions from input–output examples [49]. More recently, this idea has been extended to operator learning. ICON [29] uses prompted solution pairs to identify the target operator during inference, allowing one shared model to handle multiple operators without retraining or fine-tuning. Subsequent work has studied generalization to unseen PDE operators [56]. VICON [28] extends in-context operator learning to dense spatial data in multi-physics problems using a vision-based architecture and also considers flexible temporal mappings with varying timestep strides. FMint [57] applies in-context learning to numerical correction (differences) for ODEs. It uses a large model with approximately 15.8 million trainable parameters, and its reported OOD evaluations involve additional fine-tuning on trajectories from the target system. The ability to use demonstrations to identify the relation relevant to a new query while keeping the model parameters fixed makes ICL well suited to multi-fidelity learning. In this setting, the shared model learns a family of coarse-to-fine relations, while the demonstrations provide the context needed to identify the relation relevant to the target operator. Once trained, the same model can adapt to different operators through the supplied demonstrations without parameter updates. This provides a natural way to combine multi-fidelity learning with multi-operator generalization. Although ICL is often associated with large-scale models, the multi-fidelity setting can support a more compact model because the coarse and fine solutions within each demonstration share similar structure.
In this work, we propose an in-context multi-fidelity learning framework for learning a family of coarse-to-fine operators with one shared model. Once trained, the model parameters remain fixed, and no fine-tuning is required at inference. The framework generalizes to unseen operators drawn from the training distribution and also supports operator-parameter OOD extrapolation beyond the training range. It further handles OOD query regimes, including initial-condition and temporal ranges not represented for the target operators during training. At inference, the cost is already low because only a few demonstrations are needed and no parameter updates are required. More importantly, we further reduce the inference cost for OOD tasks through cross-operator transfer, where OOD information learned from a group of operators with more training data improves prediction for another group with limited training data that has not observed the same OOD regime. In this setting, demonstrations used during training are reused for the new OOD queries. As a result, a new query requires only the coarse solution generated by the low-fidelity solver, with no new fine solution or fine-tuning. This is particularly advantageous in multi-fidelity settings, where low-fidelity simulations are inexpensive while high-fidelity simulations are costly.
The framework is also computationally compact. Our smallest model contains 255,364 trainable parameters, corresponding to approximately 456 parameters per training operator for 560 operators, and the other models used in this work are also relatively small-scale models. The model can accommodate different numbers of demonstrations without changing its architecture or parameter count, and we study the effect of both the number and consistency of the supplied demonstrations. Beyond standard same-time coarse-to-fine mappings, we also consider temporally shifted mappings of the form . We further extend the framework to a two-dimensional multi-fidelity problem and compare it with existing multi-fidelity operator-learning methods. Together, these experiments show that the shared-model framework can adapt across unseen operators and multiple OOD regimes through in-context demonstrations, including cross-operator transfer to regimes not observed for the target operators during training.
Methodology
We consider an in-context multi-fidelity learning framework for a family of operators within a given PDE application. Rather than training a separate model for each operator, we use a single model with shared trainable parameters across the operator family.
For each prediction, a small number of paired coarse–fine demonstrations from the target operator are provided together with a new coarse query. These demonstrations provide the context for the multi-fidelity operator associated with the target operator. We arrange the demonstrations and query into an ordered sequence and treat the task as a next-row prediction problem. The sequence is processed by a Transformer, and the fine solution corresponding to the query is predicted as the missing next row. The number of demonstrations can vary, while the shared trainable parameters remain fixed during inference. An overview of the framework is shown in Figure 1.

Figure 1. Overview of the proposed in-context multi-fidelity learning framework. Paired coarse–fine demonstrations from a target operator and a coarse query are arranged into an ordered sequence. A Transformer predicts the missing fine-solution row corresponding to the query through a one-row shift, while the same shared trainable parameters are used across the operator family.
Multi-fidelity operator formulation
Let denote the -th input function space with domain and let denote the corresponding space of output functions defined on . Here, and denote the dimensions of the input and output domains, respectively. We consider operators , . For a given input , the corresponding output function is .
In the multi-fidelity setting, is the exact solution operator of the PDEs. For example, it maps the initial condition to the solution of the PDEs . The solution operator can be evaluated using numerical solvers at low- and high-fidelity levels. The two levels differ in numerical accuracy and computational cost, for example through differences in discretization resolution, orders of accuracy, or other solver settings. At the low-fidelity level, we denote the coarse-scale numerical solution operator as , which produces the coarse solution , where denotes the corresponding coarse-solution output space. At the high-fidelity level, we denote the fine-scale numerical solution operator as , which produces the fine solution , where denotes the corresponding fine-solution output space.
Let denote the space of application-specific information associated with inputs in . For each input , the map provides the auxiliary information used in the coarse-to-fine prediction. We define the corresponding multi-fidelity operator and write for . The role and sequence representation of are described in § 2.2, and the application-specific forms are summarized in Appendix § 6.1.4. In this work, we consider the family of multi-fidelity operators .
Standard multi-fidelity operator learning considers a single multi-fidelity operator over a specified training input range for one PDE solution operator . For a fixed PDE problem, the trained model predicts fine solutions from coarse solutions. When the PDE problem changes (different ), additional re-training or fine-tuning with additional data is needed to learn the new multi-fidelity operator, limiting its use across different PDE problems. In this work, we learn multiple multi-fidelity operators with one shared model and address OOD prediction without test-time fine-tuning.
To describe the multi-operator learning and OOD prediction settings, let and denote the index sets of the multi-fidelity operators used for training and held out for testing, respectively, with and . For each , let denote the input range from which training inputs are sampled.
We consider three different extrapolation settings, including prediction outside the training parameter range. Notably, standard single-operator multi-fidelity learning may require costly retraining using additional data. All three settings are tested in § 3. (1) For unseen-operator prediction, the testing multi-fidelity operator has index and is not used during training. (2) For query OOD prediction, the target multi-fidelity operator has index , but the query input lies outside . (3) For operator-parameter OOD prediction, the target multi-fidelity operator is held out during training, and the parameters defining the corresponding solution operator lie outside the training parameter ranges.
In-context learning framework
We formulate an in-context learning framework for the family of multi-fidelity operators , where indexes the exact PDE solution operator and its corresponding multi-fidelity operator . The goal is to learn multiple multi-fidelity operators using one shared model. A paired coarse–fine demonstration consists of the coarse and fine solutions generated from the same input . These demonstrations provide the context needed to identify the target multi-fidelity operator. Once trained, the shared model can be applied across different target multi-fidelity operators while its parameters remain fixed, with no retraining or fine-tuning at inference. We describe the training and testing procedures separately. See Figure 1 for the demonstration.
Training. For a target multi-fidelity operator , let denote the number of demonstrations and let be their distinct sample indices in sequence order. During training, the target operator has index , and the demonstration and query inputs are selected from . The notation and sequence construction in (1) also apply at inference.
For , the demonstration input generates the coarse–fine pair , where and . For example, the input may be an initial condition for a terminal-time solution or a time associated with a solution trajectory. Evaluating the coarse and fine solution operators at this input provides the paired solutions used as a demonstration.
For a new query with sample index and input , we denote the corresponding solutions as and . For example, the query input may be a different initial condition or another time along the trajectory, evaluated using the same solution operators as the demonstrations. The fine query solution is withheld from the model input and is used as the supervision target during training.
Before constructing the model input, we define the discretization of the coarse and fine solutions. To simplify notation, we omit the operator and input indices in this paragraph. Let and denote the coarse and fine solutions on the original coarse and fine solver grids, with and spatial locations, respectively, and physical components. and denote the corresponding numbers of entries. For a scalar-valued coarse solution, and . Within each numerical application, let denote the number of spatial locations on the common learning grid. We interpolate and from the respective solver grids onto the common learning grid, obtaining , where denotes the number of entries in one solution row on the common learning grid. Each solution row contains the values of all physical components at the spatial locations. The coarse and fine rows use the same ordering of spatial locations and physical components. We use bold symbols for the corresponding finite-dimensional solution rows. For , , and .
The application-specific information is included when needed to improve the conditioning of the coarse-to-fine prediction. For a sample with index , let denote this information, so that . Suppose is represented by auxiliary sequence rows for each sample. We denote the finite-dimensional auxiliary-row representations by bold symbols. After any required interpolation or broadcasting to the common row length, for . Each auxiliary row and each coarse or fine solution row corresponds to one token. We use as shorthand for the ordered list of auxiliary rows . In the sequence in (1), each expands into these row vectors before concatenation. The application-specific auxiliary-row quantities are summarized in Table 12 in Appendix A.1.4.
| Application | Auxiliary-row quantities | Max. length | ||
| Scalar conservation laws | 1 | 17 | ||
| KS | 2 | 23 | ||
| KdV | 1 | 17 | ||
| Ice sheet, reference | 3 | 29 | ||
| Ice sheet, multi-operator | 2 | 23 |
Table 12. Application-specific input-sequence structure. The maximum length corresponds to demonstrations. For KdV, the demonstrated fine row is evaluated at the shifted target time .
The demonstrations and the query are arranged into a single ordered sequence ,
where is the vector whose transpose forms the th row of the sequence, and is the total number of valid input rows. Each demonstration contributes rows, and the query contributes rows because the fine query solution is withheld. Different selections of demonstrations and query produce different input sequences even when and are unchanged.
For an example with demonstrations, the final valid input row is the coarse query, , and the fine query target is treated as the missing next row, . The prediction follows the one-row shift
The model predicts the next row , corresponding to the fine query solution .
The prediction in (2) is a single autoregressive-style next-row prediction. is not fed back into the sequence for any further prediction, so no recursive error propagation is introduced.
Let denote the ICL model with trainable parameters . We write the ICL prediction as
The trainable parameters are shared across the family and remain fixed when the trained model is applied to a target multi-fidelity operator at inference. The demonstrations in provide context for the target multi-fidelity operator without updating .
The number of demonstrations need not be fixed, so the input sequence can have different lengths . This motivates the use of a Transformer, which is a natural choice for handling variable-length input sequences without changing the number of trainable model parameters. Further details are provided in Appendix § 6.1.1.
Let denote the set of demonstration counts used by the model. For each training example, is sampled independently from , and the input sequence is paired with the fine query target .
We denote the training objective by . Its definition is provided in Appendix § 6.1.2. The training procedure is summarized in Algorithm 1.
Algorithm 1 Training of the in-context multi-fidelity model. See Figure 1 for the demonstration.
Input: Paired training data, training operator-index set , demonstration-count set , number of updates , and shared model
Output: Trained shared parameters
Initialize
for do
Sample and
Select distinct demonstrations and one additional query from the training data for
Construct according to (1), using the demonstrations, auxiliary information, and coarse query
Predict the fine query from the final valid input position
Compute the loss using and the true fine query
Update using the optimizer
end for
return
Testing. During testing, we consider unseen-operator generalization and cross-operator OOD transfer. For unseen-operator generalization, the target multi-fidelity operator has index , and few-shot demonstrations are provided for this held-out operator. Notably, an OOD scenario can still arise even when the testing operator has been seen during training. For example, maps initial conditions to solutions at times during training, while testing considers solutions at times , so that the new query satisfies . In this case, few-shot demonstrations (initial conditions and the corresponding solutions in the OOD time range) may not be provided. Since learning can be improved by using information from other operators , with and , whose training data cover , we refer to this setting as cross-operator OOD transfer. In this case, the demonstrations associated with the target multi-fidelity operator are reused from training. No new fine query solution or fine-tuning is required. Only the new coarse query and the application-specific query rows are needed in addition to the reused demonstrations. At inference, demonstrations and a new coarse query for the target multi-fidelity operator are arranged into . The trained model predicts the next row, , while the shared parameters remain fixed. The data-generation cost at inference for (1) consists of computing a few coarse–fine pairs as few-shot demonstrations and the new coarse query , which is inexpensive to obtain using a low-cost numerical solver. Notably, new few-shot demonstrations are not needed in the cross-operator OOD transfer setting described in § 2.2, since the demonstrations for the target operator are reused from training. Additional implementation details, including the model architecture, variable-length batching, training loss, data normalization, and application-specific training settings, are provided in Appendices § 6.§ 1–§ 6.5.
Numerical examples
In this section, we apply our in-context multi-fidelity framework to four PDE applications to evaluate the generalization ability of the proposed framework across different PDE settings. The main question is whether, given only a few paired coarse–fine demonstrations, the model can predict the corresponding fine solution for a new coarse query without any test-time parameter updates. In particular, we are interested in cross-operator generalization, out-of-distribution (OOD) transfer, and the role of the demonstration context.
We use the notation defined in § 2.1 and § 2.2. For readability, the operator index is omitted from solution rows in this section unless needed. The coordinate and other application-specific inputs are represented by the auxiliary rows defined in § 2.2.
Prediction accuracy is evaluated using the relative error and the coefficient of determination , where . For the ice-sheet benchmark, we also report the mean-squared error , where the sum includes all spatial locations and physical components. All metrics are computed separately for each test case. The reported MSE is averaged over the test cases and is computed in physical velocity units, giving units of . The low-fidelity baseline error is computed by replacing with the corresponding coarse solution . Unless otherwise stated, results are reported as mean standard deviation over the complete set of test cases.
Throughout this section, one test case refers to one prediction. The model receives coarse–fine demonstrations and one coarse query from the same target operator, and predicts the corresponding fine solution . The true fine solution is used only to evaluate the prediction error. Thus, one operator can provide multiple test cases through different queries.
When the target operator is unseen during training, demonstrations from that new operator are required to provide its coarse–fine information to the model. These demonstrations can then be used repeatedly for multiple queries from the same operator. In contrast, when the operator remains unchanged and only the query enters an OOD regime, the previously available demonstrations from that operator can be reused, and only a new coarse query needs to be generated.
We first consider parametric scalar conservation laws, where we define eight PDE families and study generalization to unseen operators, operator-parameter OOD extrapolation, and query-side OOD shifts in the initial condition. For the initial-condition OOD task, no new fine solution is required at inference time; only a new coarse query needs to be computed. We next consider the Kuramoto–Sivashinsky equation, where we study generalization to unseen operators, operator-parameter OOD extrapolation, and cross-operator temporal OOD transfer. We then consider the Korteweg–de Vries equation, where the model learns a temporally shifted coarse-to-fine mapping with a prescribed time offset , and is evaluated on operators that are unseen during training. Finally, we consider two-dimensional ice-sheet flow. We first compare ICL with established multi-fidelity DeepONet baselines under a reference multiresolution data budget, and then extend the problem to multiple ice-sheet operators with varying rheology and basal friction to evaluate in-context adaptation to unseen operators.
Parametric scalar conservation laws
PDE setting. We first consider the parametric scalar conservation law examples studied in [27],
with periodic boundary conditions. We consider four flux functions, , each in viscous and inviscid form, giving eight PDE families.
Operator setting. For each PDE family, an operator is defined by fixing and . We consider for all families. For the viscous families, , while for the inviscid families.
For a fixed operator, different initial conditions generate different solution samples. At the terminal time , each demonstration is a pair generated from the same initial condition using the low- and high-fidelity numerical solvers, respectively. For each prediction, the model is given demonstrations from the same operator together with a query generated from a different initial condition, and predicts without any parameter updates.
Detailed initial-condition construction, data-generation, numerical-solver, and training settings are provided in Appendix A.2.
Generalization to unseen operators
We first examine whether the model can generalize to operators that are unseen during training. For each unseen testing operator, the model is provided with a few demonstrations from that operator and predicts the fine solution for a new query from the same operator.
Training: For each of the eight PDE families, 70 training operators are generated by sampling . For the viscous families, is also sampled, while for the inviscid families. Each training example is constructed from a single operator. The demonstrations and query correspond to different initial conditions from that operator, and the number of demonstrations is varied dynamically from to during training.
Testing: For each PDE family, 30 unseen testing operators are generated independently from the same and ranges used for training. For each test case, five demonstrations are selected from one unseen testing operator, and a query is generated from a different initial condition of that operator. The model predicts without any parameter updates.
Results. We evaluate the model on 1,024 fixed test cases from the unseen testing operators across all eight PDE families. Each test case corresponds to one query prediction from an unseen testing operator and uses five demonstrations from that same operator. The same 1,024 test cases are used in the subsequent scaling and context comparisons. The results are summarized in Table 1.
| Flux | Regime | Test cases | (%) | (%) | |
| Overall | — | 1024 | 39.33 ± 26.41 | 3.66 ± 2.15 | 0.9945 ± 0.0044 |
| Viscous | 111 | 28.77 ± 19.61 | 1.97 ± 0.98 | 0.9945 ± 0.0047 | |
| Inviscid | 120 | 14.25 ± 4.73 | 4.66 ± 1.63 | 0.9896 ± 0.0043 | |
| Viscous | 132 | 48.09 ± 20.74 | 2.16 ± 0.95 | 0.9953 ± 0.0048 | |
| Inviscid | 114 | 13.52 ± 2.11 | 5.66 ± 1.14 | 0.9914 ± 0.0031 | |
| Viscous | 139 | 51.58 ± 17.90 | 2.19 ± 0.87 | 0.9968 ± 0.0025 | |
| Inviscid | 134 | 24.86 ± 4.68 | 5.18 ± 1.16 | 0.9942 ± 0.0028 | |
| Viscous | 139 | 82.44 ± 21.85 | 1.64 ± 0.78 | 0.9983 ± 0.0016 | |
| Inviscid | 135 | 40.91 ± 10.89 | 5.98 ± 2.05 | 0.9950 ± 0.0035 |
Table 1. Unseen-operator prediction across the eight scalar conservation-law families using five same-operator coarse–fine demonstrations. The table reports the coarse–fine relative discrepancy, the ICL prediction error, and .
Representative predictions are shown in Figure 2.

Figure 2. Representative predictions for unseen testing scalar conservation-law operators. The left and right columns show viscous and inviscid linear-flux examples, respectively. The top row shows the query initial condition in black and the demonstration initial conditions as faded curves. The bottom row shows the solutions at . Faded curves show the coarse–fine demonstrations. The blue dashed curve shows the coarse query, the orange curve shows the fine target, and the green curve shows the ICL prediction. The relative prediction error is reported above each solution panel.
Results analysis. Across the complete 1,024-case test set, the mean coarse–fine discrepancy is 39.33%, whereas the mean ICL prediction error is only 3.66%. This corresponds to a reduction of approximately 90.7% relative to the low-fidelity error, with a mean coefficient of determination of .
Notably, the model contains only 255,364 trainable parameters while using 560 operators for training. On average, this corresponds to only about 456 parameters per training operator. This highlights the strong parameter efficiency of the shared ICL model and its ability to handle multiple operators within a single model without increasing the model size.
The improvement is observed across all eight PDE families despite substantial variation in the underlying fidelity gap. For example, the viscous linear-flux family has a mean coarse–fine error of 82.44% but a prediction error of only 1.64%. The inviscid families are generally more challenging, with the largest mean prediction error, 5.98%, occurring for the inviscid linear-flux family. These results show that a small set of in-context coarse–fine demonstrations is sufficient for the trained model to adapt to previously unseen operators.
Scaling and context analysis. We next examine how prediction changes with the number and consistency of the demonstrations. The same trained model and fixed test queries are used in all evaluations. The results are summarized in Figure 3.

Figure 3. Context scaling and intervention results for the scalar conservation laws. Panel (a) shows the family-wise mean prediction error normalized by its value with one demonstration. Panel (b) compares the mean prediction errors under correct, wrong-operator, and wrong- contexts. The wrong-operator context replaces all demonstration pairs with pairs from another unseen operator in the same PDE family. The wrong- context retains the demonstrated coarse solutions and replaces their fine counterparts. All evaluations use the same trained model and fixed test queries without parameter updates.
Increasing the number of demonstrations gives a modest but consistent improvement. The overall mean prediction error decreases from 3.88% at to 3.77%, 3.71%, 3.68%, and 3.66% for to , respectively. All eight PDE families have lower error at than at .
The prediction also depends strongly on the demonstration content. With the correct five demonstrations, the mean error is 3.66%. Replacing all demonstrations with those from another unseen testing operator in the same PDE family increases the error to 11.52%, while replacing only their fine solutions with those from another unseen testing operator in the same PDE family increases it to 11.28%. Both interventions increase the error by more than a factor of three, showing that the model uses the operator-specific coarse–fine information provided by the demonstrations.
Out-of-distribution generalization in the operator parameter
We next examine whether the model can generalize to unseen operators whose values lie outside the range used during training. In § 3.1.1, the unseen testing operators are generated using the base range . Here, the testing operators are instead generated from the lower-OOD range and the upper-OOD range .
Training: The training setting is the same as in § 3.1.1. For each of the eight PDE families, 70 training operators are generated by sampling . For the viscous families, is also sampled, while for the inviscid families. Each training example is constructed from a single operator. The demonstrations and query correspond to different initial conditions from that operator, and the number of demonstrations is varied dynamically from to during training.
Testing: The OOD testing operators are generated using values outside the training range. We consider a lower-OOD region, , and an upper-OOD region, . For the viscous families, is sampled as in training, while for the inviscid families.
For each OOD test case, five demonstrations are selected from one unseen OOD testing operator, and a query is generated from another initial condition of that operator. The model predicts without any parameter updates.
Results. Table 2 compares unseen testing operators from the base range with unseen testing operators from the lower- and upper-OOD regions. Each test case corresponds to one query prediction from an unseen testing operator in the corresponding range.
| Setting | range | Test cases | (%) | (%) | |
| Base range | 1024 | ||||
| Lower OOD | 498 | ||||
| Upper OOD | 526 | ||||
| Overall OOD | 1024 |
Table 2. Operator-parameter OOD prediction for . The base-range results correspond to unseen operators with , while the lower- and upper-OOD results use operators outside this range. Each prediction uses five same-operator coarse–fine demonstrations. The table reports the coarse–fine relative discrepancy, the ICL prediction error, and , with results shown as mean standard deviation.
Results analysis. Across the complete OOD test set, the mean coarse–fine discrepancy is 38.55%, while the mean ICL prediction error is 4.39%. This corresponds to a reduction of approximately 88.6% relative to the low-fidelity error, with a mean of 0.9919. Compared with the 3.66% prediction error for unseen testing operators in the base range, the error increases only moderately when moves outside the range used during training.
The lower-OOD region is more challenging, with a mean prediction error of 5.01%, while the upper-OOD region gives 3.80%. The coarse–fine discrepancy is 45.52% in the lower-OOD region and 31.95% in the upper-OOD region. Overall, the model maintains accurate prediction for unseen operators even when the operator parameter lies outside the range used during training.
Cross-operator initial-condition-amplitude out-of-distribution transfer
In this section, we study whether OOD information can transfer across operators. We consider two groups of operators, Group A and Group B. The base-amplitude range is , while the near- and farther-OOD amplitude ranges are and , respectively.
Importantly, this OOD task does not require any new high-fidelity simulation at test time. The model reuses the previously available base-amplitude coarse–fine demonstrations from the same Group B operator and requires only a new coarse query in the OOD amplitude ranges. The corresponding fine solution is used only as ground truth for numerical evaluation. The training and evaluation allocation is summarized in Table 3.
| Training | Evaluation | |||
| Group A | Group B | Group A | Group B | |
| Base amplitude | ✓ | ✓ | – | – |
| Near-OOD amplitude | ✓ | – | – | ✓ |
| Farther-OOD amplitude | ✓ | – | – | ✓ |
Table 3. Training and evaluation setup for the initial-condition amplitude OOD experiment. Group A is trained on base-, near-OOD, and farther-OOD amplitudes, while Group B is trained only on the base-amplitude range. Group B is then evaluated on the near- and farther-OOD amplitude ranges using its base-amplitude coarse–fine pairs as demonstrations.
Training: For each of the eight PDE families, we use 200 operators, with 100 assigned to Group A and 100 to Group B, giving 1,600 operators in total. The operators are generated using the same and ranges as in § 3.1.1. We compare two training settings while keeping the remaining training details the same.
For the base-amplitude-only model, both Group A and Group B are trained only on the base-amplitude range .
For the mixed-amplitude model, Group A is trained on the base-amplitude range , the near-OOD range , and the farther-OOD range . Group B is still trained only on the base-amplitude range and receives no OOD-amplitude data during training.
Testing: Both models are evaluated on the same 800 Group B operators across the eight PDE families. For each operator, all 100 initial-condition samples are used to construct near- and farther-OOD queries, giving 80,000 test cases in each OOD regime. For each paired query, only the initial-condition amplitude changes to either the near- or farther-OOD range.
For each Group B query, five base-amplitude coarse–fine pairs from the same operator are reused as demonstrations, with the query sample excluded from the demonstration set. The base-amplitude-only and mixed-amplitude models are evaluated using exactly the same demonstrations for each matched query. A new coarse solution is then provided from either the near- or farther-OOD amplitude range. Representative matched initial conditions are shown in Figure 4.

Figure 4. Representative initial conditions for the amplitude-OOD experiment. The left and right panels show narrow and wide profiles, respectively. Each profile is shown at base, near-OOD, and farther-OOD amplitudes in blue, orange, and green, respectively.
Results. Table 4 reports the Group B test results for the near- and farther-OOD amplitude queries. We compare two models. The base-amplitude-only model is trained using only base-amplitude data from both Group A and Group B. The mixed-amplitude model is trained using base-, near-OOD, and farther-OOD amplitude data from Group A and base-amplitude data from Group B.
| Query regime | range | Test cases | LF baseline | Base-amplitude-only model | Mixed-amplitude model | Base-amplitude-only model | Mixed-amplitude model |
| Near OOD | 80,000 | ||||||
| Farther OOD | 80,000 |
Table 4. Group B amplitude-OOD prediction results. Each row contains 80,000 queries from 800 Group B operators. The base-amplitude-only model is trained with base-amplitude data from both groups, while the mixed-amplitude model additionally uses near- and farther-OOD amplitude data from Group A. Both models use the same previously available Group B base-amplitude demonstrations when predicting the Group B OOD queries.
Results analysis. For the Group B near-OOD queries, the low-fidelity baseline has a mean error of 31.66%, while the base-amplitude-only model reduces the error to 3.88%. The mixed-amplitude model further reduces the error to 3.57%, corresponding to a relative improvement of approximately 7.8% over the base-amplitude-only model. For the farther-OOD queries, the corresponding errors are 30.95%, 4.18%, and 3.65%, giving a larger relative improvement of approximately 12.6%. The mean also increases from 0.9919 to 0.9932 for near OOD and from 0.9901 to 0.9925 for farther OOD.
Since the Group B near- and farther-OOD data are not used during training, the improvement shows that OOD amplitude information learned from Group A can transfer to Group B and improve its OOD prediction.
Importantly, the model parameter count remains unchanged at 255,364 while using 1,600 operators for training. On average, this corresponds to only about 160 parameters per training operator, showing that a large number of operators can be handled without increasing the model size.
In practice, the amount and coverage of available data can vary across operators. Cross-operator transfer allows the OOD information learned from the first group to help predict the missing OOD regime for the second group.
Kuramoto–Sivashinsky equation
PDE setting. We next consider the Kuramoto–Sivashinsky (KS) equation
with periodic boundary conditions.
Operator setting. We define one operator by fixing the parameter . For the base-range training and unseen-operator evaluation, we use . For each operator, 20 independent solution trajectories are generated from different initial conditions, and multiple solution samples are obtained by evaluating each trajectory at different times.
In this setting, each demonstration is a pair evaluated at the same time and generated using the low- and high-fidelity numerical solvers, respectively. The multi-fidelity operator therefore maps to at the same physical time.
For each prediction, the model is given demonstrations from the same operator and the same trajectory at different times together with a query evaluated at another time of that trajectory. The spatial coordinate and time associated with each demonstration and query are also provided to the model, while the operator parameter is not provided explicitly. The model predicts at the same query time without any parameter updates.
For the unseen-operator experiment in § 3.2.1, only solution states from the late-time interval are used to construct the demonstrations and queries. Detailed initial-condition construction, data-generation, numerical-solver, and training settings are provided in Appendix § 6.§ 3.
Generalization to unseen operators
We examine whether the model can generalize to KS operators that are unseen during training. The demonstrations and queries are constructed from individual operator trajectories using distinct time points in .
Training: We generate 200 KS operators with distributed over . Of these, 140 operators are used for training and the remaining 60 operators are reserved as unseen testing operators. Each training example is constructed from a single training operator and a single trajectory of that operator. The demonstrations and query are taken from distinct eligible time points of the same trajectory, and the number of demonstrations is varied dynamically from to during training.
Testing: The final evaluation uses 960 fixed test cases from the 60 unseen testing operators, with 16 cases constructed for each operator. For each test case, five coarse–fine demonstrations and one coarse query are selected from a single trajectory of one unseen testing operator using distinct time points in . The model predicts without any parameter updates.
Results. We evaluate the model on the 960 fixed test cases from the 60 unseen testing KS operators. Each test case corresponds to one query prediction and uses five demonstrations from the same operator and the same trajectory. The results are summarized in Table 5.
| Setting | Test cases | (%) | (%) | |
| Unseen operators | 960 | 29.23 ± 35.25 | 4.39 ± 5.96 | 0.994 |
Table 5. Prediction accuracy on 60 unseen testing KS operators using five same-operator, same-trajectory coarse–fine demonstrations. The coarse query, fine target, and ICL prediction correspond to the same query time. is reported as the mean over the 960 fixed test cases.
Results analysis. Across the 960 fixed test cases, the mean relative discrepancy between the coarse query and the fine target is 29.23%, whereas the mean ICL prediction error is reduced to 4.39%. This corresponds to an 84.98% reduction in the mean relative error. The corresponding mean coefficient of determination is .
The median prediction error is 2.62%, and the 90th-percentile prediction error is 8.86%. These results show that the shared ICL model generalizes effectively to KS operators not observed during training.
Because the operator parameter is not provided explicitly to the model, prediction on an unseen operator relies on the coarse–fine information supplied through the in-context demonstrations together with the explicitly provided spatial and temporal information.
Figure 5 shows representative low-, average-, and high-error predictions selected from the unseen-operator test set. Although the coarse and fine states are evaluated at the same physical time, the coarse query may exhibit noticeable phase, amplitude, and local-shape differences relative to the high-fidelity target. The model uses the supplied coarse–fine demonstrations to correct these discrepancies and recover the high-fidelity solution at the query time.

Figure 5. Representative predictions for unseen testing KS operators. The panels show low-, average-, and high-error examples. Faded curves show the coarse–fine demonstrations. The blue dashed curve shows the coarse query, the orange curve shows the fine target, and the green curve shows the ICL prediction. The relative prediction error is reported above each panel.
Scaling and context analysis. We next examine how the model responds to both the amount and the consistency of the supplied context. The same trained model and the same 960 fixed test queries are used throughout, with no parameter updates. For the scaling study, the demonstrations are nested so that the context with demonstrations consists of the first demonstrations of the corresponding five-demonstration test case.
The mean prediction error decreases monotonically from 9.37% at to 6.63%, 5.51%, 4.85%, and 4.39% for , respectively. After normalization by the corresponding error, the mean errors are 0.707, 0.588, 0.517, and 0.469 for , respectively. Thus, increasing the number of valid demonstrations produces a systematic improvement in prediction accuracy.
The prediction also depends strongly on the consistency of the demonstration content. With the correct five demonstrations, the mean prediction error is 4.39%. Replacing the demonstrations by coherent coarse–fine pairs from another unseen operator increases the mean error to 52.10%. Retaining the original demonstrated coarse states while replacing only the demonstrated fine states increases the mean error further to 127.28%.
Figure 6 summarizes the scaling and context-intervention results.

Figure 6. Context scaling and intervention results for KS. Panel (a) shows the mean prediction error normalized by its value with one demonstration. Panel (b) compares the mean prediction errors under correct, wrong-operator, and wrong- contexts. The wrong-operator context replaces all demonstration pairs with pairs from another unseen operator. The wrong- context retains the demonstrated coarse solutions and replaces their fine counterparts. All evaluations use the same trained model and fixed test queries without parameter updates.
These intervention results show that the model does not simply rely on the query state alone. Instead, the prediction depends strongly on the coarse–fine relations encoded by the demonstrations and on their dynamic consistency with the current query trajectory. In particular, the wrong- intervention directly disrupts the demonstrated coarse-to-fine correspondence and produces the largest degradation in prediction accuracy. Together with the monotonic scaling behavior, these results provide evidence that the model actively uses the in-context demonstrations when constructing the high-fidelity prediction.
Out-of-distribution generalization in the operator parameter
We next examine whether the model can generalize to unseen KS operators whose values lie outside the range used during training. The base range is , and the OOD operators use .
Training: The training setting is the same as in Section 3.2.1. The model is trained using 140 operators with , with 20 trajectories per operator. Each training example is constructed from one operator and one trajectory, and the number of demonstrations is varied dynamically from to . No OOD operator is used for training, normalization, or checkpoint selection.
Testing: We generate 50 unseen OOD operators with . The evaluation contains 512 fixed test cases. For each prediction, the five coarse–fine demonstrations and the query come from the same OOD operator and the same trajectory. The trained model predicts the corresponding fine solution without any parameter updates.
Results. Table 6 compares the base-range unseen operators with the operator-parameter OOD operators.
| Setting | range | Test cases | (%) | (%) | |
| Base range | 960 | ||||
| OOD | 512 |
Table 6. Operator-parameter OOD prediction for the KS equation. The base-range results correspond to unseen operators with , while the OOD results use unseen operators with . Each OOD prediction uses five same-operator, same-trajectory coarse–fine demonstrations.
Results analysis. For , the mean ICL prediction error is 4.63%, compared with 4.39% for unseen operators in the base range. The mean coefficient of determination remains high at . The model therefore maintains prediction accuracy close to the base-range level when the operator parameter moves beyond the range used during training.
Cross-operator temporal out-of-distribution transfer
We next examine whether temporal OOD information learned from one group of KS operators can improve prediction for another group that has not observed the same OOD temporal regime. We consider two temporal OOD intervals, and . For each interval, we compare two matched models: a base-time-only model and a mixed-time model.
For each experiment, the 200 KS operators are divided into two fixed groups of 100 operators, denoted Group A and Group B. Each operator contains 20 independent trajectories. Both experiments use 100 base-time points from to . Each temporal OOD set contains 50 time points: in the first experiment and in the second.
For the base-time-only model, both Group A and Group B are trained using only the base-time points. For the mixed-time model, Group A is trained using both its 100 base-time points and 50 OOD time points, while Group B is trained using only its 100 base-time points. Thus, temporal OOD information is introduced only through Group A.
As in the standard KS experiment, each training example is constructed from one operator and one trajectory, and the demonstrations and query are selected from distinct eligible time points of that trajectory. During training, the number of demonstrations is varied dynamically from to . For the mixed-time model, the Group A eligible time pool contains 100 base-time and 50 OOD points, so one third of its eligible time points lie in the OOD interval. Group B OOD states are not used during training.
Testing: Both models are evaluated on the same Group B temporal OOD queries. For each of the 100 Group B operators, all 20 trajectories and all 50 OOD query times are evaluated, giving paired test cases for each temporal OOD interval.
Each test case uses five coarse–fine demonstrations from the base-time interval of the same Group B operator and the same trajectory as the query. The two models are evaluated using the same base-time demonstration context for each paired query. A coarse query from the OOD interval is then provided to the model, while the corresponding fine solution is used only for evaluation.
The Group A/Group B allocation for the mixed-time setting is summarized in Table 7. The base-time-only model uses the same operator partition, with both groups trained only on the base-time set.
| Training | Evaluation | |||
| Group A | Group B | Group A | Group B | |
| Base time<br> | ✓ | ✓ | – | – |
| Temporal OOD<br> or<br> | ✓ | – | – | ✓ |
Table 7. Data allocation for each mixed-time KS temporal OOD experiment. Group A is trained on both base-time and temporal OOD data, while Group B is trained only on base-time data. Group B is then evaluated at temporal OOD times using its base-time coarse–fine demonstrations as context.
Results. Table 8 reports the Group B temporal OOD results. The base-time-only model is trained using only base-time data from both groups, while the mixed-time model additionally uses temporal OOD data from Group A.
| Query regime | range | Test cases | Relative error (%) | ||||
| LF baseline<br> | Base-time-only model<br> | Mixed-time model<br> | Base-time-only model | Mixed-time model | |||
| Temporal OOD | 100,000 | ||||||
| Temporal OOD | 100,000 |
Table 8. Cross-operator temporal OOD prediction on 100 Group B KS operators for two evaluation intervals. Each row contains 100,000 paired test cases from 20 trajectories and 50 OOD query times per operator. The base-time-only model is trained on base-time data from Groups A and B, while the mixed-time model additionally uses temporal OOD data from Group A. Group B OOD states are not used during training. Each prediction uses five same-operator, same-trajectory base-time coarse–fine demonstrations. Relative errors are reported as mean standard deviation, and is reported as the mean.
Results analysis. For query times in , the low-fidelity baseline has a mean relative error of 28.77%. The mixed-time model reduces the mean prediction error from 2.90% for the base-time-only model to 2.70%, a relative improvement of 6.72%. The paired win rate is 57.71%, and the mean increases from 0.9982 to 0.9984.
For query times in , the low-fidelity baseline has a mean relative error of 30.52%. The mixed-time model reduces the mean prediction error from 6.62% to 5.08%, a relative improvement of 23.33%. The paired win rate is 69.62%, and the mean increases from 0.9865 to 0.9919. Both experiments show a transfer benefit, with a larger improvement in the experiment covering later query times.
These results show cross-operator temporal transfer in the KS setting. Temporal OOD information introduced only through Group A improves prediction for Group B, even though Group B is trained only on base-time states. The previously available Group B base-time coarse–fine demonstrations can therefore be reused for OOD prediction, so a new temporal OOD query requires only its coarse solution as model input.
Korteweg–de Vries equation
PDE setting. We next consider the Korteweg–de Vries (KdV) equation
with periodic boundary conditions.
Operator setting. We define one operator by fixing the parameter triple , where , , and . For each operator, the governing equation generates an entire solution trajectory, and multiple solution samples are obtained by evaluating this trajectory at different times.
In this setting, each demonstration is a pair with . The multi-fidelity operator in this experiment maps a coarse state at time to a fine state at the later time . In the notation of § 2.1, the input is the source time: returns the coarse state at , while returns the corresponding fine target at for this temporally shifted task.
For each prediction, the model is given demonstrations from the same operator at different source times together with a query evaluated at another source time of that operator. The model predicts the corresponding fine solution at without any parameter updates.
Detailed initial-condition construction, data-generation, numerical-solver, and training settings are provided in Appendix § 6.§ 4.
Generalization to unseen operators
We examine whether the model can generalize to KdV operators that are unseen during training. The demonstrations and queries are constructed from the operator trajectories using source times in , with the corresponding fine targets evaluated at .
Training: We generate 140 training operators by independently sampling , , and . Each training example is constructed from a single operator. The demonstrations and query are taken from different source times of that operator, and the number of demonstrations is varied dynamically from to during training.
Testing: We use 60 additional operators as unseen testing operators, generated independently from the same parameter ranges. These operators are not used during training. For each test case, five demonstrations are selected from one unseen testing operator, and a coarse query is taken from another source time of that operator. The model predicts the corresponding fine solution at without any parameter updates.
Results. We evaluate the model on 960 fixed test cases from the 60 unseen testing KdV operators, with 16 query cases per operator. Each prediction uses five demonstrations from the same testing operator. The same 960 fixed test cases are used in the subsequent scaling and context comparisons.
For the following results, denotes the coarse query at source time , while denotes the corresponding fine target at . The results are summarized in Table 9.
| Setting | Test cases | (%) | (%) | |
| Unseen operators | 960 |
Table 9. Prediction accuracy on 60 unseen testing KdV operators using five same-operator coarse–fine demonstrations. Here denotes the coarse query at source time , while and denote the fine target and ICL prediction at , respectively.
Representative prediction results are shown in Figure 7.

Figure 7. Representative predictions for unseen testing KdV operators. The panels show low-, average-, and high-error examples. Faded curves show the coarse–fine demonstrations. The blue dashed curve shows the coarse query, the orange curve shows the fine target, and the green curve shows the ICL prediction. The relative prediction error is reported above each panel. The coarse query is evaluated at , while the fine target and prediction correspond to .
Results analysis. Across the 960 fixed test cases, the mean relative discrepancy between the coarse query at and the fine target at is 20.18%, whereas the mean ICL prediction error is 3.33%. This discrepancy reflects both the difference in fidelity and the change in the solution over time. The ICL prediction error is approximately 83.5% lower than this discrepancy, with a mean coefficient of determination of .
The median prediction error is 2.34%, and the 90th-percentile prediction error is 6.97%. These results show that the shared ICL model generalizes effectively to KdV operators not observed during training.
Figure 7 shows three representative predictions from unseen testing operators, each including the five same-operator demonstrations, coarse query, fine target, and ICL prediction.
Scaling and context analysis. We next examine how the model responds to both the amount and the consistency of the supplied context. The same trained model and the same 960 fixed test query cases are used throughout, with no parameter updates. For the scaling study, the demonstrations are nested so that the context with demonstrations consists of the first demonstrations of the corresponding five-demonstration test case. The results are shown together in Figure 8.

Figure 8. Context scaling and intervention results for KdV. Panel (a) shows the mean prediction error normalized by its value with one demonstration. Panel (b) compares the mean prediction errors under correct, wrong-operator, and wrong- contexts. The wrong-operator context replaces all demonstration pairs with pairs from another unseen operator. The wrong- context retains the demonstrated coarse solutions and replaces their fine counterparts. All evaluations use the same trained model and fixed test queries without parameter updates.
Increasing the number of valid demonstrations produces a modest improvement. The overall mean prediction error decreases from at to , , , and for , respectively.
After normalization by the corresponding error, the mean errors are , , , and for , respectively. The improvement is not strictly monotonic: the normalized error increases slightly from to .
The context interventions produce a larger effect. With the correct five demonstrations, the mean prediction error is . Replacing all demonstration pairs with coarse–fine pairs from another unseen testing operator increases the error to . Retaining the original demonstrated coarse states while replacing only their fine counterparts increases the error further to .
The corresponding mean values are , , and for the correct, wrong-operator, and wrong- contexts, respectively. Taken together, the scaling and intervention results show that the model uses the operator-specific coarse–fine information supplied through the in-context demonstrations.
Two-dimensional ice-sheet flow
PDE setting. We next consider an ice-sheet flow problem motivated by a previously established multiresolution multi-fidelity benchmark [33, 58]. The depth-averaged horizontal velocity satisfies
while the ice thickness evolves according to . Here, denotes the ice thickness, is the basal-friction field, and represents the effective rheological coefficient. relations and physical parameters follow the reference benchmark.
Operator setting. We consider two settings for this problem. The first follows the reference multi-fidelity benchmark and uses a single fixed operator. Different basal-friction fields are treated as different input samples under the same reference setting, and each sample contributes one solution at the final time .
The second extends this benchmark to a multi-operator ICL setting. In this extension, one operator is defined by fixing the rheological parameter and the basal-friction field . Each operator provides solution states at different times, allowing the model to use coarse–fine demonstrations from that operator as context for new predictions.
In the multi-operator setting, each demonstration is a pair from the same operator and evaluated at the same time. A coarse solution from another time of that operator is used as the query, and the model predicts without any parameter updates.
The coarse and fine solutions are generated from the same governing equations at different spatial resolutions. Detailed initial-condition construction, data-generation, numerical-solver, and training settings are provided in Appendix § 6.5.
Reference multi-fidelity benchmark
We first consider a single-operator multi-fidelity setting motivated by the reference multi-fidelity benchmark [33]. The purpose of this experiment is to compare how effectively different methods use the reference budget of 20 high-fidelity velocity samples. Different basal-friction samples are treated as different input samples under the same reference setting, and each sample contributes one solution at the final time .
Training: We use 100 low-fidelity samples and 20 high-fidelity velocity samples, following the data budget of the reference multi-fidelity benchmark. The 20 high-fidelity velocity samples are paired with their corresponding coarse solutions.
For ICL, only these 20 paired coarse–fine samples are used for training. Each training example is constructed from different paired samples under the same reference setting, and the number of demonstrations is sampled independently for each example from to during training. The application-specific information contains the spatial coordinates , the basal-friction field , and the ice thickness . These quantities are represented by auxiliary rows, so that expands into for each demonstration or query sample . Each demonstration contains , while the query contains . Because the velocity solution depends on the ice thickness, including provides additional physical information for the coarse-to-fine prediction.
We also consider the composite and non-composite multi-fidelity DeepONet formulations introduced in the reference benchmark [33]. The composite model uses all 100 low-fidelity samples together with the 20 high-fidelity velocity samples. The non-composite model directly uses the available coarse solutions in the coarse-to-fine model and uses the 20 low-fidelity samples paired with the 20 high-fidelity velocity training samples. Thus, all three learned models use the same 20-sample high-fidelity velocity training budget, while the composite model uses an additional 80 low-fidelity training samples.
Testing: All methods are evaluated on the same 50 test cases at that are not used for training. Each test case corresponds to one basal-friction input sample. For each ICL prediction, five coarse–fine demonstrations are selected from the 20 paired training samples, and the coarse solution of the test case is used as the query. The model predicts the corresponding fine velocity field without any parameter updates.
Results. We evaluate all methods on the same 50 test cases at . All three learned methods use the same 20 high-fidelity velocity training samples. ICL and the non-composite model use 20 paired low-fidelity training samples, while the composite model uses all 100 low-fidelity training samples. The results are summarized in Table 10.
| Method | Test cases | (%) | MSE (m/yr) | ||
| LF baseline | 50 | 27.35 | 27.60 | 29.84 | 14.302 |
| Method | Test cases | (%) | MSE (m/yr) | ||
| Non-composite MF | 50 | 7.70 | 7.03 | 12.15 | 2.171 |
| Composite MF | 50 | 7.14 | 6.84 | 10.95 | 1.787 |
| ICL | 50 | 4.93 | 3.68 | 10.48 | 1.262 |
Table 10. Multi-fidelity prediction on 50 ice-sheet test cases at that are not used for training. All learned methods use the same 20 high-fidelity velocity training samples. ICL and the non-composite model use 20 paired low-fidelity samples, while the composite model uses 100 low-fidelity samples. The upper block reports the coarse–fine discrepancy of the low-fidelity baseline, while the lower block reports the prediction errors of the learned multi-fidelity models. Both blocks report the mean, median, and 90th-percentile relative error together with the MSE.
Results analysis. The LF baseline has a mean relative error of 27.35%. The non-composite and composite multi-fidelity DeepONets reduce the mean error to 7.70% and 7.14%, respectively, while ICL achieves the lowest mean error of 4.93%. The median ICL error is 3.68%, the 90th-percentile error is 10.48%, and the mean coefficient of determination is .
Compared with the non-composite multi-fidelity model, ICL reduces the mean prediction error by approximately 36.0% while using the same 20 low-fidelity and 20 high-fidelity velocity training samples. Compared with the composite model, ICL reduces the mean prediction error by approximately 30.9% and the MSE from 1.787 to 1.262, while using the same 20 high-fidelity velocity training samples and only 20 low-fidelity training samples instead of 100. Thus, ICL achieves the best prediction accuracy while using 80 fewer low-fidelity training samples than the composite multi-fidelity model.
Generalization to unseen operators
We next extend the single-operator reference benchmark to a multi-operator ICL setting and examine whether the model can generalize to ice-sheet operators that are unseen during training. Both the rheological parameter and the basal-friction field vary across operators, and each fixed operator provides solution states at different times.
For each prediction, the model is provided with coarse–fine demonstrations from one unseen testing operator at different times. A new coarse solution from another time of that operator is used as the query. The model receives the spatial grid, time, demonstrations, and coarse query, but not the operator-defining quantities and . The model uses the demonstrations as context to predict for the unseen operator.
Training: We generate 70 training operators by varying and independently sampling the basal-friction field . Each operator contains paired coarse and fine velocity fields at 50 time points.
Each training example is constructed from a single operator. The demonstrations and query are taken from different time points of that operator, and the number of demonstrations is varied dynamically from to during training.
Testing: We use 30 additional operators as unseen testing operators. These operators are generated from the same operator distribution as the training operators and are not used during training. For each unseen testing operator, five time points are used as coarse–fine demonstrations, and each of the remaining 45 time points defines one test case. This gives test cases in total.
Results. We evaluate the model on 1,350 test cases from the 30 unseen testing operators. Each prediction uses five coarse–fine demonstrations from the same testing operator. We also evaluate a wrong-operator context in which the query is unchanged but all five demonstrations are replaced by coarse–fine pairs from another unseen testing operator. The results are summarized in Table 11.
| Evaluation | Test cases | (%) | |||
| Mean | Median | P90 | |||
| LF baseline | 1350 | 30.62 | 30.85 | 33.27 | |
| Evaluation | Test cases | (%) | |||
| Mean | Median | P90 | |||
| ICL, correct context | 1350 | 1.15 | 0.95 | 1.86 | |
| ICL, wrong-operator context | 1350 | 1.49 | 1.06 | 2.63 |
Table 11. Unseen-operator prediction on 1,350 test cases from 30 unseen testing ice-sheet operators using five demonstrations. The upper block reports the coarse–fine discrepancy of the low-fidelity baseline, while the lower block reports the ICL prediction error with the correct and wrong-operator contexts. In the wrong-operator context, the query is unchanged while all five demonstrations are replaced by coarse–fine pairs from another unseen testing operator. Both blocks report the mean, median, and 90th-percentile relative error.
Representative low-, average-, and high-error predictions are shown in Figure 9. In each example, the low-fidelity query velocity field, the corresponding fine target, and the ICL prediction are overlaid to compare both the direction and magnitude of the two-dimensional velocity vectors. The ICL relative error reported in each panel measures the discrepancy between the predicted and true high-fidelity velocity fields.

Figure 9. Representative predictions for unseen testing two-dimensional ice-sheet operators. The panels show low-, average-, and high-error examples. The coarse query, fine target, and ICL prediction are overlaid as blue, orange, and green velocity vectors, respectively. The relative prediction error is reported above each panel.
Results analysis. Across the 1,350 test cases, the LF baseline has a mean relative error of 30.62%, while ICL reduces the mean prediction error to 1.15%, corresponding to an approximately 96.2% reduction. The median prediction error is 0.95%, and the 90th-percentile error is 1.86%. The mean coefficient of determination is .
These results show that a single shared ICL model can accurately predict the fine velocity fields for operators that are not observed during training.
The prediction also depends on the operator-specific demonstrations. Replacing the five correct demonstrations with demonstrations from another unseen testing operator increases the mean error from 1.15% to 1.49%, corresponding to a relative increase of approximately 30.1%. The median error increases from 0.95% to 1.06%, while the 90th-percentile error increases from 1.86% to 2.63%.
The model is not given the operator-defining quantities or . Instead, it receives the spatial grid, time, the coarse–fine demonstrations, and the coarse query. The increase in error under the wrong-operator context shows that the model uses operator-specific information supplied by the demonstrations while adapting to previously unseen ice-sheet operators without parameter updates.
Discussion and conclusion
In this work, we address the multi-fidelity problem through in-context learning. Multi-fidelity learning combines inexpensive low-fidelity solutions with limited high-fidelity data to improve prediction accuracy while reducing computational cost. However, many multi-fidelity operator-learning methods are developed for a specific coarse-to-fine relation or a single operator-learning task, making extension to multiple operators costly. We propose an in-context multi-fidelity learning framework that learns a family of coarse-to-fine operators with one shared model using a few coarse–fine demonstrations to provide the information needed for the trained model to predict the fine solution for a new coarse query. Once the model is trained, its parameters remain fixed, and no fine-tuning is required at inference.
The numerical experiments show that the framework generalizes to unseen operators across several PDE problems and remains effective for operator-parameter and query-side OOD prediction. The model uses the supplied demonstrations, with prediction accuracy depending on both their number and consistency. The framework also handles temporally shifted coarse-to-fine mappings and extends to a two-dimensional multi-fidelity problem.
The cross-operator experiments show that OOD information learned from operators with more training data can improve prediction for operators with limited data that have not observed the same OOD regime. Previously available demonstrations can be reused for these OOD queries. As a result, a new OOD prediction requires only a new coarse query generated by the low-fidelity solver and does not require new high-fidelity data or fine-tuning. This is particularly advantageous in multi-fidelity settings, where low-fidelity simulations are inexpensive while high-fidelity simulations are costly.
Acknowledgments
ZZ and XL are supported by DOE award number DE-SC0025440 and NSF award number 2615564. The work of PS was completed with support from the U.S. Department of Energy’s Advanced Scientific Computing Research program under the Uncertainty Quantification for Multifidelity Operator Learning (MOLUcQ) project (Project No. 81739). Pacific Northwest National Laboratory (PNNL) is a multi-program national laboratory operated for the U.S. Department of Energy (DOE) by Battelle Memorial Institute under Contract No. DE-AC05-76RL01830. MZ was supported by AFOSR award number FA9550-22-1-0004 and NSF award number CBET-2338843.
Additional experimental details
Common implementation details
Variable-length Transformer details
For a valid input sequence , let denote the embedding of row supplied to the Transformer, where is the model dimension. The embeddings are constructed using the application-specific input encoders described in Appendices § 6.§ 2–§ 6.5. They form . For one self-attention head, let denote the query, key, and value projection matrices. Then , , and , with and . Changing the demonstration count changes the sequence and attention dimensions through , but does not change the dimensions of the trainable projection matrices.
Training objective
For a training batch of size , let denote the predicted and target fine query rows for training example . The loss is evaluated using the normalized rows, with application-specific normalization described in Appendices § 6.§ 2–§ 6.5. The training objective is the mean-squared error
Batching strategy
For experiments with a dynamic number of demonstrations, the demonstration count is sampled independently for each training example. Examples with different values of can have different valid sequence lengths . Within each training batch, padded rows are appended after the final valid row of shorter sequences until the application-specific maximum sequence length is reached, and an attention padding mask prevents the padded rows from contributing to the valid attention context. Padding rows are excluded when determining . The output at the final valid input position , corresponding to the coarse-query row, is used to predict the missing next row . The maximum padded sequence length used for each application is reported in Table 12.
Input-sequence summary
Across all applications, demonstration follows the row structure , while the query follows . As defined in § 2.2, is the application-specific information for sample , and expands into its auxiliary row vectors , each in after any required interpolation or broadcasting. Table 12 lists the quantities represented by these rows in sequence order. The valid input length is , and the maximum padded length corresponds to .
Scalar conservation-law experiments
Data construction and numerical solvers. For the standard unseen-operator experiments, each of the eight PDE families contains 100 operators. For each operator, 100 solution samples are generated by varying the initial condition. The operator parameters are sampled as for all families and for the viscous families, while for the inviscid families.
The initial condition is a smooth periodic box profile,
where , , , and .
All coarse and fine solutions used by the model are evaluated at the terminal time . The coarse solution is computed on a 50-point grid using the low-fidelity HLL-based finite-volume solver with shock viscosity. The fine solution is computed on a 100-point grid using the high-fidelity MUSCL–Hancock solver with a Superbee limiter. The coarse solution is linearly interpolated from 50 to 100 points before being provided to the model, so that the coarse and fine solutions use the same spatial representation.
Unseen-operator training and evaluation. Within each PDE family, 70 operators are used for training and 30 are used as unseen testing operators, giving 560 training operators and 240 unseen testing operators in total. Normalization statistics are computed using the training operators.
Each training example is constructed from a single operator. The demonstrations and query are generated from different initial conditions of that same operator.
The row-sequence Transformer has model dimension 96, four attention heads, three encoder layers, feed-forward dimension 192, and dropout 0.1, giving a total of 255,364 trainable parameters. Training uses 300 epochs with 1,200 optimization steps per epoch and batch size 1,000. AdamW is used with weight decay . The learning rate increases from to during an 8% warmup period and then follows a cosine schedule to .
The unseen-operator evaluation uses 1,024 fixed test cases. Each test case contains five coarse–fine demonstrations from one unseen testing operator and a coarse query generated from another initial condition of the same operator. The trained model directly predicts the corresponding fine solution for each query.
Scaling and context interventions. For the demonstration-scaling experiment, the same fixed queries are evaluated using nested contexts with demonstrations. The same trained model is used for all values of .
For the wrong-operator intervention, all five demonstrations are replaced by coherent coarse–fine pairs from another unseen testing operator in the same PDE family, while the original query is retained. For the wrong- intervention, the original demonstrated coarse solutions are retained while their fine counterparts are replaced by those from another unseen testing operator in the same PDE family. These interventions use the same fixed test queries as the standard five-demonstration evaluation.
Operator-parameter OOD evaluation. The operator-parameter OOD experiment evaluates the same trained model on new operators outside the training range of .
For each PDE family, 50 new operators are generated with and another 50 with , giving 800 OOD operators in total. The setting, initial-condition distribution, and numerical solvers remain the same as in the standard experiment.
For each OOD test case, five coarse–fine demonstrations and one query are generated from the same OOD operator using different initial conditions. The evaluation contains 1,024 fixed test cases, with 498 cases from the lower-OOD region and 526 from the upper-OOD region. The same trained model directly predicts the corresponding fine solution for each query.
Initial-condition amplitude OOD experiment. The amplitude-OOD experiment uses a separate dataset containing 200 operators for each of the eight PDE families, giving 1,600 operators in total. The operator parameters and are generated from the same ranges used in the standard unseen-operator experiment. Within each family, 100 operators are assigned to Group A and 100 to Group B, resulting in 800 operators in each group.
The base-amplitude range is , while the near- and farther-OOD ranges are and , respectively.
Each operator contains 100 matched initial-condition samples. For a matched sample across the three amplitude ranges, the center , width , and edge-smoothing parameter are kept fixed, while the amplitude is changed.
We train two models using the same architecture, normalization procedure, optimizer settings, and training budget. The models differ in the amplitude ranges included in their training data. For both models, normalization statistics are computed using the base-amplitude data from all 1,600 operators.
For the base-amplitude-only model, both Group A and Group B are trained on samples from .
For the mixed-amplitude model, Group A is trained on the base-amplitude range , the near-OOD range , and the farther-OOD range . Group B is trained on the base-amplitude range .
Both models are evaluated on the same 800 Group B operators. For each operator, all 100 matched initial-condition samples are used to construct near- and farther-OOD queries, giving test cases in each OOD regime.
For each Group B query, five base-amplitude coarse–fine pairs from the same Group B operator are reused as demonstrations. The query sample itself is excluded from the demonstration set, and the base-amplitude-only and mixed-amplitude models use exactly the same five demonstrations for each matched query. The selected demonstrations are base-amplitude pairs included in training. A new coarse query is generated from the corresponding matched initial condition with its amplitude changed to either the near- or farther-OOD range. The trained model then predicts the corresponding fine solution.
Group B predictions use demonstrations from the same Group B operator. In the mixed-amplitude setting, the OOD amplitude information introduced through Group A is learned by the shared model and can improve prediction for Group B. The corresponding Group B high-fidelity OOD solution is used only as the reference solution for computing the evaluation error.
Kuramoto–Sivashinsky equation
Data construction and numerical solvers. For the unseen-operator KS experiment, we generate 200 operators with distributed over . For each operator, 20 independent solution trajectories are generated over . The numerical solver time step is 0.005, and solution snapshots are stored every 0.05 time units, giving 71 saved time points per trajectory.
Each trajectory uses the initial condition , where is a zero-mean squared-exponential Gaussian random field with covariance , with and . The 20 trajectories for each operator use independent realizations of this random field. The initial state is first constructed on the 256-point high-fidelity grid, and the same underlying numerical state is periodically Fourier-resampled to the 72-point low-fidelity grid and the 100-point common learning grid.
The coarse solution is computed on a 72-point periodic grid using the low-fidelity second-order centered finite-difference spatial discretization with ETDRK4 time integration. The fine solution is computed on a 256-point periodic grid using the high-fidelity Fourier pseudospectral discretization with dealiasing and ETDRK4 time integration.
Before being provided to the model, the low- and high-fidelity solutions are represented on a common 100-point periodic learning grid. The resulting low- and high-fidelity arrays have dimensions , corresponding to operator, trajectory, saved time, and spatial location.
Although each trajectory is simulated over , only the late-time interval is used to construct the ICL training examples. With snapshots separated by 0.05, this interval contains 21 eligible time points.
Unseen-operator training and evaluation. The 200 operators are divided using a fixed operator-level split into 140 training operators and 60 unseen testing operators. Normalization statistics are computed using only the training operators and the eligible time points in .
Each training example is constructed from a single training operator and a single trajectory of that operator. The demonstrations and query are selected from distinct eligible time points of the same trajectory. The prediction target is at the query time, and the operator parameter is not provided explicitly to the model.
The KS model uses a row-sequence Transformer with model dimension 288, six attention heads, five encoder layers, feed-forward dimension 576, and dropout 0.1, giving 3,484,036 trainable parameters. Training uses a batch size of 1,000 for 150 epochs with 900 optimization steps per epoch. AdamW is used with weight decay . The learning rate increases from to during an 8% warmup period and then follows a cosine schedule to . The best checkpoint is selected using a fixed 512-case monitor constructed only from the training operators.
The final unseen-operator evaluation uses 960 fixed test cases from the 60 unseen testing operators, with 16 cases constructed for each operator. Each test case contains five coarse–fine demonstrations and one distinct query selected from the same trajectory of one testing operator, with all demonstration and query times drawn from . The trained model directly predicts the corresponding fine solution at the query time without any parameter updates.
Scaling and context interventions. For the demonstration-scaling evaluation, the same 960 fixed test cases are evaluated using nested contexts with demonstrations. The context with demonstrations contains the first demonstrations of the corresponding five-demonstration test case. Thus, the query is held fixed while only the amount of valid demonstration context is changed. The same trained model is used for all values of , with no parameter updates.
For the context-intervention evaluations, the same 960 fixed test cases and five-demonstration setting are used. In the correct-context condition, the original five coarse–fine demonstration pairs from the same operator and trajectory as the query are retained. In the wrong-operator condition, all five demonstration pairs are replaced by coherent coarse–fine pairs from another unseen operator at the corresponding demonstration times, while the original query is left unchanged. In the wrong- condition, the original demonstrated coarse states are retained, but the corresponding fine demonstration states are replaced by fine states from the donor operator. This preserves the original query and coarse demonstration inputs while disrupting the demonstrated coarse-to-fine correspondence.
The mean prediction errors for are 9.37%, 6.63%, 5.51%, 4.85%, and 4.39%, respectively. For the context-intervention study, the mean prediction errors are 4.39% with the correct context, 52.10% with the wrong-operator context, and 127.28% with the wrong- context.
Operator-parameter OOD evaluation. The operator-parameter OOD experiment uses the same trained model, normalization statistics, numerical solvers, and late-time evaluation interval as the standard unseen-operator KS experiment. No OOD operator is used for training, normalization, training-side monitoring, or checkpoint selection.
We generate 50 unseen OOD operators with . Each operator contains 20 trajectories constructed using the same initial-condition procedure, numerical solvers, common learning grid, and saved time points as in the standard experiment.
The final evaluation contains 512 fixed test cases. Each test case uses five same-operator, same-trajectory coarse–fine demonstrations and one distinct query with times in . The corresponding fine query state is used only as the evaluation target.
Cross-operator temporal OOD experiment. The cross-operator temporal OOD experiments use separate KS datasets with the same 200 uniformly spaced values in and 20 independent trajectories for each operator. The same low- and high-fidelity spatial discretizations are used as in the unseen-operator experiment: the low-fidelity solver uses the 72-point second-order centered finite-difference discretization with ETDRK4, the high-fidelity solver uses the 256-point -dealiased Fourier pseudospectral discretization with ETDRK4, and both fidelities are represented on the common 100-point learning grid.
Both experiments use the same base-time pool of 100 points, 2.505, 2.510, , 3.000. For the evaluation interval , the temporal OOD pool contains the 50 points 3.002, 3.004, , 3.100, separated by 0.002. For the evaluation interval , the temporal OOD pool contains the 50 points 3.005, 3.010, , 3.250, separated by 0.005; the numerical solver time step for this dataset is 0.001. Each experiment has low- and high-fidelity arrays of dimensions .
A fixed random split with seed 42 divides the 200 operators into 100 Group A operators and 100 Group B operators. For each evaluation interval, we train two matched models using the same architecture, optimization settings, normalization procedure, and training budget. The two models differ only in the temporal data available to Group A.
For the base-time-only model, both Group A and Group B are trained using only the 100 base-time points. For the mixed-time model, Group A is trained using its 100 base-time points together with the 50 temporal OOD points, while Group B is trained using only the 100 base-time points. Thus, the Group A mixed-time eligible pool contains 150 time points, of which one third are from the temporal OOD interval. Group B OOD states are never used for training or checkpoint selection.
Each training example is constructed from one fixed operator and one trajectory of that operator, with the demonstrations and query selected from distinct eligible time points.
Both cross-operator models use the same KS Transformer architecture as the standard experiment: model dimension 288, six attention heads, five encoder layers, feed-forward dimension 576, dropout 0.1, and 3,484,036 trainable parameters. Training uses a batch size of 1,000, 150 epochs, and 900 optimization steps per epoch with AdamW, weight decay , an 8% warmup from to , and cosine decay to . Normalization is matched between the two models and is based on the shared base-time data. Checkpoint selection uses matched base-time training-side monitoring and does not use Group B OOD data.
The final paired evaluation covers all 100 Group B operators, all 20 trajectories per operator, and all 50 temporal OOD query times, giving test cases for each evaluation interval. Every test case uses base-time demonstrations from the same Group B operator and the same trajectory as the query. The evaluation uses demonstration contexts that are shared between the two trained models, so the base-time-only and mixed-time predictions are compared on exactly the same queries and demonstrations. The corresponding Group B high-fidelity OOD states are used only as evaluation targets.
For query times in , the mean coarse–fine discrepancy is 28.77%. The base-time-only and mixed-time models have mean prediction errors of 2.90% and 2.70%, respectively. The relative improvement is 6.72%, and the paired win rate is 57.71%. The corresponding mean values are 0.9982 and 0.9984, respectively.
For query times in , the mean coarse–fine discrepancy is 30.52%. The base-time-only and mixed-time models have mean prediction errors of 6.62% and 5.08%, respectively. The relative improvement is 23.33%, and the paired win rate is 69.62%. The corresponding mean values are 0.9865 and 0.9919, respectively.
Korteweg–de Vries equation
Data construction and numerical solvers. The initial condition is , where and . The dispersion parameter is sampled as . One operator is defined by the fixed triple .
We generate 200 independent operators. Each operator is simulated over . The coarse solution is computed on a 32-point periodic spatial grid, while the fine solution is computed on a 256-point periodic spatial grid. The trajectories are generated using Fourier spectral discretization with ETDRK4 time integration and a solver time step of 0.002. Solution snapshots are stored every 0.05 time units.
Before being provided to the model, the low- and high-fidelity solutions are independently represented on a common 100-point periodic grid using piecewise-linear interpolation.
For each operator, 181 paired source–target samples are constructed. The source times span , while each corresponding fine target is evaluated at , so that every paired sample has the form .
Unseen-operator training and evaluation. The 200 operators are divided using a fixed operator-level split into 140 training operators and 60 unseen testing operators. Normalization statistics are computed using only the 140 training operators.
Each training example is constructed from a single training operator. The demonstrations and query are selected from distinct source-time samples of that same operator.
The Transformer has model dimension 256, four attention heads, five encoder layers, feed-forward dimension 512, and dropout 0.1, giving 2,759,012 trainable parameters. Training uses a batch size of 1,000 for 150 epochs with 1,200 optimization steps per epoch. AdamW is used with weight decay and gradient clipping at 1.0. The learning rate increases from to during an 8% warmup period and then follows a cosine schedule to .
The final unseen-operator evaluation uses 960 fixed test cases from the 60 unseen testing operators, with 16 cases per operator. Each test case contains five distinct demonstrations and one distinct query from the same testing operator.
Scaling and context interventions. For the demonstration-scaling evaluation, the same 960 fixed queries are evaluated using nested contexts with demonstrations. The context with demonstrations contains the first demonstrations of the corresponding five-demonstration test case. The same trained model is used for all values of .
For the wrong-operator intervention, all five coarse–fine demonstration pairs are replaced by pairs from another unseen testing operator at the same demonstration source times, while the original query is retained. For the wrong- intervention, the original demonstrated coarse states are retained while their fine counterparts are replaced by the corresponding states from another unseen testing operator. Both interventions use the same 960 fixed queries as the standard five-demonstration evaluation.
Ice-sheet flow experiments
Reference benchmark and data construction. The physical parameters, constitutive settings, Halfar-dome initial condition, and basal-friction construction are motivated by the reference multifidelity benchmark [33], with the modifications described below. All numerical solutions used in this study are regenerated independently using our reduced ice-flow solver rather than taken from the original benchmark data.
The basal-friction perturbation is generated as . The reference basal-friction field and spatial correlation construction follow the reference benchmark [33].
The coarse and fine velocity solutions use the same reduced governing equations at different spatial resolutions. The low-fidelity grid contains points, while the high-fidelity grid contains points. The low-fidelity velocity field is bilinearly interpolated to the common representation before being provided to the model.
For the reference experiment, the coarse and fine thickness and velocity trajectories are generated separately on the and grids, respectively, using the same underlying basal-friction realization for each paired sample. The low-fidelity thickness evolves on its own solver grid rather than being obtained by downsampling the high-fidelity thickness. For the remaining 80 low-fidelity training samples without paired high-fidelity data, only low-fidelity trajectories are generated.
The ice thickness is part of the application-specific information associated with the velocity solution. The ICL model uses the high-fidelity-grid basal-friction field and ice thickness , together with the interpolated coarse velocity. Both the composite and non-composite multi-fidelity DeepONet baselines also use the high-fidelity-grid and for high-fidelity prediction.
Numerical solver. Both fidelity levels use the same reduced membrane-style governing equations, with fidelity determined by the spatial grid resolution. The nonlinear velocity problem is solved using Picard iteration with a relative convergence tolerance of and at most 30 iterations per block. Adaptive under-relaxation uses factors 0.65, 0.50, 0.35, and 0.25 as needed for convergence.
The ice-thickness equation is advanced using a conservative upwind scheme with a CFL number of 0.45 and a maximum internal time step of 0.20 years. For the trajectory-based multi-operator dataset, each simulation is advanced from to , and solution fields are saved at .
Reference multi-fidelity benchmark. The reference experiment uses a single-operator multi-fidelity setting motivated by the reference benchmark [33]. We use 100 low-fidelity training samples and 20 high-fidelity velocity training samples at the final time . The 20 high-fidelity velocity samples are paired with their corresponding coarse solutions, giving 20 paired coarse–fine training samples. The test set contains 50 test cases available at both fidelity levels, with each test case corresponding to one basal-friction input sample at .
The ICL training set consists of the 20 paired coarse–fine samples. Demonstrations and queries are formed from different paired samples under the same reference setting. At test time, five paired training samples are used as demonstrations for each test query.
The ICL model uses separate encoders for , , and , together with a shared velocity encoder for and . The Transformer has model dimension 512, eight attention heads, five encoder layers, feed-forward dimension 1536, and dropout 0.1, with separate output heads for the two velocity components.
Training uses a batch size of 64 for 180 epochs with 600 optimization steps per epoch. AdamW is used with weight decay . The learning rate increases from to during an 8% warmup period and then follows a cosine decay to . Normalization statistics are computed from the 20 paired training samples.
The composite and non-composite multi-fidelity DeepONet baselines are retrained on the same regenerated dataset following the corresponding reference formulations [33]. The composite model uses 100 low-fidelity training samples and 20 high-fidelity velocity training samples. The non-composite model uses the 20 low-fidelity samples paired with the 20 high-fidelity velocity training samples. ICL uses the same 20 paired low- and high-fidelity velocity samples as the non-composite model.
Multi-operator dataset construction. For the unseen-operator experiment, we extend the reference setting to 100 operators. Operator is defined by the fixed pair , where with . The 100 values of are evenly spaced over .
Each operator is assigned an independent basal-friction field sampled from the modified basal-friction distribution described in Appendix § 6.5. The values of and remain fixed throughout the trajectory. The same pair is used for the corresponding low- and high-fidelity simulations.
Each operator is simulated from to , with paired coarse and fine velocity fields saved at . This gives 50 paired time points per operator and 5,000 paired solution states in total.
A fixed random operator-level split assigns 70 operators to training and 30 operators as unseen testing operators. The training and unseen testing operators are drawn from the same range and basal-friction distribution. Normalization statistics and model optimization are based on the 70 training operators.
Multi-operator ICL training. Each training example is constructed from a single training operator. The demonstrations and query are selected from different time points of that operator, with times drawn from the 50 available snapshots.
The multi-operator model uses separate encoders for and scalar time together with one shared velocity encoder for and . The Transformer has model dimension 128, four attention heads, three encoder layers, feed-forward dimension 384, and dropout 0.1, with separate output heads for the two velocity components. This gives 1,828,386 trainable parameters. Training uses the same optimization schedule as the reference ICL model: batch size 64, 180 epochs, and 600 optimization steps per epoch with AdamW, an 8% warmup, and cosine learning-rate decay. Its input representation uses time to distinguish solution states along each operator trajectory.
Unseen-operator evaluation. For each of the 30 unseen testing operators, five fixed time points are used as coarse–fine demonstrations. The remaining 45 time points are used as queries, giving test cases. For each query, the five demonstrations come from the same unseen testing operator, and the trained model predicts the corresponding fine velocity field.
For the wrong-operator intervention, the five demonstrations are replaced by coarse–fine pairs from another unseen testing operator while the query and its fine target remain fixed.
References
- [1]Lu Lu, Pengzhan Jin, Guofei Pang, Zhongqiang Zhang, and George Em Karniadakis. Learning nonlinear operators via DeepONet based on the universal approximation theorem of operators. Nature Machine Intelligence, 3(3):218–229, 2021.
- [2]Zongyi Li, Nikola Kovachki, Kamyar Azizadehnesheli, Burigede Liu, Kaushik Bhattacharya, Andrew Stuart, and Anima Anandkumar. Fourier neural operator for parametric partial differential equations. arXiv preprint arXiv:2010.08895, 2020.arxiv.org/abs/2010.08895
- [3]Guang Lin, Christian Moya, and Zhecheng Zhang. B-deeponet: An enhanced bayesian deeponet for solving noisy parametric pdes using accelerated replica exchange sgld. Journal of Computational Physics, 473:111713, 2023.DOI
- [4]Zhecheng Zhang, Christian Moya, Lu Lu, Guang Lin, and Hayden Schaeffer. D2no: Efficient handling of heterogeneous input function spaces with distributed deep neural operators. arXiv preprint arXiv:2310.18888, 2023.arxiv.org/abs/2310.18888
- [5]Guang Lin, Christian Moya, and Zhecheng Zhang. Learning the dynamical response of nonlinear non-autonomous dynamical systems with deep operator neural networks. Engineering Applications of Artificial Intelligence, 125:106689, 2023.
- [6]Gege Wen, Zongyi Li, Kamyar Azizadehnesheli, Anima Anandkumar, and Sally M Benson. U-fno—an enhanced fourier neural operator-based deep-learning model for multiphase flow. Advances in Water Resources, 163:104180, 2022.arxiv.org/abs/2109.03697
- [7]Wenrui Hao and Jindong Wang. Laplacian eigenfunction-based neural operator for learning nonlinear partial differential equations. arXiv preprint arXiv:2502.05571, 2025.
- [8]Yue Yu, Ning Liu, Fei Lu, Tian Gao, Siavash Jafarzadeh, and Stewart A Silling. Nonlocal attention operator: Materializing hidden knowledge towards interpretable physics discovery. Advances in Neural Information Processing Systems, 37:113797–113822, 2024.arxiv.org/abs/2408.07307
- [9]Shao-Ting Chiu, Aditya Nambiar, Ali Syed, Jonathan W Siegel, and Ulisses Braga-Neto. In-context multi-operator learning with deeposets. arXiv preprint arXiv:2512.16074, 2025.arxiv.org/abs/2512.16074
- [10]Benjamin Sanderse, Panos Stinis, Romit Maulik, and Shady E Ahmed. Scientific machine learning for closure models in multiscale problems: A review. arXiv preprint arXiv:2403.02913, 2024.arxiv.org/abs/2403.02913
- [11]Brek Meuris, Saad Qadeer, and Panos Stinis. Machine-learning-based spectral methods for partial differential equations. Scientific Reports, 13(1):1739, 2023.DOI
- [12]Wuzhe Xu, Yulong Lu, and Li Wang. Transfer learning enhanced deeponet for long-time prediction of evolution equations. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 10629–10636, 2023.
- [13]Roberto Molinaro, Yunan Yang, Björn Engquist, and Siddhartha Mishra. Neural inverse operators for solving pde inverse problems, 2023.arxiv.org/abs/2301.11167
- [14]Nicholas H. Nelsen and Yunan Yang. Operator learning meets inverse problems, page 253–339. Elsevier, 2026.
- [15]Zecheng Zhang. Numerical neural operator: Connection between numerical analysis and the operator learning and building discretized neural operators from finite element methods. arXiv preprint arXiv:2610.11120, 2026.arxiv.org/abs/2610.11120
- [16]Da Long, Nicole Mrvaljevic, Shandian Zhe, and Bamdad Hosseini. A kernel framework for learning differential equations and their solution operators. Physica D: Nonlinear Phenomena, 460:134095, 2024.DOI
- [17]Tianping Chen and Hong Chen. Approximations of continuous functionals by neural networks with application to dynamic systems. IEEE Transactions on Neural Networks, 4(6):910–918, 1993.
- [18]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, 1995.
- [19]Andrew D Back and Tianping Chen. Universal approximation of multiple nonlinear operators by neural networks. Neural Computation, 14(11):2561–2566, 2002.pubmed.ncbi.nlm.nih.gov/12433289
- [20]Hao Liu, Zecheng Zhang, Wenjing Liao, and Hayden Schaeffer. Neural scaling laws of deep relu and deep operator network: A theoretical study. arXiv preprint arXiv:2410.00357, 2024.arxiv.org/abs/2410.00357
- [21]Yahong Yang, Zecheng Zhang, Wei Zhu, Wenjing Liao, and Hao Liu. Generalization guarantees for multi-input neural operator learning in sobolev spaces. arXiv preprint arXiv:2606.17419, 2026.arxiv.org/abs/2606.17419
- [22]Erhan Bayraktar, Qi Feng, Zecheng Zhang, and Zhaoyu Zhang. Deep neural operator learning for probabilistic models. arXiv preprint arXiv:2511.07235, 2025.arxiv.org/abs/2511.07235
- [23]Hao Liu, Haizhao Yang, Minshuo Chen, Tuo Zhao, and Wenjing Liao. Deep nonparametric estimation of operators between infinite dimensional spaces. Journal of Machine Learning Research, 25(24):1–67, 2024.
- [24]Samuel Lanthaler and Andrew M Stuart. The parametric complexity of operator learning. arXiv preprint arXiv:2306.15924, 2023.arxiv.org/abs/2306.15924
- [25]Samuel Lanthaler, Siddhartha Mishra, and George E Karniadakis. Error estimates for Deep-ONets: A deep learning framework in infinite dimensions. Transactions of Mathematics and its Applications, 6(1):tnac001, 2022.arxiv.org/abs/2102.09618
- [26]Zecheng Zhang. MODNO: Multi-operator learning with distributed neural operators. Computer Methods in Applied Mechanics and Engineering, 431:117229, 2024.arxiv.org/abs/2404.02892
- [27]Jingmin Sun, Yuxuan Liu, Zecheng Zhang, and Hayden Schaeffer. Towards a foundation model for partial differential equations: Multioperator learning and extrapolation. Physical Review E, 111(3):035304, 2025.DOI
- [28]Yadi Cao, Yuxuan Liu, Liu Yang, Rose Yu, Hayden Schaeffer, and Stanley Osher. VICON: Vision in-context operator networks for multi-physics fluid dynamics prediction. arXiv preprint arXiv:2411.16063, 2024.arxiv.org/abs/2411.16063
- [29]Liu Yang, Siting Liu, Tingwei Meng, and Stanley J Osher. In-context operator learning with data prompts for differential equation problems. Proceedings of the National Academy of Sciences, 120(39):e2310142120, 2023.DOI
- [30]Yuxuan Liu, Zecheng Zhang, and Hayden Schaeffer. Prose: Predicting operators and symbolic expressions using multimodal transformers. Neural Networks, 180:106707, 2024.arxiv.org/abs/2309.16816
- [31]Oded Ovadia, Adar Kahana, Panos Stinis, Eli Turkel, and George Em Karniadakis. Vito: Vision transformer-operator, 2023.arxiv.org/abs/2303.08891
- [32]Lu Lu, Raphaël Pestourie, Steven G Johnson, and Giuseppe Romano. Multifidelity deep neural operators for efficient learning of partial differential equations with application to fast inverse design of nanoscale heat transport. Physical Review Research, 4(2):023210, 2022.arxiv.org/abs/2204.06684
- [33]Amanda A Howard, Mauro Perego, George Em Karniadakis, and Panos Stinis. Multifidelity deep operator networks for data-driven and physics-informed problems. Journal of Computational Physics, 493:112462, 2023.DOI
- [34]Zecheng Zhang, Christian Moya, Wing Tat Leung, Guang Lin, and Hayden Schaeffer. Bayesian deep operator learning for homogenized to fine-scale maps for multiscale PDE. Multiscale Modeling & Simulation, 22(3):956–972, 2024.arxiv.org/abs/2308.14188
- [35]Wuzhe Xu, Yulong Lu, Sifan Wang, and Tong-Rui Liu. Improving data fidelity via diffusion model-based correction and super-resolution. Journal of Computational Physics, page 114883, 2026.arxiv.org/abs/2505.08526
- [36]Shady E. Ahmed and Panos Stinis. A multifidelity deep operator network approach to closure for multiscale systems. Computer Methods in Applied Mechanics and Engineering, 414:116161, 2023.DOI
- [37]Matthew J. Zahr and Charbel Farhat. Progressive construction of a parametric reduced-order model for PDE-constrained optimization. International Journal for Numerical Methods in Engineering, 102(5):1111–1135, 2015.arxiv.org/abs/1407.7618
- [38]David Amsallem, Matthew J. Zahr, and Charbel Farhat. Nonlinear model order reduction based on local reduced-order bases. International Journal for Numerical Methods in Engineering, 92(10):891–916, 2012.DOI
- [39]David Amsallem, Matthew J. Zahr, and Kevin Washabaugh. Fast local reduced basis updates for the efficient reduction of nonlinear systems with hyper-reduction. Advances in Computational Mathematics, 41(5):1187–1230, 2015.DOI
- [40]Kyle Washabaugh, David Amsallem, Matthew J. Zahr, and Charbel Farhat. Nonlinear model reduction for CFD problems using local reduced-order bases. In 42nd AIAA Fluid Dynamics Conference and Exhibit, 2012.DOI
- [41]Yalchin R Efendiev, Thomas Y Hou, and Xiao-Hui Wu. Convergence of a nonconforming multiscale finite element method. SIAM Journal on Numerical Analysis, 37(3):888–910, 2000.DOI
- [42]Yalchin Efendiev, Juan Galvis, and Thomas Y. Hou. Generalized multiscale finite element methods (gmsfem). Journal of Computational Physics, 251:116–135, October 2013.DOI
- [43]Juan Galvis and Yalchin Efendiev. Domain decomposition preconditioners for multiscale flows in high-contrast media. Multiscale Modeling & Simulation, 8(4):1461–1483, 2010.
- [44]Hayden Schaeffer, Giang Tran, Rachel Ward, and Linan Zhang. Extracting structured dynamical systems using sparse optimization with very few samples. Multiscale Modeling & Simulation, 18(4):1435–1461, 2020.arxiv.org/abs/1805.04158
- [45]Alan Mackey, Hayden Schaeffer, and Stanley Osher. On the compressive spectral method. Multiscale Modeling & Simulation, 12(4):1800–1827, 2014.DOI
- [46]Gareth Hardwick and Haizhao Yang. Multi-scale finite expression method for pdes with oscillatory solutions on complex domains. arXiv preprint arXiv:2510.22497, 2025.arxiv.org/abs/2510.22497
- [47]Subhayan De, Matthew Reynolds, Malik Hassanaly, Ryan N King, and Alireza Doostan. Bi-fidelity modeling of uncertain and partially unknown systems using DeepONets. Computational Mechanics, 71(6):1251–1267, 2023.arxiv.org/abs/2204.00997
- [48]Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in Neural Information Processing Systems, 33:1877–1901, 2020.arxiv.org/abs/2005.14165
- [49]Shivam Garg, Dimitris Tsipras, Percy S Liang, and Gregory Valiant. What can transformers learn in-context? a case study of simple function classes. Advances in Neural Information Processing Systems, 35:30583–30598, 2022.arxiv.org/abs/2208.01066
- [50]Sang Michael Xie, Aditi Raghunathan, Percy Liang, and Tengyu Ma. An explanation of in-context learning as implicit bayesian inference. arXiv preprint arXiv:2111.02080, 2021.arxiv.org/abs/2111.02080
- [51]Johannes Von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento, Alexander Mordvintsev, Andrey Zhmoginov, and Max Vladymyrov. Transformers learn in-context by gradient descent. In International Conference on Machine Learning, pages 35151–35174. PMLR, 2023.arxiv.org/abs/2212.07677
- [52]Ekin Akyürek, Dale Schuurmans, Jacob Andreas, Tengyu Ma, and Denny Zhou. What learning algorithm is in-context learning? investigations with linear models. arXiv preprint arXiv:2211.15661, 2022.arxiv.org/abs/2211.15661
- [53]Frank Cole, Yuxuan Zhao, Yulong Lu, and Tianhao Zhang. In-context learning of linear dynamical systems with transformers: Approximation bounds and depth-separation. Advances in Neural Information Processing Systems, 38:169441–169479, 2026.arxiv.org/abs/2502.08136
- [54]Frank Cole, Dixi Wang, Yineng Chen, Yulong Lu, and Rongjie Lai. In-context operator learning on the space of probability measures. arXiv preprint arXiv:2601.09979, 2026.arxiv.org/abs/2601.09979
- [55]Frank Cole, Yulong Lu, Wuzhe Xu, and Tianhao Zhang. In-context learning of linear systems: Generalization theory and applications to operator learning. arXiv preprint arXiv:2409.12293, 2024.arxiv.org/abs/2409.12293
- [56]Liu Yang and Stanley J Osher. PDE generalization of in-context operator networks: A study on 1D scalar nonlinear conservation laws. Journal of Computational Physics, 519:113379, 2024.
- [57]Zezheng Song, Jiaxin Yuan, and Haizhao Yang. Fmint: Bridging human designed and data pretrained models for differential equation foundation model for dynamical simulation. Advanced Theory and Simulations, 8(8):2500062, 2025.DOI
- [58]QiZhi He, Mauro Perego, Amanda A. Howard, George Em Karniadakis, and Panos Stinis. A hybrid deep neural operator/finite element method for ice-sheet modeling, 2023.arxiv.org/abs/2301.11402