TLDR: Large Language Models (LLMs) use “function tokens” (like punctuation, articles, prepositions) as key mechanisms for both memory retrieval and consolidation. During inference, these tokens dynamically activate the most relevant features from context to predict the next word. During pre-training, the challenging task of predicting content tokens that follow function tokens drives the model to update its parameters, learn new features, and expand its internal knowledge, thereby consolidating memory. This hypothesis offers a new perspective on LLM interpretability and learning.
Large Language Models (LLMs) have amazed us with their ability to remember vast amounts of information and use it to follow instructions, memorize facts, and even reason. But how these powerful AI systems actually store and retrieve this ‘memory’ has been a bit of a mystery. A new research paper sheds light on this by proposing a fascinating idea: the ‘function token hypothesis’.
Understanding Function Tokens
In human language, we have ‘function words’ like articles (the, a), prepositions (in, on), and conjunctions (and, but). These words don’t carry much meaning on their own but are crucial for grammar and connecting ideas. In contrast, ‘content words’ like ‘cat’, ‘run’, or ‘beautiful’ carry explicit meaning. This paper extends this idea to LLMs, classifying their internal ‘tokens’ (which can be words, sub-words, or punctuation) into ‘function tokens’ and ‘content tokens’ based on how frequently they appear in training data.
Memory Retrieval: How LLMs Recall Information
The researchers found that during inference (when the LLM is generating text), function tokens act like powerful activators. Even though they are few in number, these tokens can activate a large majority of the LLM’s internal ‘features’ – which are like specific concepts or pieces of knowledge the model has learned. Imagine a function token like ‘in’ in the sentence ‘J.K. Rowling was born in Britain’. This ‘in’ token doesn’t just sit there; it dynamically reactivates features related to ‘J.K. Rowling’ and ‘Location’, then activates ‘England’ to help predict ‘Britain’. It’s like a conductor orchestrating which pieces of knowledge are most relevant at that exact moment to predict the next word.
The paper provides compelling examples. When asked ‘What is the capital of Russia?’ in Chinese, the function tokens like ‘:’, ‘the’, and newline characters act as conduits, propagating and re-creating activations for ‘Speak Chinese’ and ‘Russia’ features. If ‘Russia’ is replaced with ‘UK’, the same function tokens orchestrate a different set of feature activations, leading to the correct capital for the UK. They even showed that by ‘steering’ the activations of function tokens, they could directly influence the model’s output, making it answer in Chinese or about Russia, even if the original prompt didn’t specify it.
Memory Consolidation: How LLMs Learn and Grow
The hypothesis also explains how LLMs learn and consolidate new memories during pre-training. The researchers observed that the most challenging task for an LLM during training is predicting a ‘content token’ that follows a ‘function token’. This difficult prediction task forces the LLM to update its internal parameters and learn new features, effectively expanding its knowledge base. It’s like the model is pushed to deeply understand the context provided by the function token to accurately predict the meaningful word that comes next.
Initially, LLMs learn to predict function tokens very quickly. But as training progresses, the focus shifts to mastering the prediction of content tokens, especially those following function tokens. This process is directly linked to the growth in the number of learned features within the model, which is the essence of memory consolidation. Larger models also show significant improvements in predicting these content tokens, highlighting how scaling enhances this memory consolidation process.
Also Read:
- Bridging Efficiency and Detail in Long-Context AI with Artificial Hippocampus Networks
- Unraveling LLM Hallucinations: A Framework for Tracing Semantic Failures
The Function Token Hypothesis
In essence, the function token hypothesis states that during inference, function tokens retrieve the most predictive features from context to guide next-token prediction. During pre-training, predicting content tokens based on function tokens drives the LLM to update its parameters, learning and expanding its features. This mechanism is believed to be a result of the interplay between the LLM’s training loss, learning algorithms, Transformer architecture, and the inherent structure of language data.
This research significantly enhances our understanding of how LLMs work internally, offering new avenues for improving their interpretability and potentially designing more advanced learning algorithms, especially for aligning AI with human values. You can read the full paper here: Memory Retrieval and Consolidation in Large Language Models through Function Tokens.


