PaDoc:面向文档解析的布局感知并行解码
PaDoc: Layout-Grounded Parallel Decoding for Document Parsing
August 6, 2026
作者: Hao Yu, Jiabo Zhan, Kang Liu, Linnan Zhao, Dongxu Yue, Rui Chen, Jinglin Wang, Chong Sun, Chen Li, Jing Lyu, Chun Yuan
cs.AI
摘要
端到端文档解析器提供了统一接口,但将页面布局和区域内容序列化为单一自回归序列。这种建模方式迫使相互独立的区域进入一条解码路径,其长度随总内容增长;而基于裁剪的两阶段解析器则展现出区域级并行,代价是重复的视觉预填充和碎片化的页面上下文。为了在去除依赖的同时保留完整页面上下文,我们提出PaDoc——一种基于布局的解析器,它将预测的布局视为共享页面表示上的分支结构。在区域充分性假设下,我们推导出一种前缀条件分解,其中布局流和区域内容分支并发推进,将解码深度缩减为最长的布局-内容路径。我们在单个多模态大语言模型(MLLM)中实现了这一分解:打包的可变长度祖先注意力在标准下一词元训练下保持可见性,而掩码并行解码创建分支,由所评估的vLLM后端作为并发请求处理,并复用缓存中的共享前缀。在OmniDocBench Full上,PaDoc取得了91.1的总体布局F1,并且在端到端解析器中以94.24的顶级总体得分位居前列,同时取得了最佳Text Edit(0.038)和Formula CDM(95.59)。在一个384页子集和单张A800 GPU上,PaDoc在五个并发级别下均是最快的端到端解析器,相对于同骨干的Sequential SFT基线,有效页吞吐量提升了67.4%–118%,P95延迟降低了39.2%–54.9%。代码可在 https://github.com/Longin-Yu/Padoc 获取。
English
End-to-end document parsers provide a unified interface, but serialize page layouts and regional contents into one autoregressive sequence. This formulation forces independent regions onto a decoding path whose length grows with the total content, whereas crop-based two-stage parsers expose region-level parallelism at the cost of repeated visual prefills and fragmented page context. To retain full-page context while removing dependencies, we propose PaDoc, a layout-grounded parser that treats the predicted layout as a branching structure over a shared page representation. Under a region-sufficiency assumption, we derive a prefix-conditioned factorization in which the layout stream and regional content branches advance concurrently, reducing the decoding depth to the longest layout-content path. We realize this factorization within a single MLLM: packed variable-length ancestor attention preserves the visibility under standard next-token training, while masked parallel decoding creates branches that the evaluated vLLM backend serves as concurrent requests with cache-resident shared-prefix reuse. On OmniDocBench Full, PaDoc attains an Overall layout F1 of 91.1 and, among end-to-end parsers, a top-tier Overall score of 94.24 together with the best Text Edit (0.038) and Formula CDM (95.59). On a 384-page subset and one A800 GPU, it is the fastest end-to-end parser at five concurrency levels, improving valid-page throughput by 67.4-118% and reducing P95 latency by 39.2-54.9% relative to a same-backbone Sequential SFT baseline. Code is available at https://github.com/Longin-Yu/Padoc