Graph-to-Vision / README.md
PG23's picture
Remove link to deleted THIRD_PARTY_NOTICES.md
7c912de verified
|
Raw History Blame Contribute Delete
7.28 kB
---
license: cc-by-4.0
task_categories:
- visual-question-answering
- image-text-to-text
language:
- en
pretty_name: Graph-to-Vision (MGVR Benchmark)
size_categories:
- 1K<n<10K
tags:
- multi-graph
- graph-understanding
- visual-reasoning
- flowchart
- knowledge-graph
- mind-map
- route-map
- vlm
- benchmark
configs:
- config_name: default
default: true
data_files:
- split: train
path: data/train-*.parquet
- split: validation
path: data/validation-*.parquet
- split: test
path: data/test-*.parquet
---
# Graph-to-Vision: Multi-Graph Visual Reasoning (MGVR) Benchmark
Official dataset release for **[Graph-to-Vision: Benchmarking Multi-Graph Visual Reasoning with Vision-Language Models](https://arxiv.org/abs/2503.21435)**.
- **Paper:** <https://arxiv.org/abs/2503.21435>
- **Code & Evaluation Toolkit:** <https://github.com/BIT-AQH/Graph-to-Vision>
- **Dataset:** <https://huggingface.co/datasets/PG23/Graph-to-Vision>
**Graph-to-Vision (MGVR)** evaluates whether vision-language models (VLMs) can integrate information across **multiple related graph images** rather than reasoning over isolated single diagrams. The benchmark contains **4,021 question–answer pairs** across **1,518 graph groups**, with **2–6 images per sample**, spanning four graph families—**knowledge graphs**, **flowcharts**, **mind maps**, and **route maps**—along with **heterogeneous** multi-type groups at three difficulty levels (`easy`, `medium`, `difficult`).
![Benchmark construction pipeline](assets/benchmark_construction.png)
*Overview of the three-stage benchmark construction pipeline: image collection, ColBERT-inspired graph grouping / route-map splitting, and graph-grounded QA generation with human refinement.*
## Representative Examples
![Dataset samples](assets/dataset_samples.png)
*Representative test examples across all five graph-group categories.*
## Dataset Statistics
![Dataset statistics](assets/dataset_statistics.png)
*Graph-group composition across 4,021 QA pairs, split and difficulty balance, and the native image-count distribution of the 300 test items.*
### Split Summary
| Split | QA pairs | Graph groups | Referenced images |
|:--|--:|--:|--:|
| `train` | 3,361 | 1,121 | 2,748 |
| `validation` | 360 | 120 | 294 |
| `test` | 300 | 277 | 685 |
| **Total** | **4,021** | **1,518** | **3,727** |
### Graph-Group Composition
| Graph-group type | Train | Validation | Test | Total |
|:--|--:|--:|--:|--:|
| Knowledge graph (`knowledge_graph`) | 555 | 60 | 50 | 665 |
| Flowchart (`flowchart`) | 555 | 60 | 50 | 665 |
| Route map (`routemap`) | 552 | 60 | 50 | 662 |
| Mind map (`mindmap`) | 565 | 60 | 49 | 674 |
| Heterogeneous (`heterogeneous`) | 1,134 | 120 | 101 | 1,355 |
| **Total** | **3,361** | **360** | **300** | **4,021** |
- **Difficulty balance:** Validation contains **120 / 120 / 120** (`easy` / `medium` / `difficult`) items; Test contains **100 / 100 / 100**.
- **Test image-count distribution:** Test items contain 2, 3, 4, 5, or 6 images in **173, 118, 5, 1, and 3** cases, respectively.
- **Test reasoning taxonomy** (from supplementary analysis of the 300 test items):
| Reasoning category | Test QA pairs | Share |
|:--|--:|--:|
| Cross-graph structural reasoning | 191 | 63.7% |
| Single-graph structural reasoning | 57 | 19.0% |
| Text extraction only | 45 | 15.0% |
| Ordinary multi-image reasoning | 7 | 2.3% |
## Usage
### 1. Load with 🤗 `datasets`
```python
from datasets import load_dataset
ds = load_dataset("PG23/Graph-to-Vision")
sample = ds["test"][0]
print(sample["type"], sample["difficulty"], len(sample["images"]))
print(sample["question"])
print(sample["reference"])
```
### 2. Download JSONL Manifests & Images for Official Evaluation / Fine-tuning
Use the official [Graph-to-Vision](https://github.com/BIT-AQH/Graph-to-Vision) repository to run inference, VLM-as-a-Judge evaluation (`GPA`, `IRA`, `RCC`), controlled ablations, and LoRA fine-tuning:
```bash
git clone https://github.com/BIT-AQH/Graph-to-Vision.git
cd Graph-to-Vision
python -m pip install -e '.[api]'
python scripts/download_data.py --output-dir data
export G2V_DATA_ROOT="$PWD/data/images"
g2v validate --input data/test.jsonl --check-images
```
## Schema
Each Parquet row (and canonical JSONL record) contains:
| Field | Type | Description |
|---|---|---|
| `sample_id` | `string` | Deterministic unique ID computed from `(type, cluster, question)`. |
| `type` | `string` | Graph-group category: `knowledge_graph`, `flowchart`, `mindmap`, `routemap`, or `heterogeneous`. |
| `cluster` | `string` | Graph-group cluster identifier (`mixed-a--*` and `mixed-b--*` namespace the two heterogeneous collections). |
| `lineage_id` | `string` | Augmentation-lineage identifier ensuring cluster-atomic and leakage-free train/validation/test splits. |
| `difficulty` | `string` | Difficulty level: `easy`, `medium`, or `difficult`. |
| `question` | `string` | Natural-language question requiring multi-graph visual reasoning. |
| `reference` | `string` | Human-curated reference answer. |
| `images` | `list[Image]` | Ordered list of graph images (in JSONL manifests, POSIX relative paths under `images/`). |
| `image_paths` | `list[string]` | *(Parquet only)* Ordered image paths relative to `images/`. |
## Repository Structure (Raw Files)
Besides the Parquet shards in `data/`, this repository distributes normalized manifests and reorganized images:
```text
├── data/
│ ├── train-00000-of-00003.parquet ... train-00002-of-00003.parquet
│ ├── validation-00000-of-00001.parquet
│ └── test-00000-of-00001.parquet
├── annotations/
│ ├── train.jsonl # 3,361 samples (cluster-atomic, ASCII relative paths)
│ ├── valid.jsonl # 360 samples
│ └── test.jsonl # 300 samples
├── images/
│ ├── flowchart/
│ ├── knowledge_graph/
│ ├── mindmap/
│ ├── routemap/
│ └── heterogeneous/ # mixed-a--* and mixed-b--* collections
└── assets/
├── benchmark_construction.png
├── dataset_samples.png
└── dataset_statistics.png
```
All manifests use clean ASCII POSIX paths with image extensions standardized to match binary headers (JPEG / PNG) and all machine prefixes stripped. Split disjointness across `sample_id`, `cluster`, `lineage_id`, `question`, and `image_path` is programmatically verified.
## Citation
If you use this benchmark or dataset, please cite:
```bibtex
@misc{ai2026graphtovisionbenchmarkingmultigraphvisual,
title={Graph-to-Vision: Benchmarking Multi-Graph Visual Reasoning with Vision-Language Models},
author={Qihang Ai and Ruizhou Li and Menghui Wang and Haiyun Jiang},
year={2026},
eprint={2503.21435},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2503.21435},
}
```
## License & Provenance Notice
The benchmark annotations, manifests, and evaluation splits are released under the **CC BY 4.0** license (`cc-by-4.0`) for academic and research use. Underlying third-party diagram images and route map screenshots retain their original source licenses and attribution terms.