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.
RecMem: Recurrence-based Memory Consolidation for Efficient and Effective Long-Running LLM Agents
Department of Computer Science and Engineering, The Chinese University of Hong Kong(香港中文大学计算机科学与工程系);School of Computer Science, Beijing University of Posts and Telecommunications(北京邮电大学计算机学院);Huawei Cloud(华为云);Huawei Theory Lab(华为理论实验室);Institute for Math and AI, Wuhan University(武汉大学数学与人工智能研究院)
Aspect-Based Summarization with Self-Aspect Retrieval Enhanced Generation
College of Computing and Data Science(计算与数据科学学院);Nanyang Technological University(南洋理工大学);School of Humanities(人文学院);School of Computer Science and Technology(计算机科学与技术学院);East China Normal University(华东师范大学)
Lightweight LLM Agent Memory with Small Language Models
University of Electronic Science and Technology of China(电子科学与技术大学);Kyung Hee University(庆熙大学);City University of Hong Kong(香港城市大学);University of Oxford(牛津大学)
TCRA-LLM: Token Compression Retrieval Augmented Large Language Model for Inference Cost Reduction
Meetyou AI Lab(美柚人工智能实验室);Xiamen Key Laboratory of Women’s Internet Health Management(厦门市女性互联网健康管理重点实验室);Osaka University(大阪大学);Agency for Science, Technology and Research (A*STAR)(新加坡科技研究局)
STORM: Stepwise Token Optimization with Reward-Guided Beam Search
MILA – Quebec AI Institute & ILLS(魁北克人工智能研究所与ILLs);Université Paris-Saclay & CentraleSupélec & CNRS(巴黎-萨克雷大学及CentraleSupélec与CNRS);Air Liquide;Sorbonne Université & ISIR & CNRS(索邦大学及ISIR与CNRS);Sapienza, University of Rome(罗马大学Sapienza)
From Token to Action: State Machine Reasoning to Mitigate Overthinking in Information Retrieval
Computer Science and Engineering, Seoul National University(计算机科学与工程系,首尔国立大学);Interdisciplinary Program in Artificial Intelligence, Seoul National University(人工智能交叉学科项目,首尔国立大学)
Core Tokensets for Data-efficient Sequential Training of Transformers
Hessian Center for AI (hessian.AI)(黑森人工智能中心);German Research Center for Artificial Intelligence (DFKI)(德国人工智能研究中心);Centre for Cognitive Science, TU Darmstadt(达姆施塔特工业大学认知科学中心);Department of Computer Science, TU Darmstadt(达姆施塔特工业大学计算机科学系)