CodeV: 도구 인식 정책 최적화를 통한 정확한 시각적 추론을 위한 이미지 기반 코딩
CodeV: Code with Images for Faithful Visual Reasoning via Tool-Aware Policy Optimization
November 24, 2025
저자: Xinhai Hou, Shaoyuan Xu, Manan Biyani, Mayan Li, Jia Liu, Todd C. Hollon, Bryan Wang
cs.AI
초록
에이전시 비전-언어 모델은 이미지 연산을 호출하여 "이미지로 생각"하도록 점차 훈련되고 있습니다. 그러나 우리는 최종 답변 정확도가 높을지라도 시각적 추론의 비신뢰성이 종종 숨겨져 있음을 보여줍니다. 모델은 관련 없는 영역에 도구를 사용하거나 도구 출력을 완전히 무시한 후에도 여전히 정답을 맞출 수 있습니다. 본 연구에서는 먼저 중간 시각 도구 출력(예: 크롭)이 실제로 질의된 증거를 포함하는지 측정하는 신뢰성 평가 프로토콜을 제안합니다. 이를 통해 최근의 시각 에이전트가 높은 최종 답변 정확도를 달성하지만 시각적 탐색 벤치마크에서 신뢰할 수 있는 도구 사용률은 낮다는 사실을 밝혀냅니다. 다음으로, 코드 기반 시각 에이전트인 CodeV와 Tool-Aware Policy Optimization(TAPO)으로 훈련된 방법을 소개합니다. TAPO는 사고 연쇄 토큰이 아닌 시각 도구의 입력과 출력에 직접 정의된 조밀한 보상으로 GRPO를 확장하는 프로세스 수준의 강화 학습 프레임워크로, 감독이 검증하기 쉽고 보상 해킹에 덜 취약합니다. CodeV는 시각 도구를 실행 가능한 Python 코드로 표현하며, TAPO는 질문과 도구 출력만을 기반으로 단계별 보상을 부여하여 필요적이고 증거와 일관된 도구 사용을 장려합니다. 2단계 SFT+RL 파이프라인에서 CodeV는 관련 시각 탐색 벤치마크에서 경쟁력 있거나 우수한 정확도를 달성하는 동시에 신뢰할 수 있는 도구 사용률을 크게 향상시켰습니다. 시각적 탐색을 넘어 CodeV는 다양한 다중 모달 추론 및 수학 벤치마크에서도 강력한 성능을 보여, 중간 도구 행동을 명시적으로 감독하는 것이 신뢰할 수 있는 에이전시 시각 추론 시스템 구축에 중요함을 시사합니다.
English
Agentic vision-language models are increasingly trained to "think with images" by calling image operations. However, we show that high final-answer accuracy often hides unfaithful visual reasoning: models may invoke tools on irrelevant regions or ignore tool outputs entirely, yet still guess the correct answer. In this work, we first propose a faithfulness evaluation protocol that measures whether intermediate visual tool outputs (e.g., crops) actually contain the queried evidence. This reveals that recent visual agents achieve high final-answer accuracy but exhibit low rates of faithful tool-use on visual search benchmarks. We then introduce CodeV, a code-based visual agent trained with Tool-Aware Policy Optimization (TAPO). TAPO is a process-level RL framework that augments GRPO with dense rewards defined directly on visual tool inputs and outputs, rather than on chain-of-thought tokens, making supervision easier to verify and less susceptible to reward hacking. CodeV represents visual tools as executable Python code, and TAPO assigns step-wise rewards based solely on the question and tool output, encouraging both necessary and evidence-consistent tool use. In a two-stage SFT+RL pipeline, CodeV achieves competitive or superior accuracy while substantially increasing faithful tool-use rates on related visual search benchmarks. Beyond visual search, CodeV attains strong performance on a range of multimodal reasoning and math benchmarks, suggesting that explicitly supervising intermediate tool behavior is crucial for building trustworthy, agentic visual reasoning systems.