Imagine a secretary tasked with writing down each day's events in a notebook. At day's end, you ask about something discussed earlier—and he can't answer. Opening the notebook, you find the important things weren't recorded, useless ones were, key numbers were wrong, and outdated information was never updated.
This is the core problem facing LLM long-term memory systems. Not "can't remember," but "doesn't know how to write memories."
A new paper from Tencent Hunyuan, *Hy-Memory-30B-A3B: Attributed Reinforcement Learning for Long-Term Memory Writing*, targets exactly this. They trained a 30B model specialized in memory writing that achieved an average score of 55.49% across evaluations on four memory frameworks—a small but real margin over Claude Opus 5's 54.62%.
A 30B model beating Claude Opus? Behind this lies an overlooked key problem.
The Three Stages of a Memory System
Long-term memory systems for LLMs typically have three stages:
- Writer: converts conversation content into persistent memory operations—what to store, how, and what to update.
- Retriever: finds relevant records at query time.
- Reader: answers questions using retrieved memories.
- Signal vs. noise: "Hello" and "My name is Zhang San and I'm allergic to peanuts" are very different—discard the former, store the latter.
- Precision: names, numbers, versions, dates, paths—one wrong character can be fatal.
- State updates: the user lived in Beijing last week but moved to Shanghai this week—update the old memory, don't append a new one.
- Cross-turn consistency: today's writes must be compatible with yesterday's memory store.
- Framework adaptation: different memory frameworks (Mem0, MemOS, Hy-Memory) have different schemas and control flows.
- Dense local probes: for each chunk, an independent probe checks whether it contains key evidence for answering—giving each chunk its own reward without waiting for the final answer.
- Attributed cross-chunk rewards: gold facts trace evidence in the final answer back to source chunks, so the chunk that enabled a correct answer gets positive reward.
- Over-storage controls: a penalty suppresses unnecessary storage, which raises cost and retrieval interference.
- Chunk-level GRPO: advantages are normalized across rollouts at the same chunk position, not over the whole trajectory. The same rollout can be rewarded on one chunk and penalized on another.
- Mem0: Hy-Memory ranks first
- Hy-Memory: Hy-Memory ranks first
- MemOS: Hy-Memory ranks first
- EverMemOS (held-out, unseen during training): Hy-Memory ranks first
Most research and engineering effort goes into retrieval and reading—better vector search, better RAG fusion, stronger readers. But the writing stage is usually just "plug in a general-purpose LLM with a long prompt."
That's where the problem lies.
Why General-Purpose Models Make Poor "Secretaries"
A general LLM acting as memory writer must juggle several conflicting tasks:
General models handle all this with a long prompt, poorly. And crucially—a writer trained for Mem0 doesn't work on MemOS. No one had previously trained a writer model generalizing across multiple frameworks.
Hy-Memory's Solution: Attributed Reinforcement Learning
The core innovation is "Attributed RL," solving the classic credit assignment problem.
Previous memory RL methods (e.g., Memory-R1, MemAgent) use final-answer correctness as the reward. But a conversation may involve dozens of memory operations—stored A, stored B, updated C, deleted D—if the answer is wrong, which operation failed? Supervising the whole sequence with the final score is like grading every homework problem by the final exam total—far too sparse.
Hy-Memory's solution has several layers:
Memory On-Policy Distillation
Another key design is Memory On-Policy Distillation (MoPD). Training a student on teacher-generated states creates a distribution mismatch: at deployment, the student sees states it generated itself.
MoPD lets the student execute its own policy during training—generated memory states become inputs for subsequent write operations. Training and deployment state distributions align, so the model doesn't falter in production.
This echoes a recurring theme in Agentic RL: the training environment must match the deployment environment, or learned policies fail.
Results: A Win for Small Models
On a fixed 20% benchmark subset across four frameworks:
The gap is small but meaningful. A specialized 30B model beat the strongest general model on all four frameworks—including one never seen in training—showing memory writing is a trainable skill whose gains transfer across frameworks.
An Honest Assessment
The gap is genuinely small—0.87 percentage points, possibly within benchmark noise. Claude Opus is a general model with no memory-writing optimization; coming this close to a specialized model is impressive.
But the paper's value isn't "beating Claude"—it's validating a direction: memory writing is trainable, and the training transfers across frameworks. First place on the unseen EverMemOS suggests the model learned a general writing capability, not framework-specific tricks.
Attribution matters too. Previous methods used terminal rewards with signals too sparse. Hy-Memory's chunk-level attribution gives each operation targeted feedback—credit assignment applied concretely to memory systems.
An Analogy
Picture a factory quality inspector. The old approach: wait for the batch to ship, measure the complaint rate, and judge all inspectors by it—but which inspection step failed?
Attributed RL gives each inspector, each inspection step, its own record; complaints trace back to specific steps. Rewards reflect per-inspection accuracy, not batch-wide satisfaction.
That's what Hy-Memory does for memory writing—decomposing "was the final answer right" into "was each memory operation right."
Conclusion
This paper is a concrete application of Agentic RL to memory systems. Credit assignment isn't new, but the scenario is specific: memory writing is a multi-step sequence of diverse operations where terminal rewards are too sparse—attribution is necessary.
"Attribution" keeps reappearing across AI: from RTI's Validator-Corrector-Verifier pipeline to DoubtLess's brief-vs-verbose dual thinkers to Hy-Memory's chunk-level attribution—the core is the same: don't evaluate complex systems with a scalar; decompose evaluation to the component level.
Paper: https://arxiv.org/abs/2610.22196
Code: https://github.com/Tencent-Hunyuan/Hy-Memory