mlsanityData to 14 Oct 2026

Think-in-Memory: Recalling and Post-thinking Enable LLMs with Long-Term Memory

arXiv 2311.08719 ↗First posted 15 Nov 2023cs.CLcited by 64

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

Memory-augmented Large Language Models (LLMs) have demonstrated remarkable performance in long-term human-machine interactions, which basically relies on iterative recalling and reasoning of history to generate high-quality responses. However, such repeated recall-reason steps easily produce biased thoughts, textiti.e., inconsistent reasoning results when recalling the same history for different questions. On the contrary, humans can keep thoughts in the memory and recall them without repeated reasoning. Motivated by this human capability, we propose a novel memory mechanism called TiM (Think-in-Memory) that enables LLMs to maintain an evolved memory for storing historical thoughts along the conversation stream. The TiM framework consists of two crucial stages: (1) before generating a response, a LLM agent recalls relevant thoughts from memory, and (2) after generating a response, the LLM agent post-thinks and incorporates both historical and new thoughts to update the memory. Thus, TiM can eliminate the issue of repeated reasoning by saving the post-thinking thoughts as the history. Besides, we formulate the basic principles to organize the thoughts in memory based on the well-established operations, (textiti.e., insert, forget, and merge operations), allowing for dynamic updates and evolution of the thoughts. Furthermore, we introduce Locality-Sensitive Hashing into TiM to achieve efficient retrieval for the long-term conversations. We conduct qualitative and quantitative experiments on real-world and simulated dialogues covering a wide range of topics, demonstrating that equipping existing LLMs with TiM significantly enhances their performance in generating responses for long-term interactions.

Key facts. Cited by 64 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 27 of its 33 references that are in the map. First posted on arXiv 15 Nov 2023.

Builds on

27 of 33 references.

References · 27

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  4. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  5. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  6. 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
  7. 2021Improving language models by retrieving from trillions of tokenscited by 1,293
  8. 2022GLM-130B: An Open Bilingual Pre-trained Modelcited by 843
  9. 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 799
  10. 2023Baichuan 2: Open Large-scale Language Modelscited by 670
  11. 2014Neural Turing Machinescited by 644
  12. 2023MemoryBank: Enhancing Large Language Models with Long-Term Memorycited by 556
15 more
  1. 2021Recent Advances in Natural Language Processing via Large Pre-Trained Language Models: A Surveycited by 463
  2. 2021Beyond Goldfish Memory: Long-Term Open-Domain Conversationcited by 267
  3. 2023FinGPT: Open-Source Financial Large Language Modelscited by 253
  4. 2023Prompting Large Language Model for Machine Translation: A Case Studycited by 250
  5. 2023HuatuoGPT, towards Taming Language Model to Be a Doctorcited by 214
  6. 2023Augmenting Language Models with Long-Term Memorycited by 189
  7. 2023GPTs are GPTs: An Early Look at the Labor Market Impact Potential of Large Language Modelscited by 176
  8. 2022From Images to Textual Prompts: Zero-shot VQA with Frozen Large Language Modelscited by 115
  9. 2022Long Time No See! Open-Domain Conversation with Long-Term Persona Memorycited by 108
  10. 2015Practical and Optimal LSH for Angular Distancecited by 106
  11. 2023SCM: Enhancing Large Language Model with Self-Controlled Memory Frameworkcited by 98
  12. 2021A Practical Survey on Faster and Lighter Transformerscited by 73
  13. 2020KdConv: A Chinese Multi-domain Dialogue Dataset Towards Multi-turn Knowledge-driven Conversationcited by 59
  14. 2022Investigating Efficiently Extending Transformers for Long Input Summarizationcited by 43
  15. 2022Relational Memory Augmented Language Modelscited by 24

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 1; 2024: 13; 2025: 30; 2026: 20.

64 papers.

Sort:

By area:

  1. 2025Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memorycited by 779
  2. 2024A Survey on the Memory Mechanism of Large Language Model based Agentscited by 634
  3. 2024Understanding the planning of LLM agents: A surveycited by 421
  4. 2025Darwin Godel Machine: Open-Ended Evolution of Self-Improving Agentscited by 356
  5. 2025Memory in the Age of AI Agentscited by 303
  6. 2025Advances and Challenges in Foundation Agents: From Brain-Inspired Intelligence to Evolutionary, Collaborative, and Safe Systemscited by 126
  7. 2025A Survey of Context Engineering for Large Language Modelscited by 126
  8. 2025Agentic Large Language Models, a surveycited by 108
  9. 2025How Memory Management Impacts LLM Agents: An Empirical Study of Experience-Following Behaviorcited by 101
  10. 2024A Survey on Self-Evolution of Large Language Modelscited by 91
  11. 2024AgentGen: Enhancing Planning Abilities for Large Language Model based Agent via Environment and Task Generationcited by 83
  12. 2025Collaborative Memory: Multi-User Memory Sharing in LLM Agents with Dynamic Access Controlcited by 61
38 more
  1. 2025MemoryBench: A Benchmark for Memory and Continual Learning in LLM Systemscited by 61
  2. 2025HaluMem: Evaluating Hallucinations in Memory Systems of Agentscited by 54
  3. 2026A Survey of Agent Memory in the Second Half: Towards Self-Evolving and Long-Horizon Agentscited by 44
  4. 2024KARMA: Augmenting Embodied AI Agents with Long-and-short Term Memory Systemscited by 39
  5. 2025Position: Episodic Memory is the Missing Piece for Long-Term LLM Agentscited by 36
  6. 2025O-Mem: Omni Memory System for Personalized, Long Horizon, Self-Evolving Agentscited by 32
  7. 2024INMS: Memory Sharing for Large Language Model based Agentscited by 31
  8. 2025Cognitive Memory in Large Language Modelscited by 29
  9. 2025From Single to Multi-Granularity: Toward Long-Term Memory Association and Selection of Conversational Agentscited by 29
  10. 2024Emotional RAG: Enhancing Role-Playing Agents through Emotional Retrievalcited by 26
  11. 2024MemSim: A Bayesian Simulator for Evaluating Memory of LLM-based Personal Assistantscited by 24
  12. 2025ArcMemo: Abstract Reasoning Composition with Lifelong LLM Memorycited by 24
  13. 2025Adaptation of Agentic AI: A Survey of Post-Training, Memory, and Skillscited by 22
  14. 2024A Survey of Optimization-based Task and Motion Planning: From Classical To Learning Approachescited by 20
  15. 2025Large language models for artificial general intelligence (AGI): A survey of foundational principles and approachescited by 18
  16. 2026A Comprehensive Survey on Agent Skills: Taxonomy, Techniques, and Applicationscited by 18
  17. 2023From Beginner to Expert: Modeling Medical Knowledge into General LLMscited by 14
  18. 2024A Human-Like Reasoning Framework for Multi-Phases Planning Task with Large Language Modelscited by 12
  19. 2025AI Meets Brain: Memory Systems from Cognitive Neuroscience to Autonomous Agentscited by 12
  20. 2026Memex(RL): Scaling Long-Horizon LLM Agents via Indexed Experience Memorycited by 12
  21. 2024Assessing Episodic Memory in LLMs with Sequence Order Recall Taskscited by 10
  22. 2025HiMA-Ecom: Enabling Joint Training of Hierarchical Multi-Agent E-commerce Assistantscited by 9
  23. 2025Memory-Augmented Transformers: A Systematic Review from Neuroscience Principles to Enhanced Model Architecturescited by 9
  24. 2026All-Mem: Agentic Lifelong Memory via Dynamic Topology Evolutioncited by 9
  25. 2025Beyond Pipelines: A Survey of the Paradigm Shift toward Model-Native Agentic AIcited by 8
  26. 2025Evaluating Long-Term Memory for Long-Context Question Answeringcited by 8
  27. 2025AI Awarenesscited by 7
  28. 2026MemWeaver: Weaving Hybrid Memories for Traceable Long-Horizon Agentic Reasoningcited by 7
  29. 2026Procedural Knowledge at Scale Improves Reasoningcited by 7
  30. 2026Memory as a Controlled Process: Learned Adaptive Memory Management for LLM Agentscited by 7
  31. 2025EvoMem: Improving Multi-Agent Planning with Dual-Evolving Memorycited by 6
  32. 2025Semantic Caching of Contextual Summaries for Efficient Question-Answering with Language Modelscited by 5
  33. 2026From Memory to Skills: Evidence-Grounded Co-Evolution Governance for Long-Horizon LLM Agentscited by 5
  34. 2024MathLearner: A Large Language Model Agent Framework for Learning to Solve Mathematical Problemscited by 4
  35. 2026SafeHarbor: Defining Precise Decision Boundaries via Hierarchical Memory-Augmented Guardrail for LLM Agent Safetycited by 4
  36. 2026InjecMEM: Memory Injection Attack on LLM Agent Memory Systemscited by 4
  37. 2025Learning, Reasoning, Refinement: A Framework for Kahneman's Dual-System Intelligence in GUI Agentscited by 2
  38. 2025Empowering Real-World: A Survey on the Technology, Practice, and Evaluation of LLM-driven Industry Agentscited by 2

50 most cited of 64 All 64 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2026Memory in the LLM Era: Modular Architectures and Strategies in a Unified Framework
  2. 2026Evaluating Memory Structure in LLM Agents
  3. 2023Empowering Working Memory for Large Language Model Agents
  4. 2026Thought-Retriever: Don't Just Retrieve Raw Data, Retrieve Thoughts for Memory-Augmented Agentic Systems
  5. 2026Beyond Dialogue Time: Temporal Semantic Memory for Personalized LLM Agents
  6. 2026MemOps: Benchmarking Lifecycle Memory Operations in Long-Horizon Conversations
  7. 2025Rethinking Memory in LLM based Agents: Representations, Operations, and Emerging Topics
  8. 2025CogMem: A Cognitive Memory Architecture for Sustained Multi-Turn Reasoning in Large Language Models