ChartGemma: Visual Instruction-tuning for Chart Reasoning in the Wild

Ahmed Masry, Megh Thakkar, Aayush Bajaj, Aaryaman Kartha, Enamul Hoque, Shafiq Joty

Abstract

Given the ubiquity of charts as a data analysis, visualization, and decision-making tool across industries and sciences, there has been a growing interest in developing pre-trained foundation models as well as general purpose instruction-tuned models for chart understanding and reasoning. However, existing methods suffer crucial drawbacks across two critical axes affecting the performance of chart representation models: they are trained on data generated from underlying data tables of the charts, ignoring the visual trends and patterns in chart images, and use weakly aligned vision-language backbone models for domain-specific training, limiting their generalizability when encountering charts in the wild. We address these important drawbacks and introduce ChartGemma, a novel chart understanding and reasoning model developed over PaliGemma. Rather than relying on underlying data tables, ChartGemma is trained on instruction-tuning data generated directly from chart images, thus capturing both high-level trends and low-level visual information from a diverse set of charts. Our simple approach achieves state-of-the-art results across 5 benchmarks spanning chart summarization, question answering, and fact-checking, and our elaborate qualitative studies on real-world charts show that ChartGemma generates more realistic and factually correct summaries compared to its contemporaries.

Introduction: The Bottlenecks of Chart Reasoning

While Large Multimodal Models (LMMs) have demonstrated remarkable capabilities in general image description, they frequently falter when tasked with interpreting complex charts. Current chart-reasoning models are typically hindered by two primary bottlenecks:

  1. Lossy Data Sources: Most existing models rely on instruction-tuning data derived from raw data tables (e.g., CSVs). This approach is inherently "lossy," as tables fail to capture essential visual cues such as color-coding, highlighted trends, or specific annotations that are vital for human-like reasoning.
  2. Weak Backbone Alignment: Many models utilize vision-language backbones where the image encoder and the language model are not tightly integrated. This lack of strong alignment leads to poor generalization when models encounter "in-the-wild" charts featuring unconventional styles or complex layouts.

ChartGemma addresses these issues by treating charts as visual stories rather than mere numerical arrays, leveraging a strongly aligned backbone to interpret charts as humans do.

Methodology: A Visual-First Approach

ChartGemma is a 3-billion parameter multimodal model built upon the PaliGemma architecture, which integrates a SigLIP vision encoder with a Gemma-2B language model. Unlike traditional backbones, PaliGemma is pre-trained on 10 billion image-text pairs, providing a robust foundation for domain-specific tuning.

The ChartGemma training pipeline, illustrating the use of Gemini Flash 1.5 to generate visual instruction data from a diverse chart corpus.

The core innovation lies in the Visual Instruction Generation pipeline. Instead of using data tables, the researchers fed 122,857 chart images into Gemini Flash 1.5, prompting the LLM to generate instructions based exclusively on the visual attributes and trends visible in the images. The model was then trained on a diverse set of tasks, including Chain-of-Thought (CoT) reasoning, summarization, fact-checking, chart-to-markdown conversion, and program-aided design for precise numerical calculations.

Datasets and Training

The training corpus comprised over 122,000 chart images categorized into three tiers:

  • Synthetic: Data from sources like PlotQA.
  • Curated: High-quality charts from specialized organizations such as Statista, Pew Research, OECD, and Our World in Data (OWID).
  • In-the-Wild: Real-world charts harvested from the web (WebCharts).

By prioritizing image-based instructions, ChartGemma learned to associate specific visual features—such as the slope of a line or the color of a bar—with high-level data insights, leading to a significant "visual-first" advantage.

Key Results and Performance

ChartGemma achieved state-of-the-art (SOTA) results across five major benchmarks, including ChartQA, ChartFC, ChartCheck, OpenCQA, and Chart2Text. Notably, it reached 80.16% average accuracy on ChartQA, significantly outperforming larger open-source models.

Comparative performance of ChartGemma against ChartInstruct-LLaMA2, showing superior informativeness and factual correctness across different data sources.

In qualitative evaluations, both human annotators and GPT-4 rated ChartGemma's summaries as more informative and factually correct than those produced by models with significantly higher parameter counts, such as ChartInstruct-Llama2 (7B) and ChartAssistant (13B). This demonstrates that data quality and backbone alignment are more critical for specialized reasoning tasks than raw model size. Furthermore, the model exhibited strong zero-shot capabilities, maintaining high performance on unseen datasets like ChartCheck.

Limitations and Future Work

Despite its successes, ChartGemma faces challenges related to input resolution. The current 448x448 resolution can make small text unreadable in large or skewed charts, occasionally leading to hallucinations. Additionally, while the model can generate Python code for math problems, it sometimes produces erroneous code with undeclared variables. Future research will focus on incorporating higher-resolution encoders and human-in-the-loop instructions to further refine the model's grasp of nuanced data visualizations.

Summary updated

BibTeX
@inproceedings{masry2025chartgemma,
  author = {Ahmed Masry and Megh Thakkar and Aayush Bajaj and Aaryaman Kartha and Enamul Hoque and Shafiq Joty},
  title = {{ChartGemma: Visual Instruction-tuning for Chart Reasoning in the Wild}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2025},
  url = {https://openreview.net/forum?id=HHr174Aq02},
}
Figure