π Paper Β |Β π€ Dataset Β |Β π» Code Β |Β π MIT License
SynthDocBench is a fully synthetic, controlled benchmark for long-context visual document understanding that varies document length, layout structure, modality composition, and question type as independent axes, enabling systematic diagnosis of VLM failure modes.
Abhigya Verma*,1Β Β Khyati Mahajan*,1Β Β Amit Kumar Saha*,1Β Β Shruthan Radhakrishna1Β Β Sagar Davasam1Β Β Vikas Yadav1Β Β Sai Rajeswar1,2,3
*Equal contribution Β |Β 1ServiceNow AI Β |Β 2Mila β Quebec AI Institute Β |Β 3UniversitΓ© de MontrΓ©al
SynthDocBench evaluates vision-language models on 1,788 questions over 200 documents containing 3,340 charts, averaging 51.1 pages per document β a fully synthetic, controlled benchmark for long-context visual document understanding.
Unlike prior benchmarks that draw on real documents and confound length, layout, and modality, SynthDocBench generates documents end-to-end with an LLM pipeline across 6 layout archetypes, varying document length, layout structure, modality composition, and question type as independent axes β enabling controlled attribution of why a model fails, not just that it does.
Key Features:
- π§© 3 task-specific subsets β
chart(24 D3.js chart types),cross_modal(evidence split across non-adjacent sections), andcomplex(multi-hop, difficulty L1 β L5) - π 51.1 avg. pages per document, far beyond single-page chart/doc-VQA benchmarks
- π§ͺ Dual-layer generation β every chart is rendered as D3.js and backed by hidden structured metadata, making ground-truth answers deterministic
- π€ 7 frontier VLMs evaluated, cross-judge validated (GPT-5 vs. Gemini-as-judge agree within 3.5 accuracy points, r β₯ 0.94)
- π Surfaces 3 failure modes invisible to existing benchmarks β length degradation, positional sensitivity (middle third hardest for 5/6 models), and chart-reading collapse in long-document settings
| Subset | Description |
|---|---|
chart |
Chart-reading questions answerable only from a chart β probes 24 D3.js chart types (incl. dumbbell, lollipop, slope, sparkline grids) requiring exact numerical reads. |
cross_modal |
Questions requiring text + chart evidence from separate, non-adjacent sections (long-range cross-modal grounding). |
complex |
Multi-hop questions combining 2β4 evidence units across text and charts, difficulty L1 (direct lookup) β L5 (cross-section synthesis). |
Source PDFs are hosted alongside the QA subsets at huggingface.co/datasets/ServiceNow-AI/SynthDocBench.
See Evaluation below for the harness that scores candidate VLMs against these questions and reproduces the paper's numbers.
A LangGraph-based pipeline that generates rich, themed reports (HTML + PDF, with an optional "scanned document" effect) and embedded D3.js visualizations. It supports two input paths:
- Topic-in: give it a topic and it researches (Wikipedia/Wikidata) and authors the report itself.
- Data-in: give it pre-built source text β Wikipedia groupings or arXiv papers β and it themes and visualizes them.
select_layout_archetype
β generate_reports_from_topics (topic-in; bypassed when reports are supplied)
β generate_topic_summary
β enrich_reports
β generate_design_tokens
β assign_blueprints_and_budget (style DNA, chart budget, report identity)
β generate_visualization_ideas
β insert_placeholders
β select_visualization_types
β search_wikipedia_wikidata
β structure_diagram_data
β generate_diagram_code_with_metadata
β validate_vizzes
β assign_figure_numbers β insert_figure_references
β generate_content_components
β extract_table_metadata β validate_metadata
β generate_qa_manifest
Post-graph: generate_html_report()
β convert_to_scanned_pdf() (HTML β PDF β scanned PDF)
β complex question generation (β <report>_questions.json)
After each report is built, complex/chart-reading/cross-modal QA pairs are generated from it
(reusing the report's embedded JSON-LD chart metadata) and written alongside it. Opt out with
--no-questions. It can also be run standalone via pipelines/complex_question_generation.py.
- Style DNA & visual diversity β 7 randomized style axes plus per-component renderers so reports
don't all look identical (
utils/style_dna.py,utils/visual_diversity.py). - Layout archetypes β magazine / dashboard / academic / editorial / infographic / brutalist.
- Real-world data β Wikipedia prose + Wikidata structured facts (
tools/wiki_search.py). - D3.js visualizations with figure numbering, in-text references, and a QA/metadata manifest.
- Parallelism β per-section and per-viz LLM calls run concurrently (
utils/parallel.py). - PDF export β clean PDF and a realistic scanned-document effect.
- Multi-model β GPT (Azure), Gemini (OpenAI-compatible endpoint or native Vertex AI), and Claude (Foundry / Bedrock / proxy).
- arXiv-to-report β fetch papers, extract text/figures/tables, and generate reports.
- Complex question generation β multi-hop, chart-reading, and cross-modal QA pairs generated
from each finished report (
pipelines/complex_question_generation.py); auto-chained into report generation (opt out with--no-questions).
uv sync # or: pip install -e . (dependencies are in pyproject.toml)
uv run playwright install chromium # needed for HTMLβPDFpdf2image needs poppler on your system (brew install poppler / apt-get install poppler-utils).
Model configs live in utils/model_constant.py, which is git-ignored. Copy the template and fill
it in (or set the referenced environment variables, e.g. in .env):
cp utils/model_constant.example.py utils/model_constant.pyThe template documents which fields each provider needs
(SUPPORTED_MODELS per model key; ALL_GENERATIONS is an unused stub for this pipeline).
# Single topic β pipeline researches and authors the report
python -m pipelines.report_generation --topic "Renewable Energy" --model gpt-4o --output output/demo
# Many topics from a JSON list, run concurrently
python -m pipelines.report_generation --topics-file topics.json --batch-size 4 --model gemini-2.5-flashpython -m pipelines.report_generation \
--input data/filtered_groupings.json \
--sample_start_index 0 --sample_end_index 3 \
--per_topic_limit 3 \
--model gemini-3-pro-preview \
--output output/trial
# or: bash run_report_generation.sh# End-to-end (fetch β extract β report). See the header of the script for all options.
bash run_arxiv_to_report.sh
# Autonomous mode: LLM discovers topics, fetches papers per topic, generates reports
RESEARCH_AREA="Large Language Model Evaluation" bash run_arxiv_to_report.sh
# Use a pre-fetched metadata file directly
python -m pipelines.report_generation --arxiv-metadata arxiv_dataset/metadata/papers_metadata.json# Regenerate from a cached state
python -m pipelines.report_generation --from-cache cache/state_file.pkl
# Convert existing HTML(s) to PDF (no LLM)
python -m pipelines.report_generation --html-to-pdf output/demo
# HTML only (skip PDF)
python -m pipelines.report_generation --topic "β¦" --no-scannedScore candidate VLMs on the generated reports. The harness rasterizes each report PDF to page-image strips (vision-only β no HTML/metadata), asks each candidate model the report's questions, and scores answers with a judge model.
python eval/evaluate_models.py \
--input-dir data/reports_v4 \
--candidates gpt-4o \
--judge gpt-5 \
--output results/all_results.json \
--workers 4
# --concat-num N groups N pages per strip; see the script header for all options.| Option | Default | Description |
|---|---|---|
--topic / --topics-file |
β | Topic-in input |
--input |
β | Data-in: Wikipedia groupings .json/.pkl |
--arxiv-metadata |
β | Data-in: arXiv papers_metadata.json |
--from-cache |
β | Regenerate from a saved state |
--html-to-pdf |
β | Convert existing HTML file/dir to PDF |
--model |
gpt-4o |
LLM model key (see model_constant.py) |
--output |
output |
Output directory |
--viz-cache |
β | Directory for viz code/images |
--per_topic_limit |
3 |
Data-in: samples/papers per group |
--sample_start_index / --sample_end_index |
0 / 3 |
Data-in: slice of topic groups |
--batch-size |
1 |
Topic-in: max concurrent topics |
--noise-min / --noise-max |
5.0 / 15.0 |
Scanned-PDF noise range |
--no-scanned |
false |
Skip PDF generation |
pipelines/report_generation.pyβ the report pipeline (topic-in + data-in).pipelines/arxiv_pipeline.pyβ arXiv search / citation-reference expansion / PDF download.pipelines/autonomous_pipeline.pyβ autonomous arXiv mode (topic discovery β fetch β report).pipelines/complex_question_generation.pyβ multi-hop / chart-reading / cross-modal QA generation.eval/evaluate_models.pyβ vision-only evaluation of candidate VLMs with a judge model.utils/βapi_call(LLM client),html_generator,state_loader,extract_content,parallel,style_dna,visual_diversity,model_constant(git-ignored config).tools/wiki_search.pyβ Wikipedia/Wikidata API integration.data/filtered_groupings.jsonβ sample Wikipedia groupings for data-in mode.
- HTML report β themed, with embedded D3.js visualizations.
- PDF β clean print version.
- Scanned PDF β realistic scanned-document effect (unless
--no-scanned). - Metadata sidecar β
*_report_metadata.json(style DNA, blueprints, QA global stats). - State cache β pickle for regeneration (with
--save-cache).
Key deps (full list in pyproject.toml): langgraph, openai, anthropic,
langchain-google-vertexai, boto3 (LLM/orchestration); beautifulsoup4, pymupdf, feedparser
(data); playwright, pdf2image, pillow (PDF export).
@misc{verma2026synthdocbenchcontrolledbenchmarklongcontext,
title={SynthDocBench: Controlled Benchmark for Long-Context Visual Document Understanding},
author={Abhigya Verma and Khyati Mahajan and Amit Kumar Saha and Shruthan Radhakrishna and Sagar Davasam and Vikas Yadav and Sai Rajeswar},
year={2026},
eprint={2607.10400},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2607.10400},
}