2025-12-04 · 专家 · 自然语言处理 · 机器学习

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

这篇论文提出了一个名为CodeVision的框架,通过将代码作为工具的通用接口,提高了多模态大型语言模型(MLLMs)处理图像输入时的鲁棒性和灵活性。

更新于 2025-12-05。作者:Zirun Guo、Minjie Hong、Feng Zhang、Kai Jia、Tao Jin。

中文摘要

多模态大型语言模型(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.

解读

一句话总结

这篇论文提出了一个名为CodeVision的框架,通过将代码作为工具的通用接口,提高了多模态大型语言模型(MLLMs)处理图像输入时的鲁棒性和灵活性。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt