Cognitive-structured Multimodal Agent for Multimodal Understanding, Generation, and Editing

Feng Wang, Canmiao Fu, Zhipeng Huang, Chen Li, Jing Lyu, Ge LiarXiv 2026

TL;DR

Monolithic multimodal models struggle with long-horizon dialogues because repeatedly feeding all historical images into a single context window causes "visual token explosion" and severe retrieval degradation. This paper introduces a Cognitive-structured Multimodal Agent that externalizes visual history into an explicit Episodic Visual Memory and selectively retrieves relevant images on demand. This modular 8B agent surpasses 32B monolithic baselines by +8.2% in retrieval accuracy while nearly halving per-turn inference latency.

What Problem Does This Paper Address?

State-of-the-art unified multimodal models consolidate understanding and generation within a single parameter space, treating interaction as autoregressive prediction over a unified token sequence. While effective for short contexts, this monolithic design breaks down in long-horizon, multi-turn dialogues where users reference images from many turns prior or iteratively edit visual content.

The authors identify two major bottlenecks in standard architectures:

  1. Visual Token Explosion: Visual tokens are computationally expensive. Accumulating them across a 20-turn conversation quickly exhausts the context window, crowding out the budget needed for textual reasoning.
  2. Retrieval Degradation and Semantic Drift: Relying on implicit attention over massive visual histories causes models to lose track of long-range references. For instance, a strong unified baseline (BAGEL) correctly retrieves historical visual context in fewer than 3% of the hardest dialogue turns.
Figure 1. A multi-turn multimodal dialogue produced by our Cognitive-structured Multimodal Agent, spanning 20 turns across four topics (stargazing dome, biological cells, cleanroom facility, spacecraft). The agent autonomously handles interleaved understanding, generation, and editing tasks while accurately retrieving and referencing visual episodes from earlier turns.

Methods

Instead of treating images as persistent tokens in the main context window, the proposed framework decouples perception, memory, retrieval, and execution into a modular multi-agent system:

Figure 2. End-to-end pipeline of the proposed Cognitive-structured Multimodal Agent. Each incoming image passes through the Perceptual Abstraction Engine (PAE), which compresses it into a structured entry (tags, description, thumbnail) written to the Episodic Visual Memory (EVM). Given the current query and dialogue state, the Cognitive Retrieval Engine (CoRE) selects only the visual episodes relevant to this turn. The Multimodal Executive Controller (MEC) integrates the retrieved memory with the dialogue context and dispatches the request to understanding, generation, editing, composition, or pure chat, keeping per-turn visual-token consumption bounded regardless of dialogue length.
  • Perceptual Abstraction Engine (PAE): Compresses incoming images into structured JSON entries containing semantic tags, a natural-language description, and a compact thumbnail.
  • Episodic Visual Memory (EVM): An external database where the PAE's structured entries are stored, keeping the primary dialogue context unburdened by raw visual tokens.
  • Cognitive Retrieval Engine (CoRE): Performs cross-modal reasoning over the EVM to selectively retrieve only the visual episodes relevant to the current user query.
  • Multimodal Executive Controller (MEC): Acts as the central planner. It classifies the task intent (generation, editing, composition, understanding, or chat) and orchestrates the other modules.

Staged SFT + RL Optimization

To make these modules work in harmony, the authors implement a unique training pipeline:

  1. Retriever SFT & RL: The CoRE retriever is first fine-tuned via Supervised Fine-Tuning (SFT) and then optimized using Direct Alignment Policy Optimization (DAPO). The reward function uses a difficulty-weighted Jaccard similarity between predicted and ground-truth retrieval sets.
  2. Memory Writer RL: Crucially, the PAE (memory writer) is optimized via RL against a frozen retriever. Instead of optimizing for standard captioning metrics (like CIDEr), the PAE is directly rewarded when its generated text descriptions lead to successful downstream retrieval by the CoRE.

The authors also introduce CMA-Harness, a production-ready deployment framework that expands the MEC's action space to 17 tools (e.g., web search, background removal, deterministic collage layout) and supports persistent multi-session memory.

Datasets

A major hurdle in training memory-aware multimodal agents is that existing dialogue datasets lack turn-level retrieval annotations. To solve this, the authors built the Unified Scenario Engine (USE), a programmatic, closed-loop simulation pipeline.

Figure 3. Closed-loop Unified Scenario Engine for structured multi-turn scenario construction. A Gemini-based user simulator samples a topic and emits the next query together with its ground-truth retrieval set and difficulty tag; a zero-shot multi-agent system (Qwen-VL + Qwen-Image-Edit) produces the candidate answer; a GT-justify verification step checks retrieval correctness and corrects mismatches before the verified answer is fed back to the simulator for the next turn. The resulting sessions are split into disjoint training and held-out (M2CA-Bench) partitions by random seed and topic.

Using USE, they generated two key resources:

  • Training Set: ~5,400 turns across 270 sessions, complete with fine-grained retrieval annotations and difficulty tags.
  • M2CA-Bench (Multi-turn Context Agent Benchmark): A strictly held-out evaluation benchmark consisting of 100 sessions (2,000 turns) across 55 distinct topics. Turns are stratified into four difficulty tiers (Easy, Medium, Hard, Very Hard) based on temporal span, topic-switching frequency, and referential ambiguity.
Table 1. Retrieval difficulty taxonomy.

Key Insights and Ideas

  • The Asymmetry of Multimodal Dialogue: While text history requires continuous context to maintain semantic flow, visual history is sparse—only a tiny fraction of past images matter at any single turn. Exploiting this asymmetry is the key to efficiency.
  • Task-Specific Optimization beats Parameter Scaling: Rather than scaling a monolithic model to 32B parameters, structuring the memory of an 8B model and optimizing its retrieval mechanics yields substantially better long-horizon performance.
  • Retrieval-Driven Captioning: Standard image captioning focuses on holistic description. By training the captioner (PAE) to satisfy the retriever (CoRE), the agent learns to highlight discriminative features (e.g., specific colors, layout complexities) that help distinguish near-duplicate images later in the chat.

Key Results

The 8B Cognitive-structured Agent was evaluated against monolithic and multi-agent baselines on M2CA-Bench:

  • Retrieval Accuracy: On the English benchmark, the 8B agent achieved 91.4% overall retrieval accuracy, outperforming the 32B Multi-Agent baseline by +8.2%. On the hardest subsets involving long-range callbacks ( $\ge 8$ turns), the margin widened significantly.
  • Inference Speedup: By filtering out irrelevant historical images, the per-turn inference time was slashed from 23.1 seconds to 12.7 seconds (a 1.8× speedup) compared to all-context baselines.
  • Downstream Quality: Improved retrieval directly translated to higher generation and editing quality, as verified by Gemini-3-Pro evaluations, preventing the semantic drift common in monolithic architectures.

Limitations and Future Work

  • Staged vs. Joint Training: The current optimization pipeline is staged (SFT $\rightarrow$ Retriever RL $\rightarrow$ Memory Writer RL). The authors note that fully joint end-to-end optimization could further improve representation alignment.
  • Open-Domain Scaling: While CMA-Harness introduces web tools, extending the core cognitive architecture to handle completely open-domain, unconstrained web workflows remains an open challenge.
  • Modality Expansion: The framework currently focuses on text and images; extending explicit episodic memory to video and audio streams is a natural next step.

Summary updated

BibTeX
@misc{wang2026cognitive,
  author = {Feng Wang and Canmiao Fu and Zhipeng Huang and Chen Li and Jing Lyu and Ge Li},
  title = {{Cognitive-structured Multimodal Agent for Multimodal Understanding, Generation, and Editing}},
  year = {2026},
  eprint = {2607.08497},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.08497},
}
Figure