语言模型是少样本学习者

Language Models are Few-Shot Learners

汤姆·布朗 Tom Brown · OpenAI · 2020-05-28 · arXiv:2005.14165 ↗ · 被引 60219

打开互动全文版(逐段中英对照 + 图/公式 + 论文问答)→

摘要 · Abstract

近期研究表明,在大型文本语料库上进行预训练,然后针对特定任务进行微调,可以在许多 NLP 任务和基准测试中取得显著进展。尽管这种方法在架构上通常与任务无关,但仍需要数千或数万个示例的任务特定微调数据集。相比之下,人类通常只需几个示例或简单指令就能执行新的语言任务——而当前的 NLP 系统在很大程度上仍难以做到这一点。本文表明,扩大语言模型规模能极大提升任务无关的少样本性能,有时甚至能与先前最先进的微调方法相竞争。具体来说,我们训练了 GPT-3,这是一个拥有 1750 亿参数的自回归语言模型,比之前的任何非稀疏语言模型大 10 倍,并在少样本设置下测试其性能。对于所有任务,GPT-3 无需任何梯度更新或微调,任务和少样本演示仅通过与模型的文本交互来指定。GPT-3 在许多 NLP 数据集上取得了强劲表现,包括翻译、问答和完形填空任务,以及一些需要即时推理或领域适应的任务,如单词重组、在句子中使用新词或进行三位数算术运算。同时,我们也发现了一些 GPT-3 的少样本学习仍然困难的数据集,以及一些因在大型网络语料库上训练而面临方法论问题的数据集。最后,我们发现 GPT-3 能够生成新闻文章样本,人类评估者难以将其与人类撰写的文章区分开来。我们讨论了这一发现以及 GPT-3 更广泛的社会影响。

Recent work has demonstrated substantial gains on many NLP tasks and benchmarks by pre-training on a large corpus of text followed by fine-tuning on a specific task. While typically task-agnostic in architecture, this method still requires task-specific fine-tuning datasets of thousands or tens of thousands of examples. By contrast, humans can generally perform a new language task from only a few examples or from simple instructions - something which current NLP systems still largely struggle to do. Here we show that scaling up language models greatly improves task-agnostic, few-shot performance, sometimes even reaching competitiveness with prior state-of-the-art fine-tuning approaches. Specifically, we train GPT-3, an autoregressive language model with 175 billion parameters, 10x more than any previous non-sparse language model, and test its performance in the few-shot setting. For all tasks, GPT-3 is applied without any gradient updates or fine-tuning, with tasks and few-shot demonstrations specified purely via text interaction with the model. GPT-3 achieves strong performance on many NLP datasets, including translation, question-answering, and cloze tasks, as well as several tasks that require on-the-fly reasoning or domain adaptation, such as unscrambling words, using a novel word in a sentence, or performing 3-digit arithmetic. At the same time, we also identify some datasets where GPT-3's few-shot learning still struggles, as well as some datasets where GPT-3 faces methodological issues related to training on large web corpora. Finally, we find that GPT-3 can generate samples of news articles which human evaluators have difficulty distinguishing from articles written by humans. We discuss broader societal impacts of this finding and of GPT-3 in general.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 35)

阅读逐段中英对照全文 →