Papers
Topics
Authors
Recent
Search
2000 character limit reached

MemCollab: Cross-Agent Memory Framework

Updated 3 July 2026
  • MemCollab is a cross-agent memory framework that aggregates shared solution patterns from diverse LLM-based agents to improve reasoning across tasks.
  • It employs contrastive trajectory distillation to extract transferable invariants while filtering out agent-specific biases and heuristics.
  • Empirical results demonstrate significant gains in accuracy and efficiency on benchmarks like MATH500 and HumanEval through task-aware memory retrieval.

MemCollab is a cross-agent, collaborative memory framework that enables heterogeneous LLM-based agents to construct, share, and leverage a unified agent-agnostic memory bank, thereby enhancing accuracy and efficiency across mathematical reasoning and code generation tasks. Unlike per-agent memory approaches—which conflate agent-specific heuristics with problem-solving knowledge—MemCollab employs contrastive trajectory distillation to distill shared reasoning invariants that generalize across model families, architectures, and reasoning styles. This architecture supports task-category–conditioned retrieval and serves as a foundation for collective intelligence over distributed LLM agent deployments (Chang et al., 24 Mar 2026).

1. Motivation: Cross-Agent Memory Reuse and Its Limitations

Traditional LLM agent deployments construct and store memory independently per agent, encoding not only shared solution strategies but also model-specific preferences, heuristics, and idiosyncratic tool usage. Given a set of agents A={A1,...,An}\mathcal{A} = \{A_1, ..., A_n\}, each presented with task xx, the generated trajectory τi(x)=(r1,...,rTi)\tau_i^{(x)} = (r_1, ..., r_{T_i}) entwines global task constraints with agent-local peculiarities. Naïvely transferring memory M1M_1 from agent A1A_1 to agent A2A_2 has been shown to degrade downstream performance, as agent-specific bias b1b_1 can conflict with A2A_2's reasoning style. Empirical results demonstrate accuracy drops in Qwen-7B on MATH500 when using Qwen-32B-derived memory, underscoring the need for agent-agnostic memory that encodes shared invariants ss and excludes agent-unique elements bib_i (Chang et al., 24 Mar 2026).

2. Formalization: Problem Setup and Agent-Agnostic Memory Construction

MemCollab formalizes the construction of a global memory bank xx0 that aggregates knowledge from all available agent trajectories on the training set:

xx1

The goal is to maximize task accuracy and efficiency for any agent xx2 on new task xx3 by retrieving a relevant memory slice:

xx4

Agent-specific memory xx5 is formed by distillation solely from xx6, whereas ideal agent-agnostic memory xx7 captures only shared solution patterns, maximizing transferability.

3. Methodology: Contrastive Trajectory Distillation

The core methodological innovation of MemCollab is to extract abstract, agent-agnostic constraints via contrastive distillation:

  • Agents xx8 (weaker) and xx9 (stronger) solve training instances τi(x)=(r1,...,rTi)\tau_i^{(x)} = (r_1, ..., r_{T_i})0, producing trajectories τi(x)=(r1,...,rTi)\tau_i^{(x)} = (r_1, ..., r_{T_i})1.
  • An indicator function τi(x)=(r1,...,rTi)\tau_i^{(x)} = (r_1, ..., r_{T_i})2 identifies the preferred (correct) trajectory τi(x)=(r1,...,rTi)\tau_i^{(x)} = (r_1, ..., r_{T_i})3 and the less-preferred (incorrect) τi(x)=(r1,...,rTi)\tau_i^{(x)} = (r_1, ..., r_{T_i})4.
  • A backbone LLM is prompted to contrast τi(x)=(r1,...,rTi)\tau_i^{(x)} = (r_1, ..., r_{T_i})5, extracting pairs of (\emph{violated}, \emph{invariant}) reasoning patterns τi(x)=(r1,...,rTi)\tau_i^{(x)} = (r_1, ..., r_{T_i})6:

τi(x)=(r1,...,rTi)\tau_i^{(x)} = (r_1, ..., r_{T_i})7

  • Each pair is converted to an abstract memory entry τi(x)=(r1,...,rTi)\tau_i^{(x)} = (r_1, ..., r_{T_i})8“enforce τi(x)=(r1,...,rTi)\tau_i^{(x)} = (r_1, ..., r_{T_i})9”; “avoid M1M_10”M1M_11, labeled with the originating task category, and stored in M1M_12.
  • No gradient-based training is used; memory extraction and retrieval leverage prompt-based summarization and classification.

This contrastive extraction is interpretable as maximizing a proxy InfoNCE objective over positive/negative trajectory pairs:

M1M_13

where M1M_14 is a trajectory-memory scoring function (Chang et al., 24 Mar 2026).

4. Task-Aware Memory Retrieval and Inference

At inference, a task-aware retrieval pipeline conditions memory access on relevant categories:

  • The inference agent M1M_15 first uses its backbone LLM to predict the tuple M1M_16—the coarse and fine category of the query M1M_17 (e.g., “Algebra”, “Quadratic Equations”).
  • Category filtering restricts retrieval to

M1M_18

  • Relevance ranking is performed via TF–IDF or embedding similarity between M1M_19 and A1A_10.
  • The top A1A_11 memory entries (default A1A_12) are selected.
  • These constraints serve as soft prompts to A1A_13 during solution generation, enforcing valuable invariants and discouraging known failure paths; concrete output A1A_14.

This architecture ensures that only category-applicable, agent-neutral constraints participate in inference-time guidance, balancing informativeness and noise (Chang et al., 24 Mar 2026).

5. Empirical Evaluation: Benchmarks, Accuracy, and Efficiency

Empirical studies validate MemCollab's improvements on mathematical and code-generation benchmarks. Representative datasets include MATH500, GSM8K, MBPP, and HumanEval. Primary metrics are exact match accuracy (math) and pass@1 (code).

Backbone Vanilla Self-Contrast MemCollab Δ over Vanilla
Qwen-7B 57.1 67.5 71.6 +14.5%
Qwen-32B 70.8 77.4 79.6 +8.8%
LLaMA-8B 41.7 53.9 +12.2%

Across Qwen-7B, MemCollab reduces average reasoning turns per problem: on MBPP from 3.1 to 1.4, on HumanEval from 3.3 to 1.5. Ablation demonstrates that performance increases up to A1A_15 retrieved constraints, then declines due to noise. The two-stage retrieval (classification + similarity ranking) outperforms prompt selection or single-stage retrieval (Chang et al., 24 Mar 2026).

6. Design Insights, Limitations, and Future Directions

MemCollab’s contrastive methodology successfully isolates transferable solution invariants and removes agent-level artifacts. It distills concise, abstract constraints and prunes known failure modes, thereby serving as a generalizable reasoning resource. Limitations include:

  • Over-retrieval introduces irrelevant or weakly correlated constraints, degrading accuracy.
  • Memory quality depends on the fidelity of trajectory discrimination and summarization prompts.
  • The cap on A1A_16 memory entries per task may under-summarize highly complex cases.

Future avenues include scaling to larger and dynamically composed agent pools, integrating more sophisticated re-ranking of memory entries, jointly optimizing retrieval/summarization modules, and annotating memory with richer tool or solution structure. Extensions to domains with fine-grained tool use and non-trivial task taxonomies are suggested as fertile ground for MemCollab (Chang et al., 24 Mar 2026).

7. Broader Context in Multi-Agent Memory Collaboration

MemCollab represents one approach in a spectrum of multi-agent collaborative memory work. Complementary lines include reinforcement-learning–driven inter-agent optimization (Mao et al., 13 Mar 2026), mesh memory protocols for long-term multi-session agent state sharing (Xu, 21 Apr 2026), and multimodal/robotic memory frameworks employing memoization and geometric plan cache search (Wang et al., 28 Jan 2026). In contrast, MemCollab’s core contribution is its contrastive extraction of agent-agnostic knowledge, which empirically demonstrates strong gains in cross-agent transfer, correctness, and computational efficiency in heterogeneous LLM deployments.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to MemCollab.