LMEnt:一套從預訓練數據到表徵分析語言模型知識的工具集
LMEnt: A Suite for Analyzing Knowledge in Language Models from Pretraining Data to Representations
September 3, 2025
作者: Daniela Gottesman, Alon Gilae-Dotan, Ido Cohen, Yoav Gur-Arieh, Marius Mosbach, Ori Yoran, Mor Geva
cs.AI
摘要
語言模型(LMs)日益驅動著需要世界知識的實際應用。然而,模型如何將數據轉化為對世界的知識和信念的內部過程,目前尚缺乏深入理解。對這些過程的洞察可能為開發具有更一致、更穩健和更完整知識表示的語言模型鋪平道路。為便於研究這些問題,我們提出了LMEnt,這是一套用於分析語言模型在預訓練期間知識獲取的工具。LMEnt引入了:(1)一個基於維基百科、完全註解了實體提及的知識豐富的預訓練語料庫,(2)一種在預訓練數據上基於實體的檢索方法,其性能比之前的方法高出多達80.4%,以及(3)12個參數高達1B並包含4K個中間檢查點的預訓練模型,這些模型在知識基準測試中與流行的開源模型表現相當。這些資源共同提供了一個受控環境,用於分析預訓練中的實體提及與下游性能之間的聯繫,以及預訓練數據中因果干預的效果。我們通過研究跨檢查點的知識獲取展示了LMEnt的實用性,發現事實頻率是關鍵,但並不能完全解釋學習趨勢。我們發布LMEnt以支持對語言模型中知識的研究,包括知識表示、可塑性、編輯、歸因和學習動態。
English
Language models (LMs) increasingly drive real-world applications that require
world knowledge. However, the internal processes through which models turn data
into representations of knowledge and beliefs about the world, are poorly
understood. Insights into these processes could pave the way for developing LMs
with knowledge representations that are more consistent, robust, and complete.
To facilitate studying these questions, we present LMEnt, a suite for analyzing
knowledge acquisition in LMs during pretraining. LMEnt introduces: (1) a
knowledge-rich pretraining corpus, fully annotated with entity mentions, based
on Wikipedia, (2) an entity-based retrieval method over pretraining data that
outperforms previous approaches by as much as 80.4%, and (3) 12 pretrained
models with up to 1B parameters and 4K intermediate checkpoints, with
comparable performance to popular open-sourced models on knowledge benchmarks.
Together, these resources provide a controlled environment for analyzing
connections between entity mentions in pretraining and downstream performance,
and the effects of causal interventions in pretraining data. We show the
utility of LMEnt by studying knowledge acquisition across checkpoints, finding
that fact frequency is key, but does not fully explain learning trends. We
release LMEnt to support studies of knowledge in LMs, including knowledge
representations, plasticity, editing, attribution, and learning dynamics.