Diagram-MMU
收藏资源简介:
Diagram-MMU是一个用于评估多模态大语言模型在科学图表理解、解析和编辑任务上的多模态基准数据集。该数据集旨在全面评估模型对科学图表的理解能力。数据集包含3,744个精心策划的科学图表,每个图表都配有可编译的LaTeX/TikZ源代码,并涵盖了图表、平面几何、三维形状、图结构、化学和电路图六个科学领域。基于这些核心图表,数据集构建了总计18,305个人工验证的评估实例,分布在三个具体任务上:图表到代码解析(Diagram-to-Code Parsing, D2C-P)、图表到代码编辑(Diagram-to-Code Editing, D2C-E)和图表问答(Diagram Question Answering, DQA)。数据集通过四个配置提供:`diagrams` 配置包含每个图表的规范源数据(图表ID、图像、源代码、前导码、领域);`d2c-p` 配置用于图表解析任务,包含指令、目标代码和参考图像;`d2c-e` 配置用于图表编辑任务,额外包含任务ID、编辑维度和编辑指令;`dqa` 配置用于问答任务,包含问题、答案、问题类型和输出指令。每个配置都提供完整的测试集(`test`)和一个用于快速开发的类别平衡子集(`testmini`)。数据集的源代码收集自官方包手册和社区资源,所有标注均为原创。该数据集采用CC BY-NC 4.0许可证发布,仅用于评估目的(非商业用途,不用于训练)。
Diagram-MMU is a multimodal benchmark dataset developed to evaluate multimodal large language models (LLMs) on scientific diagram understanding, parsing and editing tasks. This dataset aims to comprehensively assess models' abilities to comprehend scientific diagrams. It contains 3,744 meticulously curated scientific diagrams, each paired with compilable LaTeX/TikZ source code, covering six scientific domains: diagrams, planar geometry, 3D shapes, graph structures, chemistry and circuit diagrams. Based on these core diagrams, a total of 18,305 manually verified evaluation instances are constructed, distributed across three specific tasks: Diagram-to-Code Parsing (D2C-P), Diagram-to-Code Editing (D2C-E) and Diagram Question Answering (DQA). The dataset is provided via four configurations: the `diagrams` configuration includes standardized source data for each diagram (diagram ID, image, source code, preamble and domain); the `d2c-p` configuration is for the diagram parsing task, containing instructions, target code and reference images; the `d2c-e` configuration is for the diagram editing task, which additionally includes task ID, editing dimension and editing instructions; the `dqa` configuration is for the question answering task, containing questions, answers, question types and output instructions. Each configuration provides a complete test split (`test`) and a category-balanced subset (`testmini`) for rapid development. The source code of the dataset is collected from official package manuals and community resources, and all annotations are original. This dataset is released under the CC BY-NC 4.0 license, and is only intended for evaluation purposes (non-commercial use, not for training).
数据集概述:Diagram-MMU
Diagram-MMU 是一个多模态基准数据集,专为评估多模态大语言模型(MLLMs)在理解、解析和编辑科学图表方面的能力而设计。
核心信息
- 数据集大小:包含 3,744 个精选科学图表(每个都附带可编译的源代码),以及 18,305 个人工验证的评估实例。
- 领域覆盖:覆盖 六个科学领域:
- charts(图表)
- planar_geometry(平面几何)
- 3d_shapes(三维形状)
- graph_structures(图形结构)
- chemistry(化学)
- circuit_diagrams(电路图)
- 任务类型:包含三项核心任务:
- Diagram-to-Code Parsing (D2C-P):图表到代码的解析。
- Diagram-to-Code Editing (D2C-E):图表到代码的编辑。
- Diagram Question Answering (DQA):图表问答。
- 许可证:CC BY-NC 4.0(仅限评估使用,不可商用或用于训练)。
数据集构成与配置
该数据集包含四个配置(config),每个配置有 test(完整集)和 testmini(快速开发子集,每领域50个样本,共300个)两个划分。
| 配置名 | 任务描述 | test 样本数 | testmini 样本数 |
|---|---|---|---|
diagrams |
每个图表的规范源代码 | 3,744 | 300 |
d2c-p |
图表到代码解析 | 3,739 | 300 |
d2c-e |
图表到代码编辑 | 7,420 | 600 |
dqa |
图表问答 | 7,146 | 600 |
数据字段说明
diagrams配置:diagram_id,image,source_code,preamble(文档类+宏包),domain。
d2c-p/d2c-e配置:- 通用字段:
id,diagram_id,image,instruction,code,reference_image,domain。 d2c-e额外字段:task_id,dimension,editing_instruction。
- 通用字段:
dqa配置:id,diagram_id,image,question,answer,domain,question_type(regular 或 what_if),question_name,output_instruction。
评估方式
所有真实标签(ground truth)均已公开,评估在本地进行,无需提交。评估指标包括:
- D2C-P / D2C-E:对象级 F1(含类型/文本/颜色/边界框)、CrystalBLEU、图像指标(SSIM/CLIP/LPIPS/FID),D2C-E 会区分保留(preserve)和编辑(edit)部分。
- DQA:基于
output_instruction类型的规则匹配准确率,并辅以 LLM 作为评判的回退机制。
使用示例
python from datasets import load_dataset
加载解析任务
d2cp = load_dataset("<org>/Diagram-MMU", "d2c-p", split="test")
加载问答任务(开发子集)
dqa = load_dataset("<org>/Diagram-MMU", "dqa", split="testmini")
加载图表源代码
diagrams = load_dataset("<org>/Diagram-MMU", "diagrams", split="test")
访问第一个样本
ex = d2cp[0] ex["image"] # 自动解码的 PIL.Image ex["code"] # 真实源代码




