Gacha Decoding: Eliciting Diverse Generations Through Instruction Following

Scott Geng, Yufei Zhang, Joseph Lee, Jerry Li, Marjan Ghazvininejad, Pang Wei KoharXiv 2026

TL;DR

Gacha Decoding is a novel inference-time method that flips the script on language model diversity: instead of relying on the "randomness" of next-token predictions, it treats diversity as an instruction-following problem. By using an external random number generator to pick between semantically distinct options enumerated by the model, Gacha Decoding allows stronger, more aligned models to become more diverse, achieving up to 2.4x better diversity and 11x better sample efficiency than current state-of-the-art approaches.

What Problem Does This Paper Address?

Modern Large Language Models (LLMs) suffer from a frustrating paradox: as they become more capable and better aligned through techniques like RLHF, they often become more repetitive and "boring." Their probability distributions sharpen, collapsing onto a few safe, typical responses. This "diversity-capability tradeoff" is a major hurdle for applications that require creative ideation, synthetic data generation, or scientific discovery.

Traditionally, we try to fix this by increasing "temperature" (adding randomness at the word level), but this often leads to incoherent or low-quality gibberish. The authors argue that the problem isn't a lack of randomness, but rather that we are injecting randomness at the wrong level—the token level—rather than the semantic level.

Methods

The authors introduce Gacha Decoding, a method they describe as "planning with dice." Instead of generating a response one word at a time, the process is broken down into three distinct phases:

  1. Plan the Decision Axes: The LM identifies a sequence of high-level semantic "axes" that will shape the response (e.g., for a story: the setting, the protagonist's role, the narrative tone).
  2. Autoregressive Sampling with External RNG: For each axis, the LM is instructed to list a set of plausible, distinct options. An external random number generator (the "dice") then picks one option uniformly. Crucially, this is done step-by-step: the choice for the first axis is fed back into the prompt for the second, allowing diversity to compound combinatorially.
  3. Realize the Response: Finally, the LM writes the full response, conditioned on the entire randomized plan.
The Gacha Decoding process: Planning, making decisions with external randomness, and executing the final response.

This approach shifts the burden of diversity from the model's internal probability distribution to its ability to follow instructions and enumerate possibilities.

Datasets

The researchers evaluated Gacha Decoding across four diverse domains:

  • In-the-wild Chat: Using InfinityChat, measuring diversity via response embedding distance.
  • Creative Writing: A filtered version of WildChat for fiction prompts, evaluated on 8 semantic attributes (premise, genre, character, etc.).
  • Image Generation: Expanding prompts from OneIGBench into detailed captions for image generation.
  • Protein Design: A scientific pilot study designing binders for eight benchmark targets (e.g., PD-1), measuring structural diversity via TM-scores.

Key Insights and Ideas

  • Inverting the Tradeoff: Unlike standard sampling, where diversity drops as models get "smarter," Gacha Decoding's performance improves with model capability. As models become better instruction followers, they become better at enumerating truly distinct options.
  • Diversity without Entropy: Gacha Decoding works even under greedy decoding (zero token-level randomness). This proves that semantic diversity can be entirely decoupled from token-level stochasticity.
  • Combinatorial Compounding: By sampling ideas autoregressively, a small number of choices at each step leads to a massive space of possible outcomes. For example, picking 1 of 10 options across 5 axes creates 100,000 unique paths.
  • Discovering "Novel Modes": The method surfaces responses that other techniques never reach. For instance, when asked for a horror story, Gacha was the only method to generate second-person narratives ("You move into..."), while others stuck to standard third-person tropes.
Qualitative comparison showing how Gacha Decoding discovers novel narrative modes compared to baselines.

Key Results

Gacha Decoding consistently outperformed baselines like Persona Prompting, Verbalized Sampling, and high-temperature sampling:

  • Superior Diversity: It achieved up to 2.4x higher Vendi scores (a measure of effective diversity) than the next-best prior approach at matched quality levels.
  • Massive Sample Efficiency: To reach the same level of diversity as 256 samples from other methods, Gacha Decoding required 11x fewer samples.
  • Scaling: As shown in Figure 4, Gacha is the only method where diversity scores correlate positively and strongly ($r \approx +0.99$) with a model's instruction-following score (IFBench).
Quantitative results across different models and domains, highlighting Gacha's superior scaling and diversity.

Limitations and Future Work

While powerful, Gacha Decoding has a few notable constraints:

  • Inference Latency: The method requires multiple sequential calls to the LLM (one for planning, one for each decision axis, and one for the final realization), which increases time-to-first-token compared to direct sampling.
  • Hyperparameter Sensitivity: The number of decision axes ($T$) and the number of options per axis ($m$) need to be tuned for different domains.
  • Model Requirements: The method relies on the model being a competent instruction follower; it may not provide as much benefit for smaller or less-aligned "base" models.

The authors suggest that future work could involve distilling these diverse generations back into the base model or optimizing the "decision axes" automatically to further boost performance.

Summary updated

BibTeX
@misc{geng2026gacha,
  author = {Scott Geng and Yufei Zhang and Joseph Lee and Jerry Li and Marjan Ghazvininejad and Pang Wei Koh},
  title = {{Gacha Decoding: Eliciting Diverse Generations Through Instruction Following}},
  year = {2026},
  eprint = {2610.01382},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.01382},
}
Figure