Diffusion Drafts, AR Verifies: Accelerating Document OCR with Self-Speculative Decoding

Dohyun Kim, Sungjun Han, Hyungguk Kim, Yusik Kim, Jamin Shin, Paul Hongsuck Seo, Hongjoon AhnarXiv 2026

TL;DR

GravityOCR accelerates document OCR by combining parallel block-diffusion drafting with causal autoregressive (AR) verification inside a single, parameter-shared model. By using the diffusion path to propose multiple tokens at once and the AR path to verify them, it eliminates the need for a separate drafting network, achieving a $3.94\times$ decode-only speedup while retaining 99.7% of the original model's accuracy.

What Problem Does This Paper Address?

State-of-the-art document understanding models typically use autoregressive (AR) decoding to translate document images into structured text, HTML tables, or LaTeX formulas. While highly accurate, AR decoding is a sequential bottleneck: it requires a dedicated model forward pass for every single output token.

Because OCR outputs are strongly constrained by the input image (visually grounded), parallel generation via diffusion models seems like a natural fix. However, when a diffusion model predicts multiple tokens simultaneously, the tokens cannot condition on one another during that step. This lack of causal context leads to catastrophic structural failures, such as omitting words or creating duplicate text loops.

Failure case of confidence-based parallel commitment without verification.

Methods

The authors introduce GravityOCR, which unifies parallel drafting and sequential verification without adding any extra parameter overhead or auxiliary prediction heads.

1. Parameter-Shared Architecture & Joint Training

GravityOCR adapts a pretrained AR model (specifically GLM-OCR) to support both causal AR and block-diffusion prediction using the exact same vision encoder, language decoder, and language model head. The only architectural modification is a learned embedding for a dedicated mask token [M].

During training, the model processes three streams simultaneously in a single forward pass:

  • Clean Stream: Provides standard causal next-token supervision for the AR verifier.
  • Two Complementary Corrupted Streams: Provide denoising supervision for the block-diffusion drafter by masking disjoint sets of tokens.
Overview of the joint AR–diffusion training procedure in a single forward pass.

2. Self-Speculative Decoding

At inference time, the decoding operates in a "Draft-then-Verify" loop:

  • Draft Phase: The model uses its block-diffusion path to propose an entire block of tokens (e.g., 32 tokens) in parallel in a single "one-shot" forward pass.
  • Verify Phase: The causal AR path evaluates the proposed draft tokens in parallel. It accepts the longest prefix where the draft matches the AR token-by-token greedy predictions, ensuring the final output is mathematically equivalent to standard AR decoding.
The self-speculative draft-and-verify decoding loop.

3. Reinforcement Learning via GRPO

To align the model with sequence- and structure-level quality metrics, the authors apply Group Relative Policy Optimization (GRPO). Crucially, they route GRPO only through the causal AR path. This allows them to use standard token-level log-probabilities and avoid the notoriously difficult task of estimating likelihoods over diffusion trajectories, while still updating the shared parameters used by the drafter.

Datasets

The model was trained on a massive pool of 12.3 million region-level examples compiled from public datasets, including DocGenome, Docmatix, PubTables-1M, FinTabNet, SynthTabNet, PubTabNet, RVL-CDIP, DocLayNet, and UniMER.

Evaluation was conducted across three major benchmarks:

  • OmniDocBench v1.6: The primary benchmark for overall document parsing, text reading order, and layout analysis.
  • PubTabNet (Validation Set): Used specifically to evaluate structured table recognition.
  • UniMER-Test: Used to evaluate mathematical expression and formula recognition.

Key Insights and Ideas

  • One-Shot Drafting Wins: Iteratively refining a diffusion draft over multiple steps increases the number of accepted tokens per round, but the extra forward passes cost more than they buy. A single-step ("one-shot") parallel draft yields the highest efficiency (tokens per forward pass).
  • Structured Data Benefits Most: Highly structured regions like tables and formulas exhibit stronger syntactic constraints than plain text. As a result, the diffusion drafter makes better proposals, leading to higher token acceptance rates (an average of 25.0 accepted tokens per round for tables vs. 15.0 for text).
  • Cross-Path Optimization: Fine-tuning the model using reinforcement learning exclusively on the AR path successfully improves the performance of the diffusion drafting path. This proves that the shared internal representations are deeply intertwined.

Key Results

GravityOCR establishes a new state-of-the-art accuracy-speed frontier on OmniDocBench v1.6:

Accuracy vs. speed landscape of document OCR systems on OmniDocBench v1.6.
  • Speedups: When deployed in an SGLang serving framework, GravityOCR achieves a $3.94\times$ decode-only speedup on region crops and a $1.32\times$ end-to-end page-processing speedup over standard AR decoding.
  • High Parallelism: The model successfully commits an average of 9.7 output tokens per forward pass.
  • Accuracy Preservation: On OmniDocBench, GravityOCR achieves an Overall score of 95.16, virtually matching the original GLM-OCR baseline score of 95.48. On PubTabNet, it actually improves the Tree Edit Distance-based Similarity (TEDS) score from 0.803 to 0.871 compared to the base model.

Limitations and Future Work

  • Diminishing Returns with Batching: The relative throughput advantage of self-speculative decoding narrows as the serving batch size increases. At a batch size of 64, the speedup drops to $1.13\times$ because standard AR decoding is already highly efficient at saturating GPU compute under heavy concurrency.
  • Text vs. Table Disparity: Plain text regions do not accelerate nearly as much as tables due to weaker structural constraints, meaning the model still spends significant time on simpler text layouts. Future work could explore adaptive block sizes depending on the detected region type.

Summary updated

BibTeX
@misc{kim2026diffusion,
  author = {Dohyun Kim and Sungjun Han and Hyungguk Kim and Yusik Kim and Jamin Shin and Paul Hongsuck Seo and Hongjoon Ahn},
  title = {{Diffusion Drafts, AR Verifies: Accelerating Document OCR with Self-Speculative Decoding}},
  year = {2026},
  eprint = {2609.26638},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.26638},
}
Figure