Visual Programmability: A Guide for Code-as-Thought in Chart Understanding

Bohao Tang, Yan Ma, Fei Zhang, Jiadi Su, Ethan Chern +4 more
9/11/2025
cs.CV

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

Chart understanding presents a critical test to the reasoning capabilities of Vision-Language Models (VLMs). Prior approaches face critical limitations: some rely on external tools, making them brittle and constrained by a predefined toolkit, while others fine-tune specialist models that often adopt a single reasoning strategy, such as text-based chain-of-thought (CoT). The intermediate steps of text-based reasoning are difficult to verify, which complicates the use of reinforcement-learning signals that reward factual accuracy. To address this, we propose a Code-as-Thought (CaT) approach to represent the visual information of a chart in a verifiable, symbolic format. Our key insight is that this strategy must be adaptive: a fixed, code-only implementation consistently fails on complex charts where symbolic representation is unsuitable. This finding leads us to introduce Visual Programmability: a learnable property that determines if a chart-question pair is better solved with code or direct visual analysis. We implement this concept in an adaptive framework where a VLM learns to choose between the CaT pathway and a direct visual reasoning pathway. The selection policy of the model is trained with reinforcement learning using a novel dual-reward system. This system combines a data-accuracy reward to ground the model in facts and prevent numerical hallucination, with a decision reward that teaches the model when to use each strategy, preventing it from defaulting to a single reasoning mode. Experiments demonstrate strong and robust performance across diverse chart-understanding benchmarks. Our work shows that VLMs can be taught not only to reason but also how to reason, dynamically selecting the optimal reasoning pathway for each task.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{tang2025visual,
  title  = {Visual Programmability: A Guide for Code-as-Thought in Chart Understanding},
  author = {Bohao Tang and Yan Ma and Fei Zhang and Jiadi Su and Ethan Chern and Zhulin Hu and Zhixin Wang and Pengfei Liu and Ya Zhang},
  year   = {2025},
  eprint = {2509.09286},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.09286v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.09286.svg)](https://codeofpaper.com/paper/2509.09286)

Discussion