PhysICL: In-Context Learning of Physical Fields on Unstructured Meshes from Procedural Priors

Fabien CasenavearXiv 2026 · arXiv

TL;DR

PhysICL is a foundation model for engineering physics that performs in-context learning (ICL) directly on unstructured meshes. By observing a few example simulations (the "context"), it can predict physical fields for new geometries in a single forward pass without any task-specific weight updates.

What Problem Does This Paper Address?

In engineering design, researchers often run hundreds of simulations for a single problem, varying shapes and conditions. Traditionally, creating a fast "surrogate" model to replace these expensive simulations requires training a new model from scratch for every single study.

While "foundation models" have revolutionized natural language and tabular data by learning to perform new tasks from examples (in-context learning), applying this to physics is hard. Physical simulations don't look like text or tables; they involve complex 3D geometries represented by unstructured meshes where the number of nodes and their connectivity vary wildly between examples. Existing neural operators usually require a common grid or extensive retraining, making them difficult to use as general-purpose, "plug-and-play" tools for new engineering problems.

Methods

PhysICL adapts the architecture of tabular in-context learners (like TabICL) to the world of unstructured meshes. Its pipeline consists of three main stages:

  1. Patch Encoding: Meshes are partitioned into patches using recursive inertial bisection. Instead of processing every node, the model uses a "spatial budget," sampling a fixed number of nodes and patches to keep GPU memory usage constant regardless of the total mesh size.
  2. Transformer Backbone: The model uses a series of transformer blocks ($TF_{col}$, $TF_{row}$, and $TF_{icl}$) to process the relationship between different simulations in the context and the specific geometry of the query.
  3. Variable Identification: To handle an arbitrary number of input and output fields (e.g., pressure, velocity, stress), PhysICL identifies variables using episode-local random codes. This allows the model to be "anonymous"—it doesn't need to know the names of the variables, only how they relate to each other in the provided examples.

Crucially, PhysICL is pretrained entirely on a procedural prior. The authors developed a library of synthetic tasks—ranging from abstract mathematical laws to simplified physical models (like Darcy flow or linear elasticity)—generated on-the-fly. This allows the model to learn the "meta-task" of inferring physical relationships without ever seeing real-world engineering data during its initial training.

Figure 1. PhysICL. Context and queries share the patch encoder (blue). Variables are identified by episode-local random codes rj, fused at nodes and patches by attention pooling over variable tokens, and in each simulation’s scalars by the row encoder (violet). Context labels (orange text) enter per patch before TFcol, per simulation through the row encoder, and through the anchors. The field path (green) reads context patches, then context anchors; the output field reads the anchors once more through a query carrying its code (orange block). Scalar outputs are not predicted by the network: a Kumo-Tabular (Qu et al., 2026b) regression on θ and the context PCA of the row tokens, encoded with no output observed (dashed, outside the model). Scales are fitted on the context only; queries never attend to each other.

Datasets

  • Procedural Prior: A massive collection of synthetic 2D and 3D tasks generated using generic laws and boundary-element physical models.
  • PLAID Datasets: Five real-world engineering benchmarks used for evaluation, including flow around airfoils (2D_profile), turbine cascades (VKI-LS59), and compressor blades (Rotor37).
  • AhmedML: A large-scale dataset of automotive surface meshes (median 1.1 million nodes) used to test the model's ability to scale to industrial-sized problems.

Key Insights and Ideas

  • Physics from Meta-Learning: The core "aha moment" is that a model doesn't need to be trained on a specific physical law (like Navier-Stokes) to be useful. By training on a diverse enough set of procedural laws, it learns the general structure of how physical fields behave on manifolds, allowing it to adapt to real physics at test time.
  • Constant Memory Scaling: By using fixed spatial budgets for patches and "anchors," the model's peak GPU memory remains nearly identical whether it's processing a 6,000-node mesh or a 1.1-million-node mesh.
  • Context-Fitted Scaling: The model automatically standardizes coordinates and field values based on the provided context. This makes its predictions invariant to translations and scalings of the geometry, a critical property for physical consistency.

Key Results

  • Zero-Shot Transfer: On the PLAID datasets, PhysICL's error decreases consistently as more context examples are provided. With 32 examples ($K=32$), it outperforms nearest-neighbor baselines across the board.
  • Industrial Scaling: On the AhmedML dataset, PhysICL successfully predicted fields on meshes with over a million nodes. Despite the 20x increase in mesh size compared to pretraining, it maintained a peak GPU memory of only 4.27 GiB.
  • Speed: The model can answer a query in about one second, which is significantly faster than traditional simulation or even many tuned surrogate baselines.
  • Fine-tuning Benefits: For problems very different from the pretraining prior (like the 2D_MSHE stress dataset), the authors showed that fine-tuning on a "proxy" prior—which mimics the target geometry and loads but uses no actual labels—divided the prediction error by 2.7.
Figure 2. One task of the procedural prior. Three context simulations of one task (a generic law): one template morphed by each simulation’s design variables, on a mesh drawn among the template’s 12 (the first two draw the same one); the output field varies with the drivers. Right: the RIB patches of the first mesh and its 64 anchors, the context nodes whose output values node ICL reads.

Limitations and Future Work

  • Independent Field Decoding: Currently, the model decodes each output field (e.g., $x$-velocity and $y$-velocity) independently. The authors suggest that joint decoding could allow the model to exploit correlations between fields for better accuracy.
  • Prior Realism: The current procedural prior uses simplified boundary-element models. Incorporating more complex 3D physical laws into the pretraining phase could further close the gap with specialized supervised models.
  • Accuracy Gap: While highly flexible, PhysICL still lags behind state-of-the-art supervised models that are trained specifically on a single, large dataset. The goal is to move closer to that performance while maintaining the "zero-shot" flexibility of ICL.

Summary updated

Abstract

Engineering design studies produce a few tens to a few hundred simulations of one problem, each on its own mesh, and their surrogates are retrained for every study. Tabular foundation models instead infer a new task from its examples in one forward pass, after pretraining on synthetic tasks. We demonstrate the feasibility of in-context learning for physical field prediction on unstructured meshes. A single model, PhysICL, pretrained solely on procedural tasks, predicts fields, with quantiles, directly on each query mesh from labeled simulations, without updating its weights. The same checkpoint accepts variable numbers of context examples, scalar inputs and input fields, and any number of output fields, while mesh size and connectivity can vary within a task. Its procedural prior draws generic laws and boundary-element physical models on morphed 2D and 3D template meshes, evaluated only at the points the model samples, fast enough that tasks generated on the fly by CPU workers keep the GPUs busy throughout pretraining. On five PLAID datasets never seen in pretraining, its field error decreases as the context grows and, from $K = 32$, is below that of the nearest context simulation on every dataset and context draw. It is on par with per-dataset reduced-order models on two of them, behind them where the fields are low-rank. On AhmedML surfaces with a median of 1.1 million nodes, twenty times the largest pretraining mesh, its fixed spatial budgets keep the peak GPU memory at $K = 64$ at 4.27 GiB, against 4.07 GiB on the 6,000-node meshes of 2D\_MSHE. Finally, on 2D\_MSHE, far from the prior, fine-tuning on procedural tasks that reproduce its geometry and loads, without any of its outputs, at a tenth of the pretraining cost, divides the stress error by 2.7.
BibTeX
@misc{casenave2026physicl,
  author = {Fabien Casenave},
  title = {{PhysICL: In-Context Learning of Physical Fields on Unstructured Meshes from Procedural Priors}},
  year = {2026},
  eprint = {2611.15965},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.15965},
}
Figure