DocReward: A Document Reward Model for Structuring and Stylizing

Junpeng Liu, Yuzhong Zhao, Bowen Cao, Jiayu Ding, Yilin Jia, Tengchao Lv, Yupan Huang, Shaohan Huang, Nan Yang, Li Dong, Lei Cui, Tao Ge, Xun Wang, Huitian Jiao, Sun Mao, Fnu Kartik, Si-Qing Chen, Wai Lam, Furu Wei · OpenReview

Abstract

Recent advances in agentic workflows have enabled the automation of tasks such as professional document generation. However, they primarily focus on textual quality, neglecting visual structure and style, which are crucial for readability and engagement. This gap arises mainly from the absence of suitable reward models to guide agentic workflows toward producing documents with stronger structural and stylistic quality. To address this, we propose DocReward, a document reward model that evaluates documents based on their structure and style. We construct a multi-domain dataset DocPair of 117K paired documents, covering 32 domains and 267 document types, each including a high- and low-professionalism document with identical content but different structure and style. This enables the model to evaluate professionalism comprehensively, and in a textual-quality-agnostic way. DocReward is trained using the Bradley-Terry loss to score documents, penalizing predictions that contradict the annotated ranking. Notably, DocReward outperforms GPT-4o and GPT-5 in accuracy by 30.6 and 19.4 percentage points, respectively, demonstrating its superiority over baselines. In an extrinsic evaluation of document generation, DocReward achieves a significantly higher win rate of 60.8%, compared to GPT-5's 37.7% win rate, demonstrating its utility in guiding generation agents toward producing human-preferred documents.

Introduction

While AI agents have become remarkably good at writing text, they are often "visually illiterate." If you ask a standard Large Language Model (LLM) to generate a professional report, it might produce high-quality prose but deliver it as a disorganized "wall of text" with inconsistent fonts, cramped margins, and poor hierarchy. Existing research has focused almost exclusively on textual quality, leaving a gap in how we automate the visual professionalism required for business, government, or academic documents. The authors argue that a document's "look and feel"—its structure and style—is just as critical for readability and engagement as the words themselves. The core challenge is building a model that can judge these visual elements without being biased by the quality of the writing.

Methodology and Dataset Construction

To address the challenge of visual professionalism, the researchers introduced a textual-quality-agnostic framework. The core idea is to decouple content from style by training the model on pairs of documents where the text is identical, but the formatting differs.

The DocPair Dataset

The authors constructed a massive new dataset called DocPair, containing 117,000 document pairs across 32 domains and 267 document types. Each pair consists of a "high-professionalism" version and a "low-professionalism" version of the same text. For evaluation, they created DocPairBench, a manually annotated benchmark of 1,443 pairs ranked by human experts based on criteria like white space usage, heading hierarchy, and font consistency.

The three-step pipeline for DocReward: curating high-quality documents, expanding source documents via agents, and ranking documents.

Model Architecture and Training

The model uses Qwen-2.5-VL as the backbone, with an added regression head to output a scalar professionalism score. It was trained using the Bradley-Terry loss, a standard approach in preference learning that penalizes the model if its predicted scores contradict human-annotated rankings. Beyond just scoring, they integrated DocReward into agentic workflows using Reinforcement Learning (GRPO), allowing a document-generation agent to receive a reward signal specifically for how well it formats its output.

Experimental Results

DocReward demonstrates significant improvements over general-purpose large language models in evaluating document professionalism.

Human Preference Accuracy

On the DocPairBench, DocReward-7B achieved 82.3% accuracy, significantly outperforming GPT-5 (67.7%), Claude 4 (54.2%), and GPT-4o (54.9%). This indicates that specialized vision-language models are better suited for layout evaluation than general LLMs. Visualization of the model’s attention maps reveals that it prioritizes headers, footers, margins, and table borders rather than just reading the sentences.

DocReward provides stepwise feedback to agentic workflows, achieving superior human preference accuracy compared to baselines.

Agentic Integration and RL Gains

When used as a reward signal for reinforcement learning, DocReward helped the Qwen2.5-Coder model reach a 100% success rate in generating valid, renderable document code. In a "Best-of-N" scenario, DocReward achieved a 60.8% win rate against human preferences, nearly doubling the performance of GPT-5 (37.7%).

Conclusion

DocReward represents a significant step toward "visually literate" AI agents. By focusing on visual cues like headers, margins, and table borders, the model provides a robust reward signal for professional document generation. While current limitations include the lack of natural language feedback and challenges with multi-page flow, future work aims to provide qualitative diagnostic rationales to further assist users and agents in document refinement.

Summary updated

BibTeX
@misc{liu2025docreward,
  author = {Junpeng Liu and Yuzhong Zhao and Bowen Cao and Jiayu Ding and Yilin Jia and Tengchao Lv and Yupan Huang and Shaohan Huang and Nan Yang and Li Dong and Lei Cui and Tao Ge and Xun Wang and Huitian Jiao and Sun Mao and FNU Kartik and Si-Qing Chen and Wai Lam and Furu Wei},
  title = {{DocReward: A Document Reward Model for Structuring and Stylizing}},
  year = {2025},
  eprint = {2510.11391},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.11391},
}
Figure