CodeV: Code with Images for Faithful Visual Reasoning via Tool-Aware Policy Optimization
Idea
CodeV 将 visual tool use 表示为 Python code,并用 Tool-Aware Policy Optimization(TAPO)同时优化 final-answer correctness 与中间工具结果的 evidence relevance。模型不仅要得到正确答案,还要通过 crop 等操作真正找到与问题有关的视觉区域。
Research Problem
只用最终答案做 reward,会掩盖 unfaithful tool use:模型可能 crop 错误区域、忽略工具输出,却依靠文本线索猜对答案。单纯给 tool invocation bonus 也容易鼓励形式上的调用,因此需要能够检查中间工具行为、又不依赖完整 bounding-box annotation 的 supervision。
Insight
论文选择验证外部可观察的 tool output,而不是评价模型自己写出的 reasoning。这使 reward 更接近实际证据,也减少 judge 被自洽叙述误导的机会。这里的 faithfulness 主要由 crop 是否包含目标来近似;它证明 evidence relevance,尚不能单凭这一指标证明最终答案在因果上依赖了该 crop。
Method
- 先以 visual operation 与 multi-round refinement trajectories 做 SFT,建立 code-with-images 的 cold start;否则直接 RL 容易因早期 code rollout 成功率低而退化为纯文本回答。
- Policy 交替输出 think、code、answer;完整 code block 在 restricted Python sandbox 中执行,日志与派生图像追加到 context,再生成后续 action。
- TAPO 的 tool judge 只接收 question、tool output 和相关 metadata,不读取生成的 thought 或 code;判断结果是否提供相关证据,并抑制无信息的大 crop 等无效操作。
- 将逐次 tool reward 聚合后与 answer reward 加权,用 group-sampled trajectories 构造 baseline,并执行带 clipping 与 KL regularization 的 GRPO-style 更新。评测同时报告 answer accuracy 与正确答案条件下的 faithful tool-use rate。
Sources & Reading Scope
阅读依据:官方 PDF 正文。核读页码按 PDF 页序计数,可能与 proceedings 页码不同。
核读章节:Evidence of Unfaithful Tool Use in VLMs · Methodology · TAPO
依据正文的问题诊断与方法整理;对 faithfulness proxy 与 causal dependence 的区分是本笔记的分析。