Paper: 2603.23234 Authors: Yurui Chang, Yiran Wu, Qingyun Wu, Lu Lin Categories: cs.AI
Abstract
LLM-based agents rely on memory mechanisms to reuse knowledge from past problem-solving experiences. Existing approaches construct memory per-agent, tightly coupling stored knowledge to a single model’s reasoning style. In modern deployments with heterogeneous agents, a natural question arises: can a single memory system be shared across different models? Naive memory transfer degrades performance because memory entangles task-relevant knowledge with agent-specific biases. MemCollab addresses this by constructing agent-agnostic memory through contrasting reasoning trajectories from different agents on the same task, distilling abstract reasoning constraints that capture shared invariants while suppressing agent-specific artifacts.
Key Contributions
- Agent-agnostic memory: Constructs memory that transfers across heterogeneous models without degradation
- Contrastive trajectory distillation: Compares reasoning traces from different agents on the same task to extract universal invariants
- Task-aware retrieval: Conditions memory access on task category, ensuring only relevant constraints are used
- Cross-model-family transfer: Works even across different model architectures and sizes
The Problem: Memory is Agent-Specific
When you build memory from an agent’s own reasoning traces, that memory encodes:
- The model’s preferred solving strategies
- Habitual heuristics specific to that architecture
- Reasoning patterns that may not generalize
Experiment on MATH500 shows:
- Qwen2.5-7B + its own memory → improvement
- Qwen2.5-7B + memory from Qwen2.5-32B → worse than no memory
- This happens because the 32B model’s reasoning patterns don’t match how the 7B model thinks
MemCollab’s Approach
Contrastive Distillation
Given the same task solved by multiple agents:
- Collect reasoning trajectories from each agent
- Identify invariances — patterns that appear across all agents (likely task-level truths)
- Identify discrepancies — patterns unique to individual agents (likely agent-specific biases)
- Distill abstract reasoning constraints that capture only the invariances
This produces memory entries that encode “what must be true about solving this type of problem” rather than “how model X prefers to solve problems.”
Task-Aware Retrieval
Memory entries are tagged with task categories. At inference time, retrieval is conditioned on the incoming task’s category, ensuring the agent receives only relevant reasoning constraints — not a random sample of past experience.
Results
Across mathematical reasoning and code generation benchmarks:
- MemCollab memory outperforms memory distilled from a model’s own trajectories
- Improvements hold for both accuracy and inference-time efficiency
- Works in cross-model-family settings (different architectures benefiting from shared memory)
- The collaboratively constructed memory functions as a shared reasoning resource
Takeaways
- Per-agent memory is fundamentally limited — it bakes in model-specific biases that prevent transfer
- Contrastive distillation across agents is key: by comparing how different models solve the same problem, you isolate what’s universally true vs. what’s one model’s quirk
- This enables a production pattern where expensive large-model reasoning experiences can benefit cheap small-model inference, without the degradation of naive transfer
- Task-aware retrieval is essential — not all past experience is relevant, and irrelevant memories hurt
论文: 2603.23234 作者: Yurui Chang, Yiran Wu, Qingyun Wu, Lu Lin 分类: cs.AI
摘要
基于LLM的智能体依赖记忆机制来重用过去解题经验中的知识。现有方法按智能体构建记忆,将存储的知识紧密耦合到单一模型的推理风格。在具有异构智能体的现代部署中,一个自然的问题是:单一记忆系统能否跨不同模型共享?朴素的记忆迁移会降低性能,因为记忆将任务相关知识与智能体特定偏差纠缠在一起。MemCollab通过对比不同智能体在相同任务上的推理轨迹来构建智能体无关记忆,蒸馏出捕获共享不变量的抽象推理约束,同时抑制智能体特定的工件。
主要贡献
- 智能体无关记忆:构建跨异构模型迁移无降级的记忆
- 对比轨迹蒸馏:比较不同智能体在相同任务上的推理轨迹,提取通用不变量
- 任务感知检索:根据任务类别条件化记忆访问,确保只使用相关约束
- 跨模型族迁移:即使在不同模型架构和规模之间也有效
问题:记忆是智能体特定的
从智能体自身推理轨迹构建的记忆编码了:
- 模型偏好的求解策略
- 特定于该架构的习惯性启发式
- 可能无法泛化的推理模式
MATH500上的实验显示:
- Qwen2.5-7B + 自身记忆 → 改善
- Qwen2.5-7B + 来自Qwen2.5-32B的记忆 → 不如无记忆
- 原因是32B模型的推理模式与7B模型的思维方式不匹配
MemCollab方法
对比蒸馏
给定多个智能体求解的相同任务:
- 收集每个智能体的推理轨迹
- 识别不变量——所有智能体共有的模式(可能是任务级真理)
- 识别差异——个别智能体独有的模式(可能是智能体特定偏差)
- 蒸馏仅捕获不变量的抽象推理约束
这产生编码”解决此类问题必须为真的信息”而非”模型X偏好如何解决问题”的记忆条目。
任务感知检索
记忆条目标记任务类别。推理时,检索以传入任务的类别为条件,确保智能体只接收相关的推理约束。
实验结果
在数学推理和代码生成基准上:
- MemCollab记忆优于从模型自身轨迹蒸馏的记忆
- 准确性和推理效率均有提升
- 在跨模型族设置中有效
- 协作构建的记忆作为共享推理资源发挥作用
要点总结
- 单智能体记忆从根本上是有限的——它内嵌了阻碍迁移的模型特定偏差
- 跨智能体的对比蒸馏是关键:通过比较不同模型如何解决相同问题,隔离通用真理与模型特异性
- 这使得昂贵的大模型推理经验能够惠及廉价的小模型推理
- 任务感知检索至关重要——不相关的记忆会造成伤害