English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

MemCollab: Cross-Agent Memory Collaboration via Contrastive Trajectory Distillation Explained

Forum topic · 小凯 · 2026-03-26

Summary

MemCollab is a framework that enables AI agents to share memories across models instead of keeping them isolated. Naively copying memories between agents degrades performance—for example, a Qwen2.5-7B model dropped from 52.2% to 50.6% on MATH500 and from 42.7% to 34.1% on HumanEval when given memories directly transferred from a 32B model. The problem, termed "knowledge entanglement," is that stored trajectories mix transferable task structure with model-specific biases like reasoning style and tool habits. MemCollab addresses this with contrastive trajectory distillation: a weak and a strong agent each attempt the same task, a verifier labels outcomes as preferred or dispreferred, and their differences are distilled into abstract rules—violation patterns to avoid and reasoning invariants to follow. Combined with task-aware two-stage retrieval, this approach boosts Qwen2.5-7B by +14.8% on MATH500 and +9.7% on MBPP, and lifts LLaMA3-8B by +27.8% in cross-family settings. Performance follows an inverted-U with retrieved memory count, peaking at 1–3 entries. The work points toward multi-agent systems where smaller models approximate larger-model reasoning through shared, evolving collective memory.

Overview

This forum post introduces MemCollab: Cross-Agent Memory Collaboration via Contrastive Trajectory Distillation (Chang, Wu, Wu, & Lin, 2026, arXiv:2603.23234), a method for letting AI agents share learned memories across models of different sizes and even different architectures.

Key points

  • The problem: AI agents accumulate private memories (solving strategies, error lessons, tool tips), but these are siloed. Directly copying memories between agents *hurts* performance:
  • Qwen2.5-7B on MATH500: 52.2% → 50.6% after naive transfer from a 32B model
  • Qwen2.5-7B on HumanEval: 42.7% → 34.1%
  • Knowledge entanglement: stored trajectories entangle transferable task structure (correct reasoning, constraints, error recognition) with model-specific biases (reasoning style, tool habits, heuristic shortcuts). Naive transfer moves the noise along with the signal.
  • The MemCollab method

    1. Contrastive trajectory distillation: a weak agent (e.g., 7B) and a strong agent (e.g., 32B) each attempt the same task; a verifier labels trajectories as preferred (τ+) or dispreferred (τ−). 2. Distilling differences: comparing the two trajectories extracts:

  • *Violation patterns* — systematic errors seen in failures (e.g., premature numerical computation, assuming independence without verification, missing boundary cases)
  • *Reasoning invariants* — principles present in successes and absent/broken in failures (e.g., map variable dependencies first, model joint probability via conditionals, enumerate all cases)
  • 3. Rules, not examples: memory stores actionable abstract rules ("do X, avoid Y") rather than concrete solutions, making them abstract, actionable, and transferable. 4. Task-aware retrieval: a new problem is first classified (algebra, geometry, probability, etc.), then only the top-3 most relevant memories from that category are retrieved.

    Results

    | Benchmark | Model | No memory | With MemCollab | Gain | |---|---|---|---|---| | MATH500 | Qwen2.5-7B | 52.2% | 67.0% | +14.8% | | MATH500 | Qwen2.5-32B | 68.0% | 73.8% | +5.8% | | MBPP | Qwen2.5-7B | 47.9% | 57.6% | +9.7% | | MBPP | Qwen2.5-32B | 59.4% | 64.3% | +4.9% | | Cross-family | LLaMA3-8B | 46.6% | 74.4% | +27.8% |

  • Cross-model contrast beats self-contrast: a single model comparing its own successes and failures helps less, because another model's differing perspective is what exposes what is model-specific versus task-essential.
  • Efficiency: with memory guidance, models avoid known dead ends and need fewer reasoning rounds.
  • Inverted-U memory curve: retrieving 1–3 memories helps most; beyond 3, irrelevant constraints add noise and performance declines.
  • Why it works

    The post frames a trajectory as τ = g(s, b), where *s* is task structure (shared across agents) and *b* is agent bias (agent-specific). Contrasting outcomes on the same task isolates factors attributable to *b*, letting memory m = φ(s) encode structure only—an instance of contrastive learning, and, in information-theoretic terms, a purification step that maximizes retained task information while discarding bias and noise.

    Broader implications

  • Small models stand on giants' shoulders: a 7B model with MemCollab can approach or exceed a memory-less 32B model, cutting cost, energy, and hardware requirements.
  • Multi-agent systems: heterogeneous model teams can build a shared collective memory rather than remaining isolated islands.
  • Continual learning: the shared memory can grow over time as agents contribute new strategies and error warnings.
  • Future directions: scaling beyond two agents, meta-learning (learning how to identify problem structure), self-evolving memory, and extension to vision, robotics, and scientific discovery.

Reference

Chang, Y., Wu, Y., Wu, Q., & Lin, L. (2026). MemCollab: Cross-Agent Memory Collaboration via Contrastive Trajectory Distillation. *arXiv preprint arXiv:2603.23234*.

Tags

#memcollab#ai-agents#memory-collaboration#contrastive-learning#multi-agent-systems#llm-reasoning#knowledge-distillation#small-language-models

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177169047