Table of Contents
Fetching ...

METAL: A Multi-Agent Framework for Chart Generation with Test-Time Scaling

Bingxuan Li, Yiwei Wang, Jiuxiang Gu, Kai-Wei Chang, Nanyun Peng

TL;DR

METAL introduces a vision-language model–based four-agent framework for chart generation that decomposes the task into generation, visual critique, code critique, and revision, guided by a multi-criteria verifier. By leveraging test-time scaling, METAL shows near-linear gains as the logarithm of the computational budget increases from $2^{9}$ to $2^{13}$ tokens, and modality-tailored critiques improve self-correction. Empirical results on the ChartMIMIC dataset demonstrate clear improvements over direct prompting and other baselines across base models such as GPT-4o and LLaMA 3.2-11b, with notable gains in text and layout fidelity. The work highlights the value of agentic collaboration for multimodal chart synthesis and suggests that modular, critique-driven refinement can substantially enhance visually grounded code generation and its practical applications.

Abstract

Chart generation aims to generate code to produce charts satisfying the desired visual properties, e.g., texts, layout, color, and type. It has great potential to empower the automatic professional report generation in financial analysis, research presentation, education, and healthcare. In this work, we build a vision-language model (VLM) based multi-agent framework for effective automatic chart generation. Generating high-quality charts requires both strong visual design skills and precise coding capabilities that embed the desired visual properties into code. Such a complex multi-modal reasoning process is difficult for direct prompting of VLMs. To resolve these challenges, we propose METAL, a multi-agent framework that decomposes the task of chart generation into the iterative collaboration among specialized agents. METAL achieves 5.2% improvement over the current best result in the chart generation task. The METAL framework exhibits the phenomenon of test-time scaling: its performance increases monotonically as the logarithmic computational budget grows from 512 to 8192 tokens. In addition, we find that separating different modalities during the critique process of METAL boosts the self-correction capability of VLMs in the multimodal context.

METAL: A Multi-Agent Framework for Chart Generation with Test-Time Scaling

TL;DR

METAL introduces a vision-language model–based four-agent framework for chart generation that decomposes the task into generation, visual critique, code critique, and revision, guided by a multi-criteria verifier. By leveraging test-time scaling, METAL shows near-linear gains as the logarithm of the computational budget increases from to tokens, and modality-tailored critiques improve self-correction. Empirical results on the ChartMIMIC dataset demonstrate clear improvements over direct prompting and other baselines across base models such as GPT-4o and LLaMA 3.2-11b, with notable gains in text and layout fidelity. The work highlights the value of agentic collaboration for multimodal chart synthesis and suggests that modular, critique-driven refinement can substantially enhance visually grounded code generation and its practical applications.

Abstract

Chart generation aims to generate code to produce charts satisfying the desired visual properties, e.g., texts, layout, color, and type. It has great potential to empower the automatic professional report generation in financial analysis, research presentation, education, and healthcare. In this work, we build a vision-language model (VLM) based multi-agent framework for effective automatic chart generation. Generating high-quality charts requires both strong visual design skills and precise coding capabilities that embed the desired visual properties into code. Such a complex multi-modal reasoning process is difficult for direct prompting of VLMs. To resolve these challenges, we propose METAL, a multi-agent framework that decomposes the task of chart generation into the iterative collaboration among specialized agents. METAL achieves 5.2% improvement over the current best result in the chart generation task. The METAL framework exhibits the phenomenon of test-time scaling: its performance increases monotonically as the logarithmic computational budget grows from 512 to 8192 tokens. In addition, we find that separating different modalities during the critique process of METAL boosts the self-correction capability of VLMs in the multimodal context.

Paper Structure

This paper contains 43 sections, 8 equations, 5 figures, 2 tables, 1 algorithm.

Figures (5)

  • Figure 1: Direct prompting of current VLMs (e.g. GPT-4o ) often fails to generate charts that accurately replicate reference charts, resulting in errors in structure, color, and text alignment. Our proposed approach, METAL, tackle this challenge with iterative refinement through generation, critique, and revision. Our experiments show that increasing the logarithm of test-time compute recurrence and token usage leads to improved performance.
  • Figure 2: Overview of METAL: A multi-agents system that consists of four specialized agents working in an iterative pipeline: (1) Generation Agent creates initial Python code to reproduce the reference chart, (2) Visual Critique Agent identifies visual discrepancies between the generated and reference charts, (3) Code Critique Agent analyzes the code and provides specific improvement guidelines, and (4) Revision Agent modifies the code based on the critiques. The process iterates until either reaching the verification score or maximum attempts limit.
  • Figure 3: The performance of METAL demonstrates an near-linear relationship with the log of compute budget.
  • Figure 4: Performance gain after 5 compute recurrences of METAL over different difficulty.
  • Figure 5: Case study of METAL's progressive refinement from initial generation to perfect. Starting from Round 0's initial generation (60% color score , 84% text score), the system iteratively improves the output. In Round 1, the system identifies and corrects Y-axis scale issues and missing annotations, achieving 100% text score. Round 2 refines the color representations of distributions, achieving perfect F1 score across all metrics.