From Uncertain to Safe: Conformal Fine-Tuning of Diffusion Models for Safe PDE Control
Peiyan Hu, Xiaowei Qian, Wenhao Deng, Rui Wang, Haodong Feng, Ruiqi Feng, Tao Zhang, Long Wei, Yue Wang, Zhi-Ming Ma, Tailin Wu
TL;DR
This work addresses safety in PDE-constrained control by introducing SafeDiffCon, a diffusion-model approach that quantifies safety uncertainty with conformal prediction. It integrates an uncertainty quantile into both a post-training reweighting scheme and inference-time fine-tuning to enforce safety constraints while maintaining control performance. The method yields conformal intervals that bound the safety score with high probability under distribution shift, and demonstrates safety-compliant and high-quality control across Burgers' equation, 2D Navier–Stokes flow, and tokamak fusion scenarios. The results show SafeDiffCon uniquely satisfies all safety constraints among baselines and delivers superior objective values in safe regimes, highlighting its potential for deploying ML-based controllers in high-stakes PDE-domain applications.
Abstract
The application of deep learning for partial differential equation (PDE)-constrained control is gaining increasing attention. However, existing methods rarely consider safety requirements crucial in real-world applications. To address this limitation, we propose Safe Diffusion Models for PDE Control (SafeDiffCon), which introduce the uncertainty quantile as model uncertainty quantification to achieve optimal control under safety constraints through both post-training and inference phases. Firstly, our approach post-trains a pre-trained diffusion model to generate control sequences that better satisfy safety constraints while achieving improved control objectives via a reweighted diffusion loss, which incorporates the uncertainty quantile estimated using conformal prediction. Secondly, during inference, the diffusion model dynamically adjusts both its generation process and parameters through iterative guidance and fine-tuning, conditioned on control targets while simultaneously integrating the estimated uncertainty quantile. We evaluate SafeDiffCon on three control tasks: 1D Burgers' equation, 2D incompressible fluid, and controlled nuclear fusion problem. Results demonstrate that SafeDiffCon is the only method that satisfies all safety constraints, whereas other classical and deep learning baselines fail. Furthermore, while adhering to safety constraints, SafeDiffCon achieves the best control performance. The code can be found at https://github.com/AI4Science-WestlakeU/safediffcon.
