ERUnderstand
收藏资源简介:
ERUnderstand是由天普大学团队构建的首个大规模实体关系图结构化理解基准,包含2960个图表,涵盖教育资料、真实数据库模式及合成生成的多样化示例。数据集总计包含约17,415个实体、15,305个关系和66,856个属性,每个图表均配有标准化的JSON表示以支持细粒度评估。其创建过程综合了人工标注真实图表与基于LLM辅助的Graphviz流水线合成生成,旨在系统评估视觉语言模型在数据库工程中对概念模式的结构化推理能力,解决从图像中恢复可执行数据库模式的关键瓶颈问题。
ERUnderstand is the first large-scale structured understanding benchmark for entity-relationship diagrams (ERDs), developed by the Temple University team. It consists of 2960 diagrams covering educational materials, real database schemas, and diverse synthetically generated examples. In total, the dataset contains approximately 17,415 entities, 15,305 relationships, and 66,856 attributes. Each diagram is paired with a standardized JSON representation to enable fine-grained evaluation. The construction of this benchmark integrates manually annotated real diagrams and LLM-aided Graphviz pipeline-based synthetic generation. Its core goal is to systematically assess the structured reasoning abilities of vision-language models for conceptual schemas in database engineering, thereby addressing the critical bottleneck of recovering executable database schemas from images.
数据集概述:ERUnderstand
ERUnderstand 是一个用于评估视觉语言模型在结构化 ER 图上理解能力的基准与评估代码库,覆盖 Web、Instructional、Schema 以及合成 ER 图的理解任务,并提供了统一的评估管线(F1、BLEU、GED)。
基准共包含以下层级(按论文命名):
| 层级 | 来源 / 路径 | 图数量 | 标记法 |
|---|---|---|---|
| Web | 100 个模式 → 500 个渲染图 | 500 | Chen / Silberschatz (Web-S) / 原始 |
| Instructional | 48 个模式 → 240 个渲染图 | 240 | Chen / Silberschatz (Instr.-S) / 原始 |
| Schema | 179 个图(Graphviz 格式) | 179 | Graphviz |
| Easy / Medium / Hard | 合成数据,每个难度 199 个图 | 199 每个 | Graphviz |
| High IS-A | 合成数据 | 32 | Graphviz |
Schema 层级来源:来自 Spider (164)、经典 SQL 样本 (9)、Cypher 图模板 (5)、BIRD (1)。其真值仅包含平面关系结构,不包含弱实体、ISA、复合/多值/派生属性或 n 元关系。
数据格式
所有层级共享同一个 JSON 真值格式:
json { "entities": { "EntityName": { "attributes": ["attr1", "attr2"], "primary_keys": ["attr1"], "weak": false } }, "relationships": [ { "entities": ["A", "B"], "cardinality": ["1", "N"], "name": "rel_name", "weak": false } ] }
Web 和 Instructional 层级的数据还包含 composite、multivalued、derived 以及 ISA 条目(subclasses / superclass)。
数据集规模与统计
- 聚合计数(实体、关系、EER 结构):存储在
ERUnderstand/stats/aggregated_sums.csv - 每个层级的逐图统计:存储在
sorted_stats_{tier}.csv中 - 完整统计文档:
ERUnderstand/stats/schema_sources.md(含 Schema 来源、聚合数据、10 个模型的 F1/BLEU/GED 得分及复杂度分析)
数据集标注与质量控制
- 标注格式:统一 JSON 架构
- 标注对象:Web + Instructional 层级各 15 张图,共 30 张图进行双重标注试点
- 标注一致性:
- 30 张图中,21 张因标记法差异或低质量图像需要联合修正
- 平均宏 F1 一致性约为 0.897(与模型评估使用相同 F1 管线)
- 最终审定真值:Web 层级
Internet-JSON/和 Instructional 层级Books-JSON/,共 148 张图
评估管线
所有评估脚本位于 Codes/Evaluation/:
| 步骤 | 脚本 | 输出 |
|---|---|---|
| 1. 真值与预测标准化与比较 | compare.py |
{model}/{tier}.txt 差异日志 |
| 2. 按类别统计错误 | measure.py |
{model}/{tier}.csv |
| 3. F1(对错连给予部分学分) | f1score.py |
{model}/f1_scores_{tier}.csv、total_f1_scores.csv |
| 4. BLEU(JSON 的词元重叠) | bleu.py |
{model}/bleu_{tier}.csv、total_bleu_scores.csv |
| 5. GED(结构图距离) | ged.py |
{model}/ged_{tier}.csv、total_ged_scores.csv |
| 6. 标注者间一致性 | compute_inter_annotator_agreement.py |
逐层级 IAA CSV |
统一运行入口:Codes/Evaluation/evaluation.py
模型实验
- 视觉模型实验脚本:
Codes/Exp_API.py,通过 OpenRouter 调用视觉模型进行 ER 图 → JSON 提取 - 10 个评估模型(论文表
tab:final_scores):Claude-4.6-sonnet、GPT-5-chat、Gemini-2.0-flash、Grok-2-vision、Qwen-3.6、Llama-3.2、Gemma-3、GPT-5、Gemini-3-pro、GLM-4.5 - 预测输出路径:
Experiments/Real-world/{tier}/{model}/或Experiments/Graphviz/{model}/
相关论文
论文标题:《ERUnderstand: Evaluating Vision-Language Models on Structured ER Diagrams》
- arXiv: 2607.24707
- Hugging Face Papers: https://huggingface.co/papers/2607.24707





