Introduction
Neural text generation models, such as those used in chatbots and abstractive summarization, typically rely on beam search to decode the most probable output sequences. While effective at finding high-probability strings, standard beam search suffers from a significant "diversity problem." Because it operates as a greedy local search, the resulting $N$-best list often consists of "clones"—hypotheses that differ only by minor punctuation or morphological variations (e.g., "I don't know" vs. "I do not know"). This redundancy limits the effectiveness of downstream reranking systems and fails to explore distinct semantic paths.
The Sibling Penalty Method
To address this, we introduce a diversity-promoting beam search that requires minimal code changes. The core innovation is a sibling penalty applied during the expansion phase.
In standard beam search, candidates are ranked solely by their cumulative log-probability. Our approach introduces a penalty term, $-\gamma k'$, where $k'$ represents the rank of a candidate word among its "siblings" (other words sharing the same parent node) and $\gamma$ is a tunable "diversity rate."
By penalizing lower-ranked siblings, the algorithm prioritizes the best continuation of different ancestor paths over the second-best continuation of a single dominant path. This simple modification forces the beam to maintain a diverse set of hypotheses throughout the generation process.
Adaptive Diversity via DiverseRL
Since the optimal amount of diversity varies by task and sequence length, we also propose DiverseRL. This method employs a policy network trained via reinforcement learning (REINFORCE) to dynamically select the diversity rate $\gamma$ for each input. The model is optimized directly against final quality metrics like BLEU or ROUGE, allowing it to balance fluency and variety automatically.
Evaluation and Results
The proposed methods were evaluated across dialogue (OpenSubtitles), abstractive summarization, and machine translation (WMT’14).
Qualitative Impact
The most striking results are visible in dialogue generation. As shown in the table below, vanilla beam search frequently produces nearly identical sentences. In contrast, the diverse beam search explores fundamentally different responses to the same prompt.
Quantitative Gains and Reranking Synergy
The diversity-promoting search significantly improves the utility of the $N$-best list for secondary rerankers. In dialogue tasks, the diversity score (distinct n-grams) increased by up to 445% compared to standard beam search. In summarization, ROUGE-2 scores improved from 9.3 to 11.5 in multi-sentence settings.
Notably, the benefits are most pronounced in "high-entropy" tasks like dialogue, where many valid responses exist. In machine translation, where the target space is more constrained, the improvements were more modest (+0.9 BLEU), suggesting that standard beam search is already relatively well-suited for low-entropy tasks.
Conclusion
The sibling penalty offers a computationally efficient, GPU-friendly solution to the diversity problem in neural generation. By preventing the beam from being "hijacked" by a single high-probability path, it provides a richer set of options for reranking and improves the overall quality and variety of generated text.
Summary updated