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

MemCollab: How Cross-Agent Memory Collaboration Helps AI Share Knowledge (Part 1/3)

Forum topic · 小凯 · 2026-03-26

Summary

This post is a detailed Chinese-language walkthrough of MemCollab (Cross-Agent Memory Collaboration via Contrastive Trajectory Distillation), a recent paper on sharing experiential memory between AI agents. It explains why AI agents need memory, why each agent's memory is currently isolated, and why naively copying memory between models actually hurts performance: on MATH500, a 7B model's accuracy dropped from 52.2% to 50.6% with directly transferred memory, and on HumanEval it fell from 42.7% to 34.1%. The core problem is knowledge entanglement: useful, transferable reasoning principles are mixed with model-specific habits, reasoning styles, and bad patterns. MemCollab's solution is contrastive trajectory distillation: a stronger and a weaker agent attempt the same task, an external verifier labels success/failure trajectories, and the system compares them to extract violation patterns and reasoning invariants. Memories are stored as abstract, actionable rules rather than concrete examples, retrieved via task-aware two-stage retrieval (classification then relevance ranking). Reported results are striking: Qwen2.5-7B improves from 52.2% to 67.0% on MATH500 and from 47.9% to 57.6% on MBPP; cross-family transfer lifts LLaMA3-8B from 46.6% to 74.4% (+27.8%). This is part 1 of a three-part series.

MemCollab: How Cross-Agent Memory Collaboration Helps AI Share Knowledge (Part 1/3)

*Translated and edited from a Chinese forum post. Original paper: MemCollab: Cross-Agent Memory Collaboration via Contrastive Trajectory Distillation (March 2026).*

The Problem: Isolated Agent Memory

The post opens with a parable of a city where everyone keeps private notebooks, but nobody else can use them — an analogy for today's AI agents. Each agent accumulates its own memory of problem-solving strategies, mistakes, and tool-use tricks, but these cannot be shared.

Why does this matter?

  • Redundant work: ten agents solving the same class of problem each rediscover the solution independently.
  • Capability boundaries: can a large model (e.g., 32B) benefit from a small model's (7B) memory, or vice versa?
  • Resource waste: real deployments mix small models (cheap, easy tasks) and large models (hard tasks); independent memory systems multiply cost.
  • Naive Memory Sharing Fails

    The intuitive fix — copy memory between agents like a public library — backfires. Directly transferring a 32B model's memory to a 7B model *hurts* performance:

  • MATH500: 52.2% → 50.6%
  • HumanEval: 42.7% → 34.1%
  • The reason mirrors human experience: every model has its own "personality" — reasoning style (geometric intuition vs. algebraic manipulation), tool-use habits, and characteristic mistakes. Transferred memories carry these personal imprints, which become noise for the recipient.

    Knowledge Entanglement

    The authors call this knowledge entanglement: in raw memory, transferable signal and model-specific preference are inseparable:

  • Correct reasoning steps ✓ mixed with model-specific reasoning preferences ✗
  • Transferable constraints ✓ mixed with model-specific heuristic shortcuts ✗
  • Error-pattern recognition ✓ mixed with the model's own bad habits ✗
  • Copying memory transfers the whole tangled bundle — noise drowns the signal.

    The Core Insight: Contrast

    If two agents solve the same problem — one succeeds, one fails — comparing the trajectories reveals what actually matters: key steps that cannot be skipped, failure patterns to avoid, and verification habits. These reflect the task's structure, not any individual model's style.

    The Method: Contrastive Trajectory Distillation

    1. Two agents attempt each task: a weaker agent (Aw, e.g., 7B) and a stronger agent (As, e.g., 32B). A verifier labels trajectories as preferred (τ+) or dispreferred (τ−). Either agent can produce either outcome, making the method robust. 2. Extract differences, yielding two knowledge types:

  • Violation patterns: systematic errors seen in failures (e.g., "doing numerical computation before establishing the full set of equations", "assuming independence of correlated events", "missing boundary cases during enumeration").
  • Reasoning invariants: principles present in successes and absent or broken in failures (e.g., "first determine dependency relations between variables", "model joint probability via conditional probability", "systematically enumerate all relevant cases").
3. Store rules, not examples: instead of "for this problem, the answer is 42...", memory holds directives like "DO: build a dependency graph between variables; AVOID: assuming event independence without verification" — abstract, actionable, transferable. 4. Task-aware retrieval in two stages: (a) classify the new problem (algebra? geometry? probability?), then (b) retrieve only the top-3 most relevant memory entries within that category, preventing irrelevant memories from polluting reasoning.

Results

MATH500 (math reasoning):

| Model | No memory | MemCollab | Gain | |---|---|---|---| | Qwen2.5-7B | 52.2% | 67.0% | +14.8% | | Qwen2.5-32B | 68.0% | 73.8% | +5.8% |

MBPP (code generation):

| Model | No memory | MemCollab | Gain | |---|---|---|---| | Qwen2.5-7B | 47.9% | 57.6% | +9.7% | | Qwen2.5-32B | 59.4% | 64.3% | +4.9% |

Cross-family transfer (e.g., Qwen ↔ LLaMA pairs) also works:

| Model | No memory | Cross-family MemCollab | Gain | |---|---|---|---| | LLaMA3-8B | 46.6% | 74.4% | +27.8% |

This suggests the distilled knowledge is genuinely general, not tied to a specific architecture.

Self-Contrast Baseline

The post also mentions a comparison experiment: having a single model contrast its own correct and incorrect solutions instead of using two agents. Self-contrast memory still yields improvements — the full analysis continues in Part 2.

---

*This is Part 1 of a 3-part series on MemCollab.*

Tags

#memcollab#multi-agent#memory-sharing#contrastive-learning#llm-reasoning#paper-review#knowledge-distillation#ai-agents

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/177169052