Is Memorization Context-Sensitive? Prefix-Based Extraction Beyond Isolated Prefixes
作者: Ali Satvaty, Narjes Sharafi, Jirui Qi, Suzan Verberne, Fatih Turkmen
分类: cs.AI
发布日期: 2026-10-08
备注: Accepted at EMNLP 2026
💡 一句话要点
研究上下文对语言模型记忆提取的影响
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 记忆提取 上下文影响 信息检索 对话系统 内容生成 安全性
📋 核心要点
- 现有方法在处理上下文时,无法有效评估前缀的记忆效应,导致对模型行为的理解不足。
- 本文通过对前缀-后缀对的概率提取进行配对测量,探讨上下文对记忆提取的影响。
- 实验结果显示,上下文并未消除记忆,而是影响了接近提取阈值的样本,揭示了记忆提取的复杂性。
📝 摘要(中文)
大型语言模型(LLMs)在基于前缀的提取中可能暴露出记忆的训练序列。本文探讨了上下文条件是否减轻记忆效应,或仅改变可提取的记忆样本集。通过对三种开放权重指令调优模型的实验,发现上下文并未简单消除记忆,而是形成了一个上下文稳健的核心和一个上下文敏感的边界。许多在没有上下文时可提取的样本在有上下文时仍然可提取,尤其是前缀长度增加时。上下文主要影响接近提取阈值的边际样本,抑制某些暴露,同时也启用一些在仅前缀评估中未被捕捉的新样本。这些发现对RAG降低记忆风险的观点提出了质疑。
🔬 方法详解
问题定义:本文旨在探讨上下文条件是否会减轻大型语言模型的记忆效应,现有方法在评估前缀时往往忽视了上下文的影响,导致对记忆提取的理解不全面。
核心思路:通过对不同上下文条件下的前缀-后缀对进行概率评分,分析上下文如何影响可提取的记忆样本,提出了一种新的评估框架。
技术框架:研究采用了三种开放权重的指令调优模型,分别在空提示和不同相关性的检索上下文下进行评分,比较提取效果。
关键创新:提出了上下文稳健核心与上下文敏感边界的概念,揭示了上下文对记忆提取的复杂影响,挑战了RAG降低记忆风险的传统观点。
关键设计:实验中设置了不同的上下文相关性,评估了前缀长度对提取效果的影响,采用了概率评分作为主要评估指标。通过这种设计,能够更全面地理解上下文对记忆提取的作用。
🖼️ 关键图片
📊 实验亮点
实验结果表明,尽管上下文能够抑制一些边际样本的提取,但许多样本在上下文条件下仍然可提取,尤其是当前缀长度增加时。这一发现挑战了传统观点,表明上下文对记忆提取的影响更为复杂。
🎯 应用场景
该研究的潜在应用领域包括信息检索、对话系统和内容生成等。通过深入理解上下文对记忆提取的影响,可以优化大型语言模型在实际应用中的表现,提高其安全性和可靠性,减少潜在的记忆泄露风险。
📄 摘要(原文)
Large language models (LLMs) can expose memorized training sequences under prefix-based extraction: given a prefix from a training example, the model may assign high probability to the original continuation. In deployed systems, however, prefixes are rarely evaluated in isolation. They often appear together with instructions, retrieved documents, or other task-specific context, as in retrieval-augmented generation (RAG). This motivates examining whether contextual conditioning mitigates memorization or merely changes the set of memorized samples that become extractable. We investigate this issue through paired item-level measurements of probabilistic suffix extraction. For each prefix-suffix pair, we score the target suffix under an empty prompt and under retrieved contexts of varying relevance, across three open-weight instruction-tuned models. We find that context does not simply erase memorization. Instead, extractable memorization consists of a context-robust core and a context-sensitive boundary. Many samples that are extractable without context remain extractable under the retrieved context, especially as the prefix length increases. At the same time, context mainly affects marginal samples near the extraction threshold: it suppresses some exposures, but also enables new ones that are missed by prefix-only evaluation. These findings qualify the view that RAG reduces memorization risk. Context can lower aggregate extraction by suppressing boundary cases, yet robustly extractable samples persist, and context-enabled extractability remains security-relevant.