CMAD: Cooperative Multi-Agent Diffusion via Stochastic Optimal Control

Riccardo Barbano, Alexander H. Denker, Zeljko Kereta, Runchang Li, Francisco Vargas

Continuous-time generative models, particularly diffusion models, have revolutionized image synthesis. However, "composing" these models—combining multiple pre-trained experts to satisfy complex, multi-part constraints—remains a significant challenge. Traditional methods often treat composition as an algebraic operation, such as multiplying probability densities (a "Product of Experts"). This approach assumes the target distribution is known explicitly, which is rarely true in practice.

The researchers behind CMAD (Cooperative Multi-Agent Diffusion) propose a paradigm shift: treating compositional generation as a cooperative Stochastic Optimal Control (SOC) problem. Instead of merging densities, they treat pre-trained diffusion models as individual "agents" whose trajectories are jointly steered toward a shared objective.

The Compositional Gap

Current algebraic methods often struggle when the target isn't a simple mathematical mix, frequently resulting in "Frankenstein" images where different regions fail to integrate naturally. CMAD addresses this "compositional gap" by focusing on steering the path of the generative process rather than calculating complex density intersections.

Methodology: Diffusion as Cooperative Control

In the CMAD framework, each pre-trained model acts as an independent agent controlling a specific subset of the generation process (e.g., a horizontal stripe of pixels).

  1. The Aggregator: A function $\phi$ combines the states of all agents into a single "aggregated state."
  2. Shared Objective: Agents minimize a global cost function $J$, which includes:
  3. Control Cost: Keeps agents close to their original pre-trained knowledge.
  4. Terminal Cost: Measures how well the final output meets the target goal (e.g., classification accuracy).
  5. Running Cost (Tweedie Guidance): Provides per-step guidance using Tweedie’s formula to estimate the final clean image from noisy intermediate states.
  6. Coordinate-wise Optimization: To ensure scalability, the authors optimize one agent's steering policy at a time while keeping others fixed.

Experimental Validation on MNIST

The authors validated CMAD using a conditional MNIST generation task. The image is split into horizontal stripes, each assigned to a different agent. The goal is to generate a coherent digit that satisfies a global classification constraint.

Visual comparison of CMAD vs. CDPS. CMAD (top) produces coherent digits, while the CDPS baseline (bottom) results in disjointed "Frankenstein" images.

As shown in the visual results, CMAD produces realistic, coherent characters. In contrast, the baseline CDPS (Compositional Diffusion Posterior Sampling) often produces "broken" images where the stripes do not align visually.

Quantitative Performance

Quantitatively, CMAD significantly outperforms the baseline in terms of terminal loss ($\Psi$), which measures how well the final image satisfies the target constraint while maintaining realism.

Performance comparison across different digits and agent counts. CMAD variants consistently achieve lower loss ($\Psi$) than the CDPS baseline.

For a 3-agent setup generating the digit '3', CMAD reached a loss of 0.131, whereas the CDPS baseline remained at 0.638. While both methods maintain high classification accuracy, CMAD’s lower loss reflects its superior ability to generate visually coherent and natural-looking samples.

Conclusion and Future Directions

CMAD demonstrates that framing composition as a control problem allows for more flexible and realistic generative modeling. While currently tested on MNIST, future work aims to scale this approach to high-resolution models like Stable Diffusion. Key challenges include reducing the computational cost of training control policies and exploring "game-theoretic" scenarios where agents might have competing objectives.

Summary updated

BibTeX
@inproceedings{barbano2026cmad,
  author = {Riccardo Barbano and Alexander H. Denker and Zeljko Kereta and Runchang Li and Francisco Vargas},
  title = {{CMAD: Cooperative Multi-Agent Diffusion via Stochastic Optimal Control}},
  booktitle = {ReALM-GEN @ ICLR},
  year = {2026},
  url = {https://openreview.net/forum?id=XJto8p5maC},
}
Figure