arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2501.06598cs.AI
收藏

ChartCoder:推进面向图表到代码生成的多模态大语言模型

ChartCoder: Advancing Multimodal Large Language Model for Chart-to-Code Generation

Tsinghua University, Beijing, China(清华大学);Harbin Institute of Technology(哈尔滨工业大学)

Xuanle Zhao, Xianzhen Luo, Qi Shi, Chi Chen, Shuo Wang, Zhiyuan Liu, Maosong Sun

AI总结:

针对图表到代码生成中代码可执行性低和训练数据不足的问题,本文提出首个专用模型ChartCoder、大规模数据集Chart2Code-160k及SoT逐步生成方法,以7B参数超越现有开源多模态大语言模型。

摘要:

多模态大语言模型(MLLMs)在图表理解任务中展现了卓越的能力。然而,通过文本描述来解释图表往往会导致信息丢失,因为这种方式无法完整捕捉图表中蕴含的密集信息。相比之下,将图表解析为代码能够提供无损表示,从而有效保留所有关键细节。尽管现有的开源多模态大语言模型在图表理解任务中已取得一定成功,但它们在应用于图表到代码任务时仍面临两大挑战:(1)生成代码的可执行性较低,且对图表细节的还原效果较差;(2)缺乏大规模且多样化的训练数据。为应对这些挑战,我们提出了ChartCoder,这是首个专门面向图表到代码任务的多模态大语言模型,该模型以代码大语言模型作为语言主干,以增强生成代码的可执行性。此外,我们构建了Chart2Code-160k,这是首个用于图表到代码生成的大规模多样化数据集,并提出了思维片段(Snippet-of-Thought,SoT)方法,将直接的图表到代码生成数据转化为逐步生成形式。实验表明,ChartCoder仅用7B参数,就在图表到代码基准上超越了现有的开源多模态大语言模型,实现了更优的图表还原效果和代码可执行性。我们的代码已开源,地址为https://github.com/thunlp/ChartCoder。

英文摘要:

Multimodal Large Language Models (MLLMs) have demonstrated remarkable capabilities in chart understanding tasks. However, interpreting charts with textual descriptions often leads to information loss, as it fails to fully capture the dense information embedded in charts. In contrast, parsing charts into code provides lossless representations that can effectively contain all critical details. Although existing open-source MLLMs have achieved success in chart understanding tasks, they still face two major challenges when applied to chart-to-code tasks: (1) Low executability and poor restoration of chart details in the generated code and (2) Lack of large-scale and diverse training data. To address these challenges, we propose \textbf{ChartCoder}, the first dedicated chart-to-code MLLM, which leverages Code LLMs as the language backbone to enhance the executability of the generated code. Furthermore, we introduce \textbf{Chart2Code-160k}, the first large-scale and diverse dataset for chart-to-code generation, and propose the \textbf{Snippet-of-Thought (SoT)} method, which transforms direct chart-to-code generation data into step-by-step generation. Experiments demonstrate that ChartCoder, with only 7B parameters, surpasses existing open-source MLLMs on chart-to-code benchmarks, achieving superior chart restoration and code excitability. Our code is available at https://github.com/thunlp/ChartCoder.

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

↑