NanoKnow:如何洞悉你的语言模型所知
NanoKnow: How to Know What Your Language Model Knows
February 23, 2026
作者: Lingwei Gu, Nour Jedidi, Jimmy Lin
cs.AI
摘要
大型语言模型(LLM)如何知晓其掌握的知识?回答这一问题一直存在困难,因为预训练数据往往如同“黑箱”——未知或不可获取。近期发布的nanochat系列(完全开放预训练数据的小型LLM家族)解决了这一难题,它清晰揭示了模型参数化知识的来源。为探究LLM如何编码知识,我们推出NanoKnow基准数据集,该数据集将Natural Questions和SQuAD中的问题按答案是否存在于nanochat预训练语料库进行划分。通过这种划分,我们得以准确解析LLM生成输出时所依赖的知识来源。为验证NanoKnow的实用性,我们使用八个nanochat检查点进行实验,发现:(1)闭卷准确率受预训练数据中答案出现频率的显著影响;(2)提供外部证据可缓解这种频率依赖性;(3)即使存在外部证据,当答案曾出现于预训练阶段时模型仍表现更佳,表明参数化知识与外部知识具有互补性;(4)无关信息会产生干扰,其位置和数量均会导致准确率下降。所有NanoKnow资源已发布于https://github.com/castorini/NanoKnow。
English
How do large language models (LLMs) know what they know? Answering this question has been difficult because pre-training data is often a "black box" -- unknown or inaccessible. The recent release of nanochat -- a family of small LLMs with fully open pre-training data -- addresses this as it provides a transparent view into where a model's parametric knowledge comes from. Towards the goal of understanding how knowledge is encoded by LLMs, we release NanoKnow, a benchmark dataset that partitions questions from Natural Questions and SQuAD into splits based on whether their answers are present in nanochat's pre-training corpus. Using these splits, we can now properly disentangle the sources of knowledge that LLMs rely on when producing an output. To demonstrate NanoKnow's utility, we conduct experiments using eight nanochat checkpoints. Our findings show: (1) closed-book accuracy is strongly influenced by answer frequency in the pre-training data, (2) providing external evidence can mitigate this frequency dependence, (3) even with external evidence, models are more accurate when answers were seen during pre-training, demonstrating that parametric and external knowledge are complementary, and (4) non-relevant information is harmful, with accuracy decreasing based on both the position and the number of non-relevant contexts. We release all NanoKnow artifacts at https://github.com/castorini/NanoKnow.