[Paper Review] Contrastive Search Is What You Need For Neural Text Generation
The paper shows most autoregressive LMs are isotropic across 16 languages (except small English GPT-2 variants) and demonstrates that contrastive search decoding, without extra training, yields superior text quality and often human-level performance compared with other decoding methods.
Generating text with autoregressive language models (LMs) is of great importance to many natural language processing (NLP) applications. Previous solutions for this task often produce text that contains degenerative expressions or lacks semantic consistency. Recently, Su et al. introduced a new decoding method, contrastive search, based on the isotropic representation space of the language model and obtained new state of the art on various benchmarks. Additionally, Su et al. argued that the representations of autoregressive LMs (e.g. GPT-2) are intrinsically anisotropic which is also shared by previous studies. Therefore, to ensure the language model follows an isotropic distribution, Su et al. proposed a contrastive learning scheme, SimCTG, which calibrates the language model's representations through additional training. In this study, we first answer the question: "Are autoregressive LMs really anisotropic?". To this end, we extensively evaluate the isotropy of LMs across 16 major languages. Surprisingly, we find that the anisotropic problem only exists in the two specific English GPT-2-small/medium models. On the other hand, all other evaluated LMs are naturally isotropic which is in contrast to the conclusion drawn by previous studies. Based on our findings, we further assess the contrastive search decoding method using off-the-shelf LMs on four generation tasks across 16 languages. Our experimental results demonstrate that contrastive search significantly outperforms previous decoding methods without any additional training. More notably, on 12 out of the 16 evaluated languages, contrastive search performs comparably with human-level performances as judged by human evaluations. Our code and other related resources are publicly available at https://github.com/yxuansu/Contrastive_Search_Is_What_You_Need.
Motivation & Objective
- Assess whether autoregressive LMs are truly anisotropic and how isotropy varies across languages and model scales.
- Evaluate contrastive search decoding on open-ended generation, summarization, code generation, and machine translation without additional training.
- Compare contrastive search to traditional decoding methods (greedy, beam, nucleus, top-k) in automatic and human evaluations.
- Analyze the behavior of contrastive search and its relationship to LM isotropy across languages.
Proposed method
- Quantify isotropy using self-similarity of token representations and the isotropy metric across 16 languages.
- Revisit the contrastive search decoding formula that selects the next token by combining model confidence and a degeneration penalty (Equation 3).
- Evaluate decoding methods on open-ended generation for English and multilingual settings, summarization, code generation, and translation using automatic metrics (diversity, MAUVE, coherence) and human judgments.
- Conduct extensive human evaluations across 16 languages to compare contrastive search with baselines.
- Provide analysis of how contrastive search interacts with isotropy and why it works without extra training.
Experimental results
Research questions
- RQ1Are autoregressive language models inherently anisotropic across languages, or is anisotropy limited to specific English GPT-2 variants?
- RQ2Can contrastive search improve text generation quality across multiple tasks and languages without additional model training?
- RQ3How does the isotropy of a language model relate to the effectiveness of the contrastive search decoding method?
- RQ4What are the empirical gains of contrastive search on open-ended generation, summarization, code generation, and translation compared to standard decoding methods?
Key findings
- Most evaluated LMs (38 models, 16 languages) are isotropic; anisotropy is confined to two English GPT-2 small/medium variants.
- Contrastive search without extra training significantly outperforms traditional decoding methods across four generation tasks.
- In many languages (12 of 16), contrastive search achieves performance comparable to human level according to human evaluations.
- Contrastive search yields better coherence with given prefixes than other stochastic methods, while maintaining competitive diversity and MAUVE scores.
- Across tasks, contrastive search often matches or surpasses baseline methods in automatic metrics and is favored in human judgments.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.