Solving time-dependent parametric partial differential equations (PDEs) is challenging, as models must adapt to variations in parameters such as coefficients, forcing terms, and boundary conditions. Data-driven neural solvers either train on data sampled from the PDE parameters distribution in the hope that the model generalizes to new instances or rely on gradient-based adaptation and meta-learning to implicitly encode the dynamics from observations. This often comes with increased inference complexity. Inspired by the in-context learning capabilities of large language models (LLMs), we introduce Zebra, a novel generative auto-regressive transformer designed to solve parametric PDEs without requiring gradient adaptation at inference. By leveraging in-context information during both pre-training and inference, Zebra dynamically adapts to new tasks by conditioning on input sequences that incorporate context trajectories or preceding states. This approach enables Zebra to flexibly handle arbitrarily sized context inputs and supports uncertainty quantification through the sampling of multiple solution trajectories. We evaluate Zebra across a variety of challenging PDE scenarios, demonstrating its adaptability, robustness, and superior performance compared to existing approaches.
翻译:求解时间相关的参数化偏微分方程(PDEs)具有挑战性,因为模型必须适应系数、外力项和边界条件等参数的变化。数据驱动的神经求解器通常有两种策略:要么基于从PDE参数分布中采样的数据进行训练,以期模型能泛化到新实例;要么依赖基于梯度的自适应和元学习方法,从观测数据中隐式编码动力学规律。这些方法往往伴随着较高的推理复杂度。受大型语言模型(LLMs)上下文学习能力的启发,我们提出了Zebra——一种新颖的生成式自回归Transformer,旨在无需推理时梯度调整即可求解参数化PDEs。通过在预训练和推理阶段均利用上下文信息,Zebra能够根据包含上下文轨迹或先前状态的输入序列进行条件化,从而动态适应新任务。该方法使Zebra能灵活处理任意规模的上下文输入,并通过采样多个解轨迹支持不确定性量化。我们在多种具有挑战性的PDE场景中对Zebra进行评估,结果表明相较于现有方法,Zebra具有更强的适应性、鲁棒性和更优异的性能。