arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.03746cs.CVcs.CL
收藏

通过编程视觉思考:迈向图像思考的统一视角

Thinking with Programming Vision: Towards a Unified View for Thinking with Images

Zhejiang University(浙江大学);ByteDance BandAI(字节跳动BandAI)

Zirun Guo, Minjie Hong, Feng Zhang, Kai Jia, Tao Jin

AI总结:

CodeVision提出一种灵活的代码作为工具框架,通过两阶段训练提升模型对图像变化和多工具推理的鲁棒性,实验显示显著提升性能并促进新兴能力。

摘要:

多模态大语言模型(MLLMs)能够通过图像进行思考,可以交互式地使用工具对视觉输入进行推理,但当前方法往往依赖于一组狭窄的工具,这些工具在现实世界中实用性和可扩展性有限。在本工作中,我们首先揭示了一个关键且此前被忽视的弱点:即使是最先进的MLLMs也出人意料地脆弱,对简单的方向变化或自然退化图像表现出显著的性能下降,凸显了对更稳健的基于工具推理的迫切需求。为了解决这一问题,我们提出了CodeVision,一个灵活且可扩展的代码作为工具框架,其中模型生成代码作为通用接口来调用任何图像操作,超越了固定工具注册表。我们通过一种两阶段方法训练我们的模型,首先在高质量数据集上进行监督微调(SFT),该数据集专门用于复杂的多轮工具组合和错误恢复;随后通过强化学习(RL)使用一种新颖且密集的过程奖励函数来鼓励战略和高效的工具使用。为了促进这项研究,我们构建了新的SFT和RL数据集,并引入了一个新的挑战性基准测试套件,旨在严格评估对方向变化和多工具推理的鲁棒性。在Qwen2.5-VL和Qwen3-VL系列上的实验表明,我们的方法显著提高了模型性能,并促进了诸如灵活的工具组合、高效的链式执行以及从运行时反馈中稳健的错误恢复等新兴能力。代码可在https://github.com/ByteDance-BandAI/CodeVision上获取。

英文摘要:

Multimodal large language models (MLLMs) that think with images can interactively use tools to reason about visual inputs, but current approaches often rely on a narrow set of tools with limited real-world necessity and scalability. In this work, we first reveal a critical and previously overlooked weakness: even state-of-the-art MLLMs are surprisingly brittle, showing significant performance degradation on images with simple orientation changes or natural corruptions, underscoring the need for more robust tool-based reasoning. To address this, we propose CodeVision, a flexible and scalable code-as-tool framework where the model generates code as a universal interface to invoke any image operation, moving beyond fixed tool registries. We train our model using a two-stage methodology, beginning with Supervised Fine-Tuning (SFT) on a high-quality dataset curated for complex, multi-turn tool composition and error recovery, followed by Reinforcement Learning (RL) with a novel and dense process reward function to encourage strategic and efficient tool use. To facilitate this research, we construct new SFT and RL datasets and introduce a challenging new benchmark suite designed to rigorously evaluate robustness to orientation changes and multi-tool reasoning. Experiments on Qwen2.5-VL and Qwen3-VL series show that our approach significantly improves model performance and fosters emergent capabilities such as flexible tool composition, efficient chained execution, and robust error recovery from runtime feedback. Code is available at https://github.com/ByteDance-BandAI/CodeVision.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑