NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ChartReasoner: Code-Driven Modality Bridging for Long-Chain Reasoning in Chart Question Answering

Caijun Jia, Nan Xu, Jingxuan Wei, Qingli Wang, Lei Wang, Bihui Yu, Junnan Zhu · Submission to ICLR 2026 · Rejected

TL;DR

ChartReasoner is a new two-stage framework that enables multimodal models to perform long-chain reasoning over charts by using structured code as a bridge. By converting images into executable ECharts code and training with reinforcement learning, the model achieves state-of-the-art performance on complex ChartQA benchmarks, often rivaling proprietary systems like GPT-4o while using significantly fewer parameters.

What Problem Does This Paper Address?

While Large Language Models (LLMs) have become remarkably good at "thinking" through complex text problems (exemplified by models like DeepSeek-R1), this reasoning capability hasn't translated well to the visual domain—specifically for charts.

Current Chart Question Answering (ChartQA) models typically rely on "lossy" image-to-text pipelines. They might extract a table of numbers from a bar chart, but they often lose the spatial context, color semantics, and structural nuances that are vital for complex queries. Furthermore, existing models tend to produce "shallow" reasoning—short, superficial steps that fail when a question requires multi-step logical or numerical inference. The authors aim to bridge this "modality gap" by using symbolic code as a lossless intermediate representation.

Methods

The authors propose a two-stage framework called ChartReasoner:

  1. Chart2Code (The Symbolic Bridge): Instead of just describing a chart in text, the authors first train a model to translate a chart image into structured ECharts code. ECharts is a powerful JavaScript visualization library. Because the code contains the exact data and layout instructions needed to render the chart, it acts as a high-fidelity, lossless representation of the visual input.
  2. ChartThink (Reasoning Synthesis): Using the ECharts code, the authors generate a massive dataset of long-chain reasoning trajectories. They use a "distillation" approach where a teacher LLM looks at the code and the question to write out a detailed, step-by-step logical path to the answer.
  3. Training with GRPO: The final model (based on Qwen2.5-VL-7B) is trained using Supervised Fine-Tuning (SFT) followed by Group Relative Policy Optimization (GRPO). This reinforcement learning technique rewards the model for accuracy and formatting while penalizing "over-reasoning" (being unnecessarily wordy) and hallucinations.

Datasets

The paper introduces two significant new resources:

  • Chart2Code Dataset: 110K synthetic chart-code pairs across 9 major categories and 49 subtypes, used to train the image-to-code translation.
  • ChartThink: A first-of-its-kind dataset containing over 140K multi-step reasoning samples grounded in chart code.

For evaluation, they used four major benchmarks: ChartQA, EvoChart-QA, ChartQAPro, and ChartBench. These include "out-of-domain" tests to see how well the model generalizes to real-world, complex dashboards it hasn't seen before.

Key Insights and Ideas

  • Code as a Universal Language: The "aha moment" here is that code is a better bridge than natural language. Natural language is ambiguous; code is executable. By converting a chart to code, the model can "read" the data structure directly, preserving quantitative details that are usually lost in pixel-to-text conversions.
  • Curing "Verbosity": A common failure in reasoning models is "over-generation"—writing a massive wall of text even for simple questions. The authors found that reinforcement learning (GRPO) effectively pruned these chains, reducing the average reasoning length from 699 to 618 tokens while actually increasing accuracy.
  • Logical Grounding: The model doesn't just guess; it uses the axis structure. For example, if asked about "February," the model reasons: "The x-axis data is [Jan, Feb, March...], so February is the second index." This logical grounding allows it to correct visual ambiguities that trip up standard models.

Key Results

  • Efficiency: The 7B parameter ChartReasoner outperformed all other open-source 7B models and even surpassed many larger specialized models.
  • Competitive with Giants: In out-of-domain settings (EvoChart-QA and ChartQAPro), ChartReasoner approached or even exceeded the performance of proprietary models like GPT-4o and Gemini-2.0-Flash.
  • Reconstruction Accuracy: The Chart2Code module achieved a 92.4% pass rate in reconstructing charts from images, proving that the symbolic bridge is highly reliable.
  • Robustness: The RL phase completely eliminated "truncated responses" (where a model cuts off mid-sentence), a problem that plagued the SFT-only version.

Limitations and Future Work

Despite the success, the authors note a few hurdles:

  • Visual Complexity: The model still struggles with scatter plots and multi-series line charts where data points overlap or are extremely dense. These "noisy" visuals are harder to encode into precise code.
  • Data Distribution: Performance is strongest on bar and pie charts because they are more prevalent in the training data.
  • Future Directions: The authors suggest that future work should focus on improving the "visual encoder" to handle higher-density charts and expanding the diversity of the ChartThink dataset to include even more obscure visualization types.

This summary is based on the paper "ChartReasoner: Code-Driven Modality Bridging for Long-Chain Reasoning in Chart Question Answering" under review for ICLR 2026.

Summary updated

BibTeX
@misc{jia2025chartreasoner,
  author = {Caijun Jia and Nan Xu and Jingxuan Wei and Qingli Wang and Lei Wang and Bihui Yu and Junnan Zhu},
  title = {{ChartReasoner: Code-Driven Modality Bridging for Long-Chain Reasoning in Chart Question Answering}},
  year = {2025},
  eprint = {2506.10116},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.10116},
}
Figure