TeamFlowRL: Online Policy Optimization of Decentralized Flow Policies for Multi-Agent Coordination
Organizations: Sun Yat-sen University
Abstract
Complex cooperative tasks require coordinated multi-agent behavior. Offline generative policies learn expressive cooperative behaviors from trajectories but remain limited by fixed datasets. Online reinforcement learning can improve them through environment interaction. However, fine-tuning flow policies is difficult because action likelihoods are hard to compute. We propose TeamFlowRL, a two-stage framework that pretrains multi-agent flow policies offline and fine-tunes them online. We formulate team policy optimization over the complete denoising trajectories of decentralized flow policies, avoiding intractable action likelihoods. The resulting objective weights each agent's trajectory ratio with a shared team advantage and clips each ratio separately, aligning local policy updates with the common team return. Across 51 paired configurations in seven simulation groups, TeamFlowRL improves every offline initialization, with a 47.3% average gain in normalized score. It also achieves 33.1% higher average success under exploration noise than Gaussian-policy fine-tuning across 6 bimanual tasks.
Figures & tables
| Method | Policy representation | Policy optimization | Online | Multi-agent |
|---|---|---|---|---|
| DPPO [ 24 ] | Diffusion | PPO on denoising transitions | — | |
| ReinFlow [ 33 ] | Flow | PPO on denoising trajectories | — | |
| FPO [ 15 ] | Flow | Flow matching loss ratio | — | |
| MAPPO [ 32 ] | Categorical / Gaussian | PPO on each agent’s action | ||
| MADiff [ 34 ] | Diffusion | Return conditioning | ||
| DOM2 [ 12 ] | Diffusion | Q-learning + BC |
| MPE | Spread | Tag | World | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Expert | Medium | M-R b | Random | Expert | Medium | Random | Expert | Medium | Random | |
| MADiff-D a [ 34 ] ( 2024 ) | m | m | m | m | m | m | ||||
| DOM2 [ 12 ] ( 2026 ) | ||||||||||
| MAC-Flow [ 9 ] ( 2026 ) | ||||||||||
| TeamFlowRL (w/o online RL) | ||||||||||
| TeamFlowRL | ||||||||||
| MAPPO | BC+MAPPO | TeamFlowRL | |||
|---|---|---|---|---|---|
| Task | Trained | Pretrained | Fine-tuned | Pretrained | Fine-tuned |
| MS Pick | 0.0% | 0% | 34.4% | 20% | 91.6% |
| MS Stack | 0.0% | 16% | 82.6% | 31% | 95.8% |
| MS Stack, cam. | 0.0% | 19% | 52.0% | 54% | 84.0% |
| MS Stack, away | 0.0% | 0% | 69.0% | 1% | 91.6% |
| RF Stack | 0.0% | 2% | 49.8% | 25% | 90.4% |
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Meaning |
|---|---|
| Indices, clocks, and local information | |
| Agent index and number of controlled agents ( ). | |
| Environment step and episode horizon. | |
| Denoising step and number of flow steps, with . | |
| Continuous interpolation time between latent noise and data. | |
| Local actor input and centralized critic input. | |
| TeamFlowRL | BC+MAPPO | |
|---|---|---|
| Initial policy | Ten-step flow teacher from flow matching | One-step student network, latent fixed at zero |
| Sampling distribution | Markov chain of Gaussian transitions with learnable noise | Gaussian around the student output with a learned standard deviation shared across states and agents |
| Stored sample | Complete denoising trajectory | Raw action before clipping |
| Likelihood | Sum of transition log probabilities (Equation 4 ). The action marginal cannot be evaluated directly | Gaussian likelihood of the raw action |
| Ratio | One trajectory ratio per agent (Equation 7 ) | One action ratio per agent |
| Clipping | Per-agent ratio, by default, computed in log space | Per-agent ratio, in the robot tasks |
| Benchmark | Actor | Critic | Clip | KL | Ref. | Ent. | Epochs | Minib. | Envs | Rollout | Grad. | Warmup | Penalty | Actor input | Critic input | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SMAC, SMACv2 | 2e-5 | 3e-4 | 0.99 | 0.95 | 0.2 | 0.02 | 0 | 0 | 4 | 256 | 8 | 128 | 0.5 | 1st iter. | off | 0.1 | frozen recurrent features | state |
| MPE, MA-MuJoCo | 2e-5 | 3e-4 | 0.99 | 0.95 | 0.2 | 0.02 | 0 | 0 | 4 | 256 | 40 | 128 | 0.5 | 1st iter. | off | 0.1 | local observation | joint observation or state |
| OMIGA | HalfCheetah | Hopper | Ant | Avg. | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Expert | M-E | Expert | M-R | M-E | Expert | Medium | M-R | M-E | ||
| MACQL [ 8 ] ( 2020 ) | ||||||||||
| MATD3BC [ 6 ] ( 2021 ) | ||||||||||
| OMAR [ 17 ] ( 2022 ) | ||||||||||
| OMIGA [ 31 ] ( 2023 ) | ||||||||||
| MADiff-D [ 34 ] ( 2024 ) | ||||||||||
| Pretraining | Online fine-tuning | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | Init. | Pre. upd. | Demos | Split | Batch | Seq. | Steps | Envs | Ep. len. | Actor | Critic | Epochs | Clip | KL stop | Ref. KL | Ent. | Minib. | Rollout | Exec. | |
| MS3 | TeamFlowRL | 10-step | 50k | 983/1007 | 90/10 | 128 | 20 | 5M | 64 | 100 | 2e-5 | 3e-4 | 4 | – | 0.02 | – | – | – | 6400 | random |
| BC+MAPPO | 1-step | 50k | 983/1007 | 90/10 | 128 | 20 | 5M | 64 | 100 | 2e-5 | 3e-4 | 4 | 0.05 | 0.02 | 0.01 | 0.001 | 128 | 6400 | mean | |
| RF | TeamFlowRL | 10-step | 30k | 817/1024 | 735/82 | – | – | 2M | 64 | 100 | 2e-5 | 3e-4 | 4 | – | 0.02 | – | – | – | 6400 | – |
| BC+MAPPO | 1-step | 30k | 817/1024 | 735/82 | – | – | 2M | 64 | 100 | 2e-5 | 3e-4 | 4 | – | 0.02 | – | – | – | 6400 | mean | |
| Spread Medium | Spread M-R | 2-Ant Poor | ||||
|---|---|---|---|---|---|---|
| Ratio | Final | Last 10% | Final | Last 10% | Final | Last 10% |
| Complete trajectory per agent (default) | 449.6 | 448.9 | 300.3 | 305.4 | 3195 | 3162 |
| Clipped per denoising step | 401.5 | 406.2 | 301.2 | 301.8 | 3195 | 2971 |
| Averaged and clamped | 441.2 | 434.7 | 255.5 | 263.2 | 3035 | 3052 |
Cooperative MARL
Cooperative multi-agent reinforcement learning (MARL) trains agents to coordinate toward shared goals under partial information and decentralized control.
See all 275 papers