P2TPO: Structure-Aligned Page-to-Token Credit Assignment for Full-Page Document Parsing
Organizations: Qwen Business Unit, Alibaba · Xidian University
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.
Figures & tables
| Benchmark | Split | Init | GRPO | GSPO | GDPO | RDPO | P2BPO | +UAP | +SCR | P2TPO |
|---|---|---|---|---|---|---|---|---|---|---|
| OmniDocBench | v1.6 | 92.17 | ||||||||
| PureDocBench | Clean | 81.28 | ||||||||
| Digital | 76.66 | |||||||||
| Real | 63.29 | |||||||||
| FinixDocBench | — | 65.30 | ||||||||
| Real5- OmniDocBench | Scanning | 91.06 |
| Benchmark | Split | Full P2TPO | (a) UAP interventions | w/o UAP | (b) SCR allocation controls | w/o SCR | ||
|---|---|---|---|---|---|---|---|---|
| w/o consensus feedback | w/o omission routing | Circular shift | Random support | |||||
| OmniDocBench | v1.6 | |||||||
| PureDocBench | Clean | |||||||
| Digital | ||||||||
| Real | ||||||||
| FinixDocBench | — | |||||||
| Parsing metrics | Omission rates (%) | ||||||
|---|---|---|---|---|---|---|---|
| Method | Text ED | Formula CDM | Formula ED | Table TEDS | Order ED | Element | Local |
| P2BPO | |||||||
| P2BPO + UAP | |||||||
| P2BPO + SCR | |||||||
| P2TPO | |||||||
| Initial Conditions | Qwen3.5-2B SFT data: 50K pages | Qwen3.5-4B SFT data: 50K pages | Qwen3-VL-2B-Instruct SFT data: 700K pages | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Benchmark | Split | GRPO | GSPO | GDPO | RDPO | P2TPO | GRPO | GSPO | GDPO | RDPO | P2TPO | GRPO | GSPO | GDPO | RDPO | P2TPO |
| OmniDocBench | v1.6 | |||||||||||||||
| PureDocBench | Clean | |||||||||||||||
| Digital | ||||||||||||||||
| Real | ||||||||||||||||
| FinixDocBench | — | |||||||||||||||
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Work | Target | RL algorithm | Reward construction | Optimizer signal |
| Infinity-Parser ( Wang et al., 2025 ) | end2end | GRPO | Edit similarity paragraph count reading order | Sum Scalar |
| Logics-Parsing ( Chen et al., 2025 ) | end2end | GRPO | Text similarity box localization reading order | Sum Scalar |
| olmOCR 2 ( Poznanski et al., 2025 ) | end2end | GRPO | Unit-test pass rate termination and metadata checks | Sum Scalar |
| HunyuanOCR ( Hunyuan Vision Team et al., 2025 ) | end2end | GRPO | Parsing: NED-based similarity; format/length validity gate | Scalar |
| LightOnOCR ( Taghadouini et al., 2026 ) | end2end | GRPO | OCR: unit-test pass rate with repetition, termination, math, and format checks | Scalar |
| TexOCR ( Wang et al., 2026a ) | end2end | GRPO-style | Pass rate of binary tests derived from nine metrics | Scalar |
| Setting | Specification |
|---|---|
| Training framework | veRL with Megatron actor training and asynchronous vLLM generation; BF16. |
| RL budget | 100 updates; 128 page prompts per update; responses per prompt. |
| PPO minibatch | 128 prompts, expanded to 1,024 responses; one PPO epoch. |
| Sequence limits | 8,192 prompt tokens (including image tokens) and 8,192 response tokens; total model length 16,384. |
| Rollout sampling | Temperature 1.0, top- , top- disabled. |
| Optimizer | Megatron Adam; learning rate , moments , weight decay , constant schedule, no warmup. |
| Study | Initialization | RL records / updates | Summary | Evaluation |
|---|---|---|---|---|
| Primary comparison and UAP/SCR combinations | Qwen3.5-2B; 700K SFT | 12,800 / 100 | ; 5 runs | All splits; content and omission diagnostics on OmniDocBench |
| Internal UAP interventions | Qwen3.5-2B; 700K SFT | 12,800 / 100 | ; 5 paired runs | All splits |
| SCR allocation controls | Qwen3.5-2B; 700K SFT | 12,800 / 100 | ; 5 runs | All splits |
| Initialization and scale | Qwen3.5-2B and 4B; same 50K SFT manifest | 12,800 / 100 | ; 5 data seeds | All splits |
| Additional backbone | Qwen3-VL-2B-Instruct; 700K SFT | 12,800 / 100 | ; 5 data seeds | All splits |
| Parameter sensitivity | Qwen3.5-2B; 700K SFT | 12,800 / 100 | ; 5 runs | All splits |
| Benchmark | Pages | Evaluated Scope | Engine |
|---|---|---|---|
| OmniDocBench v1.6 ( Ouyang et al., 2025 ; OmniDocBench contributors, 2026 ) | 1,651 | Official v1.6 ground truth, including 1,355 v1.5 pages. | OmniDocBench v1.6 |
| Real5-OmniDocBench ( Zhou et al., 2026 ) | 1,355 per condition | Scanning, Warping, Skew, Illumination, Screen photo; shared v1.5 ground truth. | OmniDocBench v1.6 |
| Wild-OmniDocBench ( Li et al., 2026b ) | 1,350 | Real captures of a subset of v1.5 pages. | OmniDocBench v1.6 |
| DocPTBench SynReal ( Du et al., 2025 ; DocPTBench authors, 2025 ) | 1,381 | Photographed set: simulated and real captures. | OmniDocBench v1.6 |
| DocPTBench Dewarp ( Du et al., 2025 ; DocPTBench authors, 2025 ) | 1,381 | Unwarping set: rectified Photographed images. | OmniDocBench v1.6 |
| PureDocBench ( Li et al., 2026c ; PureDocBench authors, 2026 ) | 1,475 per condition | Clean, Digital, Real; ground truth uses the v1.6 page schema. | OmniDocBench v1.6 |
Document Parsing
Document parsing converts PDFs and page images into structured, machine-readable text, tables, formulas, layouts, and reading order.
See all 63 papers