CCA: collaborative competitive agents for image editing

Tiankai Hang, Shuyang Gu, Dong Chen, Xin Geng, Baining Guo

TL;DR

CCA (Collaborative Competitive Agents) is a novel multi-agent framework that uses Large Language Models (LLMs) to tackle complex, multi-step image editing tasks. By organizing agents into a "collaborative-competitive" structure inspired by Generative Adversarial Networks (GANs), the system can decompose intricate user instructions, execute them using a suite of specialized vision tools, and iteratively refine the results based on internal feedback.

What Problem Does This Paper Address?

While modern generative models like Stable Diffusion or InstructPix2Pix are impressive, they often stumble when faced with "compound" instructions—for example, "colorizing an old photograph, replacing the person with a specific user, and adding a tool to their hand."

The authors identify two primary hurdles:

  1. Complexity: Single-model architectures struggle to decompose and execute multifaceted tasks accurately.
  2. Opacity: Most generative models are "black boxes." If a result is poor, it is difficult to pinpoint which step failed or to learn from the successes of other models because the intermediate "compute graph" is hidden.

Methods

The researchers introduced the Collaborative Competitive Agents (CCA) framework, which consists of two types of agents:

  • Generator Agents (The "Artists"): There are two equal-status generators. Each contains a Planner (which breaks the prompt into subtasks) and a Tool Executor (which selects and runs specific vision tools like GroundingDINO, InstructDiffusion, or Edict).
  • Discriminator Agent (The "Critic"): This agent evaluates the outputs from both generators. It provides specific feedback and decides which version better aligns with the user's request.

The "Secret Sauce": Collaborative Competition Unlike a standard GAN where the discriminator just tries to "catch" the generator, the CCA discriminator provides actionable feedback. The two generators then engage in "collaborative competition": they try to outperform each other while simultaneously learning from the successful strategies and intermediate steps revealed by their rival’s transparent execution plan.

The authors also implemented a Hierarchical Tool Configuration. Instead of overwhelming the LLM with technical manuals, the Planner only sees short tool descriptions to make high-level decisions, while the Executor receives the full technical manual to handle parameter tuning (like adjusting classifier-free guidance scales).

Datasets

The paper focuses on evaluating the framework's reasoning and orchestration capabilities rather than training a new base image model. They utilized:

  • A custom benchmark of 100 complex editing instances to test the effects of collaboration and competition.
  • Human Preference Study: Conducted via a Gradio interface where participants compared CCA against baselines like InstructPix2Pix, MagicBrush, and VisProg.
  • Toolbox: The agents had access to a set of 20 off-the-shelf tools, including LLaVA-1.5 (for image understanding), SDXL-Inpainting, and various image processing functions (Resize, Crop, Flip).

Key Insights and Ideas

  • Transparency as a Feature: Because the agents communicate in natural language and use discrete tools, the entire "thought process" is visible. This allows the system to identify exactly where a plan went wrong.
  • The Power of "Yes/No": The authors found that asking the Discriminator open-ended questions (e.g., "What is wrong with this image?") led to vague feedback. Switching to a "Yes/No" verification format (e.g., "Is there a rainbow in the sky?") significantly improved the precision of the feedback and the quality of subsequent iterations.
  • Iterative Refinement: The system doesn't just "one-shot" the edit. It performs multiple rounds. In later rounds, the Executor learns to adjust hyperparameters (like txt-cfg) based on whether the previous round's edit was too subtle or too aggressive.

Key Results

  • Human Preference: In head-to-head comparisons, 47% of users preferred CCA's results for text alignment, and 44% preferred its visual quality, significantly outperforming baselines like MagicBrush (21%) and InstructDiffusion (23%).
  • Ablation Success: Removing either the "collaboration" (learning from the peer) or "competition" (trying to beat the peer) components led to a measurable drop in user satisfaction, proving that the multi-agent loop is essential.
  • LLM Robustness: While GPT-4 was the primary "brain," the framework also performed well with open-source models. Notably, DeepSeek-V2 achieved a 100% success rate in correctly formatting tool calls within the hierarchical structure.

Limitations and Future Work

Despite its success, CCA has a few notable drawbacks:

  • Sequential Error Accumulation: The pipeline processes subtasks one after another. If an early tool makes a mistake, that error can "snowball" through the rest of the process.
  • Latency: Quality comes at a cost. Using GPT-4, a full editing cycle takes about 11.5 minutes, which is far slower than single-pass diffusion models.
  • Tool Understanding: Agents sometimes lack a deep "intuition" for how a tool behaves, requiring multiple rounds of trial and error.

The authors suggest that future work will involve adding a memory module so agents can "remember" tool behaviors across different sessions, reducing the need for repetitive exploration.

Summary updated

BibTeX
@article{hang2025cca,
  author = {Tiankai Hang and Shuyang Gu and Dong Chen and Xin Geng and Baining Guo},
  title = {{CCA: collaborative competitive agents for image editing}},
  journal = {Frontiers of Computer Science},
  year = {2025},
  url = {https://openreview.net/forum?id=ymfbfjn25e},
}
Figure