arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.01349cs.CLcs.AIcs.LG
收藏

非参数掩码语言建模

Nonparametric Masked Language Modeling

Meta AI;Allen Institute for AI(艾伦人工智能研究所);University of Washington(华盛顿大学)

Sewon Min, Weijia Shi, Mike Lewis, Xilun Chen, Wen-tau Yih, Hannaneh Hajishirzi, Luke Zettlemoyer

AI总结:

本文提出首个非参数掩码语言模型NPM,用参考语料库上的非参数分布替代softmax,通过对比学习和批内近似检索训练,在16个零样本任务上优于更大参数化模型,尤其擅长处理罕见模式和罕见词。

摘要:

现有语言模型(LMs)通过在有限词表上的softmax来预测词元,这使得预测罕见词元或短语变得困难。我们提出NPM,这是第一个非参数掩码语言模型,它用参考语料库中每个短语上的非参数分布替代了softmax。NPM仅通过从文本语料库中检索词元来填充[MASK]。我们证明NPM可以通过对比目标和批内近似全语料库检索来高效训练。在包括分类、事实探测和问答在内的16个任务上的零样本评估表明,NPM显著优于规模更大的参数化模型,无论是否采用检索-生成方法。它在处理罕见模式(词义或事实)以及预测罕见或几乎未见过的词(例如非拉丁文字)方面尤其出色。我们在github.com/facebookresearch/NPM发布了模型和代码。

英文摘要:

Existing language models (LMs) predict tokens with a softmax over a finite vocabulary, which can make it difficult to predict rare tokens or phrases. We introduce NPM, the first nonparametric masked language model that replaces this softmax with a nonparametric distribution over every phrase in a reference corpus. NPM fills in the [MASK] solely from retrieving a token from a text corpus. We show that NPM can be efficiently trained with a contrastive objective and an in-batch approximation to full corpus retrieval. Zero-shot evaluation on 16 tasks including classification, fact probing and question answering demonstrates that NPM outperforms significantly larger parametric models, either with or without a retrieve-and-generate approach. It is particularly better at dealing with rare patterns (word senses or facts) and predicting rare or nearly unseen words (e.g., non-Latin script). We release the model and code at github.com/facebookresearch/NPM.

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

↑