TL;DR
Large Language Models (LLMs) are notorious for "hallucinating" non-factual information, especially in long-form writing. This paper introduces Integrative Decoding (ID), a novel strategy that improves factuality by sampling multiple initial responses and then generating a final answer that aggregates the "votes" of those samples at every single decoding step. It effectively brings the power of self-consistency—previously reserved for multiple-choice or math problems—to open-ended, creative generation.
What Problem Does This Paper Address?
The AI community has found that "repeated sampling" (asking a model the same question multiple times) is a powerful way to find the truth. If ten different samples all agree on a fact, it’s likely correct. This is known as Self-Consistency (SC).
However, applying SC to open-ended text (like a biography or a technical explanation) is hard. Unlike a math problem where the answer is a single number, two biographies can be "consistent" in meaning even if they use completely different words. Existing solutions often involve complex "self-reflection" loops or asking the model to manually cluster and pick the best sentences. These methods are slow, expensive, and fail to scale well as you increase the number of samples. The authors aim to bridge this gap with a method that is both efficient and universally applicable to any text generation task.
Methods
Integrative Decoding operates in two primary steps to bake consistency directly into the text generation process:
- Candidate Sampling: The model generates $k$ independent responses to a prompt using standard sampling techniques (e.g., temperature sampling).
- Integrative Decoding (Implicit Integration & Aggregation): Instead of picking one of these completed samples, ID starts a new decoding process. It constructs $k$ parallel input sequences. Each sequence consists of the original prompt, one of the $k$ sampled responses, and then the prompt again (instructing the model to answer once more).
The model processes these $k$ inputs concurrently in a single batch. At each decoding step, the model looks at the predicted "logits" (probability scores for the next token) from all $k$ paths and sums them up. The token with the highest aggregate score is chosen and fed back into all $k$ paths for the next step.
What’s new? Unlike standard self-consistency which picks a final completed response, ID incorporates consistency into the objective function of the decoding process itself. Each parallel path acts as a "representative" for its sampled response, voting for tokens that are semantically consistent with the "facts" it contains.
Datasets
The authors evaluated ID across three benchmarks representing different levels of complexity:
- TruthfulQA: Tests the model's ability to avoid common human misconceptions (brief, sentence-level responses).
- Biographies: Requires generating bullet-point biographies for computer scientists (paragraph-level).
- LongFact: A challenging benchmark requiring document-level responses that can exceed a thousand tokens.
They tested these on a diverse fleet of models, including LLaMA2, LLaMA3, Mistral2, Qwen2, Gemma2, and GLM4.
Key Insights and Ideas
- Inference-Time Scaling Laws: One of the most exciting findings is that ID follows a "scaling law." As you increase the number of initial samples ($k$), the factuality of the final output continues to improve in a near log-linear fashion. This suggests we can "buy" better accuracy by spending more compute at inference time.
- Semantic vs. Surface Consistency: ID doesn't just copy-paste from the samples. Because it aggregates logits, it finds the "semantic consensus." Even if the samples use different phrasing, ID identifies the underlying facts they agree on.
- Efficiency through Batching: Because the parallel paths are processed in a single batch, ID is significantly faster and has lower latency than "Self-Reflection" methods that require multiple sequential LLM calls to verify facts.
- Robustness to Scale: The benefits of ID actually become more pronounced as the base model gets larger and stronger.
Key Results
ID consistently outperformed greedy decoding and other state-of-the-art ensemble methods across all models and tasks.
- TruthfulQA: Achieved a +11.2% absolute improvement in truthfulness.
- Biographies: Saw a massive +15.4% boost in factual accuracy.
- LongFact: Improved document-level factuality by +8.5%.
- Coherence: Human and GPT-4 evaluations confirmed that ID maintains the same level of linguistic fluency and coherence as standard greedy decoding—it doesn't trade off "readability" for "factuality."
Limitations and Future Work
While ID is more efficient than many alternatives, it still carries a higher computational cost than a single-pass greedy decode because it requires generating $k$ initial samples and then running a batch-size $k$ decoding pass.
The authors suggest a promising future direction: Speculative Integrative Decoding. Since many tokens in a sentence are "easy" (like grammar or connectors) and don't affect factuality, ID could be used selectively only for "difficult" or "knowledge-heavy" tokens. This would significantly reduce the total compute required while maintaining the accuracy gains. They also plan to explore more sophisticated ways to approximate the self-consistency objective, such as using beam search instead of greedy selection.
Summary updated