Home

Awesome

<div align="center"> <h1>ChartX & ChartVLM: A Versatile Benchmark and Foundation Model for Complicated Chart Reasoning</h1>

[ Related Paper ] [ Website ] [ Dataset (Google Drive)] [ Dataset (Hugging Face) ]

[Models šŸ¤—(Hugging Face)]

</div>

ChartX & ChartVLM

Recently, many versatile Multi-modal Large Language Models (MLLMs) have emerged continuously. However, their capacity to query information depicted in visual charts and engage in reasoning based on the queried contents remains under-explored. In this paper, to comprehensively and rigorously benchmark the ability of the off-the-shelf MLLMs in the chart domain, we construct ChartX, a multi-modal evaluation set covering 18 chart types, 7 chart tasks, 22 disciplinary topics, and high-quality chart data. Besides, we develop ChartVLM to offer a new perspective on handling multi-modal tasks that strongly depend on interpretable patterns such as reasoning tasks in the field of charts or geometric images. We evaluate the chart-related ability of mainstream MLLMs and our ChartVLM on the proposed ChartX evaluation set. Extensive experiments demonstrate that ChartVLM surpasses both versatile and chart-related large models, achieving results comparable to GPT-4V. We believe that our study can pave the way for further exploration in creating a more comprehensive chart evaluation set and developing more interpretable multi-modal models.

Release

<div align=center> <img src="assets/motivation.png" height="85%"> </div>
<div align="center"> <h1>ChartX Evaluation Set<br></h1> </div>

Overall

We collected 48K multi-modal chart data covering 22 topics, 18 chart types, and 7 tasks. Each chart data within this dataset includes four modalities: image, CSV, python code, and text description.

<details> <summary> 18 chart types:</summary>

General Chart Types = ['bar chart', 'bar_num chart', 'line chart', 'line_num chart', 'pie chart'],

Fine-grained Chart Types = ['radar chart', 'histogram', 'box plot', 'treemap', 'bubble chart', 'area chart', '3D-bar chart', 'multi-axes', 'ring chart', 'rose chart'],

Domain-specific Chart Types=['heatmap', 'candlestick chart', 'funnel chart']

</details> <details> <summary> 22 chart topics:</summary>

major_categories = [ "Business and Finance", "Healthcare and Health", "Science and Engineering", "Social Media and the Web", "Government and Public Policy", "Education and Academics", "Environment and Sustainability", "Arts and Culture", "Retail and E-commerce", "Tourism and Hospitality", "Human Resources and Employee Management", "Agriculture and Food Production", "Energy and Utilities", "Transportation and Logistics", "Real Estate and Housing Market", "Manufacturing and Production", "Sports and Entertainment", "Social Sciences and Humanities", "Law and Legal Affairs", "Technology and the Internet", "Charity and Nonprofit Organizations", "Food and Beverage Industry" ]

</details> <details> <summary> 7 chart tasks (Employed eval metric):</summary>

4 close-ended = ['Structural Extraction (SCRM)', 'Chart Type (EM)', 'Chart Title (EM)', 'QA (GPT-acc)']

3 open-ended = ['Description (GPT-score)', 'Summarization (GPT-score)', 'Redrawing code (GPT-score)']

</details>

ChartX Download

<details> <summary> Data Download</summary>

Please download the official ChartX Evaluation Set dataset and organize the downloaded files as follows:

ChartX
ā”œā”€ā”€ 3D-Bar
ā”‚   ā”œā”€ā”€ code
|   ā”œā”€ā”€ csv
|   ā”œā”€ā”€ png
|   ā”œā”€ā”€ txt
ā”œā”€ā”€ area_chart
ā”‚   ā”œā”€ā”€ code
|   ā”œā”€ā”€ csv
|   ā”œā”€ā”€ png
|   ā”œā”€ā”€ txt
....
....
ā”œā”€ā”€ rose
ā”‚   ā”œā”€ā”€ code
|   ā”œā”€ā”€ csv
|   ā”œā”€ā”€ png
|   ā”œā”€ā”€ txt
</details> <details> <summary> Visualization of Data Distribution</summary> <div align=center> <img src="assets/tsne.png" height="85%"> </div> </details>
<div align="center"> <h1>ChartVLM<br></h1> </div>

ChartVLM Overall:

<div align=center> <img src="assets/chartvlm.png" height="85%"> </div>

Installation for ChartVLM

Pre-trained Checkpoints of ChartVLM

Please refer to Huggingface to download our pre-trained weights for ChartVLM-large and ChartVLM-base.

<details> <summary>You need to organize the downloaded ckpts as follow:</summary>
CharVLM-base (or your customized name)
ā”œā”€ā”€ instruction_adapter
ā”‚   ā”œā”€ā”€ mlp_classifier.pth
|   ā”œā”€ā”€ vectorizer.pkl
ā”œā”€ā”€ base_decoder
ā”‚   ā”œā”€ā”€ type_title
ā”‚   ā”‚   ā”œā”€ā”€ files of type_title base_decoder
ā”‚   ā”œā”€ā”€ files of base_decoder
ā”œā”€ā”€ auxiliary_decoder
ā”‚   ā”œā”€ā”€ base
ā”‚   ā”‚   ā”œā”€ā”€ files of pretrained auxiliary_decoder
ā”‚   ā”œā”€ā”€ files of auxiliary_decoder lora_weights 
</details>

Training ChartVLM

Please refer to instruction adapter, base decoder, and auxiliary decoder for more details of model training.

Evaluation

Please refer to eval for details of evaluation all tasks

<details> <summary> Evaluation Results for Structural Extraction (SE) task</summary> <div align=center> <img src="assets/radar_se.png" height="650"> </div> </details> <details> <summary> Evaluation Results for QA task</summary> <div align=center> <img src="assets/radar_qa.png" height="650"> </div> </details> <details> <summary> Evaluation Results for Description task</summary> <div align=center> <img src="assets/radar_desc.png" height="650"> </div> </details> <details> <summary> Evaluation Results for Summarization task</summary> <div align=center> <img src="assets/radar_summ.png" height="650"> </div> </details>

Citation

If you find our work useful in your research, please consider citing Fox:

@article{xia2024chartx,
  title={ChartX \& ChartVLM: A Versatile Benchmark and Foundation Model for Complicated Chart Reasoning},
  author={Xia, Renqiu and Zhang, Bo and Ye, Hancheng and Yan, Xiangchao and Liu, Qi and Zhou, Hongbin and Chen, Zijun and Dou, Min and Shi, Botian and Yan, Junchi and others},
  journal={arXiv preprint arXiv:2402.12185},
  year={2024}
}