UPS: Efficiently Building Foundation Models for PDE Solving via Cross-Modal Adaptation

Junhong Shen, Tanya Marwah, Ameet Talwalkar

Abstract

We present Unified PDE Solvers (UPS), a data- and compute-efficient approach to developing unified neural operators for diverse families of spatiotemporal PDEs from various domains, dimensions, and resolutions. UPS embeds different PDEs into a shared representation space and processes them using a FNO-transformer architecture. Rather than training the network from scratch, which is data-demanding and computationally expensive, we warm-start the transformer from pretrained LLMs and perform explicit alignment to reduce the modality gap while improving data and compute efficiency. The cross-modal UPS achieves state-of-the-art results on a wide range of 1D and 2D PDE families from PDEBench, outperforming existing unified models using 4 times less data and 26 times less compute. Meanwhile, it is capable of few-shot transfer to unseen PDE families and coefficients.

Introduction

Partial Differential Equations (PDEs) are the mathematical backbone of science, describing phenomena ranging from fluid dynamics to heat transfer. While classical numerical solvers are accurate, they are computationally intensive and must be re-executed for every change in parameters. Neural operators have emerged as a fast AI-based alternative, but most are specialists trained for specific equations. Existing unified "foundation models" for PDEs are notoriously expensive to train, requiring massive datasets and thousands of GPU hours. Furthermore, bridging the gap between different spatial dimensions (e.g., 1D vs. 2D) remains a significant challenge.

Unified Architecture and Cross-Modal Adaptation

UPS addresses these challenges by treating PDE solving as a cross-modal transfer learning task. Instead of training a massive transformer from scratch, UPS "warm-starts" the process using a pretrained Large Language Model (LLM), such as RoBERTa or T5.

The UPS Framework

The architecture consists of three main components:

  1. FNO Embedding Network: A Fourier Neural Operator (FNO) layer processes raw PDE data. FNOs are chosen for their resolution-invariance, allowing the model to handle data regardless of grid sampling density.
  2. LLM Body: The core transformer layers of a pretrained LLM process the embeddings.
  3. Linear Predictor: A simple head translates the LLM's internal representations back into physical states (e.g., pressure or velocity).
The UPS Unified Architecture and two-stage training process.

Two-Stage Training Strategy

To bridge the "modality gap" between text and physics, UPS employs a two-stage training process:

  • Stage 1 (Alignment): Using Maximum Mean Discrepancy (MMD), the model forces PDE embeddings to align with the text embeddings the LLM was originally trained on.
  • Stage 2 (Multi-Task Fine-Tuning): The model is fine-tuned on various PDE families simultaneously. Crucially, text-form metadata (e.g., "[Burgers Equation] [nu=0.001]") is included, allowing the LLM to use its semantic understanding to contextualize the physics.

Experimental Results

The model was evaluated using PDEBench, a comprehensive benchmark for scientific machine learning, including 1D and 2D tasks such as Burgers, Advection, Shallow-Water, and Navier-Stokes equations.

Performance and Efficiency

UPS achieved state-of-the-art results across nearly all tested PDE families, outperforming existing unified models like MPP and DPOT. Most notably, it achieved these results with 4x less data and 26x less compute (under 100 GPU hours on a single A6000) compared to previous leading models.

Comparison of UPS against single-family and unified baselines across various PDE benchmarks.

Key Insights

  • Physics as a Language: The structural patterns learned by LLMs during language pretraining are highly transferable to the patterns of physical evolution.
  • Dimension Unification: UPS uses a "superspace" representation, treating 1D PDEs as 2D PDEs with zero-padded coordinates, enabling knowledge transfer between dimensions.
  • Few-Shot Mastery: On 1D tasks, UPS with only 100 samples outperformed baselines trained on 9,000 samples—a 90x improvement in data efficiency.

Conclusion

UPS demonstrates that repurposing pretrained LLMs for physical simulations is not only possible but highly efficient. By aligning physical data with the latent space of language models, UPS provides a scalable path toward general-purpose scientific foundation models. Future work will explore extending the model to 3D PDEs and addressing inverse problems.

Summary updated

BibTeX
@inproceedings{shen2024ups,
  author = {Junhong Shen and Tanya Marwah and Ameet Talwalkar},
  title = {{UPS: Efficiently Building Foundation Models for PDE Solving via Cross-Modal Adaptation}},
  booktitle = {AI4Science @ ICML},
  year = {2024},
  url = {https://openreview.net/forum?id=HctgQ6UKee},
}
Figure