arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.24559cs.CLcs.AI
收藏

对齐的多视图脚本用于通用图表到代码生成

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

School of Computing and Information Systems, Singapore Management University(新加坡管理大学计算机与信息学院)

Zhihan Zhang, Lizi Liao

AI总结:

本文提出Chart2NCode数据集和CharLuMA模型,通过多语言监督提升图表到代码生成的可执行性和视觉一致性,优于开源基线并具备竞争力。

摘要:

图表到代码生成将图表图像转换为可执行的绘图脚本,实现忠实复现和可编辑的可视化。现有方法主要针对Python,限制了实际应用,并忽视了同一图表可通过不同绘图语言的语义等价脚本表达。为填补这一空白,我们引入包含176,000个图表及其对齐的Python、R和LaTeX脚本的数据集,通过元数据到模板管道构建,结合渲染验证和人工质量检查。基于LLaVA风格架构,我们进一步提出CharLuMA,一种参数高效适应模块,通过语言条件混合的低秩子空间增强多模态投影器,使模型在共享核心图表理解的同时,通过轻量级路由专门化代码生成到目标语言。大量实验显示,在所有语言中执行性和视觉保真度均有显著提升,优于强大的开源基线,并与专有系统竞争。进一步分析表明,平衡的多语言监督对所有语言有益,且适配器分配了紧凑的共享核心和语言特定能力。代码和数据可在https://github.com/Zhihan72/CharLuMA获取。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑