Manuscript Offprint

arXiv:2610.10066

From Pixel to Coding: Evaluating the Figure Reproduction Capabilities of MLLMs

Zijian Chen, Zhengyu Chen, Bohan Liang, Lirong Deng, Yushuo Zheng, Yanwei Jiang, Qi Jia, Kaiwei Zhang, Wenjun Zhang, Guangtao Zhai

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Multimodal Large Language Models (MLLMs) have demonstrated impressive capabilities in both visual understanding and code generation. However, existing benchmarks typically evaluate these two modalities in isolation, lacking a dedicated assessment of their unification, i.e., how a model can perceive complex visual structures and synthesize them into precise, executable code. Moreover, current visual code generation benchmarks often rely on simplified layouts within single programming environments, falling short of evaluating true unified multimodal reasoning. To bridge this gap, we propose FigCodeBench, a comprehensive framework for rigorously evaluating MLLMs on figure reproduction, integrating multimodal comprehension and generation. We first design a systematic dataset construction pipeline, resulting in a total of 6,194 instances that cover 7 functional categories and 4 types of programming languages (Python, Matlab, R, and Latex). We further categorize figure reproduction into three tiers (Easy, Medium, Hard) with visual and code complexity modeling, specifically targeting complex structural reasoning, varying aspect ratios, and dense geometric constraints. We introduce a multi-dimensional evaluation protocol, encompassing visual fidelity (e.g., PSNR, SSIM, LPIPS) and syntactic isomorphism (e.g., abstract syntax tree similarity), that aligns highly with the Mean Machine Opinion Score (MMOS) and human preferences. Based on our framework, we conducted extensive experiments on 24 widely used proprietary and open-source MLLMs (e.g., Gemini 3.1 Pro, GPT-5.4, and Kimi-K2.5), where we observed a universal, non-linear performance cliff across different programming languages and difficulty scenarios for all models, and gained several insights, such as the significant metric decline in rigid declarative languages. Our benchmark offers (1) a comprehensive dataset and multi-dimensional evaluation pipeline; (2) an up-to-date leaderboard on MLLM figure reproduction proficiency; and (3) a nuanced understanding of the perceiving and reasoning bottlenecks hindering unified comprehension and generation in current MLLMs.

Keywords: Multimodal Large Language Models, Figure Reproduction, Image Understanding, Code Generation, Benchmark

1 Introduction

Multimodal Large Language Models (MLLMs) have demonstrated extraordinary advances in image understanding and code generation. Current models (Xu et al. 2025; Qwen Team 2026a; Zeng et al. 2026; xAI 2026; OpenAI 2026d) can now effortlessly complete Visual Question Answering (VQA) (Liu et al. 2024) and achieve near-perfect accuracy on visual math problems (Wang et al. 2024a), coding challenges (Chen et al. 2021; Jimenez et al. 2024a), and strong performance on more recent multimodal reasoning benchmarks such as RealWorldQA (xAI 2024) and OmniDocBench 1.5 (Ouyang et al. 2025). Recent releases touted as vision-language breakthroughs, such as Gemini 3.1 Pro (Google 2026a) and Qwen3.8-Max (Qwen Team 2026c), have pushed performance towards the upper limits of these benchmarks. For example, Qwen3.8-Max achieves over 95% accuracy on MathVision (Wang et al. 2024a) and over 92% pass@1 on LiveCodeBench v6 (Jain et al. 2025).

Yet, existing evaluations predominantly operate within isolated paradigms that evaluate modalities in a disjointed manner, failing to assess the true unification of comprehension and generation. On one hand, traditional code generation benchmarks (Jain et al. 2025; Zheng et al. 2025) rely exclusively on textual specifications as input, neglecting the reality that real-world programming is inherently a multimodal endeavor, where developers frequently reference visual materials. On the other hand, existing multimodal evaluations (Yue et al. 2025; Fu et al. 2026; Zhang et al. 2025b) are largely confined to perceptual comprehension, which is typically assessed through VQA or multiple-choice formats. They fall short of validating a model's capacity for further structural representation, leaving it unknown whether an MLLM can accurately synthesize its visual understanding into complex, executable generative outputs. Benchmarks like CharXiv (Wang et al. 2024c) offer visual chart comprehension challenges, but suffer from passive question-answering, rely on rigid text-matching metrics susceptible to superficial guessing, lack executable validation, and the inability to verify active figure reproduction.

Figure

Fig. 1 FigCodeBench leaderboard. Left: Mean Machine Opinion Score (MMOS) versus average cost per problem for various models. Right: Performance comparison of six representative models on different image categories.

To bridge this gap, some pioneering efforts have begun to explore cross-modal visual code generation, tasking models with translating images into executable scripts. Plot2Code (Wu et al. 2025a), ChartCoder (Zhao et al. 2025), and ChartMimic (Yang et al. 2025) utilize information-intensive visual charts and textual instructions as inputs, requiring MLLMs to generate the corresponding code for chart rendering. Design2Code (Si et al. 2025) assesses how well MLLMs can generate code that renders into webpages matching given reference screenshots. BioMotion Arena (Chen et al. 2025b) draws inspiration from the remarkable capacity of human vision to perceive biological motions and prompts MLLMs to generate code for human animation that satisfies the combination of action requirements. However, these benchmarks predominantly focus on overly simplified, single-language data plots or front-end web development (e.g., HTML/CSS rendering). They inherently lack the mathematical rigor, dense geometric constraints, and multi-paradigm complexity required for professional scientific figure reproduction. Furthermore, their evaluation protocols often rely on unidimensional visual similarity or heuristic script matching, failing to capture the true structural fidelity across diverse programming environments.

To this end, we introduce FigCodeBench, a visual programming benchmark for figure reproduction, which challenges MLLMs to generate the corresponding code for reproducing a given figure. FigCodeBench is characterized by its (1) real-world fidelity, (2) more programming languages, (3) diverse figure types, and (4) multi-dimensional evaluation metrics. Specifically, prior benchmarks predominantly focus on simplistic charts (e.g., standard bar or pie graphs), while FigCodeBench expands the horizon to complex scientific figures in different coding scenarios. Our benchmark comprehensively evaluates the model's ability to synthesize intricate typographic layouts, geospatial projections, mathematical vector fields, flowcharts, and other abstract diagrams, moving beyond simple chart reading to holistic code-driven scientific visualization. Through the collection of academic documents and online repositories, we identify four common programming languages, i.e., Python, Matlab, R, and Latex, as well as 7 function-focused figure subcategories. Subsequently, we manually collect a total of 6,194 high-quality figure-code pairs for these types with human-in-the-loop augmentation to mitigate data contamination. Furthermore, we establish a suite of evaluation metrics from both image-oriented and code-oriented perspectives to thoroughly assess the performance of MLLMs. We also propose to extract the visual quality achieved relative to the amount of code required as a joint fidelity-efficiency metric that quantifies the reproduction efficiency.

We evaluate a suite of frontier models on FigCodeBench, including proprietary models such as Gemini 3.1 Pro, GPT-5.4, Claude Opus 4.7, and open-source models such as Kimi-K2.5 and Qwen3.5-122B (Fig. 1). We observe a significant performance gap across different programming languages, where rendering via descriptive Latex constitutes a formidable bottleneck for all evaluated models. In-depth experiments on different image types further reveal that current MLLMs lack the 2D spatial reasoning capabilities required for code-based object depiction and the representation of abstract set relationships, once detached from a regular grid coordinate system. Meanwhile, we find a significant divergence in the coding strategies adopted by different MLLMs, highlighting that few models can strike a perfect balance between precise visual comprehension and reliable code generation. We also compare reasoning models with their non-reasoning counterparts and identify the impact of model size in handling such problems. Correlation analysis demonstrates a high correlation between our adopted metrics and human evaluation, validating the effectiveness of these metrics. Further case study reveals that although current MLLMs have largely mastered basic data-to-geometry mapping, they still exhibit substantial weaknesses in fine-grained aesthetic rendering.

Overall, our contributions can be summarized as follows:

  • This paper introduces FigCodeBench, a comprehensive framework designed for evaluating the unified visual comprehension and code generation capabilities of MLLMs, consisting of a large-scale figure reproduction dataset and a multi-perspective evaluation protocol.

  • We design a systematic dataset construction pipeline resulting in 4 programming languages and 7 functional categories with 6,194 multimodal figure-code pairs, alongside a multi-dimensional metric system that provides reliable assessments highly aligned with both machine judgments and human evaluations.

  • We conduct large-scale experiments on 11 proprietary and 13 open-source MLLMs, revealing that existing models still face substantial challenges in figure reproduction tasks. We observe widespread performance cliffs across scenarios and derive several insights into the perceptual and generative bottlenecks of current MLLMs.

References (71)

  • In: ICASSP 2025-2025 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), IEEE, pp 1–5
  • Assessing multimodal LLM-as-a-judge with vision-language benchmark
  • Rethinking action quality assessment for ai-generated videos
  • Scaling up vision foundation models and aligning for generic visual-linguistic tasks
  • Can lmms aid in study of ancient script on oracle bones? In: The Thirteenth International Conference on Learning Representations
  • Unveiling large multimodal models in visual decipherment for pictographic oracle bone characters
  • IEEE Transactions on Circuits and Systems for Video Technology 35(4):3573–3588
  • A multi-agent continual evaluation network for large models
  • A squid game for large language models
  • precisely and efficiently measuring the similarity of code
  • User study and empirical evaluation
  • step-by-step video reasoning from perception to cognition
  • MME: A Comprehensive Evaluation Benchmark for Multimodal Large Language Models
  • Evaluate as you desire
  • Advances in Neural Information Processing Systems 38
  • Elevating the role of image understanding in visual question answering
  • A multimodal llm for chart understanding and generation (opens arXiv in a new tab)
  • Communication methods and measures 1(1):77–89
  • Towards versatile multimodal reasoning with scalable reinforcement learning (opens arXiv in a new tab)
  • Hu H, Zhu X, He T, et al (2026) Qwen3-tts technical report. arXiv preprint arXiv:2601.15621 (opens arXiv in a new tab)
  • GPT-4o System Card
  • Holistic and contamination free evaluation of large language models for code
  • a survey on mllms aligned with multi-modalities
  • Can language models resolve real-world github issues? In: International Conference on Learning Representations, pp 54107–54157
  • Can language models resolve real-world github issues? In: The Twelfth International Conference on Learning Representations
  • Benchmarking multimodal large language models
  • LLaVA-OneVision: Easy Visual Task Transfer
  • Benchmarking multimodal large language models for code generation with visually rich programming problems
  • NPJ Digital Medicine 6(1):226
  • Is your multi-modal model an all-around player? In: European conference on computer vision, Springer, pp 216–233
  • A comprehensive cognitive mllm agent for smartphone gui automation
  • A benchmark for question answering about charts with visual and logical reasoning
  • 1m-context msa
  • Benchmarking diverse pdf document parsing with comprehensive annotations
  • A realistic benchmark for data science code generation
  • A multilingual code generation benchmark for cross-lingual natural language generalization
  • Communications in Statistics-Simulation and Computation 44(10):2636–2653
  • Mllm as a judge across any modality
  • evaluating and training multi-modal large language models for action understanding (opens arXiv in a new tab)
  • A contamination-free benchmark for assessing models' specialized capabilities in protein science (opens arXiv in a new tab)
  • Journal of the ACM (JACM) 13(4):471–494
  • Journal of vision 7(2):17–17
  • Benchmarking multimodal code generation for automated front-end engineering
  • Advances in Neural Information Processing Systems 37:20198–20224
  • Gemini: A Family of Highly Capable Multimodal Models
  • Benchmarking blind video quality assessment for user generated content
  • Advances in Neural Information Processing Systems 37:95095–95169
  • Qwen2-VL: Enhancing Vision-Language Model's Perception of the World at Any Resolution
  • InternVL3.5: Advancing Open-Source Multimodal Models in Versatility, Reasoning, and Efficiency
  • An extreme long video understanding benchmark
  • from error visibility to structural similarity
  • Charting gaps in realistic chart understanding in multimodal llms
  • Modality perception with mllms for gui understanding
  • A challenging, contamination-free llm benchmark
  • A comprehensive benchmark for evaluating multi-modal large language models in code generation from scientific plots
  • Boosting mllm capabilities in visual-based spatial intelligence
  • A benchmark for long-context interleaved video-language understanding
  • A versatile benchmark and foundation model for complicated chart reasoning
  • A comprehensive evaluation benchmark for large vision-language models
  • Evaluating lmm's cross-modal reasoning capability via chart-to-code generation
  • Advances in Multimedia 2012(1):273723
  • Method and evaluation for llm-based agentic scientific data visualization
  • A more robust multi-discipline multimodal understanding benchmark
  • In: Proceedings of the IEEE conference on computer vision and pattern recognition, pp 586–595
  • A fully dynamic evaluation framework for large multimodal models on puzzle solving
  • Advancing multimodal large language model for chart-to-code generation
  • How do olympiad medalists judge llms in competitive programming? In: The Thirty-ninth Annual Conference on Neural Information Processing Systems Datasets and Benchmarks Track
  • Evaluating code generation with pretrained models of code
  • Probing cognitive abilities of mllm via perception, understanding, and reasoning
  • Scientific multimodal foundation model at trillion scale
  • Walter de Gruyter GmbH & Co KG