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

理解从语言模型中提取事实知识的微调

Understanding Finetuning for Factual Knowledge Extraction from Language Models

Google Research(谷歌研究院)

Mehran Kazemi, Sid Mittal, Deepak Ramachandran

摘要:

已经观察到在来自网络的大型文本语料库上预训练的语言模型(LM)包含大量关于世界的各种类型的知识。这一观察导致了知识图谱构建中一个新的令人兴奋的范例,其中,而不是手动策展或文本挖掘,从LM的参数中提取知识。最近,它已被证明,微调LM的一组事实知识,使他们产生更好的答案,从一个不同的集合查询,从而使微调LM知识提取,因此,知识图谱建设的一个很好的候选人。在本文中,我们分析了微调LM的事实知识提取。我们发现,除了先前已知的积极影响外,微调还导致了一种(潜在有害的)现象,我们称之为频率冲击,即在测试时,模型过度预测出现在训练集中的罕见实体,并低估未出现在训练集中的常见实体。我们发现,频率冲击会导致模型预测的退化,超过一定程度,频率冲击的危害甚至会超过微调的积极影响,使微调总体上有害。然后,我们考虑两种解决方案来弥补所识别的负面影响:1-模型混合和2-混合微调LM的预训练任务。这两个解决方案相结合,导致显着的改进相比,香草微调。

英文摘要:

Language models (LMs) pretrained on large corpora of text from the web have been observed to contain large amounts of various types of knowledge about the world. This observation has led to a new and exciting paradigm in knowledge graph construction where, instead of manual curation or text mining, one extracts knowledge from the parameters of an LM. Recently, it has been shown that finetuning LMs on a set of factual knowledge makes them produce better answers to queries from a different set, thus making finetuned LMs a good candidate for knowledge extraction and, consequently, knowledge graph construction. In this paper, we analyze finetuned LMs for factual knowledge extraction. We show that along with its previously known positive effects, finetuning also leads to a (potentially harmful) phenomenon which we call Frequency Shock, where at the test time the model over-predicts rare entities that appear in the training set and under-predicts common entities that do not appear in the training set enough times. We show that Frequency Shock leads to a degradation in the predictions of the model and beyond a point, the harm from Frequency Shock can even outweigh the positive effects of finetuning, making finetuning harmful overall. We then consider two solutions to remedy the identified negative effect: 1- model mixing and 2- mixture finetuning with the LM's pre-training task. The two solutions combined lead to significant improvements compared to vanilla finetuning.

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

↑