arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2412.01014cs.LGcs.AIcs.CL
收藏

检测大型语言模型中的记忆现象

Detecting Memorization in Large Language Models

Eduardo Slonski

AI总结:

本文提出通过检查 LLM 神经元激活识别已记忆 token 的方法,训练探针实现近完美检测,并可干预激活以抑制记忆且不损害性能。

摘要:

大型语言模型(LLM)在自然语言处理中取得了令人瞩目的成果,但它们容易记忆部分训练数据,这可能损害评估指标、引发隐私担忧并限制泛化能力。传统的记忆检测方法依赖输出概率或损失函数,由于常见语言模式等混杂因素,往往缺乏精确性。本文提出一种分析方法,通过检查 LLM 内部的神经元激活来精确检测记忆。我们识别出可区分已记忆 token 与未记忆 token 的特定激活模式,并据此训练分类 probes(探针),达到接近完美的准确率。如本研究所示,该方法还可应用于重复等其他机制,突显其多功能性。对这些激活进行干预,使我们能够在不降低整体性能的情况下抑制记忆,通过确保指标反映真实泛化能力来增强评估完整性。此外,我们的方法支持对 token 和序列进行大规模标注,这对下一代 AI 模型至关重要,可提升训练效率和结果。我们的发现有助于模型可解释性,并为分析和控制 LLM 内部机制提供实用工具。

英文摘要:

Large language models (LLMs) have achieved impressive results in natural language processing but are prone to memorizing portions of their training data, which can compromise evaluation metrics, raise privacy concerns, and limit generalization. Traditional methods for detecting memorization rely on output probabilities or loss functions, often lacking precision due to confounding factors like common language patterns. In this paper, we introduce an analytical method that precisely detects memorization by examining neuron activations within the LLM. By identifying specific activation patterns that differentiate between memorized and not memorized tokens, we train classification probes that achieve near-perfect accuracy. The approach can also be applied to other mechanisms, such as repetition, as demonstrated in this study, highlighting its versatility. Intervening on these activations allows us to suppress memorization without degrading overall performance, enhancing evaluation integrity by ensuring metrics reflect genuine generalization. Additionally, our method supports large-scale labeling of tokens and sequences, crucial for next-generation AI models, improving training efficiency and results. Our findings contribute to model interpretability and offer practical tools for analyzing and controlling internal mechanisms in LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑