TL;DR
This paper tackles the problem of repetitive and uninspired text generation from neural models. They introduce a novel sampling method, Inverse Probability Weighting (IPW), that intelligently re-weights the "head" of the probability distribution to encourage more diverse and surprising word choices without sacrificing fluency.
What Problem Does This Paper Address?
Neural text generation models, while powerful, often fall into a trap of producing repetitive and predictable text. This "text degeneration" issue is particularly noticeable in long generations where models tend to get stuck in loops. Traditional methods like top-k and nucleus sampling address this by truncating the "tail" of the probability distribution (i.e., discarding low-probability words). However, the authors argue that these methods overlook the "head" of the distribution – the high-probability words. They posit that this "head" can contain tedious or repetitive candidates that, paradoxically, lead to repetition loops. Furthermore, human text generation doesn't always favor the absolute highest probability words, suggesting a disconnect between model behavior and human preference.
Methods
The core of the proposed solution is the Interquartile Range Inverse Probability (IQR-IP) sampling algorithm. Here's a breakdown:
- Identifying the "Head": The method uses the Interquartile Range (IQR) to dynamically identify the "head" of the probability distribution. IQR is chosen because it's robust to different distribution shapes (flat vs. peaked).
- Dynamic Vocabulary Filtering: Before applying IQR, they use a multi-stage filtering process (combining top-k, nucleus sampling, and a new "top-1 controlled" filter) to create an initial vocabulary subset ($V_{K0}$). This ensures that only reliable candidates are considered for head identification.
- Inverse Probability Weighting (IPW): Once the "head" candidates are identified, their probabilities are re-scaled using inverse probability weighting. This means that less probable (but still reasonable) candidates within the "head" are given a boost in probability, while highly probable, potentially repetitive candidates are down-weighted. This is inspired by techniques used in causal inference.
- Permutation: The IPW effectively permutes the distribution within the identified "head" subset, aiming to decrease the likelihood of selecting tedious words and increase the chance of picking more surprising, yet rational, ones.
Datasets
The paper uses pre-trained GPT-2 Small and GPT-2 XL models for evaluation. The generation task is performed on a fixed input context ("She walks in beauty" from Lord Byron's poetry) to facilitate analysis of repetition loops.
Key Insights and Ideas
- The "Head" Matters: The paper convincingly argues that focusing solely on truncating the "tail" is insufficient. The high-probability "head" of the distribution can be a significant source of repetition.
- Human Text is Not Always "Most Probable": The observation that humans don't always pick the absolute highest probability word is crucial. This suggests that models should also explore slightly less probable but still sensible options.
- IQR as a Robust Identifier: Using IQR to define the "head" is a clever way to adapt to varying distribution shapes, making the method more generalizable than fixed thresholds.
- IPW for Controlled Diversity: Inverse probability weighting provides a principled way to re-balance probabilities, allowing for controlled diversity enhancement without completely abandoning the original distribution.
Key Results
- Increased Diversity: The proposed IQR-IP sampling algorithm significantly increases the diversity of generated samples, as measured by Self-BLEU scores and Zipf coefficients, bringing them closer to human text.
- Reduced Repetition: The method effectively reduces repetition, as indicated by higher Hrep scores.
- Maintained Fluency: Despite increasing diversity, the algorithm maintains human-level perplexity (PPL), suggesting that fluency is not compromised.
- Human Evaluation: Human evaluations show that the IQR-IP method achieves similar fluency to traditional methods but with higher diversity.
Limitations and Future Work
- Sensitivity to Filtering: The authors note that the algorithm's performance is sensitive to the filtering parameters (p, k, n). Loosening these filters can lead to destructive diversity gains.
- "Leakage" on Peaked Distributions: The paper discusses how "leakage" from the tail on peaked distributions can interfere with accurate head identification, though their proposed "top-1 controlled" filtering aims to mitigate this.
- Future Work: The authors suggest that their approach could be applied to other decoding algorithms (like MIROSTAT) and generation tasks (like summarization), potentially leading to more interesting and diverse outputs. They also mention exploring "milder" permutation strategies beyond strict inverse probability weighting.
Summary updated