Page to token credit assignment improves document parsing accuracy
P2TPO: Structure-Aligned Page-to-Token Credit Assignment for Full-Page Document Parsing
Machine LearningComputation and LanguageComputer Vision and Pattern Recognition
Summary
Full-page document parsing aims to understand both the content and layout of pages with many different parts. Sometimes, even if the overall result looks good, small mistakes or missing pieces happen, and it’s not easy to tell exactly which parts are the problem. The authors propose a new method called P2TPO that links page-level feedback down to specific words or tokens, helping the system learn from local errors more precisely. This approach improved performance across multiple document parsing tests and worked well for different model sizes and starting points.
What this means in practice
- •For document processing teams: Improve automated extraction accuracy of content and structure from diverse full-page documents like forms and reports.
- •For software engineers in automation: Build better training methods for AI models that handle complex document layouts to reduce local errors and omissions.
Authors
Yong Zu, Ninghua Yang, Zezhong Tan, Xinhong Ma, Ziqiang Dong, Yang Yang
Abstract
End-to-end full-page document parsing must preserve the content and structure of heterogeneous elements, yet otherwise accurate outputs can contain local errors and omissions. A single page-level advantage does not explicitly identify which elements differ in quality across sampled outputs or where their errors occur. We introduce Page-to-Token Policy Optimization (P2TPO), a structure-aligned credit-assignment framework that operates on full-page policy trajectories. Reference-element alignment first associates block-level quality contrasts with generated spans. Unified Anchor Pricing (UAP) incorporates matched and missing element outcomes and provides feedback relative to a fixed quality ceiling when sampled outputs receive identical but imperfect scores for a reference element. Within matched blocks, Span Credit Redistribution (SCR) redistributes existing block credit according to aligned correct and erroneous spans, using boundary proxies for within-block omissions while preserving the total block-derived advantage across its tokens. Under a fixed-weight additive page utility, we show that element-indexed contrasts retain local quality differences that page-level aggregation can cancel out. In the main experimental comparison, P2TPO outperforms all evaluated policy optimization baselines in seed-averaged scores on each of the six document parsing benchmarks. Additional experiments demonstrate gains across model scales and initializations.