[Paper Review] ChartMimic: Evaluating LMM's Cross-Modal Reasoning Capability via Chart-to-Code Generation
ChartMimic introduces a new benchmark for evaluating large multimodal models (LMMs) on chart-to-code generation, using 1,000 human-curated (figure, instruction, code) triplets across 191 chart subcategories. It reveals significant performance gaps, with even GPT-4V achieving only 73.2/100 average score, highlighting challenges in cross-modal reasoning, visual understanding, and code generation.
We introduce a new benchmark, ChartMimic, aimed at assessing the visually-grounded code generation capabilities of large multimodal models (LMMs). ChartMimic utilizes information-intensive visual charts and textual instructions as inputs, requiring LMMs to generate the corresponding code for chart rendering. ChartMimic includes 4,800 human-curated (figure, instruction, code) triplets, which represent the authentic chart use cases found in scientific papers across various domains (e.g., Physics, Computer Science, Economics, etc). These charts span 18 regular types and 4 advanced types, diversifying into 201 subcategories. Furthermore, we propose multi-level evaluation metrics to provide an automatic and thorough assessment of the output code and the rendered charts. Unlike existing code generation benchmarks, ChartMimic places emphasis on evaluating LMMs' capacity to harmonize a blend of cognitive capabilities, encompassing visual understanding, code generation, and cross-modal reasoning. The evaluation of $3$ proprietary models and 14 open-weight models highlights the substantial challenges posed by ChartMimic. Even the advanced GPT-4o, InternVL2-Llama3-76B only achieved an average score across Direct Mimic and Customized Mimic tasks of 82.2 and 61.6, respectively, indicating significant room for improvement. We anticipate that ChartMimic will inspire the development of LMMs, advancing the pursuit of artificial general intelligence.
Motivation & Objective
- To address the lack of benchmarks evaluating LMMs on visually grounded code generation for scientific charts.
- To assess LMMs' ability to harmonize visual understanding, code generation, and cross-modal reasoning in real-world scientific contexts.
- To provide a comprehensive evaluation framework that captures both high-level and low-level aspects of code and rendered chart fidelity.
- To identify persistent limitations in current LMMs, particularly hallucination and misclassification of chart types and textual elements.
- To guide future development of foundation models by offering a rigorous, human-annotated benchmark aligned with real academic use cases.
Proposed method
- Proposes two tasks: Direct Mimic (reproduce a given chart) and Customized Mimic (adapt to new data in instruction), using visual and textual inputs.
- Curates 1,000 (figure, instruction, code) triplets from scientific papers across 18 regular and 4 advanced chart types, spanning 191 subcategories.
- Designs multi-level evaluation metrics: high-level (chart type, layout, clarity) and low-level (data, text, style, color) to assess code and rendered output.
- Introduces three prompting strategies—HintEnhanced, SelfRevision, and Scaffold Prompting—to improve LMM performance on the benchmark.
- Employs human evaluation with 300 test examples and 3 evaluators per example, using a 0–100 similarity scale aligned with automatic metrics.
- Calculates Pearson correlation between automatic metrics and human judgments to validate metric reliability.

Experimental results
Research questions
- RQ1To what extent can LMMs accurately generate code that reproduces complex, information-dense scientific charts from visual and textual inputs?
- RQ2How do different prompting strategies (HintEnhanced, SelfRevision, Scaffold) affect LMMs’ performance on chart-to-code generation?
- RQ3How well do automatic evaluation metrics correlate with human judgment in assessing chart fidelity and code correctness?
- RQ4What are the primary failure modes of LMMs in chart-to-code generation, particularly regarding hallucination and misclassification?
- RQ5How do proprietary and open-weight LMMs compare in handling the multimodal reasoning demands of scientific chart generation?
Key findings
- GPT-4V achieves an average score of 73.2 on the Direct Mimic task, indicating substantial room for improvement despite its state-of-the-art status.
- Claude-3-opus scores 53.7, highlighting that even advanced proprietary models struggle with the complexity of chart-to-code generation.
- The best open-weight model, Phi-3-Vision, achieves only about half the performance of GPT-4V, revealing a significant gap in capability.
- Automatic evaluation metrics show high Pearson correlation (p < 0.01) with human judgments, validating their reliability for benchmarking.
- Error analysis reveals that hallucination—such as generating non-existent text or misclassifying chart types—is a dominant failure mode.
- The benchmark captures diverse chart types and subcategories, with 1,000 human-curated triplets from real scientific papers across multiple domains.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.