MemCoE: Learning How and What to Memorize
Paper: *Learning How and What to Memorize: Cognition-Inspired Two-Stage Optimization for Evolving Memory* Authors: Derong Xu, Shuochen Liu, Pengfei Luo, Pengyue Jia, Yingyi Zhang, Yi Wen, Yimin Deng, Wenlin Zhang, Enhong Chen, Xiangyu Zhao, Tong Xu arXiv: 2605.00702 | 2026-04-30
1. The AI Assistant with Bad Memory
Imagine an AI assistant managing your schedule, recommending restaurants, and remembering your preferences. After months of conversation, it should know that you:
- Don't eat seafood
- Love science fiction novels
- Are free on Wednesday evenings
- Are sensitive to caffeine
- Context windows are limited, so it can't retain long conversation histories
- Static memory update rules are too rigid
- Reinforcement learning suffers from sparse rewards
- Preferences evolve (e.g., you recently started trying seafood), yet the agent still acts on old preferences
- Hippocampus: fast encoding of new memories, limited capacity
- Prefrontal cortex: long-term, organized, structured storage
- Schema: abstract representations of repeated experience
- Two-stage decoupling: decide *what* first, then *how*
- Cognition-inspired: mimics the division of labor in human memory
- End-to-end learning: rules are learned from data, not hand-crafted
- Passive storage = database
- Active memorization = intelligence
But in practice:
LLM agents need long-term memory, but current memory systems are too simplistic.
2. Three Core Challenges of Long-Term Memory
1. Limited context windows — models like GPT-4 can only handle a finite number of tokens, so history must go into an external memory system. 2. Static update rules — hand-crafted rules ("if the user says X, update memory Y") can't cover all cases or adapt to individual differences. 3. Sparse rewards — RL-based memory updates only get rewards at task completion, making it hard to attribute outcomes to specific updates; training becomes unstable.
Plus a subtler problem: preferences evolve. People aren't static — memory systems must support evolution.
3. MemCoE: Cognition-Inspired Two-Stage Memory Optimization
MemCoE (Memory Cognition Optimization with Evolution) draws on cognitive science: memory schema theory and the hippocampus–prefrontal cortex division of labor.
Two-stage design:
Stage 1 — What to Memorize: learn to identify which information is worth remembering. Not everything belongs in long-term memory; filter for the *important, persistent, and generalizable*.
Stage 2 — How to Memorize: learn how to organize and update memory — how new information integrates with old memories, how conflicts are reconciled, and when old memories should be updated or forgotten.
Key innovations:
This gives AI a true "cognitive memory system" — not a simple notebook, but selective, organized, forgetful intelligence.
4. Why Cognitive Inspiration Works
The human memory system encodes millions of years of evolutionary wisdom:
1. Selective attention — we don't remember every falling leaf, only what is goal-relevant, emotionally significant, or novel. MemCoE learns this selectivity. 2. Hierarchical organization — memory isn't a flat list; it's structured and interconnected. MemCoE learns to organize memory hierarchies. 3. Dynamic updating — memory adjusts with new experience. MemCoE supports memory evolution. 4. The wisdom of forgetting — forgetting is a feature, not a bug: it removes outdated information while preserving core knowledge. MemCoE learns *when* to forget.
5. Memory Is Active Construction, Not Passive Storage
As Feynman put it:
> "Knowing the name of something and understanding something are completely different. Understanding means connecting new knowledge to your existing knowledge network."
For memory systems, the analogy is:
> "Memory isn't stuffing information into drawers. Memory is weaving new information into an existing knowledge network — deciding where it belongs, what it relates to, and whether it's worth keeping."
MemCoE's philosophical basis: memory is an active, selective, constructive process.
6. Takeaways for Builders
If you're building LLM agents or conversational systems, ask yourself:
1. Is my memory system selective — does it avoid storing everything? 2. Are memory updates hand-crafted rules or learned? 3. Does the system support memory evolution? 4. Have I considered insights from cognitive science?
MemCoE reminds us: the future of AI memory isn't a bigger context window — it's smarter memory management.
Human memory is imperfect — we forget, distort, and select. But these "flaws" are precisely the hallmarks of intelligence. MemCoE borrows from cognitive science to make AI memory more human-like: selective, organized, and evolving.
In the world of LLM agents, the best memory isn't the one that remembers the most — it's the one that remembers the smartest.