arXiv:2610.22196cs.CLOct 2026

Manuscript Offprint

arXiv:2610.22196

Hy-Memory-30B-A3B: Attributed Reinforcement Learning for Long-Term Memory Writing

Tianxiang Fei, Jiazheng Kang, Mao Zheng, Xingyan He, Xiang Yu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

External-memory systems extend language-model applications beyond a context window, but their quality depends critically on the model executing the write path: deciding what to retain, how precisely to represent it, and how new evidence should update persistent state. Existing frameworks typically place a general-purpose large language model behind framework-specific prompts. This raises serving cost, and a writer specialized for one protocol does not transfer directly to another; a unified model that can operate across established memory frameworks remains largely unexplored. We present Hy-Memory-30B-A3B, a compact long-term-memory writer trained across Mem0, MemOS, and Hy-Memory. Memory On-Policy Distillation teaches framework-specific write protocols on student-generated states; Memory RL then optimizes downstream answerability using dense per-chunk probes, attributed cross-chunk rewards, over-storage controls, and chunk-level GRPO. Carrying policy-written banks across windows keeps training aligned with deployment. On fixed 20% benchmark subsamples, Hy-Memory-30B-A3B ranks first on all four evaluated harnesses, including held-out EverMemOS, with a 55.49% macro average versus 54.62% for Claude Opus 5.

huggingface.co/tencent/Hy-Memory-30B-A3B

github.com/Tencent-Hunyuan/Hy-Memory

1 Introduction

A long-term memory system for an LLM application usually contains three functional stages: (1) a writer converts an interaction into persistent memory operations; (2) a retriever selects records relevant to a future query; and (3) a reader or answer model uses the retrieved records to respond.

Systems such as Mem0, A-MEM, MemoryOS, and MemOS have expanded the design space of persistent memory through extraction, consolidation, hierarchical paging, linking, versioning, and lifecycle management (Chhikara et al., 2025; Xu et al., 2025; Kang et al., 2025; Li et al., 2025). Benchmarks such as LoCoMo and LongMemEval have also shown that long-term memory is not a single retrieval problem: it includes precise extraction, multi-session composition, temporal reasoning, knowledge updates, and abstention (Maharana et al., 2024; Wu et al., 2025).

Despite this progress, the write policy is commonly implemented by placing a general-purpose LLM behind a long, framework-specific prompt. That model must simultaneously distinguish durable user information from greetings, assistant suggestions, and transient text; preserve exact names, numbers, versions, dates, paths, and other identifying details; represent a state transition without losing either the new state or what it replaced; reconcile new evidence with retrieved memories already in the bank; and emit valid operations under the framework's schema and control flow.

The framework cannot recover information that the writer omitted, and a powerful downstream reader cannot reliably infer a fact that was never stored. Conversely, indiscriminately storing everything increases cost and retrieval interference. The desired writer is therefore not a generic summarizer: it is a policy for changing an external state under a long-horizon downstream objective.

Recent work has begun to train memory operations with reinforcement learning. Memory-R1 trains a memory manager and an answer agent with final-answer rewards (Yan et al., 2025). MemAgent learns recurrent textual compression from a terminal verifier (Yu et al., 2026). Mem- α\alpha combines downstream QA correctness with format, compression, and operation-quality rewards (Wang et al., 2025). MemCoE explicitly identifies sparse outcome reward as a weakness and adds guideline-aligned process feedback (Xu et al., 2026). These studies establish that memory behavior is learnable rather than fixed. They also expose a remaining problem: a final answer score usually supervises an entire sequence of heterogeneous memory actions, even though only a few actions supplied the evidence—or caused the failure.

Hy-Memory-30B-A3B focuses on this credit-assignment problem while preserving compatibility with existing memory frameworks. Our contributions are:

• A framework-integrated memory writer. Hy3-30B-A3B replaces the LLM inside Mem0, MemOS, and Hy-Memory without moving their memory logic into a custom model architecture.

• State-distribution-aligned training. OPD and RL both execute the policy inside the actual harness, and later writes observe banks produced by earlier policy outputs.

• Failure-surface reward data. Training questions are constructed from concrete write failures, including omission, lost specificity, semantic inversion, stale-state confusion, secondary-fact loss, and over-storage.

• Attributed, non-binary feedback. Local probes provide dense per-chunk evidence, while cross-chunk outcome questions use gold facts to map recovered evidence back to source chunks.

• Chunk-level policy optimization. Advantages are normalized among rollouts at the same chunk position rather than over whole trajectories, so one rollout can be credited at one chunk and penalized at another. Each rollout casts one vote per chunk even when a framework makes multiple LLM calls.

• Cross-harness and OOD results. Hy-Memory-30B-A3B ranks first on Mem0, Hy-Memory, MemOS, and held-out EverMemOS, averaging 55.49% across the four harnesses versus 54.62% for Claude Opus 5.