arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.14140cs.CL
收藏

对比搜索是神经文本生成所需要的

Contrastive Search Is What You Need For Neural Text Generation

University of Cambridge(剑桥大学)

Yixuan Su, Nigel Collier

摘要:

用自回归语言模型(LM)生成文本对于许多自然语言处理(NLP)应用是非常重要的。此任务的先前解决方案通常产生包含退化表达式或缺乏语义一致性的文本。最近,Su等人基于语言模型的各向同性表示空间引入了一种新的解码方法,对比搜索,并在各种基准上获得了新的技术水平。此外,Su等人认为自回归线性模型(例如GPT-2)的表示本质上是各向异性的,这也是以前的研究所共有的。因此,为了确保语言模型遵循各向同性分布,Su等人提出了一种对比学习方案SimCTG,该方案通过额外的训练来校准语言模型的表示。在这项研究中,我们首先回答这个问题:“自回归LM真的是各向异性的吗?".为此,我们广泛评估了16种主要语言的LM的各向同性。令人惊讶的是,我们发现,各向异性问题只存在于两个特定的英语GPT-2-小型/中型模型。另一方面,所有其他评估的LM是自然各向同性的,这与以前的研究得出的结论相反。基于我们的研究结果,我们进一步评估了对比搜索解码方法,使用现成的LM在16种语言的四代任务。我们的实验结果表明,对比搜索显着优于以前的解码方法,无需任何额外的训练。更值得注意的是,在16种评估语言中的12种语言上,对比搜索的性能与人类评估所判断的人类水平的性能相当。我们的代码和其他相关资源可在https://github.com/yxuansu/Contrastive_Search_Is_What_You_Need上公开获取。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑