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

大语言模型中事实性知识的测量与修改

Measuring and Modifying Factual Knowledge in Large Language Models

Megagon Labs(美加贡实验室)

Pouya Pezeshkpour

AI总结:

该研究提出基于信息论的大语言模型事实知识测量框架,通过熵、KL散度等指标对比知识注入前后的预测分布,准确率超传统排序法35%,还可用于识别模型未学/错学的事实。

摘要:

大语言模型(LLM)存储了从海量文本中获取的大量事实性知识。要将这些模型有效用于下游任务,拥有可靠的知识测量方法至关重要。然而,现有知识测量方法存在一定局限性,尽管近期已有相关研究,但它们仍无法提供准确的测量结果,也难以为修改LLM内部知识提供必要洞见。\n本研究采用基于信息论的测量方法,提出了一个估算大语言模型中所蕴含事实性知识的框架。具体而言,我们通过分析注入目标知识前后LLM的预测概率分布来测量知识,用到了熵、KL散度等指标。\n在提出指标后,我们首先将其与此前基于排序的方法对比评估准确性,在合成实验中准确率较后者高出超过35%。随后我们探究了两种主流的知识注入方法,发现对于其中一种方法,LLM在特定场景下掌握新知识的能力存在局限。最后,我们将方法应用于上下文学习场景,证明了其可用于提取LLM中未习得和习得错误的事实。本文所有方法与实验的代码和数据均已公开。

英文摘要:

Large Language Models (LLMs) store an extensive amount of factual knowledge obtained from vast collections of text. To effectively utilize these models for downstream tasks, it is crucial to have reliable methods for measuring their knowledge. However, existing approaches for knowledge measurement have certain limitations, and despite recent efforts, they fail to provide accurate measurements and the necessary insights for modifying the knowledge within LLMs. In this work, we employ information theory-based measurements to provide a framework estimating the factual knowledge contained within large language models. More specifically, we measure knowledge by analyzing the LLM's prediction probability distribution before and after instilling the target knowledge, employing metrics such as entropy and KL-divergence. Introducing our metrics, we first assess their accuracy in comparison to previous ranking-based methods, surpassing them by over $35\%$ in a synthetic experiment. Then, we explore two prominent methods of knowledge instillation, discovering that LLMs exhibit limitations in capturing new knowledge under specific circumstances for one of these methods. Lastly, we demonstrate the applicability of our methods in extracting unlearned and mislearned facts in LLMs through their application to in-context learning. We make code and data for all methods and experiments in this paper publicly available.

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

↑