用预训练嵌入模型高效探测大模型的知识掌握情况
Efficient Knowledge Probing of Large Language Models by Adapting Pre-trained Embeddings
- 用嵌入模型作为代理,通过线性解码器预测大模型知识
- 在3个数据集上最高达90%准确率,可大规模识别知识盲区
- 句向量比图嵌入更适合预测大模型事实知识,揭示其表征机制
大型语言模型(LLMs)在生成式预训练中学习了科学、历史、地理等领域的知识,但由于其随机性,难以预测具体掌握内容。现有探针方法需对模型进行前向传播,计算成本高。为此,我们提出PEEK(Proxy Embeddings to Estimate Knowledge),利用预训练的嵌入模型(如文本或图嵌入)作为大模型知识的代理。首先通过多种探针策略获取大模型已知的事实集合,再用线性解码器适配嵌入模型以预测大模型输出。在3个维基百科衍生数据集、4个大模型和7个嵌入模型上的综合评估显示,嵌入模型在未见数据上可达到最高90%的预测准确率。进一步发现,句向量模型比图嵌入更适用于预测大模型知识,揭示了事实知识在模型中的表征特性。该方法可规模化识别大模型知识缺口,并深入理解其内在归纳偏置。代码与数据已公开于https://github.com/claws-lab/peek。
原文摘要 · Abstract (English)
Large language models (LLMs) acquire knowledge across diverse domains such as science, history, and geography encountered during generative pre-training. However, due to their stochasticity, it is difficult to predict what LLMs have acquired. Prior work has developed different ways to probe this knowledge by investigating the hidden representations, crafting specific task prompts, curating representative samples, and estimating their uncertainty. However, these methods require making forward passes through the underlying model to probe the LLM's knowledge about a specific fact, making them computationally expensive and time-consuming. To bridge this gap, we propose $\textbf{PEEK}$ or $\textbf{P}$roxy $\textbf{E}$mbeddings to $\textbf{E}$stimate $\textbf{K}$nowledge of LLMs, by leveraging the pre-trained embedding models that effectively encode factual knowledge as text or graphs as proxies for LLMs. First, we identify a training set of facts known by LLMs through various probing strategies and then adapt embedding models to predict the LLM outputs with a linear decoder layer. Comprehensive evaluation on $3$ Wikipedia-derived datasets, $4$ LLMs, and $7$ embedding models shows that embeddings can predict LLM knowledge on a held-out set with up to 90 % accuracy. Furthermore, we find that sentence embedding models are more suitable than graph embeddings to predict LLM knowledge, shedding light on the underlying representation of the factual landscape. Thus, we believe that knowledge-adapted embeddings can be used to identify knowledge gaps in LLMs at scale and can provide deeper insights into LLMs' internal inductive bias. The code and data are made available at https://github.com/claws-lab/peek.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。