Weighted Sampling for Masked Language Modeling (2302.14225v2)
Abstract: Masked LLMing (MLM) is widely used to pretrain LLMs. The standard random masking strategy in MLM causes the pre-trained LLMs (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.
- Linhan Zhang (5 papers)
- Qian Chen (264 papers)
- Wen Wang (144 papers)
- Chong Deng (22 papers)
- Xin Cao (52 papers)
- Kongzhang Hao (7 papers)
- Yuxin Jiang (26 papers)
- Wei Wang (1793 papers)