动态记录有助于BERT预培训
Taking Notes on the Fly Helps BERT Pre-training
摘要:
如何使无监督语言预训练更高效、资源消耗更少是自然语言处理领域的一个重要研究方向。在本文中,我们专注于通过提供更好的数据利用率来提高语言预训练方法的效率。众所周知,在语言数据库中,词服从重尾分布。很大一部分单词只出现很少的次数,并且罕见单词的嵌入通常优化得很差。我们认为,这种嵌入带有不充分的语义信号,这可能会使数据利用效率低下,并减慢整个模型的预训练。为了缓解这个问题,我们提出了即时记笔记(TNF),它在预训练期间即时记录罕见单词,以帮助模型在下次出现时理解它们。具体地说,TNF维护一个注释字典,并在句子中出现稀有词时将该稀有词的上下文信息保存为注释。当训练过程中再次出现相同的生僻词时,可以使用预先保存的注释信息来增强当前句子的语义。通过这样做,TNF提供了更好的数据利用率,因为跨句子的信息被用来覆盖句子中的稀有词造成的语义不足。我们在BERT和ELECTRA上实现了TNF,以检查其效率和有效性。实验结果表明,在达到相同性能的情况下,TNF的训练时间比其骨干预训练模型少$60\%$。当使用相同的迭代次数进行训练时,TNF在大多数下游任务和平均GLUE得分上优于其骨干方法。源代码附在补充材料中。
英文摘要:
How to make unsupervised language pre-training more efficient and less resource-intensive is an important research direction in NLP. In this paper, we focus on improving the efficiency of language pre-training methods through providing better data utilization. It is well-known that in language data corpus, words follow a heavy-tail distribution. A large proportion of words appear only very few times and the embeddings of rare words are usually poorly optimized. We argue that such embeddings carry inadequate semantic signals, which could make the data utilization inefficient and slow down the pre-training of the entire model. To mitigate this problem, we propose Taking Notes on the Fly (TNF), which takes notes for rare words on the fly during pre-training to help the model understand them when they occur next time. Specifically, TNF maintains a note dictionary and saves a rare word's contextual information in it as notes when the rare word occurs in a sentence. When the same rare word occurs again during training, the note information saved beforehand can be employed to enhance the semantics of the current sentence. By doing so, TNF provides better data utilization since cross-sentence information is employed to cover the inadequate semantics caused by rare words in the sentences. We implement TNF on both BERT and ELECTRA to check its efficiency and effectiveness. Experimental results show that TNF's training time is $60\%$ less than its backbone pre-training models when reaching the same performance. When trained with the same number of iterations, TNF outperforms its backbone methods on most of downstream tasks and the average GLUE score. Source code is attached in the supplementary material.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。