[论文解读] Contrastive Search Is What You Need For Neural Text Generation
论文表明大多数自回归语言模型在16种语言中具有各向同性(除了小型英文GPT-2变体),并证明对比搜索解码在不额外训练的情况下比其他解码方法在文本质量上更优,且常达到人类水平的性能。
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.
研究动机与目标
- 评估自回归语言模型是否真正存在各向异性,以及各语言和模型规模下的各向同性如何变化。
- 评估对比搜索解码在开放式生成、摘要、代码生成和机器翻译上的表现,且无需额外训练。
- 将对比搜索与传统解码方法(贪婪、束束、核采样、Top-k)在自动和人类评估中进行比较。
- 分析对比搜索的行为及其与各语言下LM各向同性的关系。
提出的方法
- 使用标记表示的自相似性和各向同性指标对16种语言进行量化。
- 重新考量对比搜索解码公式,即通过结合模型置信度和退化惩罚来选择下一个标记(方程3)。
- 使用自动指标(多样性、MAUVE、连贯性)和人类评判,在英语和多语言设定下对开放式生成、摘要、代码生成和翻译进行评估。
- 在16种语言上进行大规模的人类评估,以比较对比搜索与基线方法。
- 提供对对比搜索如何与各向同性交互以及为何无需额外训练而有效的分析。
实验结果
研究问题
- RQ1自回归语言模型在语言之间是否本质上存在各向异性,还是仅限于某些英文GPT-2变体?
- RQ2对比搜索是否能在多任务和多语言上提升文本生成质量,而无需额外的模型训练?
- RQ3语言模型的各向同性与对比搜索解码方法的有效性之间有何关系?
- RQ4与标准解码方法相比,对比搜索在开放式生成、摘要、代码生成和翻译上的实证提升是多少?
主要发现
- 大多数评估的语言模型(38个模型,16种语言)是各向同性;各向异性仅限于两个英文GPT-2小型/中型变体。
- 无需额外训练的对比搜索在四个生成任务上显著优于传统解码方法。
- 在许多语言中(16种中的12种),根据人类评估,对比搜索的表现达到接近人类水平。
- 对比搜索在给定前缀下比其他随机方法具有更好的连贯性,同时保持竞争力的多样性和MAUVE分数。
- 在各任务中,对比搜索在自动指标上通常达到或超过基线方法,并在人工评估中更受青睐。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。