TL;DR
This paper introduces "Document Sketching," a new task for generating draft documents from analogous texts to aid human writers. They propose a weakly supervised approach using a Mixture of Experts (MoE) model, enhanced with reinforcement learning, to create these "sketches" which capture structural patterns and reusable text from similar documents.
What Problem Does This Paper Address?
Large language models have become adept at generating fluent text, but their application to full document generation for writing assistance is hampered by a high "branching factor." This means models can easily go off-topic or "hallucinate" information, making them unsuitable for generating entire drafts without significant human oversight. Current tools are limited to sentence-level suggestions. The authors observe that much of human writing involves reusing existing structures and content. They aim to leverage this by generating a "sketch" of a document from a collection of similar, previously written documents, providing a structured starting point for users to edit and refine.
Methods
The core of the proposed solution is a Document Sketching framework.
- Weakly-Supervised Learning: Since gold-standard "sketches" are unavailable, they create heuristic sketches. This involves using pairwise sequence alignment (Ratcliff-Obershelp algorithm) between a target document and its analogous inputs. Tokens in the target document that have a high alignment ratio (above a threshold) are kept, while others are replaced with ellipses, forming the heuristic sketch.
- Mixture of Experts (MoE): To handle multiple input documents effectively, they employ an MoE architecture. Each input document is processed by a separate "expert" (an encoder-decoder model). A "coordinator" then combines the outputs of these experts to generate the final sketch. This allows for document-level coordination without concatenating long sequences, which is computationally expensive and less structured for standard encoder-decoder models.
- Reinforcement Learning (RL): To further refine the generated sketches and improve their quality according to the evaluation metric, they apply reinforcement learning. They use a token-level incremental reward based on the change in the evaluation score, which is more stable than end-to-end rewards. A mixed loss function combines the RL loss with a standard language modeling loss.
Datasets
The authors introduce a new dataset derived from Wikipedia. They group Wikipedia articles into collections based on similar textual characteristics, particularly those with similar titles. This dataset consists of approximately 20,000 documents, split into training, validation, and test sets. The dataset is designed for a weakly supervised setting, as gold sketches are not available.
Key Insights and Ideas
- Leveraging Document Similarity: The core idea is that analogous documents share structural patterns and reusable text. By identifying and exploiting these similarities, a useful draft "sketch" can be generated.
- MoE for Multi-Document Input: The MoE architecture proves effective for processing multiple input documents, outperforming simpler methods like concatenating inputs or using a single encoder. It allows for better coordination across documents.
- Weak Supervision is Viable: The success of the heuristic sketch generation demonstrates that even without perfect ground truth, a weakly supervised approach can yield effective models for this task.
- RL Improves Quality but Can Hurt Readability: While RL fine-tuning boosts automatic evaluation scores, human evaluations suggest it can sometimes lead to less readable sketches, indicating a trade-off that might require customized rewards for practical applications.
- Input Similarity Matters: The performance of models, especially non-neural baselines and T5, degrades significantly as input document similarity decreases. MoE-based models show greater robustness to lower similarity.
Key Results
- MoE Outperforms Baselines: The MoE model, especially when combined with RL (MoE+RL), significantly outperforms non-neural baselines (like consensus-MSA) and standard T5 models in automatic evaluation (1-WER).
- MoE+RL vs. MoE (Human Eval): While MoE+RL achieves higher automatic scores, human evaluators often preferred the MoE model, suggesting that automatic metrics might not fully capture perceived sketch quality or readability.
- Robustness to Low Similarity: MoE-based models are more robust to input documents with lower similarity compared to other approaches.
- T5 Fine-tuning: Fine-tuning T5 on the target document (doc-finetune) leads to worse results than using heuristic sketches, likely due to T5's tendency to hallucinate information when the target document contains much more detail than the input.
Limitations and Future Work
- Readability Concerns: The authors note that while MoE models generate more readable sketches, they can sometimes make it difficult to guess what should fill an ellipsis.
- Customized RL Rewards: For practical deployment, RL rewards should be customized to user preferences (e.g., tolerance for deletions vs. insertions).
- Interpretable Ellipses: Future work could explore making ellipses more interpretable by replacing them with more contentful labels (e.g., entity types) or retrieved sample content.
- Interactive Generation: The authors suggest interactive document generation, where sketches dynamically fill in local contexts based on user input, as a promising next step.
Summary updated