Intent Factored Generation: Unleashing the Diversity in Your Language Model

Eltayeb Ahmed, Uljad Berdica, Martha Elliott, Danijela Horak, Jakob N. Foerster

TL;DR

Intent Factored Generation (IFG) is a simple yet powerful two-stage sampling method that decouples an LLM's conceptual intent from its final phrasing. By sampling a high-level intent (like keywords or a summary) at a high temperature and the final response at a lower temperature, IFG significantly boosts semantic diversity without sacrificing text coherence. This approach yields major performance gains in mathematical reasoning, code generation, and instruction tuning.

What Problem Does This Paper Address?

When you ask an LLM for multiple answers to the same prompt, you often get superficial variations—different words saying the exact same thing. This lack of semantic diversity is a major bottleneck. In conversational agents, it leads to repetitive and unengaging interactions. In automated reasoning (like solving math or coding problems), it causes poor exploration of the solution space; the model keeps repeating the same flawed logic instead of trying fundamentally different approaches.

The standard fix—raising the sampling temperature—fails because it operates purely at the token level. High temperatures quickly degrade text coherence, turning structured arguments into gibberish. Alternative decoding strategies like Diverse Beam Search (DBS) are slow, deterministic, and often fail to produce true conceptual diversity.

Methods

The authors propose Intent Factored Generation (IFG), which breaks down the standard sequential generation process into a two-stage factorization:

  1. Intent Sampling: The model first generates a compact, semantically dense "intent" $i$ (such as a list of keywords or a brief summary) conditioned on the prompt $p$. This step uses a high temperature ($t_i$) to maximize conceptual diversity.
  2. Response Generation: The model then generates the final response $r$, conditioned on both the original prompt $p$ and the sampled intent $i$. This step uses a lower temperature ($t_r$) to ensure the output remains coherent and self-consistent.
Figure 1: In Intent Factored Generation (IFG), we first sample a semantically dense intent such as keywords or a summary. We then sample the final response anchored to this intent. This is in contrast to standard direct generation. We see that by raising the temperature during the intent phase, we obtain responses that are more semantically diverse. The generations lose coherence when we use similarly high temperatures for direct generation.

The authors implement this via two paradigms:

  • Few-shot Prompted IFG: Priming off-the-shelf LLMs at inference time to output intents (e.g., before each step in a Chain-of-Thought).
  • Finetuned IFG: Automatically annotating datasets with LLM-generated intents and fine-tuning the model using standard supervised fine-tuning (SFT) or Direct Preference Optimization (DPO).

To measure their success, they introduce Relaxed Semantic Entropy (RSE), a robust evaluation metric that uses an LLM judge to cluster long, complex model responses based on bidirectional semantic similarity rather than strict token-level paraphrasing.

Datasets

The method was evaluated across several distinct benchmarks:

  • MATH: A dataset of challenging competition-level mathematics problems used to test exploration and data efficiency.
  • LiveCodeBench: An algorithmic competitive programming platform used to evaluate code generation capabilities.
  • Helpful and Harmless (HH) Golden: Used for instruction-tuning experiments combined with DPO.
  • Reddit News Comments (New): The authors curated and open-sourced a new dataset consisting of over 556k reader comments across 14k news articles from the r/news subreddit to evaluate open-ended, diverse text generation.

Key Insights and Ideas

  • Decoupling Semantics from Syntax: The core "aha moment" is that creativity and structure should be handled at different temperatures. A single token change in a high-level intent (e.g., changing the keyword from "tasty" to "pricey") completely shifts the trajectory of the final response while allowing the low-temperature generation phase to keep the grammar flawless.
  • Granular Planning Boosts Reasoning: For complex tasks like math, forcing the model to explicitly state its intent before each step of a Chain-of-Thought (termed IFG-prompting) naturally encourages the model to break problems down into smaller, more manageable, and less brittle steps.
  • Synergy with Reinforcement Learning: When paired with Self-Taught Reasoning (STaR), the enhanced exploration from IFG generates a wider variety of correct solution paths, significantly boosting data efficiency during training.

Key Results

  • Code Generation: On LiveCodeBench, using Qwen-2.5-Coder-32B, IFG achieved a pass@5 of 27.6%, outperforming the baseline's pass@10 of 26.4%. Essentially, IFG found more correct solutions in 5 attempts than standard sampling did in 10.
  • Mathematical Reasoning: Integrating IFG with the STaR framework consistently outperformed standard STaR across 3B, 7B, and 14B model scales, showing particularly strong data efficiency gains in early training iterations.
  • Instruction Tuning & Open-Ended Text: When combined with DPO on the HH-Golden dataset and evaluated on the Reddit News Comments dataset, IFG consistently pushed up the quality-diversity Pareto frontier. It achieved significantly higher Relaxed Semantic Entropy without increasing undesirable traits like toxicity or profanity.

Limitations and Future Work

The primary limitation of IFG in reasoning domains is its dependency on a reliable verifier (like an execution environment for code or an automated answer checker for math). If the verifier is noisy or easily gamed, the increased diversity can lead to reward hacking. For instance, the authors note that IFG failed to provide performance gains on the multiple-choice MMLU dataset because random guessing yields a 25% success rate, creating a highly noisy reward signal.

Future research directions include integrating IFG into language-based tree search algorithms, alternative RLHF/RLVF variants, and evolutionary algorithms that naturally thrive on diverse candidate generation.

Summary updated

BibTeX
@inproceedings{ahmed2026intent,
  author = {Eltayeb Ahmed and Uljad Berdica and Martha Elliott and Danijela Horak and Jakob N. Foerster},
  title = {{Intent Factored Generation: Unleashing the Diversity in Your Language Model}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=haufpYkZZz},
}
Figure