Conditional neural text generation models generate high-quality outputs, but often concentrate around a mode when what we really want is a diverse set of options.
We present a search algorithm to construct lattices encoding a massive number of generation options.
First, we restructure decoding as abest-first search, which explores the space differently than beam search and improves efficiency by avoiding pruning paths.
Second, we revisit the idea ofhypothesis recombination: we can identify pairs of similar generation candidates during search and merge them as an approximation.
On both summarization and machine translation, we show that our algorithm encodes thousands of diverse options that remain grammatical and high-quality into one lattice.
This algorithm provides a foundation for building downstream generation applications on top of massive-scale diverse outputs.111Code, implementation guideline, and visualization are available athttps://github.com/jiacheng-xu/lattice-generation.