AmbiHTMLBench evaluates HTML document parsing for retaining layout
AmbiHTMLBench: A Benchmark for HTML-based Visually Rich Document parsing
Artificial Intelligence
Summary
Many tools that read documents simplify them into plain text formats, which lose important details like tables and visual layout. This paper shows that using HTML can keep these details intact, making the documents easier to edit and understand later. The authors created AmbiHTMLBench, a test set with over 1,100 pages, to measure how well computer models can recreate documents as HTML while preserving their look and structure. They found that different evaluation methods show different strengths, and that specially trained models improve results.
What this means in practice
- •For document processing engineers: Improve document digitization workflows by converting scanned or PDF documents into editable, visually accurate HTML representations.
- •For web content developers: Create tools that automatically generate maintainable HTML layouts from complex, visually rich documents for easier web publication.
Authors
Boyu Niu, Yingjie Xiong, Shurui Li, Linhan Pang, Yuntong Zhang, Han Wang, Hao Wu, Kai Zuo, Xu Tang, Xuanhe Zhou, Fan Wu
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.