WorksComputer Science
Rapid Mean-Field Formation Transport with a Shared-Representation Neural Fokker-Planck Controller
Abstract
This paper develops a mean-field formation transport method with low online computational cost for large-scale multi-agent systems. Classical mean-field planners often require repeated solutions of coupled forward and backward partial differential equations, making online replanning computationally demanding. Density and control are therefore approximated by a common parameterized nonlinear map with separate scalar density and vector control outputs. Parameters are optimized using Fokker–Planck and initial-condition residuals, formation-matching costs on numerically simulated closed-loop particle trajectories, and control effort. Numerical computations are restricted to a bounded region of the state space, with an additional penalty on probability flux across its boundary. For the periodic-domain model, we establish well-posedness of the induced density evolution and bound the density-approximation error in terms of the dynamics and initial-condition residuals. Parameter optimization precedes online operation, during which controller coefficients remain fixed. Experiments quantify the accuracy–runtime trade-off relative to a mean-field planner, show lower transport error than classical feedback baselines, and demonstrate the benefits of the common parameterization.
Introduction
Large-scale robotic formation control is becoming increasingly important for tasks requiring scalable and robust coordination [1]. Classical approaches include potential-field control [2] and consensus-based coordination [3], but distributional objectives under stochastic disturbances motivate a population-level description. Mean-field formulations are attractive in this regime because they describe the swarm through a population density and interpret formation synthesis as probability transport [4, 5]. This formulation characterizes the spatial distribution of large agent populations under stochastic disturbances and expresses formation objectives directly in terms of the population density.
Numerical methods for coupled mean-field partial differential equations (PDEs) include policy iteration with repeated forward–backward solves [6] and alternating optimization of population and control approximations [7]. When these computations are repeated online, their cost can limit feedback implementation under restricted computational resources. Optimization based on particle simulations evaluates formation objectives directly, but does not explicitly impose the Fokker–Planck equation on an auxiliary density approximation. The control synthesis problem is therefore to incorporate the probability-transport dynamics and formation objectives into a feedback law that can be evaluated with low online computational cost.
This paper jointly parameterizes a decentralized feedback law and an auxiliary density approximation using a neural network, defined as a finite composition of affine maps and componentwise nonlinear functions. A common transformation of state and time supplies intermediate coordinates to separate density and control output maps. The coefficients are computed by minimizing an objective that combines density residuals, formation mismatch, and control effort. This numerical parameter optimization, termed training or learning, is performed offline, before online feedback execution (deployment). Formation mismatch is evaluated on simulated closed-loop particle trajectories (rollouts); their use in parameter optimization is termed rollout supervision. During online operation, the coefficients remain fixed, and each agent evaluates the feedback law using only its current state and time.
The contributions are summarized as follows.
A common state-time parameterization is constructed for the feedback law and density approximation. The shared coefficients couple the two maps during offline optimization, while online control requires only evaluation of the feedback map at each agent’s state and the current time.
A joint synthesis objective combines Fokker–Planck and initial-condition residuals with particle-based formation costs and control effort. The residual terms promote consistency with the density dynamics, while the particle-based terms penalize deviations from prescribed formations at selected times.
For the periodic-domain model, well-posedness of the induced density evolution and a residual-to-density error bound are established under the stated assumptions. The bound quantifies consistency between the density approximation and the exact density induced by the synthesized feedback law.
Presented for publication in the 2026 IEEE Conference on Decision and Control (CDC).
© 2026 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.
Background
Mean-Field Control and Probability Transport
Mean-field formulations describe the collective behavior of large agent populations through a state distribution [4]. For stochastic agent dynamics, the evolution of this distribution is characterized by a controlled Fokker–Planck equation [5]. Formation control can therefore be formulated as steering an initial population density toward a prescribed target distribution subject to drift and diffusion. Decentralized control under population coupling has been studied for large stochastic multi-agent systems [8], with applications to swarm tracking developed within mean-field game formulations [9]. Mean-field games seek consistency between individually optimal control laws and the resulting population distribution. The formulation considered here instead minimizes a common population objective, while retaining the controlled Fokker–Planck description of density evolution.
Numerical approaches to mean-field planning and mean-field games include policy iteration [6], proximal-gradient optimization [10], and alternating updates of neural density and control approximations [7]. Coupled approximations of the control law, value function, and population density have also been used to construct mean-field-game controllers for large multi-agent systems [11]. For methods that solve the coupled optimality equations separately for each planning instance, changes in the task specification require additional computation. This requirement can limit their use when control inputs must be computed within a restricted online computational budget.
Physics-Informed Solvers for Mean-Field Games
Physics-informed approximation incorporates governing-equation residuals into parameter optimization. Applications to mean-field games include spatiotemporal physics-informed neural operators [12] and unsupervised solution-operator learning [13]. These approaches approximate solution fields or mappings from problem data to solutions while incorporating the governing equations into the approximation procedure.
The coupling between density evolution and individual optimality remains part of the mean-field game formulation. Physics-informed neural network (PINN) methods address this coupling through residual-based optimization of network coefficients. Operator approximations can reduce the computation required for new problem instances by performing parameter optimization offline; their computational requirements depend on the class of problems represented. This paper considers a prescribed population-level formation objective and constructs an explicit feedback law through joint offline optimization of density and control approximations. During online operation, each agent evaluates this law at its current state and time with fixed coefficients, without solving a coupled forward–backward system.
Problem Formulation
Formation-Control Problem
Let denote the state domain, the time horizon, and the state of agent , for . The continuum model and analysis use the periodic domain . Bounded Euclidean boxes, also denoted by when discussing numerical computations, are treated separately through the boundary rules specified in Section IV. The swarm distribution is represented by the empirical measure
where denotes the Dirac measure concentrated at , so records the swarm shape at time . Let denote a set of target points. The target measure
specifies the desired allocation of mass among these points. More generally, target samples can describe a continuous spatial distribution around the desired geometry. The control objective is to drive toward the prescribed target distribution at selected times while limiting control effort.
On the periodic domain, each agent obeys the stochastic dynamics
where and are known, is the common feedback law, and is the diffusion coefficient. (1) is interpreted periodically. The are independent standard -dimensional Wiener processes, independent of the initial states, which are independently sampled from . The standing analytical assumptions are , , and with and . The spaces and are the usual periodic Sobolev spaces, and .
Fix a control bound . The admissible class consists of deterministic feedback laws that are measurable in time, Lipschitz continuous in state uniformly in time, and satisfy . Each such law yields well-posed agent dynamics. Population coupling enters through the common design objective rather than an explicit density-dependent drift.
Mean-Field Control Formulation
For a fixed , independent of the population size , let denote the probability density of the common state law. Write when the feedback is understood. The empirical measure is a random finite-sample representation of this law. Independence gives, for each fixed and continuous test function ,
Thus is the weak limit of . Densities at different evaluation times are time slices of this same evolving law, corresponding to the empirical measures at those times.
For a smooth periodic test function , define the controlled diffusion generator
Then Itô’s formula applied to (1) and averaged over the swarm gives
By Itô’s isometry, the stochastic integral over has second moment at most for . Taking expectations gives
for all smooth periodic test functions and almost every , which is the weak form of the controlled Fokker–Planck equation. Hence formation control becomes a probability-transport problem for the swarm density, and the shared feedback law in (1) induces
with initial density . The periodic model requires no boundary flux condition. Numerical computations on bounded boxes use an auxiliary flux penalty and particle projection, which are not covered by the periodic-domain analysis. Let , with , denote the formation-evaluation times, and let denote the prescribed target densities at those times. A finite target measure is atomic and has no Lebesgue density; a continuous target can instead be specified by smooth profiles around the target points. Empirical measures of independent, identically distributed samples from converge weakly almost surely to as their sample size increases. For static formations, one may take for all , whereas for staged transport tasks the target density may vary with . The mean-field formation-transport problem is therefore to choose a shared feedback law such that the induced density approaches at the selected times while maintaining moderate control effort. The target geometry is imposed by penalizing the mismatch between simulated particle distributions and target formations at the times in .
Shared-Representation Neural Fokker–Planck Controller
Shared-Representation Density-Control Parameterization
The approximations and , parameterized by the coefficient vector , are coupled through the transport term
The shared feature map computes intermediate coordinates used by both outputs. The density head is the scalar output map , and the control head is the vector output map . They use the common coordinates to compute the raw scalar and feedback input , respectively. With collecting all adjustable coefficients,
The raw output may have either sign and is not itself a probability density. The common map followed by the two output maps defines the two-head architecture, termed the shared-representation neural Fokker–Planck controller (SR-NFPC). The density output is normalized at each time by
where and is a fixed numerical offset. Since , exact evaluation of the denominator gives and ; numerical quadrature introduces an integration error. The term learned density refers to the approximation obtained by parameter optimization. Equations (3) and (4) define a coupled map
with shared intermediate coordinates. The control output satisfies . Smooth nonlinearities provide the derivatives required for collocation and yield a feedback law that is Lipschitz continuous in state on the compact state-time domain. For the periodic analysis, both approximations are required to be periodic in state, so . Online execution requires only the composition .
Physics-Informed Density Residuals
Density residuals measure defects in the controlled Fokker–Planck equation and its initial condition. Define the interior operator
so the formal mean-field model (2), together with , requires
The dynamics and initial-condition residuals entering the formal analysis are
For a square-integrable residual, the continuous norm satisfies
where is the norm of the embedding . Collocation approximates the squared norm by residual evaluations at sampled points. This finite-sample quantity does not itself bound without an additional sampling-error estimate. All derivatives act on the normalized density in (4), including the time-dependent denominator.
For the bounded box used in numerical computations, let denote the outward unit normal on . The auxiliary boundary penalty is
which penalizes departures from zero normal probability flux. For the periodic model, set . The bounded-domain penalty does not impose an exact boundary condition.
Minimizing these residuals promotes consistency with the transport-diffusion equation and initial distribution. These constraints alone do not select a target formation, since different feedback laws can induce different density evolutions satisfying the same PDE model and initial condition.
Formation Matching by Particle Simulation
Formation costs evaluated on simulated particle distributions supply geometric information absent from the PDE residuals. These simulations use the same feedback law as online operation.
For the bounded-box numerical model, use simulated particles initialized independently from . Let be the number of integration steps, , and . The projected Euler–Maruyama update is
where , , the are independent vectors independent of the initial states, is the identity matrix, and is Euclidean projection onto the closed box. This numerical boundary rule is distinct from the periodic interpretation of (1).
For simulation, choose evaluation times , where . The particle set is compared with target samples and prescribed centers . The entries of are independent and identically distributed with density , independently of the simulated particles. The formation-matching cost is
where MMD is the maximum mean discrepancy, the fixed weights satisfy and , and balances center assignment against distribution matching. MMD compares unlabeled samples without estimating a density or assigning individual particle correspondences. We use the Gaussian kernel
where is the prescribed spatial bandwidth, distinct from the diffusion coefficient . For sample sets and , we define
including diagonal pairs. This cost is differentiable with respect to particle positions and invariant to sample ordering. At the population level, Gaussian-kernel MMD is zero only for identical probability distributions [14], making it suitable for matching multimodal formations.
For and , the formation-center term combines a weighted distance cost with a penalty for uneven allocation:
where controls the concentration of the assignment weights , is the allocation penalty weight, is the average assignment weight for center , and . The relative entropy is .
Using the residual penalty as a surrogate for the weak residual, the composite loss is
The weights are positive, and weights the bounded-domain penalty. Numerical optimization approximates the integrals in (12) by quadrature or sampling. The particle term specifies the formation objective, while the residual terms promote consistency of the density approximation with the controlled dynamics.
Offline Optimization and Online Feedback Execution
Formation mismatch is evaluated at selected times rather than every integration step. For static targets, we evaluate formation mismatch at and ; for mode splitting or aggregation, we add one intermediate time before the final approach. No full reference trajectory is prescribed for individual particles.
Each offline iteration samples residual-evaluation points and simulates particles to evaluate (12). The PDE residual depends on the normalized density and the feedback , so its gradients update both output maps and the common map. The particle formation cost depends on the feedback
Algorithm 1 Offline optimization and online feedback for SR-NFPC
Sample interior, initial, and boundary points for residual evaluation.
Evaluate , , and sampled PDE, initial, and boundary residual losses.
Simulate closed-loop particle trajectories with (8) under .
Compute formation-matching cost (9) from MMD and weighted center assignments.
Update using the sampled objective corresponding to (12); repeat steps 1–5 for the prescribed iterations.
Fix and apply online.
composition : it directly updates and , and changes the density approximation indirectly through . Online, each agent applies with fixed : one evaluation of the common map and control output map per agent and control update. Algorithm 1 summarizes the procedure.
Density Approximation Bound
The normalized network output approximates the exact density induced by the same feedback law. Both objects are defined on the periodic domain in this section. The analysis uses the Aubin–Lions compactness theorem [15] and the Lions–Magenes time-continuity and energy identities [16 Ch. III, Sec. 1].
Proposition 1. Under the standing analytical assumptions, for every , (2) with initial density admits a unique weak solution satisfying
Moreover, almost everywhere and for every .
Proof. Omitted due to page limits.
Fix and a normalized periodic approximation satisfying
This regularity gives a representative in , so the time traces in the error estimate are well defined.
Theorem 1. Under the standing analytical assumptions and (13), there is , independent of , such that
Proof. Omitted due to page limits.
The constant depends only on , , , , , and . Theorem 1 concerns the periodic continuum model; sampling, time-discretization, and bounded-domain boundary errors are outside its scope.
Experiments
Setup
The experiments consist of a 1D Fokker–Planck (FP) transport benchmark and a 2D formation-control simulation. The 1D benchmark uses the domain , horizon , time step , diffusion , and 1800 simulated particles. The target is a Gaussian profile with center 1.2 and scale 0.09, restricted to the domain and normalized to unit mass. We compare the proposed controller against a tuned mean-field planning baseline [9, 10] and a tuned centralized sampled-goal baseline that assigns each agent a sampled terminal target and tracks it with centralized feedback.
The formation control simulation uses the 2D domain , horizon , time step , diffusion , and 2500 agents. We evaluate five target geometries, namely line, ring, split, transition, and triangle. We compare against a navigation-function potential-field baseline [2], a consensus-style feedback baseline [3, 17], and the uncontrolled case. Metrics are terminal 2-Wasserstein distance , control energy, and runtime.
1D Planner Comparison
Figure 1 compares the transient transport errors. After approximately , SR-NFPC has a smaller discrepancy than the mean-field planner over most of the remaining horizon, whereas the planner attains the lowest terminal error. The curves complement the terminal metrics by showing how rapidly the population approaches the target distribution during the maneuver.
Figure 1. Evolution of the 2-Wasserstein distance to the target distribution on the 1D benchmark. The plotted reference is the fixed target density.
Table 1 shows that SR-NFPC trades terminal accuracy for lower control energy and shorter reported runtime relative to the mean-field planner. The centralized sampledgoal baseline provides an additional accuracy reference; its timing is not directly comparable because it uses a different communication architecture.
| Method | Energy | Time (s) | |
| SR-NFPC | 0.077 | 3.626 | 0.101 |
| Mean-field plan [10] | 0.025 | 3.886 | 0.307 |
| Centralized sampled-goal | 0.040 | 5.077 | 0.044 |
Table 1. 1D benchmark terminal metrics and total runtime.
Table 2. Average performance over five formation tasks.
Formation Benchmark
Figure 2 summarizes the five-formation suite. SR-NFPC achieves the lowest terminal Wasserstein distance among the compared methods on all five tasks, with particularly large reductions on the line, transition, and triangle targets.
Figure 2. Terminal Wasserstein distance across the five formation tasks. SR-NFPC achieves the lowest error among the compared methods on all five tasks.
Table II makes the trade-off explicit. The proposed controller has the lowest average Wasserstein distance among the compared methods, with average control energy between those of the potential-field controller [2] and the consensus controller [3], [17]. The no-control baseline confirms that diffusion alone is not enough to recover the target geometries.
Effects of the Shared Representation
Table III shows that, on the transition task, replacing separate density/control networks with a shared representation reduces the parameter count from 17,154 to 2,594 while reducing terminal from 0.0542 to 0.0394 and runtime from 0.0862 s to 0.0621 s. This supports the design choice behind (4)–(12), since the Fokker–Planck equation couples density and control directly.
This comparison supports the use of shared coordinates: the shared model uses fewer parameters and achieves lower terminal and control energy on the reported task.
Conclusions
This paper presented a mean-field formation-transport method with direct online feedback evaluation based on a shared-representation neural Fokker–Planck controller. The
| Metric | Shared map | Separate maps |
| Terminal | 0.0394 | 0.0542 |
| Control energy | 4.158 | 4.756 |
| Runtime (s) | 0.0621 | 0.0862 |
| Parameter count | 2594 | 17154 |
Table 3. Shared representation versus separate density/control networks on the transition task.
combined objective uses density residuals to promote consistency with the controlled dynamics and particle costs to specify the target formation. The shared parameterization supports direct feedback evaluation after offline optimization. Future work will extend the controller to obstacle-rich environments, higher-dimensional formations, and stronger approximation guarantees for the particle-based formation cost.
References
- [1]M. Dorigo, G. Theraulaz, and V. Trianni, “Swarm robotics: Past, present, and future [point of view],” Proceedings of the IEEE, vol. 109, no. 7, pp. 1152–1165, 2021.DOI
- [2]E. Rimon and D. E. Koditschek, “Exact robot navigation using artificial potential functions,” IEEE Transactions on Robotics and Automation, vol. 8, no. 5, pp. 501–518, 1992.DOI
- [3]W. Ren and R. W. Beard, Distributed Consensus in Multi-vehicle Cooperative Control: Theory and Applications. Springer, 2008.DOI
- [4]J.-M. Lasry and P.-L. Lions, “Mean field games,” Japanese Journal of Mathematics, vol. 2, no. 1, pp. 229–260, 2007.
- [5]A. Bensoussan, J. Frehse, and P. Yam, Mean Field Games and Mean Field Type Control Theory. Springer, 2013.DOI
- [6]S. Cacace, F. Camilli, and A. Goffi, “A policy iteration method for mean field games,” ESAIM: Control, Optimisation and Calculus of Variations, vol. 27, p. 85, 2021.arxiv.org/abs/2007.04818
- [7]A. T. Lin, S. W. Fung, W. Li, L. Nurbekyan, and S. J. Osher, “Alternating the population and control neural networks to solve high-dimensional stochastic mean-field games,” Proceedings of the National Academy of Sciences, vol. 118, no. 31, p. e2024713118, 2021.DOI
- [8]T. Li and J.-F. Zhang, “Asymptotically optimal decentralized control for large population stochastic multiagent systems,” IEEE Transactions on Automatic Control, vol. 53, no. 7, pp. 1643–1660, 2008.DOI
- [9]Z. Zhou and H. Xu, “Large-scale multiagent system tracking control using mean field games,” IEEE Transactions on Neural Networks and Learning Systems, vol. 33, no. 10, pp. 5602–5610, 2022.DOI
- [10]J. Yu, R. Lai, W. Li, and S. Osher, “A fast proximal gradient method and convergence analysis for dynamic mean field planning,” Mathematics of Computation, vol. 93, no. 346, pp. 603–642, 2024.arxiv.org/abs/2102.13260
- [11]Z. Zhou and H. Xu, “A novel mean-field game-type optimal control for very large-scale multiagent systems,” IEEE Transactions on Cybernetics, vol. 52, no. 6, pp. 5197–5208, 2022.
- [12]S. Liu, X. Chen, and X. Di, “Scalable learning for spatiotemporal mean field games using physics-informed neural operator,” Mathematics, vol. 12, no. 6, p. 803, 2024.DOI
- [13]H. Huang and R. Lai, “Unsupervised solution operator learning for mean-field games,” Journal of Computational Physics, vol. 537, p. 114057, 2025.DOI
- [14]A. Gretton, K. M. Borgwardt, M. J. Rasch, B. Schölkopf, and A. Smola, “A kernel two-sample test,” Journal of Machine Learning Research, vol. 13, pp. 723–773, 2012. [Online]. Available: https://jmlr.org/papers/v13/gretton12a.htmlDOI
- [15]J. Simon, “Compact sets in the space Lp(0,T; B),” Annali di Matematica Pura ed Applicata, vol. 146, pp. 65–96, 1986.
- [16]J.-L. Lions and E. Magenes, Non-Homogeneous Boundary Value Problems and Applications. Springer, 1972, vol. 1.
- [17]R. Olfati-Saber, “Flocking for multi-agent dynamic systems: Algorithms and theory,” IEEE Transactions on Automatic Control, vol. 51, no. 3, pp. 401–420, 2006.

