Flow matching for stochastic linear control systems

Yuhang Mei, Mohammad Al-Jarrah, Amirhossein Taghvaei, Yongxin Chen

TL;DR

This paper bridges the gap between generative AI and classical control theory by adapting "flow matching" to systems with constrained linear dynamics. Instead of assuming we can move particles in any direction, the authors derive a feedback control law that steers probability distributions through specific control channels, providing both analytical solutions for Gaussian mixtures and a scalable neural network approach for high-dimensional systems.

What Problem Does This Paper Address?

In generative modeling, "flow matching" has become a popular alternative to diffusion models because it is simpler and faster to train. Usually, these models assume you can move a data point (or "particle") from point A to point B along any arbitrary velocity vector.

However, in the physical world—think of a swarm of robots or a complex thermodynamic system—you can’t just teleport particles. You are constrained by the system's dynamics (the $A$ matrix) and can only influence the state through specific control inputs (the $B$ matrix). The challenge is: how do we find a control law that moves an entire "cloud" of initial states (an initial probability distribution) to a target "cloud" (a target distribution) while respecting these physical constraints?

Methods

The authors propose a framework that generalizes flow matching to Deterministic and Stochastic Linear Control Systems.

  1. Stochastic Bridges: The core idea relies on "stochastic bridges"—mathematical constructs that describe the path of a particle conditioned on starting at point $x$ and ending at point $y$.
  2. Conditional Expectation: The optimal feedback control law is characterized as the conditional expectation of the control inputs for these bridges. Essentially, the controller looks at where a particle is currently and "averages" the best moves to get it to the target distribution based on the underlying physics.
  3. The Controllability Gramian: To solve the steering problem, the authors utilize the controllability Gramian—a classic tool in control theory that determines if a system can be moved to any state.
  4. Analytical vs. Numerical:
    • For Gaussian and Gaussian Mixture Models (GMMs), the authors derive explicit, closed-form analytical formulas for the control law.
  5. For more complex distributions, they propose a least-squares regression approach. They train a ResNet (Residual Neural Network) to approximate the control law by minimizing the difference between the network's output and the ideal "bridge" control inputs.

Datasets

As a theoretical and algorithmic paper, the authors do not use standard computer vision or NLP datasets. Instead, they evaluate their method on synthetic benchmarks designed to test control performance:

  • 2D Systems: A double integrator (basic physics), a pure oscillator, and a Nyquist-Johnson resistor model.
  • Target Distributions: They test steering toward complex shapes, including mixtures of two and four Gaussians, and uniform distributions on concentric circles.
  • High-Dimensional Systems: 4-dimensional and 8-dimensional mass-spring-damper systems to test scalability.

Key Insights and Ideas

  • The "Surprising" Symmetry: One of the most interesting findings (Remark 5) is that the same feedback control law works for both deterministic and stochastic versions of the system. The noise (Brownian motion) doesn't change the fundamental structure of the controller.
  • Control over Velocity: Traditional flow matching is essentially a control problem where the system is a simple integrator ($dX/dt = u$). This paper shows that by incorporating the $A$ and $B$ matrices, we can apply generative modeling to much more realistic physical systems.
  • Scalability: By using a neural network to learn the "average" control input, the method avoids the "curse of dimensionality" that plagues many other distribution-steering methods (like those based on solving partial differential equations).

Key Results

  • Qualitative Success: In 2D simulations, the "transported density" (the distribution reached by the controller) almost perfectly overlaps with the "exact target density," even for non-Gaussian shapes like circles.
  • Quantitative Accuracy: The authors used Maximum Mean Discrepancy (MMD) and Wasserstein-2 ($W_2$) distance to measure error. In the 8D mass-spring system, the $W_2$ distance remained low, demonstrating that the neural network successfully learned to steer high-dimensional distributions.
  • Efficiency: The training process uses a standard ADAM optimizer and requires relatively small sample sizes ($N=2000$), making it computationally practical.

Limitations and Future Work

  • Linearity: The current work focuses primarily on linear systems. While the authors briefly mention an extension to "control-affine" systems (where dynamics are non-linear but control enters linearly), they acknowledge that sampling from those stochastic bridges is much harder.
  • State Constraints: The paper does not yet address "no-go zones" or boundaries in the state space (e.g., a robot avoiding a wall while moving toward a target distribution).
  • Optimality: While the method is efficient, it doesn't necessarily guarantee the most energy-efficient path (like optimal transport might), though it can be combined with optimal couplings (like the Sinkhorn algorithm) to improve this.

The authors suggest that future research could explore state constraints and more complex non-linear dynamics to broaden the applicability of this "control-aware" generative approach.

Summary updated

BibTeX
@inproceedings{mei2025flow,
  author = {Yuhang Mei and Mohammad Al-Jarrah and Amirhossein Taghvaei and Yongxin Chen},
  title = {{Flow matching for stochastic linear control systems}},
  booktitle = {L4DC},
  year = {2025},
}

Loading related content...

Figure