ChatPaper.aiChatPaper

大規模言語モデルにおける機能トークンを介した記憶検索と統合

Memory Retrieval and Consolidation in Large Language Models through Function Tokens

October 9, 2025
著者: Shaohua Zhang, Yuan Lin, Hang Li
cs.AI

要旨

大規模言語モデル(LLM)の顕著な成功は、事前学習中に膨大な知識を記憶に統合し、推論時にその記憶から情報を検索する能力に由来しており、これにより知識の記憶、指示の実行、推論といった高度な能力が可能となる。しかし、LLMにおける記憶の検索と統合のメカニズムは未だ十分に理解されていない。本論文では、LLMの動作を説明するための機能トークン仮説を提案する:推論時、機能トークンは文脈から最も予測力の高い特徴を活性化し、次のトークンの予測(記憶の検索)を制御する。事前学習時、機能トークンに続く次のトークン(通常は内容トークン)を予測することで、LLMの学習された特徴の数が増加し、モデルパラメータが更新される(記憶の統合)。ここでの機能トークンは、言語学における機能語(句読点、冠詞、前置詞、接続詞など)にほぼ対応し、内容トークンとは対照的である。本仮説を支持する広範な実験的証拠を提供する。二部グラフ解析を用いて、少数の機能トークンが大多数の特徴を活性化することを示す。ケーススタディでは、機能トークンが文脈から最も予測力の高い特徴を活性化し、次のトークンの予測を導く仕組みをさらに明らかにする。また、事前学習時、機能トークンに続く内容トークンを予測することが訓練損失の大部分を占め、機能トークンが文脈から最も予測力の高い特徴を選択することを強制することを見出した。
English
The remarkable success of large language models (LLMs) stems from their ability to consolidate vast amounts of knowledge into the memory during pre-training and to retrieve it from the memory during inference, enabling advanced capabilities such as knowledge memorization, instruction-following and reasoning. However, the mechanisms of memory retrieval and consolidation in LLMs remain poorly understood. In this paper, we propose the function token hypothesis to explain the workings of LLMs: During inference, function tokens activate the most predictive features from context and govern next token prediction (memory retrieval). During pre-training, predicting the next tokens (usually content tokens) that follow function tokens increases the number of learned features of LLMs and updates the model parameters (memory consolidation). Function tokens here roughly correspond to function words in linguistics, including punctuation marks, articles, prepositions, and conjunctions, in contrast to content tokens. We provide extensive experimental evidence supporting this hypothesis. Using bipartite graph analysis, we show that a small number of function tokens activate the majority of features. Case studies further reveal how function tokens activate the most predictive features from context to direct next token prediction. We also find that during pre-training, the training loss is dominated by predicting the next content tokens following function tokens, which forces the function tokens to select the most predictive features from context.
PDF52October 10, 2025