Positional Fragility in LLMs: How Offset Effects Reshape Our Understanding of Memorization Risks

📄 arXiv: 2505.13171v2 📥 PDF

作者: Yixuan Xu, Antoni-Joan Solergibert i Llaquet, Antoine Bosselut, Imanol Schlag

分类: cs.CL

发布日期: 2025-05-19 (更新: 2025-05-28)


💡 一句话要点

提出位置脆弱性理论以评估大语言模型的记忆风险

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大语言模型 记忆风险 位置脆弱性 偏移效应 文本生成 版权保护 自然语言处理

📋 核心要点

  1. 现有研究未能充分考虑位置偏移对大语言模型记忆风险的影响,导致对记忆机制的理解不够全面。
  2. 论文通过系统的预训练实验,提出了位置脆弱性理论,揭示了短前缀对逐字记忆的显著影响。
  3. 实验结果显示,调整敏感数据在上下文窗口中的位置可以有效抑制可提取记忆和文本退化现象。

📝 摘要(中文)

大型语言模型已知会记忆部分训练数据,可能导致版权侵犯风险。为系统性地检验这一风险,研究者从零开始对语言模型进行预训练,使用83B个标记,混合网络规模数据与公共领域书籍,以模拟受控频率的版权内容。研究发现了偏移效应,表明短前缀更容易触发逐字记忆,而当前缀偏离上下文窗口的初始标记时,逐字回忆显著下降。这一现象归因于位置脆弱性,模型对上下文窗口中最早标记的依赖使其对轻微偏移敏感。研究结果表明,位置偏移是评估记忆风险的重要维度,之前的研究未能考虑这一因素。

🔬 方法详解

问题定义:本论文旨在解决大语言模型在记忆训练数据时的风险评估问题,现有方法未考虑位置偏移的影响,导致对记忆机制的理解不足。

核心思路:论文提出位置脆弱性理论,强调模型对上下文窗口中最早标记的依赖,短前缀更容易触发逐字记忆,偏移会导致显著的记忆下降。

技术框架:研究通过对1B、3B和8B参数的语言模型进行预训练,使用83B个标记,结合网络规模数据与公共领域书籍,模拟版权内容。主要模块包括数据预处理、模型训练和记忆风险评估。

关键创新:最重要的创新在于识别并分析了偏移效应,提出位置偏移作为评估记忆风险的新维度,挑战了之前研究的假设。

关键设计:在实验中,模型的前缀长度和上下文窗口的设置是关键参数,研究还探讨了损失函数和网络结构对记忆效果的影响。通过调整这些设计,成功抑制了模型的记忆退化现象。

📊 实验亮点

实验结果表明,调整敏感数据在上下文窗口中的位置可以显著抑制可提取记忆和文本退化现象。具体而言,逐字记忆的回忆率在前缀偏移时下降超过30%,而通过优化前缀长度和位置,模型的生成质量得到了有效提升。

🎯 应用场景

该研究的潜在应用领域包括自然语言处理、文本生成和版权保护等。通过深入理解大语言模型的记忆机制,可以为模型设计和训练提供指导,降低版权风险,提升模型的安全性和可靠性。

📄 摘要(原文)

Large language models are known to memorize parts of their training data, posing risk of copyright violations. To systematically examine this risk, we pretrain language models (1B/3B/8B) from scratch on 83B tokens, mixing web-scale data with public domain books used to simulate copyrighted content at controlled frequencies at lengths at least ten times longer than prior work. We thereby identified the offset effect, a phenomenon characterized by two key findings: (1) verbatim memorization is most strongly triggered by short prefixes drawn from the beginning of the context window, with memorization decreasing counterintuitively as prefix length increases; and (2) a sharp decline in verbatim recall when prefix begins offset from the initial tokens of the context window. We attribute this to positional fragility: models rely disproportionately on the earliest tokens in their context window as retrieval anchors, making them sensitive to even slight shifts. We further observe that when the model fails to retrieve memorized content, it often produces degenerated text. Leveraging these findings, we show that shifting sensitive data deeper into the context window suppresses both extractable memorization and degeneration. Our results suggest that positional offset is a critical and previously overlooked axis for evaluating memorization risks, since prior work implicitly assumed uniformity by probing only from the beginning of training sequences.