Multi-Operator Few-Shot Learning for Generalization Across PDE Families

Yile Li, Shandian Zhe · DOI

Abstract

Neural operators have significantly advanced the simulation of physical systems, yet they remain limited by high data requirements and poor generalization across different partial differential equation (PDE) families. We present MOFS (Multi-Operator Few-Shot), a multimodal framework that addresses these bottlenecks. By integrating self-supervised spatial-frequency pretraining, text-conditioned operator embeddings, and memory-augmented prompting, MOFS enables accurate few-shot generalization to novel physical regimes using only a handful of demonstration examples.

Introduction

In scientific machine learning, neural operators such as the Fourier Neural Operator (FNO) have transformed simulation capabilities. However, two primary challenges persist: data hunger and rigidity. Models typically require massive datasets for each specific PDE and often fail when boundary conditions or physical parameters (like viscosity or permeability) shift slightly. MOFS aims to build a "foundation model" for physics capable of "in-context learning," where the model adapts to a new physical system after seeing just 4 or 5 examples.

Methodology

MOFS introduces a sophisticated multimodal architecture that treats physics as more than just spatial fields. Its key innovations include:

Multi-Task Self-Supervised Pretraining

Before learning specific PDEs, an FNO-based encoder is trained to reconstruct masked spatial fields and predict their frequency spectra via Fast Fourier Transform (FFT). This forces the model to learn structural and periodic priors common to many physical laws.

Visualization of the self-supervised pretraining task, showing spatial field reconstruction and frequency spectrum prediction for input fields (a) and output fields (u).

Text-Conditioned Operator Embeddings

Natural language descriptions of each dataset are generated based on statistical properties (e.g., mean, gradient magnitude). These are processed by a pretrained BERT model, providing a semantic "anchor" that helps the model identify the current physical regime.

Memory-Augmented Prompting and Two-Stage Training

The system maintains a dynamic buffer of prior PDE examples, using similarity-based attention to retrieve relevant "prompts" for new queries. Training occurs in two stages: a supervised stage for prompt-conditioned inference and a contrastive fine-tuning stage to align representations across vision, frequency, and text modalities.

Experimental Setup

The model was evaluated using PDEBench across 11 distinct PDE operator datasets, including six variants of Darcy Flow and five variants of Incompressible Navier-Stokes. The experiments utilized a "leave-one-family-out" protocol, testing the model's ability to generalize to an entirely unseen family using only a few-shot prompt.

Results and Discussion

MOFS significantly outperformed standard baselines like DeepONet, FNO, and UNet in few-shot generalization. For instance, on the DarcyFlow-100.0 dataset, MOFS achieved a relative $L_2$ error of 0.0491, compared to FNO's 0.0854. In the most challenging low-permeability scenario (DarcyFlow-0.01), MOFS reduced the error to 0.1331, while FNO struggled at 0.3148.

Comparison of ground truth with Stage 1 and Stage 2 predictions, illustrating the reduction in relative L2 error and the refinement of the solution across the training stages.

Ablation studies confirmed that the multimodal approach is essential; removing the text modality or pretraining stage led to significant performance degradation. The results highlight that the frequency domain is a "first-class citizen" in physics-informed ML, essential for capturing scale-invariant properties.

Conclusion

MOFS demonstrates that combining self-supervised pretraining with multimodal semantic anchors allows neural operators to generalize across diverse PDE families. Future work will focus on automating text feature engineering using LLMs and extending the framework to 3D time-varying systems for real-world engineering applications.

Summary updated

BibTeX
@misc{li2025multi,
  author = {Yile Li and Shandian Zhe},
  title = {{Multi-Operator Few-Shot Learning for Generalization Across PDE Families}},
  year = {2025},
  eprint = {2508.01211},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.01211},
}
Figure