Introduction
Large Language Models (LLMs) have demonstrated remarkable capabilities in text generation, yet they often struggle with "meaningful" diversity. When prompted for multiple outputs, models frequently produce token-level paraphrases—responses that use different words to convey identical concepts. This lack of semantic variation is a critical bottleneck in reasoning tasks, where exploring diverse logical paths is necessary to find correct solutions, and in conversational AI, where repetitive outputs lead to unengaging user experiences.
Intent Factored Generation (IFG) is a simple yet powerful two-stage sampling technique designed to address this limitation. By explicitly factorizing the generation process into a high-level "intent" and a subsequent detailed response, IFG enables better exploration of the semantic space without sacrificing coherence.
The Problem: Token-Level vs. Semantic Diversity
Standard sampling methods, such as increasing the temperature, often fail to produce useful diversity. High temperatures can lead to a "breakdown of coherence," where the model generates gibberish or irrelevant text before it explores truly diverse ideas. In reasoning benchmarks like math or coding, if a model repeatedly explores the same incorrect logic with slightly different phrasing, it fails to find the correct answer despite multiple attempts.
Method: Intent Factored Generation
IFG decomposes the generation process into two distinct steps:
- Intent Sampling: The model first generates a "semantically dense intent"—such as a short summary, a list of keywords, or a high-level plan. This step is performed at a high temperature to encourage a wide variety of conceptual starting points.
- Response Generation: The model then generates the final response, conditioned on both the original prompt and the sampled intent. This step uses a lower temperature to ensure the final output is coherent and strictly follows the chosen intent.
This approach allows the intent to act as a "lever" for diversity. A single token change in the intent (e.g., changing a keyword from "tasty" to "pricey") results in a massive semantic shift in the final response, whereas token-level sampling in standard models often results in minor stylistic variations.
Experimental Evaluation
The researchers evaluated IFG across several domains using both few-shot prompting and fine-tuned models. Key benchmarks included MATH for mathematical reasoning, LiveCodeBench for competitive programming, and HH-Golden for instruction tuning. Additionally, the authors introduced a new Reddit News Comments dataset (556k comments) to test conversational diversity in real-world settings.
To measure success, the authors introduced Relaxed Semantic Entropy (RSE), a metric that uses an LLM as a judge to determine if two responses are semantically distinct, providing a more robust measure of diversity for long-form text than traditional n-gram overlaps.
Key Results
IFG consistently outperformed standard "Direct Generation" across all evaluated benchmarks:
- Mathematical Reasoning: On the MATH dataset, IFG achieved higher
pass@kscores, indicating a significantly higher probability of finding the correct answer within k attempts. The method showed strong scaling properties as model size increased. - Coding: On LiveCodeBench, IFG-equipped models solved more problems in 5 attempts than baseline models could solve in 10.
- Instruction Tuning: When combined with Direct Preference Optimization (DPO), IFG pushed the quality-diversity Pareto frontier, allowing models to reach higher levels of diversity without the typical drop in reward or quality.
Conclusion
Intent Factored Generation demonstrates that decoupling the "what to say" (intent) from the "how to say it" (phrasing) is a highly effective strategy for improving LLM performance. By being creative in the intent stage and disciplined in the response stage, models can explore a much wider range of ideas while maintaining high output quality. IFG proves that to help a model think outside the box, we should first ask it to describe the box it intends to explore.
Summary updated