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を含む評価対象4つのハーネスすべてで第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.