MemoryForge: Synthesize Lifelong Memory for Human-Like LLM Agents

MemoryForge: Synthesize Lifelong Memory for Human-Like LLM Agents

MemoryForge:为类人 LLM 智能体合成终身记忆

Abstract: Equipping Large Language Models (LLMs) with human-like personas is crucial for agentic applications, such as role-play and user simulation. Traditional prompt-based methods rely on descriptive conditioning by injecting static textual profiles, which often makes agents show generic behaviors due to a lack of realistic life memory.

摘要: 为大语言模型(LLM)赋予类人的人格对于角色扮演和用户模拟等智能体应用至关重要。传统的基于提示词(Prompt)的方法依赖于通过注入静态文本描述来进行条件设定,由于缺乏真实的生命记忆,这往往导致智能体表现出同质化的行为。

To fill this gap, we introduce memory-based conditioning, a paradigm inspired by the cognitive psychology, which replaces abstract profiles with an autobiographical memory base, enabling frozen LLMs to dynamically retrieve situation-relevant memory to guide their behaviors.

为了填补这一空白,我们引入了基于记忆的条件设定(memory-based conditioning)。这一范式受认知心理学启发,用自传体记忆库取代了抽象的个人资料,使冻结参数的 LLM 能够动态检索与情境相关的记忆,从而引导其行为。

We formalize its enabling task as customized lifelong memory synthesis and propose MemoryForge, a novel framework to synthesize such lifelong memory from brief target personas. MemoryForge has three key components: a context generator for socio-historical grounding, a life organizer for developmental coherence toward the target identity, and a multi-resolution simulator that balances broad temporal summaries with high-fidelity episodic experiences.

我们将实现这一目标的过程形式化为“定制化终身记忆合成”,并提出了 MemoryForge,这是一个能够从简短的目标人格描述中合成此类终身记忆的新型框架。MemoryForge 包含三个关键组件:用于社会历史背景构建的上下文生成器、用于确保目标身份发展连贯性的生命组织器,以及一个平衡了宏观时间总结与高保真情景体验的多分辨率模拟器。

Experiments on PersonaGym for role-play and SimulatorArena for user-simulation, show that the synthesized memory base by MemoryForge enables frozen LLMs to exhibit more human-like behaviors than strong descriptive conditioning baselines across multiple metrics and LLM backbones.

在 PersonaGym(角色扮演)和 SimulatorArena(用户模拟)上的实验表明,与强大的描述性条件设定基线相比,MemoryForge 合成的记忆库使冻结参数的 LLM 在多个指标和不同的 LLM 主干模型上均表现出更具类人的行为。