DePlot: One-shot visual language reasoning by plot-to-table translation

Fangyu Liu, Julian Martin Eisenschlos, Francesco Piccinno, Syrine Krichene, Chenxi Pang, Kenton Lee, Mandar Joshi, Wenhu Chen, Nigel Collier, Yasemin Altun

Abstract

Large Language Models (LLMs) have demonstrated exceptional reasoning capabilities in textual domains but remain limited in their ability to interpret visual data such as charts and plots. We present DePlot, a modality conversion module designed to translate complex visual plots into linearized Markdown tables. By decoupling visual perception from logical reasoning, DePlot enables LLMs to perform sophisticated visual reasoning tasks using standard text-based techniques. Our approach achieves state-of-the-art performance on the ChartQA benchmark, outperforming fully supervised models by nearly 30% in a one-shot setting.

Introduction

Visual language—comprising charts, plots, and graphs—is a fundamental medium for conveying information in research and business. However, reasoning over these visual formats is a significant challenge for text-centric Large Language Models. Existing state-of-the-art (SOTA) models for Chart Question Answering (ChartQA) typically employ end-to-end architectures that require extensive supervised training to simultaneously learn low-level perception and high-level reasoning. Despite this, these models often struggle with complex, human-written queries that demand nuanced logical steps.

Methodology: The DePlot Pipeline

We propose a "divide and conquer" strategy that separates the visual extraction of data from the subsequent reasoning process. This pipeline consists of two primary stages:

  1. Plot-to-Table Translation (DePlot): We developed DePlot, an image-to-text Transformer model based on the MATCHA architecture. DePlot is trained to "read" a chart and output its underlying data as a linearized Markdown table. Unlike traditional OCR-based methods, DePlot learns to interpret the chart's structure and values end-to-end.
  2. Textual Reasoning: The resulting table is provided to a standard LLM (e.g., FlanPaLM or Codex). The LLM can then answer queries by applying reasoning techniques such as Chain-of-Thought (CoT) or Program-of-Thoughts (PoT), the latter involving the generation of Python code to compute the final answer.
The DePlot pipeline translates visual charts into tables, which are then processed by an LLM to generate answers via natural language or code.

This modular approach is "plug-and-play," allowing for the seamless integration of more powerful LLMs as they become available without the need to retrain the vision module.

Evaluation and Results

The performance of DePlot was evaluated on several benchmarks, including ChartQA (which features both machine-generated and human-written queries) and PlotQA (a large-scale synthetic dataset).

A key contribution of this work is the introduction of Relative Mapping Similarity (RMS), a metric designed to evaluate the quality of table extraction. Unlike previous metrics, RMS accounts for table structure and is invariant to the ordering of rows and columns, providing a more accurate measure of a model's perceptual accuracy.

Key Results on ChartQA

The most significant gains were observed on the human-written query set of ChartQA. While the previous fully supervised SOTA model (MATCHA) achieved 38.2% accuracy, the DePlot+LLM configuration reached 67.6%—an absolute improvement of 29.4% using only one-shot prompting.

Comparison of DePlot against baselines on the ChartQA benchmark, highlighting the significant performance gap on the human-set.

On synthetic datasets like PlotQA, DePlot+LLM showed strong performance but did not surpass fine-tuned models. This suggests that while fine-tuned models can memorize synthetic templates, the DePlot approach is superior for the diverse and unpredictable nature of real-world human queries.

Discussion and Limitations

The primary advantage of DePlot is its ability to leverage the pre-existing reasoning power of LLMs. However, the conversion from plot to table inherently involves a loss of visual metadata. Information such as bar colors, line styles, or spatial positioning is currently discarded. Consequently, queries that depend on these visual attributes (e.g., "What is the value of the red bar?") cannot be answered by the current system.

Future work will focus on incorporating visual attribute encoding to capture these details and expanding the module's capability to handle more specialized or exotic plot types.

Summary updated

BibTeX
@inproceedings{liu2023deplot,
  author = {Fangyu Liu and Julian Martin Eisenschlos and Francesco Piccinno and Syrine Krichene and Chenxi Pang and Kenton Lee and Mandar Joshi and Wenhu Chen and Nigel Collier and Yasemin Altun},
  title = {{DePlot: One-shot visual language reasoning by plot-to-table translation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.660},
}
Figure