arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.14225cs.CLcs.AI
收藏

用于掩码语言建模的加权采样

Weighted Sampling for Masked Language Modeling

University of New South Wales(新南威尔士大学);DAMO Academy, Alibaba Group(阿里巴巴集团达摩院);Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州))

Linhan Zhang, Qian Chen, Wen Wang, Chong Deng, Xin Cao, Kongzhang Hao, Yuxin Jiang, Wei Wang

AI总结:

针对MLM中随机掩码导致的高频token偏差问题,提出基于频率和损失的加权采样策略,构建WSBERT模型,显著提升了句子嵌入及下游任务的迁移学习能力。

摘要:

掩码语言建模(MLM)被广泛用于预训练语言模型。MLM中的标准随机掩码策略导致预训练语言模型(PLMs)偏向于高频token。罕见token的表示学习效果较差,且PLMs在下游任务上的性能受限。为了缓解这一频率偏差问题,我们提出了两种简单有效的加权采样策略,基于token频率和训练损失来掩码token。我们将这两种策略应用于BERT,得到了加权采样BERT(WSBERT)。在Semantic Textual Similarity基准(STS)上的实验表明,WSBERT相比BERT显著提升了句子嵌入。将WSBERT与校准方法和提示学习相结合,进一步改善了句子嵌入。我们还在GLUE基准上研究了WSBERT的微调,并表明加权采样也提升了主干PLM的迁移学习能力。我们进一步分析并提供了WSBERT如何改善token嵌入的见解。

英文摘要:

Masked Language Modeling (MLM) is widely used to pretrain language models. The standard random masking strategy in MLM causes the pre-trained language models (PLMs) to be biased toward high-frequency tokens. Representation learning of rare tokens is poor and PLMs have limited performance on downstream tasks. To alleviate this frequency bias issue, we propose two simple and effective Weighted Sampling strategies for masking tokens based on the token frequency and training loss. We apply these two strategies to BERT and obtain Weighted-Sampled BERT (WSBERT). Experiments on the Semantic Textual Similarity benchmark (STS) show that WSBERT significantly improves sentence embeddings over BERT. Combining WSBERT with calibration methods and prompt learning further improves sentence embeddings. We also investigate fine-tuning WSBERT on the GLUE benchmark and show that Weighted Sampling also improves the transfer learning capability of the backbone PLM. We further analyze and provide insights into how WSBERT improves token embeddings.

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

↑