Chart-based Reasoning: Transferring Capabilities from LLMs to VLMs

Victor Carbune, Hassan Mansoor, Fangyu Liu, Rahul Aralikatte, Gilles Baechler, Jindong Chen, Abhanshu Sharma

Abstract

Charts and plots are essential for data communication, yet they pose a significant challenge for AI models that must integrate visual perception with numerical reasoning. While Large Language Models (LLMs) excel at logical reasoning, smaller Vision-Language Models (VLMs) often struggle with the multi-step logic required for complex chart analysis. This paper presents a novel framework to transfer reasoning prowess from LLMs to a compact 5-billion parameter VLM. By utilizing a massive synthetic dataset enriched with reasoning traces and a multi-stage training recipe, the resulting model, ChartPaLI-5B, achieves state-of-the-art performance on chart reasoning benchmarks, even surpassing significantly larger models like GPT-4V in specific configurations.

Introduction

Current VLMs are proficient at basic multimodal tasks, but their ability to perform deep reasoning remains limited. Answering a question such as "What is the difference between the highest and lowest values in this trend?" requires a model to identify relevant visual elements, extract precise numerical values, and perform mathematical operations. Smaller VLMs often fail at these intermediate logical steps.

A complex multi-line chart from the ChartQA dataset requiring sophisticated visual and numerical reasoning.

To bridge this gap, researchers from Google Research propose a method to teach a compact VLM to "think" like an LLM. This approach avoids the massive computational overhead of 50B+ parameter models while maintaining high-level reasoning capabilities.

Methodology

The researchers employed a three-stage "recipe" to upgrade the base PaLI3-5B model:

  1. Enhanced Representation (Chart2Table): The model's vision encoder was pre-trained on a chart-to-table translation task. By learning to "derender" a chart back into its raw data table, the model develops a robust internal understanding of chart structures and data relationships.
  2. Synthetic Reasoning Traces: High-quality human explanations for charts are scarce. To address this, the authors used LLMs (specifically PaLM 2) to generate "rationales" for existing datasets. By providing the LLM with raw table data and a question, they produced step-by-step logic chains that guide the model through the reasoning process.
  3. Multitask Fine-tuning: The model was trained using a multitask loss to independently predict both the rationale and the final answer. This "distilling step-by-step" approach encourages the model to reason internally before concluding, without increasing inference time for the final answer.

Data Augmentation

The study primarily utilizes the ChartQA benchmark. To enhance the model's capabilities, the authors constructed a synthetic dataset approximately 20 times larger than the original human-annotated set. This includes specialized subsets for rationale generation, extra QA pairs for diversity, and programmatically generated arithmetic questions to bolster mathematical skills.

Breakdown of the synthetic datasets used to train ChartPaLI-5B, including human-annotated and augmented counts.

Key Results and Insights

ChartPaLI-5B achieved a record 77.3% accuracy on ChartQA, significantly outperforming the 55B-parameter PaLIX (70.9%). When paired with a Program-of-Thought (PoT) refinement step—where a small LLM converts the VLM's rationale into a Python snippet for calculation—the performance reached 81.3%, surpassing industry leaders like Gemini Ultra (80.8%) and GPT-4V (78.5%).

The research highlights two critical insights:

  • Rationales as a Scaffold: Teaching a model how to arrive at an answer is more effective than simply providing more Q&A pairs. Reasoning traces transfer logical structures directly into the VLM's weights.
  • The Chart2Table Advantage: Pre-training the vision encoder to map pixels to tabular data is a necessary prerequisite for accurate numerical reasoning.

Conclusion and Future Work

While ChartPaLI-5B sets new benchmarks, limitations remain. The model struggles with color-dependent questions because the synthetic data (derived from tables) lacks color metadata. Additionally, complex semantic descriptions of chart elements can still be challenging. Future research will focus on incorporating visual metadata into synthetic generation and exploring more complex reasoning chains to further narrow the gap between compact VLMs and massive LLMs.

Summary updated

BibTeX
@inproceedings{carbune2024chart,
  author = {Victor Carbune and Hassan Mansoor and Fangyu Liu and Rahul Aralikatte and Gilles Baechler and Jindong Chen and Abhanshu Sharma},
  title = {{Chart-based Reasoning: Transferring Capabilities from LLMs to VLMs}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-naacl.62},
}
Figure