XTC: Head-Aware Sampling by Excluding Top Choices

TL;DR

XTC improves generation diversity by excluding top choices, achieving 15% Distinct-2 increase, 47% trigram repetition reduction.

cs.CL 🔴 Advanced 2026-08-24 6 views
Philipp Emanuel Weidmann Allen Roush Judah Goldfeder Sanjay Basu Ravid Shwartz-Ziv
NLP language models diversity decoding strategies machine learning

Key Findings

Methodology

XTC is a lightweight decoding operator focusing on head ambiguity. It identifies tokens exceeding an absolute plausibility threshold τ. When at least two tokens qualify, it removes dominant choices with probability ρ and retains the weakest plausible alternative before renormalization.

Key Results

  • On the Gemma 3 27B Q4 model, XTC increased Distinct-2 by 15% and reduced trigram repetition by 47%, significantly enhancing text diversity.
  • When combined with temperature scaling, Distinct-2 improvement reached 38%, and trigram repetition reduction hit 71%.
  • In a blind test with 150 Amazon Mechanical Turk workers, 62.3% preferred XTC-generated text, p < 10^-4.

Significance

XTC addresses head ambiguity, significantly enhancing text diversity without sacrificing fluency. This has important implications for academia and industry, especially in applications requiring high diversity and creativity.

Technical Contribution

XTC introduces a new head-aware mechanism in existing decoding strategies, distinct from traditional tail truncation and global entropy methods. It offers new theoretical guarantees and engineering possibilities, particularly on the diversity-repetition Pareto frontier.

Novelty

XTC is the first to target head ambiguity in decoding, differing from prior work focused on tail truncation. It enhances diversity by excluding high-probability options, a unique approach in the literature.

Limitations

  • In some cases, XTC may lead to content deviating from expected themes, especially when head options are few.
  • XTC's effectiveness depends on parameter τ and ρ selection, requiring tuning for different tasks.

Future Work

Future research could explore the combination effects of XTC with other decoding strategies and its applicability across different model architectures and tasks.

AI Executive Summary

Current autoregressive language model decoding strategies often enhance text diversity by adjusting the probability distribution of the next token. However, these strategies tend to overlook scenarios where the model overly concentrates on the most common choice in open-ended generation tasks. To address this, Weidmann et al. introduced a new decoding operator called XTC (Exclude Top Choices). XTC identifies tokens exceeding an absolute plausibility threshold τ and, when at least two tokens qualify, removes dominant choices with probability ρ, retaining the weakest plausible alternative before renormalization.

In 60 experiments, XTC significantly improved text diversity on models like Gemma 3 27B Q4, with a 15% increase in Distinct-2 and a 47% reduction in trigram repetition. When combined with temperature scaling, the Distinct-2 increase reached 38%, and trigram repetition reduction hit 71%. In a blind test with Amazon Mechanical Turk workers, 62.3% preferred XTC-generated text, p < 10^-4, demonstrating its advantage in creative generation tasks.

XTC introduces a new head-aware mechanism in decoding strategies, distinct from traditional tail truncation and global entropy methods. It offers new theoretical guarantees and engineering possibilities on the diversity-repetition Pareto frontier. However, XTC's effectiveness depends on parameter τ and ρ selection, and future research could explore its combination with other decoding strategies and applicability across different model architectures and tasks.

Deep Analysis

Background

Decoding strategies for autoregressive language models have evolved significantly over recent years. Traditional methods like temperature scaling, Top-k, and Top-p sampling primarily enhance diversity by adjusting the tail of the probability distribution. However, these methods may lead to over-concentration on the most common choice in open-ended generation tasks, limiting text diversity.

Core Problem

In open-ended generation tasks, models may overly concentrate on the most common choice, leading to a lack of diversity. This head ambiguity problem is challenging for existing decoding strategies, which mainly focus on tail truncation.

Innovation

XTC introduces a head-aware mechanism, targeting head ambiguity in decoding. It identifies tokens exceeding an absolute plausibility threshold τ and removes dominant choices with probability ρ, retaining the weakest plausible alternative.

Methodology

  • �� Set an absolute plausibility threshold τ to identify eligible tokens.
  • �� When at least two tokens qualify, remove dominant choices with probability ρ.
  • �� Retain the weakest plausible alternative and renormalize.

Experiments

Conducted 60 experiments on models like Gemma 3 27B Q4, Gemma 3 12B Q6, and DeepSeek R1 14B Q6 to verify XTC's effectiveness in enhancing text diversity. Experiments included different parameter settings and model architectures.

Results

XTC increased Distinct-2 by 15% and reduced trigram repetition by 47% on the Gemma 3 27B Q4 model. When combined with temperature scaling, Distinct-2 improvement reached 38%, and trigram repetition reduction hit 71%.

Applications

XTC is applicable in scenarios requiring high diversity and creativity, such as automated writing, dialogue generation, and content creation. Its head-aware mechanism enhances text diversity without sacrificing fluency.

Limitations & Outlook

XTC's effectiveness depends on parameter τ and ρ selection, requiring tuning for different tasks. In some cases, XTC may lead to content deviating from expected themes, especially when head options are few.

Plain Language Accessible to non-experts

Imagine you're at a restaurant with many menu options, but you always choose the most common dish. XTC is like a clever waiter who suggests trying less common but equally delicious dishes. This way, your dining experience becomes more diverse, rather than eating the same thing every time. The method identifies those overlooked options and encourages you to try them, enhancing overall diversity.

ELI14 Explained like you're 14

Imagine playing a game with many choices, but you always pick the easiest one. XTC is like a game assistant that helps you discover less common but fun choices, making your game experience richer. This way, you won't always play the same level, but explore more interesting content! It's like at school, where teachers encourage you to try different activities instead of doing the same thing all the time.

Glossary

XTC (Exclude Top Choices)

A decoding strategy that improves generation diversity by excluding high-probability options.

Used to address head ambiguity and enhance text diversity.

Distinct-2

Measures the proportion of unique bigrams in generated text, used to evaluate diversity.

Used to assess XTC's effectiveness in enhancing diversity.

Trigram Repetition Rate

Measures the proportion of repeated trigrams in generated text, used to evaluate text repetition.

Used to assess XTC's effectiveness in reducing text repetition.

Head Ambiguity

Refers to the problem of models overly concentrating on the most common choice during text generation.

XTC addresses this by excluding high-probability options.

Temperature Scaling

A strategy that adjusts the sharpness of all logits to control diversity.

Used in combination with XTC to enhance generation diversity.

Open Questions Unanswered questions from this research

  • 1 How to optimize XTC's parameter settings for different tasks to maximize its effectiveness?
  • 2 How does XTC perform in multilingual models? Does it require additional adjustments?

Applications

Immediate Applications

Automated Writing

XTC can be used to enhance the diversity of automated writing systems, generating more creative content. Applicable in fields like journalism and blogging.

Long-term Vision

Dialogue Generation

Applying XTC in dialogue systems can generate more diverse and natural conversations, improving user experience.

Abstract

Standard decoding rules for autoregressive language models promote diversity by rescaling the full next-token distribution or truncating its low-probability tail. These strategies overlook a common regime of open-ended generation in which several continuations are plausible but too much probability mass remains concentrated on the most generic choice. We introduce XTC (Exclude Top Choices), a lightweight head-aware decoding operator that targets this regime directly. XTC identifies tokens whose probabilities exceed an absolute plausibility threshold $τ$: when at least two qualify, it removes the dominant eligible choices with probability $ρ$ and retains only the weakest plausible alternative before renormalization. Across 60 experiments on Gemma 3 27B Q4, Gemma 3 12B Q6, and DeepSeek R1 14B Q6, with scaling validation on Llama 3.3 70B Q4, XTC improves the diversity-repetition Pareto frontier. On creative generation, Distinct-2 increases by 11--15% and repeat trigrams decrease by 27--47% across the four models. Combined with temperature scaling, gains reach 38% in Distinct-2 and 71% in repeat-trigram reduction over baseline. A blinded Amazon Mechanical Turk study with 150 Master raters yields a 62.3% creativity preference for XTC ($p<10^{-4}$) without reduced fluency, while a GPT-4o control judge reproduces the Anthropic-judge direction on every measure. On IFEval with Llama 3.3 70B Q4, XTC preserves prompt-level strict accuracy within 1.7 percentage points of baseline while recovering most of the diversity gain; a temperature setting matched on Distinct-2 reduces IFEval by 8.8 points. The effect is additive with temperature and repetition penalties, robust across quantization levels and model families, and consistent across twelve prompt genres. XTC has been adopted by llama.cpp, ExLlamaV2, and text-generation-webui.

cs.CL cs.AI cs.LG