Command Palette
Search for a command to run...
Hy-Memory-30B-A3B: 장기 기억 쓰기를 위한 귀속 강화학습
Hy-Memory-30B-A3B: 장기 기억 쓰기를 위한 귀속 강화학습
Tianxiang Fei Jiazheng Kang Mao Zheng Xingyan He Xiang Yu
Hy-Memory-30B-A3B: 장기 기억 쓰기 모델
초록
외부 메모리 시스템은 언어 모델 응용을 컨텍스트 창 너머로 확장하지만, 그 품질은 쓰기 경로를 실행하는 모델, 즉 무엇을 보존할지, 얼마나 정밀하게 표현할지, 새로운 증거가 지속 상태를 어떻게 갱신할지 결정하는 모델에 결정적으로 의존한다. 기존 프레임워크는 일반적으로 프레임워크별 프롬프트 뒤에 범용 대규모 언어 모델을 배치한다. 이는 서빙 비용을 높이고, 한 프로토콜에 특화된 쓰기 모델은 다른 프로토콜로 직접 전이되지 않는다. 확립된 메모리 프레임워크 전반에서 작동할 수 있는 통합 모델은 아직 충분히 탐구되지 않았다. 우리는 Mem0, MemOS, Hy-Memory 전반에 걸쳐 학습된 소형 장기 기억 쓰기 모델인 Hy-Memory-30B-A3B를 제시한다. Memory On-Policy Distillation은 학생이 생성한 상태에 대해 프레임워크별 쓰기 프로토콜을 가르치고, Memory RL은 청크별 밀집 프로브, 귀속 교차 청크 보상, 과잉 저장 제어, 청크 수준 GRPO를 사용하여 하류 응답 가능성을 최적화한다. 정책이 작성한 메모리 뱅크를 창 간에 이월하면 학습이 배포 환경과 정렬된 상태로 유지된다. 고정된 20% 벤치마크 하위 표본에서 Hy-Memory-30B-A3B는 홀드아웃 EverMemOS를 포함한 네 가지 평가 하니스 모두에서 1위를 차지했으며, 매크로 평균 55.49%로 Claude Opus 5의 54.62%를 능가했다.
One-sentence Summary
Researchers at Tencent Hunyuan introduce Hy-Memory-30B-A3B, a compact long-term-memory writer trained across Mem0, MemOS, and Hy-Memory using Memory On-Policy Distillation and Memory RL with dense per-chunk probes, attributed cross-chunk rewards, over-storage controls, and chunk-level GRPO, achieving first place on all four evaluated harnesses, including held-out EverMemOS, with a 55.49% macro average versus Claude Opus 5's 54.62%.
Key Contributions
- Hy-Memory-30B-A3B is a compact long-term-memory writer trained across Mem0, MemOS, and Hy-Memory, unifying framework-specific write protocols into a single model.
- Training uses Memory On-Policy Distillation to teach framework-specific write protocols on student-generated states. Memory RL then optimizes downstream answerability via dense per-chunk probes, attributed cross-chunk rewards, over-storage controls, and chunk-level GRPO while carrying policy-written banks across windows.
- Hy-Memory-30B-A3B ranks first on Mem0, Hy-Memory, MemOS, and held-out EverMemOS, achieving a 55.49% macro average on fixed 20% benchmark subsamples versus 54.62% for Claude Opus 5. The held-out EverMemOS result provides the clearest margin over Claude Opus 5 (+2.86 points), supporting memory writing as a transferable capability.
Introduction
Long-term memory for LLM applications typically separates writing, retrieval, and reading, and systems such as Mem0, A-MEM, MemoryOS, and MemOS have expanded memory design beyond simple retrieval. However, the write policy is usually a general-purpose LLM guided by a long prompt, so it must simultaneously extract durable facts, preserve exact identifying details, update state, resolve conflicts, and obey framework schemas; omitted facts cannot be recovered downstream, while storing too much increases cost and retrieval interference. Recent memory RL methods learn from final-answer rewards, but a scalar outcome supervises a whole sequence of heterogeneous writes, causing weak credit assignment. The authors introduce Hy-Memory-30B-A3B, a framework-integrated memory writer trained inside existing memory harnesses with failure-driven, attributed, chunk-level reinforcement learning, and they report cross-harness results including held-out EverMemOS.
Dataset
The authors describe a reward-focused dataset built from generated probes and cross-chunk questions rather than imported benchmark items. The dataset has two main question types used to score local write quality and long-range memory utility.
-
Composition and scale: The structural verification pass keeps roughly 410k of 478k generated probes and 61k of 72k generated cross-chunk questions. After capping at most three positive probes and one trap per chunk, the final artifact contains 164,576 positive probes, 8,599 traps, approximately 60.8k outcome questions, and 222,395 chunk-level gold-fact references.
-
Sources and annotation: Questions are generated during reward construction. The failure taxonomy follows LoCoMo and LongMemEval, but the questions are not copied from those benchmarks. Local per-chunk probes and long-range cross-chunk outcome questions are annotated in separate passes. For a per-chunk probe, annotators see the current chunk plus extracted facts from the two preceding chunks as context only. No probes are generated from those context facts, and they receive no credit.
-
Processing and schema: Each probe or outcome question carries weighted credit points, semantic equivalents, explicit full credit, partial credit, and zero credit bands, named distractors, and evidence chunk IDs. Outcome questions also include the source facts introduced by each evidence chunk. Gold facts are visible only to the outcome judge and are not inserted into the memory bank, retrieval query, or answer-model prompt. Earlier-window facts are marked history-only and cannot generate credit for the current chunk.
-
Filtering and verification: Records must pass schema validity, causal locality, rubric independence, and discriminability checks. The discriminability check scores five synthetic answers per item in the expected order: reference and paraphrase receive full credit, a partial answer receives partial credit, and a distractor or refusal receives zero credit.
-
Use in training: Each complete interaction sequence is assigned to one harness configuration. The offline schedule preserves within-sequence window order and consumes every row exactly twice over two epochs.
Method
The authors leverage a unified harness scope across multiple configurations to train a memory-writing policy. The system relies on a strict three-model separation. The policy model generates memory-write outputs, a frozen answer model reads the retrieved memory to answer questions, and a frozen judge evaluates the answers against a reference and rubric. By freezing the answer model and judge, the memory bank remains the sole changing component in the reward path.
As shown in the figure below, the training pipeline consists of two distinct stages.
Stage 1 focuses on Memory On-Policy Distillation (OPD). Direct reinforcement learning from a generic model often wastes samples on protocol failures, while pure distillation cannot rank valid memory representations by downstream usefulness. OPD addresses this by having the student model generate its own trajectories. The frozen Hy3 flagship teacher evaluates the student token stream, and the student is trained using a top-k reverse KL divergence objective:
LOPD=∣T∣1(i,j)∈T∑v∈top-50∑πθ(v∣xi,<j)[logπθ(v∣xi,<j)−logπT(v∣xi,<j)]This ensures the student learns to act within the harness while experiencing the state distribution it creates during deployment.
Stage 2 transitions to Memory Reinforcement Learning, starting from the OPD checkpoint. The authors employ a chunk-level Group Relative Policy Optimization (GRPO) approach. For each window of interaction chunks, multiple rollouts are executed from independent copies of a parent bank. The reward for each chunk is a combined score comprising a per-chunk recall reward from local probes and traps, an attributed outcome reward from cross-chunk questions, and a bank-growth penalty to discourage indiscriminate storage:
s[t]=wprmk≥t∑γk−tprm[k]+wormorm[t]−wpenpen[t]Advantages are computed per chunk across the rollout group rather than per trajectory:
Ai,t=σt+ϵsi[t]−μtThis allows the best rollout to differ from chunk to chunk. Finally, the bank with the highest cumulative score at the end of a window is carried forward to initialize the next window, ensuring the policy learns to operate on its own prior mistakes.
Experiment
The evaluation isolates the memory writer by fixing the retrieval, prompt, judge, and reader pipeline, using 20% benchmark subsamples across four harnesses and six metrics. Hy-Memory-30B-A3B ranks first on all four harnesses, with small margins indicating parity on some frameworks and stronger gains on Travel SPS and CMB, while the held-out EverMemOS result supports out-of-distribution memory-writing generalization rather than protocol memorization. Reward construction treats final benchmark questions as insufficient and builds items from distinct memory failure surfaces, and the engineering audit shows that silent failures must be caught through explicit invariant checks.
Hy-Memory-30B-A3B differs from prior memory RL by training only the writer, keeping the reader fixed, and operating across several pre-existing memory harnesses. Its reward decomposes into per-chunk recall, attributed outcome, and a growth penalty, which localizes evidence to writes. On a held-out harness, it outperforms strong baselines, with recurring gains concentrated in Travel SPS and CMB. The method trains a writer only, so improvements cannot be attributed to a learned reader. It operates across multiple existing memory harnesses and, on a held-out harness, outperforms strong baselines with gains concentrated in Travel SPS and CMB.
The experimental harness set spans three families and five trained configurations: Mem0 and MemOS each have one general configuration, while Hy-Memory has chat, working, and coding configurations with distinct memory roles. The same conceptual harness set is used for OPD and RL, and a held-out EverMemOS harness is evaluated only at test time to probe generalization. Gains are strongest on Travel SPS and CMB, including on the held-out harness, and the leading Hy-Memory model outperforms other compared models, suggesting memory-writing skill rather than protocol memorization. Three harness families are used, with Hy-Memory contributing three scenario configurations and Mem0 and MemOS one general configuration each. Travel SPS and CMB show the strongest recurring gains, including on the held-out EverMemOS harness. The Hy-Memory model leads on the held-out EverMemOS harness over DeepSeek V4.1 Flash, Opus 5, and Hy3, separating memory-writing skill from training protocol memorization.
The annotation design separates local write-quality probing from cross-chunk outcome annotation into two passes, each feeding a different reward. Per-chunk probes inspect the current chunk with factual context from the two previous chunks to test precision and recoverability without crediting earlier chunks. Cross-chunk outcome annotation uses earlier-sequence facts and the current window to evaluate relations spanning chunks or sessions. Local write quality and long-range memory utility are annotated in separate passes because they require different context. The per-chunk probe pass uses facts from the two preceding chunks as context only, supporting coreference and novelty checks while avoiding credit for earlier content. The cross-chunk outcome pass uses earlier-sequence facts plus all facts in the current window to test relations that span chunks or sessions. Using full history instead of the two-chunk context makes extracted facts more generic, while the limited context yields more named entities and numeric details per fact.
The failure-surface probes target local memory-writing failures such as exact identifier survival, semantic precision, plain recall, preservation of secondary details, and state transitions. They also require absence of greetings, vague praise, generic assistant text, and meta-summaries, while cross-chunk questions add coexistence, temporal, aggregation, multi-hop, and negative recall. The resulting reward construction shows strongest recurring gains on Travel SPS and CMB, with held-out evaluation gains driven particularly by these two categories. Probes check that exact names, numbers, titles, versions, paths, and entities survive writing, and that negation, scope, and event meaning are not inverted. Reward tests require the memory to store the fact rather than a meta-summary, and to keep smaller details from being erased by a dominant topic.
The reward artifact spans all four harness configurations, with recall rewards far outnumbering trap and ORM rewards. Hy-Memory Chat, Mem0, and MemOS have similar window volumes, while Hy-Memory Coding is smaller and contributes very few trap rewards relative to its recall rewards. The offline schedule preserves within-sequence window order and consumes every row exactly twice across two epochs. Hy-Memory Chat, Mem0, and MemOS each process 3,182 windows, but Chat has the highest recall and trap counts among them. Trap rewards are unevenly distributed, with Hy-Memory Coding contributing only 178 traps compared with much higher trap counts in Chat and the memory framework baselines.
The experiments evaluate Hy-Memory-30B-A3B by training only the memory writer while keeping the reader fixed, using a reward that decomposes into per-chunk recall, attributed outcome, and a growth penalty across several existing memory harnesses, with a held-out EverMemOS harness reserved for generalization testing. The method outperforms strong baselines on the held-out harness, with recurring gains concentrated in Travel SPS and CMB, indicating that the improvements reflect transferable memory-writing skill rather than memorization of a specific training protocol. Supporting analyses separate local write-quality probes from cross-chunk outcome annotations, target failures such as exact identifier survival, semantic precision, state transitions, and multi-hop relations, and show that recall rewards dominate the training artifact while Hy-Memory Coding contributes relatively few trap rewards.