Safe and Stable Control via Lyapunov-Guided Diffusion Models

Xiaoyuan Cheng, Xiaohang Tang, Yiming Yang · 2025

Read Safe and Stable Control via Lyapunov-Guided Diffusion Models by Xiaoyuan Cheng, Xiaohang Tang, Yiming Yang (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-2509-25375.txt.

Introduction

Xiaoyuan Cheng, Xiaohang Tang, and Yiming Yang present a control method in 2025 that uses diffusion models to plan actions while it keeps a system safe and stable. Diffusion models, borrowed from image generation, have grown strong at planning. Most such policies chase reward or low cost and leave safety and stability aside.

Their method guides the model's sampling with a Lyapunov function, a classic tool that certifies stability. That guidance yields policies that hold world wide, without complex solvers or a set control form. The safety rules are carried by learned certificate functions. The team also draws links between this setup and other control ideas. Control that is both learned and certified could suit robots and power systems, where a wrong move has a real cost.

Catalog record

CREATORXiaoyuan Cheng, Xiaohang Tang, Yiming Yang
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE108 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2509-25375

Browse the full library · About the Tower of Babel

Full text

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

Safe and Stable Control via Lyapunov-Guided Diffusion Models Xiaoyuan Cheng, Xiaohang Tang, Yiming Yang Abstract Diffusion models have made significant strides in recent years, exhibiting strong generalization capabilities in planning and control tasks. However, most diffusion-based policies remain focused on reward maximization or cost minimization, often overlooking critical aspects of safety and stability. In this work, we propose Safe and Stable Diffusion ( S 2 S^{2} Diff), a model-based diffusion framework that explores how diffusion models can ensure safety and stability from a Lyapunov perspective. We demonstrate that S 2 S^{2} Diff eliminates the reliance on both complex gradient-based solvers (e.g., quadratic programming, non-convex solvers) and control-affine structures, leading to globally valid control policies driven by the learned certificate functions. Additionally, we uncover intrinsic connections between diffusion sampling and Almost Lyapunov theory, enabling the use of trajectory-level control policies to learn better certificate functions for safety and stability guarantees. To validate our approach, we conduct experiments on a wide variety of dynamical control systems, where S 2 S^{2} Diff consistently outperforms both certificate-based controllers and model-based diffusion baselines in terms of safety, stability, and overall control performance. 1 Introduction Real-world control tasks often go beyond simple cost minimization or reward maximization, requiring safety ( gu2022review ) and stability ( bacciotti2005liapunov ) as essential requirements in various fields such as robotics and aerospace. Specifically, safety ensures a risk-free trajectory during control, while stability drives the system toward convergence to achieve a desired goal. However, achieving both safety and stability remains an open problem in control theory due to the complexity of synthesizing numerous non-convex constraints, including both equalities and inequalities ( hewing2020learning ) , within a single formulation. Model Predictive Control. A common approach to address this challenge is to leverage convex optimization techniques, minimizing the accumulated costs under multiple constraints ( camacho2007constrained ; zeilinger2014soft ) . One of the most well-known methods is the model predictive control (MPC) ( kouvaritakis2016model ) and its variants ( grne2013nonlinear ; grune2017nonlinear ) . While MPC is widely used to ensure safety and stability, the policies derived from MPC algorithms often remain suboptimal in execution ( scokaert1999suboptimal ) . Moreover, MPC can easily become infeasible for some problems with many safety constraints and tight control limitations. Another significant drawback of MPC is its computational complexity ( kwon2005receding ) . Achieving better performance typically requires a longer receding horizon, making MPC inefficient for high-dimensional nonlinear problems. Certificate-Based Method. Another approach to ensuring safety and stability in control relies on certificate functions, such as control Lyapunov functions (CLFs) ( ames2012control ; artstein1983stabilization ; sontag1983lyapunov ) and control barrier functions (CBFs) ( tee2009barrier ; ames2014control ; romdlony2016stabilization ) . However, identifying a valid certificate function is challenging and highly problem-dependent ( ahmadi2016some ) , as most existing methods rely on convex optimization with known system dynamics ( scherer2000linear ; papachristodoulou2002construction ) . In addition, these approaches struggle to scale to high-dimensional control tasks. To improve the generality of certificate-based methods, several approaches have been proposed to learn certificate functions from data ( alfarano2023discovering ; chang2019neural ; zhou2022neural ; zhang2022learning ; sun2021learning ) . These techniques have been shown effective in control-affine dynamics, enabling the learning of a control policy based on optimized certificate functions. Specifically, the policy is generated by solving step-wise quadratic programs (QPs) using learned parameterized certificate functions and a nominal policy. Two representative methods in this field are proposed in qin2021learning and dawson2022safe . The former ( qin2021learning ) formulates an approach to synthesizing CBFs for goal-oriented multi-agent control tasks, while the latter ( dawson2022safe ) introduces the control Lyapunov barrier function (CLBF) which ensures safe and stable control performance ( romdlony2016stabilization ) . However, synthesizing QP-based control with certificate functions remains challenging ( so2023solving ; xiao2021high ) , due to several factors: (1) QP formulation typically requires control-affine dynamics; (2) ensuring the existence of a control policy for step-wise greedy optimization often requires the introduction of slack variables, which can lead to globally inconsistent behavior; and (3) jointly learning the certificate and policy may lead to an infeasible QP, destabilizing training and degrading certificate quality. Figure 1 : Overview of S^{2} Diff. Bottom to top: as guidance function improves, vector fields align better with the goal, Lyapunov landscapes get smooth, and trajectories converge more reliably. Right to left: the generated policy is guided by the Lyapunov function, and diffusion sampled trajectories are used to update the Lyapunov function. Contribution. To address the aforementioned challenges in gradient-based methods, we propose Safe and Stable Diffusion ( S^{2} Diff) , a novel sampling-based method based on model-based diffusion planning framework 1 1 1 Model-based diffusion planning here refers to planning with known dynamics as defined in ( pan2024model ) . , where we learn the certificate functions based on policies sampled via diffusion models and do policy improvement via guided policy sampling iteratively. Crucially, since the guidance is a learned certificate functions (CLBF), the control sequence obtained by guided diffusion sampling is guaranteed to be safe and stable . Unlike previous MPC or QP-based methods, our approach goes beyond step-wise greedy policies for control-affine dynamics, avoids the use of slack variables, and can be extended to trajectory-level optimization for general differentiable dynamics (the core idea is illustrated in Figure 1 ). Theoretically, we uncover intrinsic connections between diffusion sampling and Almost Lyapunov theory: the diffusion-sampled certificate function is not merely a weak relaxation of classical methods — it constitutes a realization of Almost Lyapunov theory, which prioritizes global convergence rather than pointwise strict descent. In experiments, we evaluate S^{2} Diff across a wide range of dynamical systems, where it consistently outperforms both gradient-based methods and model-based diffusion approaches in terms of safety and stability. We summarize the comparison with other methods in Table 1 . Related Work. In parallel with gradient-based approaches, an increasing number of works have explored diffusion models ( song2020denoising ; song2020score ; lipman2022flow ) for control problems ( ajay2022conditional ; lu2025makes ; ubukata2024diffusion ; wang2022diffusion ; ding2024diffusion ; lu2023contrastive ; hansen2023idql ) . One work focuses specifically on diffusion planning, as formulated in Diffuser ( janner2022planning ) , a probabilistic diffusion model that generates action plans by iteratively denoising trajectories. Diffusion planning shows strong performance in long-horizon decision-making and trajectory generation at test time ( janner2022planning ; lu2025makes ) . To address safety in control, model-free safe diffusion planning methods have been proposed, integrating QP based on handcrafted control barrier functions (CBFs) ( xiao2023safediffuser ) . However, designing valid CBFs prior remains a challenge ( ahmadi2016some ) , and the stability guarantee of diffusion policies are still unexplored. Table 1 : Comparison of existing methods and S^{2} Diff (ours). Policy inference includes, quadratic programming (QP), non-convex optimization (NCO), and Diffusion Sampling (DS). Methods Control-affine Trajectory level Safe Stable Policy Inference CLBF-QP ( dawson2022safe ) ✓ ✗ ✓ ✓ QP (fast) MPC ✓ ✓ ✗ ✗ NCO (slow) MBD ( pan2024model ) ✗ ✓ ✗ ✗ DS (fast) S^{2} Diff (ours) ✗ ✓ ✓ ✓ DS (fast) 2 Preliminary Consider a general differentiable nonlinear dynamical system given by \dot{x}=f(x,u), (1) where the state x and control input u belong to the compact sets \mathcal{X}\subseteq\mathbb{R}^{n} and \mathcal{U}\subseteq\mathbb{R}^{m} , respectively. The function f:\mathcal{X}\times\mathcal{U}\to\mathbb{R}^{n} is globally

Read the complete text