DiffPDE用扩散模型解决PDE求解器中的局部错误修复问题,比传统方法更快更准。
DiffPDE框架利用离散扩散语言模型进行针对性代码修复,通过局部重新掩码和填充策略仅重新生成错误区域。该方法在PDEBench基准测试上实现了与现有方法相当的准确性,优于同规模自回归模型,并显著加速了修复过程。研究团队还提出了迭代调试GRPO(ID-GRPO)强化学习方案,通过中间奖励实现单轨迹多轮调试。
DiffPDE: Masked Diffusion Language Models as PDE Solver
Existing approaches for synthesizing Partial Differential Equation (PDE) solvers predominantly rely on autoregressive models, yet their global left-to-right decoding incurs substantial redundancy when addressing inherently localized bugs. In this work, we challenge this inefficient paradigm and propose DiffPDE, a framework leveraging discrete diffusion language models for targeted code repair. By introducing a localized re-masking and infilling strategy, DiffPDE regenerates only erroneous regions while preserving correct context, naturally aligning generation with the sparse nature of PDE errors. Furthermore, to handle coupled bugs requiring sequential interventions, we present Iterative Debugging GRPO (ID-GRPO), a reinforcement learning scheme that enables multi-round debugging within single trajectories via intermediate rewards. Experiments on PDEBench show that DiffPDE achieves competitive accuracy, outperforms same-scale AR models, and significantly accelerates repair.