TL;DR
MMDynOpt-Agent is a novel reinforcement learning framework that trains a lightweight agent to dynamically optimize prompts for large multimodal language models (MLLMs) over multiple turns. By framing multi-turn reasoning as a Markov Decision Process and utilizing a cost-aware "Prism Reward," it significantly boosts reasoning accuracy across diverse domains while drastically reducing token consumption. Crucially, the agent generalizes zero-shot to completely unseen MLLM architectures at inference time.
What Problem Does This Paper Address?
While Multimodal Large Language Models (MLLMs) excel at visual understanding, they frequently struggle with complex, multi-step reasoning tasks. A major bottleneck is their inability to efficiently translate raw visual cues and question semantics into effective intermediate reasoning conditions.
Existing solutions fall short in three major ways:
- Static Prompts: Standard prompt optimization techniques generate static templates that cannot adapt to sparse or heterogeneously distributed visual information across different reasoning steps.
- The Quality-Cost Dilemma: Test-time scaling and multi-agent debate systems improve accuracy but suffer from an explosion in token consumption and interaction rounds.
- Poor Generalization: Most optimization strategies are tightly coupled with specific model architectures, making cross-model transfer difficult.
The authors introduce MMDynOpt-Agent to bridge this "adaptivity gap" by personalizing prompt interventions on an instance-by-instance, turn-by-turn basis.
Methods
MMDynOpt-Agent models the interaction between a lightweight agent ($\pi_\theta$, such as Qwen2.5-VL-3B) and a large-scale target MLLM (the environment, $\mathcal{E}$) as a Markov Decision Process (MDP).
The core components of this architecture include:
- Action Space: At each turn, the agent decides whether to execute a steering action (generating a dynamic optimization prompt to refine the MLLM's focus) or an answering action (concluding the trajectory and outputting the final answer).
- Prism Reward: To balance accuracy and cost, the authors designed a hierarchical gating reward mechanism that evaluates three dimensions:
- Format Compliance: Rewards the agent for strictly following structural tags (
<think>,<prompt>). - Answer Correctness: Measures token-level F1 score against the ground truth.
- Budget Efficiency: Penalizes excessive interaction turns and token usage.
- Policy Optimization: The agent is trained end-to-end using Group Relative Policy Optimization (GRPO). Gradients propagate exclusively through the lightweight agent's tokens, keeping the target MLLM completely frozen and treated as a black box.
Datasets
The framework was rigorously evaluated across 15 public multimodal datasets spanning medicine, finance, and general science:
- Training (9 datasets): PMC-VQA, MedXpertQA, OmniMedVQA, FinChart-Bench, FinMME, Sujet-Finance-QA-Vision-100k, GeoQA, ScienceQA, and Multi.
- Out-of-Distribution Evaluation (6 datasets): MathVista, PathVQA, SeePhys, VisFinEval, AI2D, and VQA-RAD.
To test true generalization, the 6 OOD datasets were kept entirely unseen by the agent during the training phase.
Key Insights and Ideas
- The Adaptivity Gap is Real: The authors show that dataset-level prompt searches often underperform plain inference because a single static prompt cannot satisfy the unique visual demands of every question. Turn-level, instance-conditioned prompting is essential.
- On-Demand Escalation: The agent naturally learns an adaptive turn-control policy. It resolves straightforward problems quickly (typically in 2 rounds) but automatically escalates to 4–5 rounds for complex mathematical or physical reasoning tasks.
- Environment Agnosticism: Because the agent communicates with the target MLLM purely through a standardized text/image interface, the policy is decoupled from the target model's internal parameters. This allows for seamless, zero-shot cross-model transfer.
Key Results
- Superior Accuracy: MMDynOpt-Agent consistently outperformed strong test-time scaling baselines (like Tree of Thoughts and Self-Consistency). On the overall benchmark, it elevated Qwen3-VL-32B's performance from a baseline of 48.76% EM / 63.87% F1 to 58.10% EM / 71.21% F1.
- Massive Efficiency Gains: MMDynOpt-Agent achieved its peak accuracy using an average of just 2.8K tokens per sample. In comparison, Tree of Thoughts (ToT) consumed over 413K tokens per sample, and Best-of-N used around 17K tokens.
- Robust Zero-Shot Transfer: When transferred to four completely unseen MLLMs (InternVL3.5-38B, NVIDIA-Nemotron-Nano-12B, Qwen3-VL-30B, and Gemma-3-27B), the agent consistently boosted performance on OOD datasets without any additional fine-tuning. Notably, weaker baseline models experienced the largest relative performance jumps.
Limitations and Future Work
Despite its strengths, the authors note several limitations:
- Latency Constraints: Because it relies on multi-turn interactions, the framework is less suited for ultra-low-latency or strict single-turn production environments.
- Target Model Bounds: The agent acts as an external guide; it cannot inject new knowledge or capabilities into the target MLLM. If the target model suffers from severe underlying perception or instruction-following deficiencies, the agent's upside is bounded.
Future Directions: The team plans to explore finer-grained early-stopping mechanisms, integrate the framework with retrieval-augmented generation (RAG) and external tools, and develop more robust model-agnostic interface adaptation techniques to handle target model heterogeneity.
Summary updated