From Uncertain to Safe: Conformal Adaptation 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 · 2025

Read From Uncertain to Safe: Conformal Adaptation of Diffusion Models for Safe PDE Control by Peiyan Hu, Xiaowei Qian, Wenhao Deng, Rui Wang, Haodong Feng, Ruiqi Feng, Tao Zhang, Long Wei, Yue Wang, Zhi-Ming Ma, Tailin Wu (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2502-02205.txt.

Introduction

Peiyan Hu and co-authors present a safe control method for systems governed by partial differential equations in a 2025 paper. Learning based control for such systems is growing, but most methods ignore safety limits that real uses demand. Their method builds on diffusion models, which generate control sequences step by step, and adds a measure of uncertainty from conformal prediction.

Training reweights the model loss so generated controls better meet safety limits and goals. At use time, the model adjusts its generation and its own settings in loops, guided by targets and the uncertainty measure. Tests on a fluid equation, a two dimensional fluid, and a fusion problem show it alone met all safety limits.

Catalog record

CREATORPeiyan Hu, Xiaowei Qian, Wenhao Deng, Rui Wang, Haodong Feng, Ruiqi Feng, Tao Zhang, Long Wei, Yue Wang, Zhi-Ming Ma, Tailin Wu
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE75 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2502-02205

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

From Uncertain to Safe: Conformal Adaptation 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 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 Diff usion Models for PDE Con trol (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 . † † affiliationnotice: Equal contribution 1 Introduction The control of physical systems described by partial differential equations (PDEs) is crucial in various scientific and engineering domains, including fluid dynamics ( Hinze and Kunisch, 2001 ) , controlled nuclear fusion ( Schuster and Ariola, 2006 ) , and mathematical finance ( Soner, 2004 ) . While traditional control algorithms have been extensively studied over the years ( Li et al., 2006 ; Protas, 2008 ) , advancements in neural networks have led to the development of numerous deep learning-based approaches ( Farahmand et al., 2017 ; Holl et al., 2020 ; Hwang et al., 2022 ) . Among these, diffusion models have gained increasing attention to PDE control due to their ability to model high-dimensional and nonlinear data ( Vahdat et al., 2022 ; Li et al., 2024 ) , and have demonstrated impressive performance in various control tasks ( Chi et al., 2023 ; Wei et al., 2024 ; Hu et al., 2024 ) . However, existing deep learning-based methods for PDE control generally overlook safety – meaning ensuring control sequences satisfy predefined constraints, mitigating risks, and preventing hazards ( Dawson et al., 2022 ; Liu et al., 2023a ) . In real-world applications, controlling PDE systems particularly requires addressing safety concerns ( Barros et al., 1998 ; Argomedo et al., 2013 ) . For instance, in fluid dynamics, minor errors can cause turbulence or structural damage, while in controlled nuclear fusion, violating safety constraints may lead to catastrophic failures. This lack of safety enforcement remains a major bottleneck in applying deep learning to scientific and engineering problems, posing a critical challenge for high-stakes applications. Despite its importance, safe PDE control remains challenging. First, ensuring safety requires preventing methods without formal guarantees from interacting with the environment, restricting the approach to an offline setting with pre-collected data. However, such data is often suboptimal and includes unsafe samples, creating a significant gap between the observed distribution and the near-optimal, safe distribution ( Xu et al., 2022 ; Liu et al., 2023a ) . Second, the method must resolve the inherent conflict between optimizing control performance and satisfying safety constraints ( e.g. , aggressive control policies that reduce error may violate safety thresholds) ( Liu et al., 2023a ; Zheng et al., 2024 ) . To address these challenges, we propose Safe Diffusion Models for PDE Control (SafeDiffCon), a method that adapts diffusion models to varying safety constraints by quantifying their uncertainty. In offline settings, training data are often sub-optimal and unsafe, which causes the distribution learned by diffusion models to deviate significantly from the desired optimal and safe distribution. Inspired by conformal prediction ( Vovk et al., 2005 ; Tibshirani et al., 2019 ) , we propose quantifying diffusion models’ safety uncertainty under distribution shifts and incorporating it through both post-training and inference phases. This uncertainty quantification, termed as uncertainty quantile , allows us to compute a conformal interval , within which the safety score of the diffusion model interacting with the real environment is expected to lie. By leveraging this uncertainty quantification for predicted safety, diffusion models can be optimized with a clear safety optimization objective, to satisfy various safety constraints by constraining their conformal intervals within safe boundaries. Specifically, we incorporate uncertainty quantification into both the post-training and inference-time fine-tuning processes. Technically, we perform post-training with reweighted loss , where the weighting accounts for the uncertainty quantile of safety instead of the original predicted safety score. This refinement improves the model’s control performance while enhancing its adherence to safety constraints, leading to the generation of more optimal and safer control sequences. To further ensure the safety of PDE control, we introduce inference-time fine-tuning , where the diffusion model is iteratively adjusted with guidance and fine-tuning based on specific control targets and uncertainty quantile to improve the safety of the final outputs within few iterations. Our main contributions are as follows: (1) We introduce safety constraints into deep learning-based control of PDE systems and propose our method SafeDiffCon. (2) To address significant distribution shifts, we quantify the safety uncertainty of diffusion models and design a conformal adaptation process, which incorporates post-training with a reweighted loss and inference-time fine-tuning to promote a safer and more optimal output distribution. (3) We design safe control tasks in the contexts of the 1D Burgers’ equation, 2D incompressible fluid, and the controlled nuclear fusion scenario, and evaluate various methods. Extensive experiments on these datasets demonstrate that SafeDiffCon is the only method to successfully meet all safety constraints while achieving superior control objectives. 2 Related Work 2.1 Control of PDE Systems The development of control methods in physical systems is critical across various scientific and engineering areas, including PID ( Li et al., 2006 ) , supervised learning (SL) ( Holl et al., 2020 ; Hwang et al., 2022 ) , reinforcement learning (RL) ( Farahmand et al., 2017 ; Pan et al., 2018 ; Rabault et al., 2019 ) , and physics-informed neural networks (PINNs) ( Mowlavi and Nabi, 2023 ) . Among these, PID is one of the earliest and most widely used method ( Johnson and Moradi, 2005 ) , known for its simplicity and effectiveness in regulating physical systems; however, it faces challenges in parameter tuning and struggles with highly nonlinear or time-varying systems. Model Predictive Control (MPC) ( Garcia et al., 1989 ; Findeisen and Allgöwer, 2002 ; Schwenzer et al., 2021 ) is another well-known control strategy that optimizes a control sequence over a finite time horizon by solving an optimization problem at each time step, using a dynamic model of the system. As it requires solving an optimization problem in real-time at each time step, it may have a high computational cost and struggle to handle high-dimensional, complex systems effectively. Furthermore, the adjoint method ( Protas, 2008 ) and PINNs ( Mowlavi and Nabi, 2023

Read the complete text