MemCollab: Cross-Model Memory Collaboration via Contrastive Trajectory Distillation
About
LLM agents increasingly rely on memory mechanisms to reuse knowledge from past problem-solving experiences. However, existing methods typically construct memory for a single agent and reuse it with the same underlying model, tightly coupling stored knowledge to model-specific reasoning styles. In heterogeneous deployments, where agents may be instantiated with backbone models of different sizes, architectures, or specializations, this raises a key question: can a single memory system be shared across agents with different backbone models? We find that naive cross-model memory transfer can degrade performance, because stored memories often entangle task-relevant knowledge with model-specific biases. To address this challenge, we propose MemCollab, a collaborative memory framework that builds shared cross-model memory by contrasting reasoning trajectories generated by different model-based agents on the same task. Through this contrastive process, MemCollab distills abstract reasoning constraints that capture shared task-level invariants while suppressing model-specific artifacts. We further introduce a task-aware retrieval mechanism that conditions memory access on task category, ensuring that only relevant constraints are retrieved at inference time. Experiments on mathematical reasoning and code generation benchmarks show that MemCollab consistently improves both accuracy and inference-time efficiency across diverse agents, including settings with different model families. These results demonstrate that collaboratively constructed cross-model memory can serve as a shared reasoning resource for heterogeneous LLM-based agents.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Mathematical Reasoning | AIME 2024 | Accuracy26.7 | 525 | |
| Mathematical Reasoning | AIME 2025 | Pass@1 Accuracy23.3 | 192 | |
| Mathematical Reasoning | AIME 2023 | Accuracy (%)16.7 | 36 | |
| Mathematical Reasoning | AIME 2022 | Accuracy (Exact Match)23.3 | 12 | |
| Multi-domain reasoning | AFlow-Stream (test) | GSM8K Accuracy96 | 11 | |
| Mathematical Reasoning | MATH hard Level 4 5 | Accuracy (Exact Match)60.3 | 7 | |
| Mathematical Reasoning | Hard Math Stream Overall | Accuracy (micro-average)48.4 | 7 | |
| Code Generation | Hard Code Stream MBPP+, CC, HumanEval | MBPP+ Accuracy87 | 7 | |
| Mathematical Reasoning | Hard Math Stream (test) | Accuracy (Hard Math Stream)87.8 | 4 |