ChatPaper.aiChatPaper

Geheugenopvraging en consolidatie in grote taalmodellen via functietokens

Memory Retrieval and Consolidation in Large Language Models through Function Tokens

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

Samenvatting

Het opmerkelijke succes van grote taalmodellen (LLM's) komt voort uit hun vermogen om enorme hoeveelheden kennis te consolideren in het geheugen tijdens de pre-training en deze tijdens de inferentie uit het geheugen op te halen, wat geavanceerde mogelijkheden mogelijk maakt zoals kennisopslag, instructievolging en redenering. De mechanismen van geheugenophaling en consolidatie in LLM's blijven echter slecht begrepen. In dit artikel stellen we de functietokenhypothese voor om de werking van LLM's te verklaren: Tijdens inferentie activeren functietokens de meest voorspellende kenmerken uit de context en sturen ze de voorspelling van het volgende token (geheugenophaling). Tijdens pre-training vergroot het voorspellen van de volgende tokens (meestal inhoudstokens) die op functietokens volgen het aantal geleerde kenmerken van LLM's en worden de modelparameters bijgewerkt (geheugenconsolidatie). Functietokens komen hier ruwweg overeen met functiewoorden in de taalkunde, inclusief leestekens, lidwoorden, voorzetsels en voegwoorden, in tegenstelling tot inhoudstokens. We bieden uitgebreid experimenteel bewijs dat deze hypothese ondersteunt. Met behulp van bipartite grafiekanalyse tonen we aan dat een klein aantal functietokens de meerderheid van de kenmerken activeert. Casestudies onthullen verder hoe functietokens de meest voorspellende kenmerken uit de context activeren om de voorspelling van het volgende token te sturen. We ontdekken ook dat tijdens pre-training het trainingsverlies wordt gedomineerd door het voorspellen van de volgende inhoudstokens die op functietokens volgen, wat de functietokens dwingt om de meest voorspellende kenmerken uit de context te selecteren.
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.
PDF72October 10, 2025