TL;DR
Chart-R1 introduces a specialized vision-language model designed to tackle complex, multi-step chart reasoning by combining supervised chain-of-thought (CoT) pre-training with reinforcement learning. By leveraging a novel programmatic data synthesis pipeline that generates charts directly from code, the model learns to decompose intricate visual problems into verifiable subtasks. The resulting model sets a new state-of-the-art among open-source models under 20B parameters, even outperforming proprietary giants on popular chart reasoning benchmarks.
What Problem Does This Paper Address?
Charts are highly information-dense images that require a unique mix of visual parsing, precise numerical comprehension, and multi-step logical inference. While modern Vision-Language Models (VLMs) excel at basic perception (e.g., reading a single value from a bar chart), they struggle significantly with complex reasoning tasks, such as synthesizing data across multiple subcharts or performing sequential mathematical operations.
Traditional Supervised Fine-Tuning (SFT) often causes models to overfit to specific reasoning templates, limiting their generalization. Conversely, recent attempts to apply Reinforcement Learning (RL) to VLMs have primarily focused on simple visual grounding rather than deep, multi-step cognitive reasoning. Chart-R1 addresses this gap by teaching a VLM how to "think" systematically before answering complex chart-based questions.
Methods
The authors implement a robust two-stage training strategy backed by an innovative data generation pipeline:
- Programmatic Data Synthesis: Instead of attempting to parse existing chart images into code (which is prone to errors), the authors reverse the paradigm. They extract real-world tables from arXiv papers, use an LLM to generate diverse Matplotlib plotting code, and execute it to render high-fidelity charts. This executable code provides a lossless textual foundation, allowing an LLM to generate highly complex QA pairs complete with step-by-step reasoning paths.
- Stage 1: Chart-COT (Supervised Fine-Tuning): The base model (Qwen2.5-VL-7B-Instruct) is fine-tuned on the synthesized step-by-step reasoning data. This "cold start" phase teaches the model the fundamental capability of breaking down complex questions into fine-grained, interpretable subtasks.
- Stage 2: Chart-RFT (Reinforcement Fine-Tuning): The model is optimized using Group Relative Policy Optimization (GRPO), which eliminates the need for a resource-heavy critic model. The RL process is guided by a rule-based reward function:
- Accuracy Reward: Employs soft matching with a $\pm5\%$ relative error tolerance for numerical answers and edit distance for string-based answers.
- Format Reward: A regex parser enforces structural integrity, ensuring the reasoning process is enclosed in
<think>tags and the final answer in<answer>tags.
Datasets
The paper introduces ChartRQA, a comprehensive dataset featuring 24 distinct chart types:
- Training Set: 258k total samples, strategically split into ChartRQA-SFT (228k samples) and ChartRQA-RL (30k samples).
- Benchmark Set: A human-verified evaluation benchmark consisting of 1,702 high-quality samples (933 single-chart and 769 multi-chart tasks).
The model was also evaluated on several established open-source benchmarks: ChartQA, CharXiv-RQ, ChartQAPro, and ChartMuseum.
Key Insights and Ideas
- Code-First Generation is Superior: Generating charts from code ensures absolute data fidelity. It allows the data-generation LLM to understand the exact underlying data structure, enabling it to formulate highly challenging cross-subplot questions that are nearly impossible to synthesize from raw images alone.
- The Necessity of Data Separation: A key finding was that using the exact same dataset for both the SFT and RL stages severely degrades performance. Overlapping data causes the model to overfit and simply memorize the SFT reasoning paths, destroying its ability to explore alternative reasoning strategies during RL.
- SFT as an Essential RL Bootstrap: Attempting RL directly from a standard instruct model fails to develop long-chain reasoning. The initial Chart-COT phase is critical; it acts as a behavioral catalyst that significantly increases the generated token length and accelerates reward convergence during the subsequent RL phase.
Key Results
Chart-R1 achieves state-of-the-art performance among open-source VLMs under 20B parameters and rivals top-tier proprietary models:
- ChartQA: Chart-R1 achieves an outstanding 91.04% accuracy, outperforming its baseline Qwen2.5-VL-7B (87.30%), and beating proprietary models like GPT-4o (85.7%) and Gemini-1.5-Pro (87.2%).
- ChartRQA Benchmark: On the authors' challenging new benchmark, Chart-R1 scores 52.09% on single charts and 49.93% on multi-charts, vastly outperforming general-domain open-source models.
Limitations and Future Work
The primary limitation acknowledged by the authors is the scope of the visual data. Because the training data relies heavily on tables extracted from academic arXiv papers, Chart-R1 is highly optimized for scientific and statistical charts. Consequently, it exhibits a performance gap when faced with more practical, real-world visual layouts like business dashboards, complex infographics, and flowcharts.
The authors plan to expand their programmatic synthesis framework in future work to encompass these diverse, non-academic visualization styles to build a more universally versatile chart reasoner.
Summary updated