Learning Sampled-data Control for Swarms via MeanFlow

Anqi Dong, Yongxin Chen, Karl H. Johansson, Johan KarlssonarXiv 2026

TL;DR

This paper introduces a new framework for steering large-scale robotic swarms using sparse, discrete control updates by adapting the machine learning concept of "MeanFlow" to linear dynamic systems. Instead of predicting instantaneous velocities, the method learns a finite-window control coefficient that optimizes energy over an entire time interval. This enables highly accurate "few-step" swarm control that inherently respects the underlying physical dynamics of the system.

What Problem Does This Paper Address?

Controlling large-scale swarms (such as drone fleets or autonomous underwater vehicles) requires guiding an entire population of agents from an initial distribution to a desired target configuration. In real-world applications, controllers operate on a sampled-data basis: control inputs are updated at discrete time steps and held constant (or follow a pre-determined profile) over a finite time window due to communication and computational constraints.

However, popular generative machine learning frameworks—like Flow Matching or Diffusion Models—are designed to learn instantaneous quantities, such as velocity or score fields. When researchers try to deploy these continuous-time models using a limited budget of coarse discrete steps, discretization errors compound rapidly, leading to poor control performance or unstable trajectories. This paper bridges the gap between continuous-time learning and discrete-time execution in swarm control.

Methods

The authors extend MeanFlow—a recent generative modeling framework that learns window-level average velocities rather than instantaneous ones—into the domain of structured control systems governed by linear time-invariant (LTI) dynamics:

$$\dot{z}(\tau) = Az(\tau) + Bu(\tau)$$

Instead of predicting an arbitrary state-space velocity, their method operates directly in the control space. It learns a finite-horizon control coefficient $c(z_t, t, r)$ that parameterizes the minimum-energy control profile over a specific time window $[t, r]$.

Concept of interval-based swarm control evolving over finite windows.

Key components of the method include:

  • Local Differential Identity: The authors derive a mathematical identity showing how this window-level control coefficient changes with respect to local bridge velocities.
  • Stop-Gradient Training: This identity allows them to train a neural network using a simple regression objective on local samples from a "minimum-energy bridge," completely avoiding the need for expensive full-trajectory rollouts during training.
  • Sampled-Data Execution: During deployment, the network is queried exactly once per time window to compute the coefficient. This coefficient analytically determines the continuous control signal across that window via the system's controllability Gramian, ensuring the physics of the system are perfectly respected.

Datasets

The method was evaluated using simulated large-scale swarm control tasks:

  1. 2D Planar Swarm Navigation: Moving a swarm of particles from an initial distribution spelling the authors' initials "AYKJ" to a target distribution spelling "DCJK". This was tested under both drift-free conditions and with a rotational drift matrix.
  2. 3D Spatial Swarm Maneuvering: Transporting a swarm from a solid 3D pyramid shape into a hollow torus. This was evaluated under drift-free, 2D rotational drift, and full 3D rotational drift dynamics.

Key Insights and Ideas

  • Control-Space Alignment: In physical systems, arbitrary state-space velocities are rarely possible due to fixed actuation channels ($B$ matrix). By learning directly in the control space rather than the state velocity space, the model inherently respects what the robot's hardware can actually execute.
  • Local Supervision for Global Windows: A major "aha" moment is that a quantity defining a long-term finite-window control profile can still be supervised using purely local information along a training bridge, making training highly efficient.
  • Inherent Feedback Robustness: Because the learned coefficient depends on the current state $z_t$, evaluating it at the start of each interval naturally creates a sampled-data state-feedback loop. This provides passive robustness against external perturbations or particle loss during propagation.

Key Results

  • Few-Step Efficiency: The proposed method successfully achieves high-fidelity swarm steering using as few as 16 discrete control steps across the entire time horizon.
  • Physics-Aware Path Planning: When rotational drift is introduced, the model automatically alters the geometry of the transport plan to exploit the physics. For example, in the 2D task, particles that moved horizontally in the drift-free case are automatically routed vertically so that the rotational drift assists their transport.
2D swarm navigation results under drift-free (top) and rotational drift (bottom) dynamics.
  • Coherent 3D Reorganization: In the demanding 3D pyramid-to-torus task, the controller successfully carves out the hollow center of the torus while keeping the swarm evolution coherent, avoiding the fragmented or unstable motion typical of standard flow-matching methods under coarse discretization.
3D swarm maneuvering from a pyramid to a torus under various drift conditions.

Limitations and Future Work

  • Restricted to Linear Dynamics: The current framework relies heavily on closed-form solutions unique to linear time-invariant (LTI) systems, such as the controllability Gramian and the variation-of-constants formula.
  • Unconstrained Control: The formulation does not explicitly account for hard constraints on control inputs (e.g., bounded actuator torque) or state-space obstacles.
  • Future Directions: The authors suggest extending this control-space MeanFlow approach to nonlinear dynamics, incorporating control constraints, and providing formal stability guarantees under coarse-time execution.

Summary updated

BibTeX
@misc{dong2026learning,
  author = {Anqi Dong and Yongxin Chen and Karl H. Johansson and Johan Karlsson},
  title = {{Learning Sampled-data Control for Swarms via MeanFlow}},
  year = {2026},
  eprint = {2603.20189},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.20189},
}
Figure