arXiv:2610.38179math.NAOct 2026

Manuscript Offprint

arXiv:2610.38179

In-Context Learning for Multi-Fidelity Multiscale Model Closure and Cross-Operator Out-Of-Distribution Generalization

Xinyuan Li, Matthew Zahr, Panos Stinis, Zecheng Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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, and, given a new PDE, retraining the model using a large set of data (coarse-fine solution pairs of the new PDE) 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. In-context learning aims to learn to downscale a coarse-scale model to a fine-scale model using a few example coarse-fine pairs. Compared to the standard model, the proposed method is able to construct fine-scale predictions for unseen operators with only a few examples (at low cost), or even no additional examples if the testing operators match the training operators but have a different prediction goal, without fine-tuning. Specifically, the model is trained using a small number of paired low-fidelity (coarse PDE solution) and high-fidelity (fine PDE solution) examples as demonstrations from multiple operators, together with a new coarse-scale solution query, to predict the fine-scale solution corresponding to the query. Once trained, given a new PDE operator (e.g., an initial-condition-to-solution map), a few (fewer than five) coarse-fine solution pairs as demonstrations, and a target query consisting of the low-cost coarse solution for the query initial condition, the model can predict the corresponding fine-scale solution without any model fine-tuning. Notably, during testing, if the target operator appears in the training dataset but has a different prediction goal, e.g., predicting the solution beyond the training time interval, our model does not need to generate more demonstrations. Instead, the model can leverage the training coarse-fine pairs from this PDE and information from other training operators to make the prediction without fine-tuning. The model therefore has a very low cost during testing and only requires generating a low-cost coarse-scale solution query. Notably, our smallest model contains only 255,364 trainable parameters, corresponding to approximately 456 parameters per training operator for 560 operators.

1 Introduction

Operator learning [1–16] aims to approximate mappings between function spaces and has become an important approach for learning solution operators of differential equations. Early studies

*Department of Applied and Computational Mathematics and Statistics, University of Notre Dame, Notre Dame, IN 46556, USA. E-mail: xli46@nd.edu. †Department of Aerospace and Mechanical Engineering, University of Notre Dame, Notre Dame, IN 46556, United States. E-mail: mzahr@nd.edu. ‡Advanced Computing, Mathematics, and Data Division, Pacific Northwest National Laboratory, Richland, WA 99354, USA. E-mail: Panagiotis.stinis@pnnl.gov. §Corresponding author. Department of Applied and Computational Mathematics and Statistics, University of Notre Dame, Notre Dame, IN 46556, USA. E-mail: zzhang48@nd.edu or zecheng.zhang.math@gmail.com.

established universal approximation results for continuous functionals and nonlinear operators using neural networks [17–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–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–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–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–40] or multiscale methods [41–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–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 vc(t)↦vf(t+Δt)v_c(t) \mapsto v_f(t + \Delta t). 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.

References (57)