Memadapter:针对记忆诱发谄媚的反事实适应

·

研究论文 · 2026/10/06

长期记忆使基于大语言模型的智能体能够跨任务和会话保留并复用信息,支持个性化与长时程交互。然而,持久记忆也可能诱发谄媚,使智能体过度迎合用户的历史信念,即使这些信念不准确、过时或与客观证据不一致。现有缓解方法假设记忆诱发的谄媚源于有偏或错误的记忆,并试图在记忆流程的不同阶段过滤此类记忆来降低风险。但在现实中,客观且正确的记忆仍可能诱发谄媚,且同一记忆在不同情境下应具有不同影响。为此,我们提出 MemAdapter,一种新颖框架,自适应地整合检索到的记忆以支持客观可靠的推理。具体而言,MemAdapter 包含三个组件:(i) 反事实诱导,利用反事实推理揭示检索记忆的潜在风险;(ii) 情境感知反思,通过自我反思根据当前任务校准每个检索记忆的推理影响;(iii) 基于证据的推理,在保留记忆合理影响的同时,将最终回答建立在适当证据之上。在三个基准上的大量实验表明,MemAdapter 在不同场景下持续提升记忆可靠性。代码见 https://github.com/DEEP-JLU/MemAdapter。

该研究揭示了记忆诱发谄媚的新成因,并提出了可自适应整合记忆的通用框架,对提升大语言模型智能体的可靠推理具有重要价值。

Long-term memory enables LLM-based agents to retain and reuse information across tasks and sessions, supporting personalization and long-horizon interactions. However, persistent memories can also induce sycophancy, causing agents to over-align with users' historical beliefs even when they are inaccurate, outdated, or inconsistent with objective evidence. Existing mitigation methods assume that memory-induced sycophancy originates from biased or incorrect memories and attempt to reduce this risk by filtering such memories at different stages of the memory pipeline. However, in the real world, objective and correct memories can still induce sycophancy, and the same memory can warrant different influence across different contexts. To this end, we propose MemAdapter, a novel framework that adaptively integrates retrieved memories to support objective and reliable reasoning. Specifically, MemAdapter consists of three components: (i) Counterfactual Induction, which leverages counterfactual reasoning to uncover the potential risk of retrieved memories; (ii) Context-Aware Reflection, which calibrates the inferential influence of each retrieved memory in light of the current task via self-reflection; and (iii) Evidence-Based Reasoning, which grounds the final response in appropriate evidence while preserving the legitimate influence of memory. Extensive experiments on three benchmarks demonstrate that MemAdapter consistently improves memory reliability across diverse scenarios. Our code is available at https://github.com/DEEP-JLU/MemAdapter.

阅读原文

参与讨论