AmbiHTMLBench: A Benchmark for HTML-based Visually Rich Document parsing
Organizations: Shanghai Jiao Tong University · Theseus Labs · Xiaohongshu
Abstract
Traditional document parsing systems use Markdown as their output representation, which is effective for linear text but does not fully preserve fine-grained spatial structure, table geometry, visual hierarchy, or rendering semantics. We show that HTML is advantageous for heterogeneous and layout-sensitive documents whose representations must remain editable, inspectable, and reusable, and introduce AmbiHTMLBench to systematically study this setting. In this benchmark, given a real-world document, a model must recover executable HTML that preserves its content, organization, and visual appearance. The benchmark contains 1,115 diverse pages with structured annotations and evaluates predictions in two different ways: The objective protocol aligns ground-truth and predicted rendered blocks and measures table fidelity, page-level text error, and a two-dimensional layout consistency; a complementary reference-anchored protocol measures perceived fidelity by aligning LLM judges with human preferences. Across ten primary multimodal systems, the best objective score is 0.8092, while the subjective winner is different, demonstrating that automatic decomposition and human-perceived fidelity capture complementary properties. We further fine-tune a small-parameter expert model and find that task-specific adaptation yields good performance on document-to-HTML reconstruction task. These results position AmbiHTMLBench as a diagnostic testbed for building smarter and more logical document parsing systems.
Figures & tables
| Rank | Model | Text ED | TEDS | TEDS-S | Layout | Obj. score |
|---|---|---|---|---|---|---|
| 1 | Gemini 3.1 Pro Preview | 0.1754 | 0.6518 | 0.6650 | 0.8092 | |
| 2 | Claude Opus 5.5 | |||||
| 3 | Gemini 3.8 Flash | |||||
| 4 | Kimi-K3 | |||||
| 5 | Claude Opus 5 | |||||
| 6 | Qwen 3.8 max |
| Model | Method | Weighted | Text | TEDS | Layout |
|---|---|---|---|---|---|
| Qwen3.5-9B | Base | ||||
| Qwen3.5-9B | Distill SFT | 0.7064 | 0.6761 | 0.5827 | 0.7737 |
| Qwen3.5-4B | Base | ||||
| Qwen3.5-4B | Distill SFT | 0.6934 | 0.6556 | 0.5722 | 0.7675 |
| Rank | Model | BT score (95% CI) | Soft pref. | Rank CI | ||
|---|---|---|---|---|---|---|
| Score | Low | High | ||||
| 1 | GPT 5.6 Sol | % | [1, 1] | |||
| 2 | GPT 5.6 Terra | % | [2, 3] | |||
| 3 | Gemini 3.1 Pro Preview | % | [2, 3] | |||
| 4 | Qwen3.7 Plus | % | [4, 4] | |||
| 5 | Kimi K3 | % | [5, 6] | |||
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Activation | Axis | Visual criteria | |
|---|---|---|---|
| Fixed | Global layout | 1,872 | Regions, columns, spacing, grouping, reading order, proportions. |
| Fixed | Text presentation | 1,872 | Wrapping, typography, density, alignment, hierarchy, legibility. |
| Conditional | Table | 497 | Visible row/column organization and cell alignment. |
| Conditional | Formula | 61 | Fractions, scripts, radicals, matrices, and mathematical alignment. |
| Conditional | Algorithm | 12 | Block organization, indentation, and step hierarchy. |
| Conditional | Vertical text | 90 | Vertical flow, orientation, and reading organization. |
| Judge | Coefficient |
|---|---|
| Claude Opus 5 | 0.09045204815695966 |
| Claude Sonnet 5 | 0.10401091278902799 |
| Gemini 3.1 Pro Preview | 0.37576678499354577 |
| GPT-5.6-Sol | 0.13742077090225210 |
| GPT-5.6-Terra | 0.16012498207363500 |
| Pilot | Holdout | |||||
|---|---|---|---|---|---|---|
| Committee | Brier | Coverage | Rank | Brier | Coverage | Rank |
| S+G+T (v1) | 0.1258 | 77.81% | 1 | 0.1293 | 78.99% | 4 |
| O+G+T | 0.1302 | 78.44% | 2 | 0.1263 | 79.90% | 2 |
| S+G+L | 0.1369 | 79.06% | 3 | 0.1267 | 79.45% | 3 |
| O+G+L (v2) | 0.1404 | 79.06% | 4 | 0.1240 | 80.35% | 1 |