Simple and Effective Retrieve-Edit-Rerank Text Generation

Nabil Hossain, Marjan Ghazvininejad, Luke ZettlemoyerACL 2020

Introduction

Generating high-quality text from scratch remains a significant challenge for neural networks, which often struggle with hallucinations, repetitive phrasing, and loss of coherence. To mitigate these issues, researchers have turned to retrieve-and-edit methods. These systems identify a similar human-authored example (a "prototype") from a training database and use it as a template to guide the generation process.

However, traditional retrieve-and-edit approaches suffer from a critical bottleneck: they attempt to select the single best prototype before any editing occurs. This early commitment is problematic because a prototype that appears similar to the input may not necessarily be the easiest for the model to transform into the desired output. This paper introduces a "Retrieve-Edit-Rerank" framework that overcomes this limitation by delaying the final selection until after the editing phase.

Methodology: The Retrieve-Edit-Rerank Framework

The proposed framework utilizes a three-stage pipeline designed to maintain multiple candidate options throughout the generation process.

The three-stage Retrieve-Edit-Rerank framework.
  1. Retrieve: For a given input $x$, the system employs standard search tools (e.g., Lucene) to retrieve a set of $N$ similar examples from the training data.
  2. Edit: Rather than selecting a single prototype, the system passes each of the $N$ retrieved examples through a Transformer-based "editor." The editor processes the original input concatenated with a retrieved example to produce a candidate target text. Each candidate is edited independently.
  3. Rerank: After generating $N$ potential outputs, a post-generation ranking module selects the final result. For Machine Translation, the model uses its own log-likelihood (confidence) to rank outputs. For Summarization, a "voting" system is used, selecting the output generated most frequently across different candidates.

Experimental Evaluation

The framework was evaluated on two primary tasks: Machine Translation (MT) for English-to-Dutch (EN-NL) and English-to-Hungarian (EN-HU), and Summarization using the Gigaword dataset for headline generation.

Key Results

The Retrieve-Edit-Rerank approach established new performance benchmarks across both tasks. In Machine Translation, the model significantly outperformed previous state-of-the-art methods like Neural Fuzzy Repair (NFR).

Performance comparison on Machine Translation tasks (EN-NL and EN-HU).

As shown in the results table, the model achieved gains of 6.5 BLEU points on EN-NL and 7.5 BLEU points on EN-HU compared to NFR. In the Summarization task, the model achieved a 1.2 ROUGE improvement over the Re3Sum baseline, nearing the performance of much more complex multi-stage systems.

Discussion and Insights

The success of this framework stems from an "Edit-First, Decide-Later" philosophy. It is fundamentally easier for a model to judge the quality of a completed generation than to predict the utility of a raw prototype. By editing multiple candidates, the model can empirically determine which prototype best "flexes" to fit the current context.

Furthermore, the system demonstrates remarkable robustness to noise. The post-generation reranker acts as a filter; if a retrieved example is a poor match that leads to a low-quality generation, the reranker can ignore it in favor of more coherent alternatives. An "Oracle" analysis revealed that if a perfect reranker were available, scores could improve by an additional 3-5 BLEU points, suggesting that the current bottleneck is the selection logic rather than the editing model itself.

Conclusion

The Retrieve-Edit-Rerank framework provides a simple yet highly effective method for improving text generation. By leveraging standard Transformer architectures and basic reranking metrics, it achieves state-of-the-art results without requiring specialized neural components. Future work will likely focus on developing more sophisticated reranking algorithms to close the gap between current performance and the theoretical "Oracle" potential.

Summary updated

BibTeX
@inproceedings{hossain2020simple,
  author = {Nabil Hossain and Marjan Ghazvininejad and Luke Zettlemoyer},
  title = {{Simple and Effective Retrieve-Edit-Rerank Text Generation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2020},
  url = {https://openreview.net/forum?id=o6UKDECHLcm},
}

Loading related content...

Figure