Large pre-trained language models (LMs) are capable of not only recovering linguistic but also factual and commonsense knowledge. To access the knowledge stored in mask-based LMs, we can use cloze-style questions and let the model fill in the blank. The flexibility advantage over structured knowledge bases comes with the drawback of finding the right query for a certain information need. Inspired by human behavior to disambiguate a question, we propose to query LMs by example. To clarify the ambivalent question "Who does Neuer play for?", a successful strategy is to demonstrate the relation using another subject, e.g., "Ronaldo plays for Portugal. Who does Neuer play for?". We apply this approach of querying by example to the LAMA probe and obtain substantial improvements of up to 37.8% for BERT-large on the T-REx data when providing only 10 demonstrations--even outperforming a baseline that queries the model with up to 40 paraphrases of the question. The examples are provided through the model's context and thus require neither fine-tuning nor an additional forward pass. This suggests that LMs contain more factual and commonsense knowledge than previously assumed--if we query the model in the right way.
翻译:经过培训的大型语言模型(LMS)不仅能够恢复语言知识,而且能够恢复事实和常识知识。为了获取以遮罩为主的LMS中储存的知识,我们可以使用凝胶式的问题,让模型填入空白。结构化知识基础的灵活性优势在于无法找到正确的信息需求查询。受人类行为驱使,无法解析某个问题,我们建议以实例来查询LMS。为了澄清模糊不清的“谁为Neuer玩谁?”问题,一个成功的策略是使用另一个主题,例如“Ronaldo为葡萄牙演戏。谁为Neuer演戏?”来演示这一关系,例如“Ronaldo为葡萄牙演唱?谁为Neuer演唱?”。我们采用这种以实例查询LAMaMA探测器的方法,在只提供10个演示-甚至比查询模型40个参数的基线要好。通过模型背景提供,因此不要求微调,也不需要向前推进。这表明LMS-Ms在假设的右方方面有更多的事实和普通知识。