DiffPhyCon: A Generative Approach to Control Complex Physical Systems

Long Wei, Peiyan Hu, Ruiqi Feng, Haodong Feng, Yixuan Du, Tao Zhang, Rui Wang, Yue Wang, Zhi-Ming Ma, Tailin Wu

Controlling the evolution of complex physical systems—such as the plasma in a fusion reactor or the fluid dynamics around a swimming organism—is a notoriously difficult challenge across science and engineering. Traditional methods like Proportional-Integral-Derivative (PID) control are often too simplistic for high-dimensional, nonlinear systems. Conversely, Model Predictive Control (MPC) is more robust but computationally expensive and prone to getting stuck in local optima.

Recent deep learning and Reinforcement Learning (RL) approaches have attempted to bridge this gap but face a "myopic" dilemma: they often optimize step-by-step, losing sight of long-term goals. Worse, they can generate "adversarial" states that appear correct to a neural network but violate the underlying physical laws (PDE constraints). Furthermore, these models are bottlenecked by their training data; if the dataset only contains mediocre control examples, the model struggles to extrapolate to truly optimal ones.

To address these limitations, researchers have introduced Diffusion Physical systems Control (DiffPhyCon), a novel generative framework that uses diffusion models to solve complex physical control problems by jointly optimizing entire trajectories and control sequences.

The DiffPhyCon Methodology

Instead of predicting the next state iteratively, DiffPhyCon treats the entire system trajectory ($\mathbf{u}$) and the control sequence ($\mathbf{w}$) as a single, high-dimensional variable.

Overview of the DiffPhyCon framework

The framework operates on three core principles:

  1. Generative Energy Perspective: The model learns the joint distribution of trajectories and controls, $p(\mathbf{u}, \mathbf{w})$, using a diffusion model. This learned distribution acts as an implicit "physics engine." High-probability regions correspond to sequences that naturally obey the system's underlying Partial Differential Equations (PDEs).
  2. Guided Inference: During the denoising process, the model does not merely sample from the learned distribution. It utilizes the gradient of a specific predefined control objective (e.g., "move the jellyfish as fast as possible") to steer the sampling trajectory toward optimal solutions.
  3. Prior Reweighting: This is the framework's most critical innovation. The authors recognize that the learned distribution is heavily biased by the (often suboptimal) training data. To counter this, they introduce a hyperparameter $\gamma$ to "flatten" the prior distribution of control sequences.
Visualization of the energy landscape and prior reweighting

As illustrated above, prior reweighting allows the model to explore low-probability regions of the control space that yield much higher rewards. This effectively enables the model to "hallucinate" and discover near-optimal, physics-compliant control strategies that significantly outperform anything it observed during training.

Experimental Setup and Datasets

The researchers evaluated DiffPhyCon on three increasingly complex tasks:

  • 1D Burgers’ Equation: A standard benchmark for fluid flow and shock waves.
  • 2D High-Dimensional Smoke Control: Controlling smoke density across a $64 \times 64$ grid, involving approximately 100,000 control variables.
  • 2D Jellyfish Movement: A newly released benchmark dataset of 30,000 trajectories generated via Computational Fluid Dynamics (CFD). It simulates a flapping jellyfish in a fluid field, where the goal is to maximize swimming speed through complex vortex interactions.

Key Insights and Results

DiffPhyCon consistently outperformed state-of-the-art baselines, including Soft Actor-Critic (SAC), BPPO, and MPC across various metrics:

  • Global Optimization: By optimizing the entire horizon at once, DiffPhyCon avoids the "greedy" pitfalls of RL, where a model might take a short-term gain that leads to long-term failure.
  • Physics-Faithfulness: Because the diffusion model learns the joint distribution of states and controls, the generated trajectories remain faithful to the physics, even when the control signals are highly novel.
  • Emergent Biological Patterns: In the jellyfish task, DiffPhyCon discovered a highly efficient "fast-close-slow-open" flapping pattern. This specific timing is known in fluid dynamics to be optimal for propulsion, yet it was rare in the training data. The model's ability to find this through prior reweighting is a strong validation of its exploratory power.
  • Quantitative Dominance:
    • Burgers' Equation: Reduced control error by 30.1% to 52.6% compared to the best baselines across various observation scenarios.
  • Jellyfish Control: In the full observation setting, it achieved an average speed of 279.87, nearly tripling the speed of the best RL baseline (BPPO at 107.67).
  • Smoke Control: Achieved the lowest objective score (0.2254) compared to Behavioral Cloning (BC) and RL methods, proving its scalability to extremely high-dimensional control spaces.

Limitations and Future Work

While DiffPhyCon represents a significant leap forward, the authors note a few limitations. The model is currently trained offline; integrating a "solver-in-the-loop" during training could provide real-time feedback and further improve accuracy. Additionally, DiffPhyCon operates in an open-loop manner, meaning it plans the entire sequence at once but cannot adjust to unexpected real-time perturbations. Finally, as a data-driven generative approach, there is no mathematical guarantee that the discovered solution is the absolute global optimum.

Future work will likely focus on closing these control loops and applying the framework to real-world hardware, such as underwater robotics or plasma control in fusion reactors.

Summary updated

BibTeX
@inproceedings{wei2024diffphycon,
  author = {Long Wei and Peiyan Hu and Ruiqi Feng and Haodong Feng and Yixuan Du and Tao Zhang and Rui Wang and Yue Wang and Zhi-Ming Ma and Tailin Wu},
  title = {{DiffPhyCon: A Generative Approach to Control Complex Physical Systems}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=MbZuh8L0Xg},
}
Figure