arXiv:2604.24559cs.CLcs.AI2026-04ACL被引 1

多语言对齐脚本让图表自动转代码更准更通用

Aligned Multi-View Scripts for Universal Chart-to-Code Generation

论文配图:Aligned Multi-View Scripts for Universal Chart-to-Code Generation
图 1 · 摘自论文原文
  • 用多语言对齐脚本构建17.6万张图表数据集
  • 模型在三种语言上执行率与视觉一致率均提升
  • 轻量适配模块让模型共享理解、专精生成

图表转代码任务将图表图像转换为可执行绘图脚本,实现可视化内容的精确复现与可编辑。现有方法主要聚焦Python,限制实际应用,并忽略了重要监督信号:同一图表可用语义等价的不同编程语言脚本表达。为此,我们提出Chart2NCode数据集,包含17.6万张图表及其在Python、R和LaTeX中对齐的渲染等效脚本,通过元数据到模板的流水线构建,并经渲染验证与人工质检。基于LLaVA架构,我们进一步设计CharLuMA,一种参数高效适配模块,通过语言条件控制的低秩子空间混合,增强多模态投影器,使模型共享核心图表理解能力,同时通过轻量路由机制适配目标语言的代码生成。大量实验表明,该模型在所有语言上均实现执行成功率与视觉保真度的持续提升,优于主流开源基线,且媲美专有系统。进一步分析显示,均衡的多语言监督惠及所有语言,且适配器能分配紧凑共享核心与语言特异性容量。代码与数据已公开于https://github.com/Zhihan72/CharLuMA。

原文摘要 · Abstract (English)

Chart-to-code generation converts a chart image into an executable plotting script, enabling faithful reproduction and editable visualizations. Existing methods are largely Python-centric, limiting practical use and overlooking a critical source of supervision: the same chart can be expressed by semantically equivalent scripts in different plotting languages. To fill this gap, we introduce Chart2NCode, a dataset of 176K charts paired with aligned scripts in Python, R, and LaTeX that render visually equivalent outputs, constructed via a metadata-to-template pipeline with rendering verification and human quality checks. Building on a LLaVA-style architecture, we further propose CharLuMA, a parameter-efficient adaptation module that augments the multimodal projector with a language-conditioned mixture of low-rank subspaces, allowing the model to share core chart understanding while specializing code generation to the target language through lightweight routing. Extensive experiments show consistent gains in executability and visual fidelity across all languages, outperforming strong open-source baselines and remaining competitive with proprietary systems. Further analyses reveal that balanced multi-language supervision benefits all languages and that the adapter allocates a compact shared core plus language-specific capacity. Codes and data are available at https://github.com/Zhihan72/CharLuMA.

图表生成多语言代码生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。