LatentMem: Customizing Latent Memory for Multi-Agent Systems

Muxin Fu, X.d. Xue, Yafu Li, Zefeng He, Huang, Siyuan, Xiaoye Qu, Cheng, Yu, Yang, Yang · DOI

Abstract

Large language model (LLM)-powered multi-agent systems (MAS) demonstrate remarkable collective intelligence, wherein multi-agent memory serves as a pivotal mechanism for continual adaptation. However, existing multi-agent memory designs remain constrained by two fundamental bottlenecks: (i) memory homogenization arising from the absence of role-aware customization, and (ii) information overload induced by excessively fine-grained memory entries. To address these limitations, we propose LatentMem, a learnable multi-agent memory framework designed to customize agent-specific memories in a token-efficient manner. Specifically, LatentMem comprises an experience bank that stores raw interaction trajectories in a lightweight form, and a memory composer that synthesizes compact latent memories conditioned on retrieved experience and agent-specific contexts. Further, we introduce Latent Memory Policy Optimization (LMPO), which propagates task-level optimization signals through latent memories to the composer, encouraging it to produce compact and high-utility representations. Extensive experiments across diverse benchmarks and mainstream MAS frameworks show that LatentMem achieves a performance gain of up to 19.36% over vanilla settings and consistently outperforms existing memory architectures, without requiring any modifications to the underlying frameworks.

Introduction: The Bottlenecks of Token-Space Memory

In LLM-powered Multi-Agent Systems (MAS), memory is essential for coordinating long-term collaboration. However, traditional memory architectures typically operate in the "Token Space," leading to two significant challenges: memory homogenization and information overload.

Comparison between traditional token-space memory and the proposed LatentMem architecture.

As illustrated above, current systems often provide identical raw logs to all agents, regardless of their specific roles (e.g., Coder vs. Reviewer). This homogenization dilutes role-specific behavior. Furthermore, as interaction logs grow, they consume excessive context window space, introducing noise and increasing inference costs.

The LatentMem Framework

LatentMem addresses these issues by shifting memory from raw text to compact latent representations. The framework is built on three pillars:

  1. Experience Bank: A repository storing raw interaction trajectories. For new tasks, relevant past experiences are retrieved based on similarity.
  2. Memory Composer: A learnable Transformer module (initialized from the backbone LLM and tuned via LoRA) that synthesizes retrieved trajectories and Agent Role Profiles into a fixed-length set of latent memory tokens.
  3. Latent Memory Policy Optimization (LMPO): A reinforcement learning approach using Group Relative Policy Optimization (GRPO). LMPO uses task-level rewards (e.g., code execution success) to train the Memory Composer to distill high-utility information specifically tailored for each agent's role.

These latent tokens are injected at the embedding level, ensuring the system remains compatible with existing MAS frameworks like AutoGen, MacNet, and CAMEL without requiring internal logic changes.

Experimental Evaluation

The framework was rigorously tested across six benchmarks in four domains: Knowledge-intensive QA (TriviaQA, PopQA), Coding (KodCode, BigCodeBench), Reasoning (StrategyQA), and Symbolic Planning (PDDL).

Performance and Efficiency

LatentMem demonstrated significant improvements over state-of-the-art memory designs:

  • Performance Gain: An average improvement of 7.86%, reaching up to 19.36% in specific scenarios.
  • Token Efficiency: Used 50% fewer tokens compared to mainstream designs.
  • Inference Speed: Reduced inference time to approximately 66% of the original baseline.

Role-Awareness and Generalization

Visualizations of the latent memories confirmed that the Memory Composer creates distinct clusters for different agent roles, effectively providing a "customized briefing" for each participant. Additionally, LatentMem showed strong zero-shot generalization to unseen roles and out-of-domain tasks, such as a 7.10% improvement on the PDDL symbolic planning dataset.

Conclusion

LatentMem represents a shift toward more efficient and specialized memory management in MAS. By replacing raw logs with learned, role-aware latent representations, it mitigates the dual problems of homogenization and information overload. Future research will focus on scaling the Memory Composer to heterogeneous LLM backbones and developing more advanced "forgetting" mechanisms for extremely long-horizon tasks.

Summary updated

BibTeX
@misc{fu2026latentmem,
  author = {Muxin Fu and X.D. Xue and Yafu Li and Zefeng He and Huang, Siyuan and Xiaoye Qu and Cheng, Yu and Yang, Yang},
  title = {{LatentMem: Customizing Latent Memory for Multi-Agent Systems}},
  year = {2026},
  eprint = {2602.03036},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.03036},
}
Figure