A Simple, Fast Diverse Decoding Algorithm for Neural Generation
Jiwei Li, Will Monroe and Dan Jurafsky Computer Science Department, Stanford University, Stanford, CA, USA
Abstract
We propose a simple, fast decoding algorithm that fosters diversity in neural generation. The algorithm modifies the standard beam search algorithm by penalizing hypotheses that are siblings—expansions of the same parent node in the search—thus favoring including hypotheses from diverse parents. We evaluate the model on three neural generation tasks: dialogue response generation, abstractive summarization, and machine translation. We also describe an extended model that uses reinforcement learning to automatically choose the appropriate level of beam diversity for different inputs or tasks. Simple diverse decoding helps across all three tasks, especially those needing reranking or having diverse ground truth outputs; reinforcement learning offers an additional boost. 111This paper includes material from the unpublished manuscript “Mutual Information and Diverse Decoding Improve Neural Machine Translation” (Li and Jurafsky, 2016).
中文速览
标准束搜索(beam search)在神经文本生成中普遍存在"候选同质化"的问题——生成的N条候选结果往往只在标点或个别词形上有细微差异,缺乏真正的多样性,这在对话回复生成、摘要、机器翻译等需要重排序或存在多种合理答案的任务中会明显拖累最终效果。作者提出了"多样性束搜索"(Diverse Beam Search),核心改动极为简洁:在对每个父节点的子候选打分时,按其在同父节点内的排名施加一个惩罚项,从而迫使最终保留的候选来自不同的父节点、覆盖更广泛的搜索空间;此外还引入了基于强化学习的扩展版本,让模型针对不同输入自动选择最合适的多样性强度。在对话回复生成、抽象式摘要和机器翻译三项任务上的实验表明,多样性束搜索在所有任务上均有提升,对需要重排序或答案本身多样的任务提升尤为显著,强化学习版本带来了进一步增益。这项工作的价值在于:改动成本极低(仅需修改一行代码)、完全兼容GPU批量解码,却能系统性地缓解束搜索长期存在的多样性不足问题,为多种神经生成场景提供了一个通用且实用的改进方案。
原文 arXiv:1611.08562;中英对照 + 大白话阅读 https://aha.fim.ai/paper/1611.08562v2