LyapuFlow: Controlling Generative Flows with Lyapunov Feedback for Inverse Problems
Organizations: Lawrence Berkeley National Lab · International Computer Science Institute · Georgia Institute of Technology · Siemens
Abstract
Pretrained flow models are now widely used as generative priors in science and vision, where inference-time guidance enables test-time constraints without retraining. Existing methods use projection, posterior sampling, or iterative optimization of the generative trajectory. We propose LyapuFlow, an alternative based on Lyapunov feedback control. At each sampling step, LyapuFlow predicts the terminal sample towards which the current flow is evolving, and evaluates the constraint violation on this prediction. Then, we compute the minimum-norm control that satisfies a prescribed Lyapunov decrease condition. The resulting control remains inactive when the uncontrolled dynamics already reduce the constraint violation at the prescribed rate. Otherwise, it provides a corrective update within a feedback trust region that prevents the control from dominating the pretrained dynamics. We demonstrate LyapuFlow in both data and latent spaces, outperforming alternatives spanning different mechanisms for test-time constraint enforcement in scientific machine learning and image inverse problems.
Figures & tables
| Dataset | Metric | LyapuFlow | DPS | SAD-Flower | FlowDPS | ProFlow | PCFM | OC-Flow | FFM [-2pt]w/ Proj. |
|---|---|---|---|---|---|---|---|---|---|
| 1D Heat | 0.012 | 0.221 | 3.463 | 2.127 | 0.485 | 0.115 | 0.134 | 5.206 | |
| 0.004 | 0.002 | 1.835 | 1.234 | 0.335 | 0.700 | 0.339 | 2.809 | ||
| FPD | 0.006 | 0.093 | 1.064 | 0.826 | 0.377 | 0.639 | 0.353 | 1.481 | |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
| 0 | 0 | 0.003 | 0.001 | 0.002 | 0 | 0.001 | 0.001 | ||
| 1D Burgers | 0.163 | 0.254 | 6.874 | 7.578 | 9.326 | 4.303 | 4.172 | 8.266 |
| AFHQ 1k (768 768) | ||||||||||||
| Super-resolution x4 (Bicubic) | Deblurring (Gauss) | Deblurring (Motion) | ||||||||||
| Method | PSNR | SSIM | FID | LPIPS | PSNR | SSIM | FID | LPIPS | PSNR | SSIM | FID | LPIPS |
| FlowChef | 29.43 | 0.798 | 27.30 | 0.095 | 25.22 | 0.717 | 40.81 | 0.274 | 26.33 | 0.739 | 40.83 | 0.230 |
| FlowDPS | 28.24 | 0.746 | 16.05 | 0.122 | 25.41 | 0.680 | 26.87 | 0.244 | 25.95 | 0.693 | 22.78 | 0.212 |
| LyapuFlow (Ours) | 30.05 | 0.829 | 9.68 | 0.045 | 26.88 | 0.723 | 20.21 | 0.172 | 27.03 | 0.740 | 20.47 | 0.166 |
| FFHQ 1k (768 768) | ||||||||||||
| 1D Burgers | 2D NS | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | FPD | FPD | |||||||||
| LyapuFlow (Ours) | 0.165 | 0.213 | 0.200 | 0 | 1.532 | 0.978 | 5.457 | 2.480 | 0.568 | 0 | 0 |
| w/o feedback trust region | 0.285 | 0.237 | 0.474 | 0 | 1.303 | 0.896 | 5.497 | 2.473 | 0.576 | 0 | 0 |
| w/o time derivative | 0.574 | 0.401 | 1.890 | 0 | 4.757 | 3.067 | 6.038 | 2.712 | 0.761 | 0 | 0 |
Appendix figures & tables26 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Spatial dimension | Temporal dimension | Train samples | |
|---|---|---|---|---|
| 1D Heat | 5,000 | |||
| 1D Burgers | 6,400 | |||
| 1D RD | 6,400 | |||
| 2D NS | 10,000 |
| Task | Type | Residual | |
| 1D Heat | Linear IC | 100 | |
| Linear CL | 99 | , | |
| Total | 199 | ||
| 1D Burgers | Linear IC | 101 | |
| Nonlinear Dynamics | 495 | , | |
| Nonlinear CL | 100 | , |
| Dataset | Selected conditions | Reference fetch per condition | Total |
|---|---|---|---|
| 1D Heat | 1 IC ( ) | 512 analytic -trajectories, | 512 |
| 1D Reaction–Diffusion | 16 IC | 32 BC trajectories per IC | 512 |
| 1D Burgers | 16 IC | 32 BC trajectories per IC | 512 |
| 2D Navier–Stokes | 10 IC (vorticity) | 10 forcing trajectories per IC (vorticity) | 100 |
| Dataset | LyapuFlow | DPS | SAD-Flower | FlowDPS | ProFlow | OC-Flow |
|---|---|---|---|---|---|---|
| 1D Heat | ; | ; | ; | ; ; | ||
| 1D Burgers | ; | ; | ; | ; ; | ||
| 1D RD | ; | ; | ; | ; ; | ||
| 2D NS | ; | ; | ; | ; ; |
| Dataset | Metric | LyapuFlow (Ours) | DPS | SAD-Flower | FlowDPS | ProFlow | PCFM | OC-Flow |
|---|---|---|---|---|---|---|---|---|
| 1D Heat | Second / sample | 1.106 | 0.802 | 0.401 | 0.71 | 0.774 | 0.618 | 2.992 |
| Peak memory (GiB) | 0.167 | 0.157 | 0.115 | 0.115 | 0.833 | 0.493 | 0.545 | |
| 1D Burgers | Second / sample | 1.87 | 1.29 | 0.579 | 2.242 | 2.295 | 1.712 | 3 |
| Peak memory (GiB) | 0.168 | 0.158 | 0.141 | 0.141 | 0.862 | 0.62 | 0.561 | |
| 1D RD | Second / sample | 1.351 | 0.959 | 0.475 | 1.297 | 1.375 | 0.987 | 2.867 |
| Peak memory (GiB) | 0.186 | 0.174 | 0.119 | 0.119 | 1.31 | 0.748 | 0.805 |
| 1D Heat | 1D Burgers | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | FPD | FPD | |||||||||
| LyapuFlow (Ours) | 0.012 | 0.004 | 0.006 | 0 | 0 | 0.163 | 0.212 | 0.204 | 0 | 0.010 | 0.005 |
| w/o trust region | 0.012 | 0.004 | 0.006 | 0 | 0 | 0.283 | 0.235 | 0.458 | 0 | 0.008 | 0.004 |
| w/o time derivative | 0.067 | 0.018 | 0.043 | 0 | 0 | 0.584 | 0.398 | 2.240 | 0 | 2.208 | 4.800 |
| 28 NFEs | 40 NFEs | ||||||
|---|---|---|---|---|---|---|---|
| Dataset | Task | ||||||
| AFHQ | Super-resolution (Bicubic) | 5 | 28 | 1.0 | 5 | 40 | 1.0 |
| AFHQ | Deblurring (Gaussian) | 5 | 3 | 1.0 | 5 | 40 | 1.0 |
| AFHQ | Deblurring (Motion) | 5 | 7 | 1.0 | 5 | 40 | 1.0 |
| FFHQ | Super-resolution (Bicubic) | 5 | 28 | 1.0 | 5 | 40 | 1.0 |
| FFHQ | Deblurring (Gaussian) | 5 | 3 | 1.0 | 5 | 7 | 1.0 |
| Sampler | NFE | SR | Deblur (Gaussian) | Deblur (Motion) | Second / image | ||||
|---|---|---|---|---|---|---|---|---|---|
| PSNR | LPIPS | PSNR | LPIPS | PSNR | LPIPS | ||||
| LyapuFlow (Ours) | 1 | 40 | 30.63 | 0.041 | 28.76 | 0.117 | 28.87 | 0.120 | 13.8 |
| FlowChef | 1 | 40 | 30.90 | 0.060 | 26.62 | 0.219 | 28.52 | 0.175 | 11.9 |
| FlowDPS | 3 | 40 | 30.09 | 0.101 | 26.57 | 0.208 | 27.83 | 0.171 | 26.6 |
| FlowLPS | 15 | 40 | 24.86 | 0.060 | 28.87 | 0.075 | 30.08 | 0.065 | 112.6 |
| FLAIR | 15 | 40 | 22.84 | 0.044 | 26.29 | 0.094 | 26.93 | 0.088 | 112.8 |
| AFHQ 1k (768 768) | ||||||||||||
| Method | Super-resolution x4 (Bicubic) | Deblurring (Gauss) | Deblurring (Motion) | |||||||||
| PSNR | SSIM | FID | LPIPS | PSNR | SSIM | FID | LPIPS | PSNR | SSIM | FID | LPIPS | |
| FlowChef | 29.67 | 0.807 | 22.34 | 0.077 | 25.42 | 0.719 | 38.55 | 0.256 | 26.56 | 0.743 | 36.37 | 0.2107 |
| FlowDPS | 28.51 | 0.764 | 18.45 | 0.124 | 25.67 | 0.697 | 29.65 | 0.244 | 26.20 | 0.710 | 25.21 | 0.2106 |
| LyapuFlow (Ours) | 30.35 | 0.833 | 8.93 | 0.040 | 27.42 | 0.732 | 17.86 | 0.137 | 27.57 | 0.750 | 17.06 | 0.1429 |
| FFHQ 1k (768 768) | ||||||||||||
Constrained Generative Modeling
Constrained generative modeling develops methods that produce samples satisfying structural, physical, semantic, or user-defined requirements.
See all 180 papers