在自回归语言模型中学习记忆的签名
Learning the Signature of Memorization in Autoregressive Language Models
AI总结:
本文提出了一种可转移的学习攻击方法,通过训练变压器模型来检测记忆签名,实现了在不同架构和数据集上的高准确率。
摘要:
所有先前针对微调语言模型的成员推断攻击都使用手工设计的启发式方法(例如损失阈值、Min-K%、参考校准),每种方法都受限于设计者直觉。我们引入了第一个可转移的学习攻击,通过观察到在任何语料库上微调任何模型都会产生无限的标记数据,因为成员身份是通过构造已知的。这消除了阴影模型的瓶颈,将成员推断带入深度学习时代:学习而不是设计,通过训练多样性和规模实现泛化。我们发现微调语言模型会产生一种记忆的不变签名,可以在不同的架构家族和数据域中检测到。我们训练了一个成员推断分类器,仅在基于变压器的模型上进行训练。它能够零样本地转移到Mamba(状态空间)、RWKV-4(线性注意力)和RecurrentGemma(门控递归),分别达到0.963、0.972和0.936的AUC。每项评估都结合了一个在训练期间从未见过的架构和数据集,但所有三个都超过了在保留的变压器上的性能(0.908 AUC)。这四个家族没有任何计算机制的共同点,它们唯一的共同点是交叉熵损失上的梯度下降。即使简单的基于似然的方法也表现出强大的转移能力,证实了这种签名的存在与检测方法无关。我们的方法,Learned Transfer MIA(LT-MIA),通过将成员推断重新框架为序列分类过每个token的分布统计来最有效地捕捉这种信号。在变压器上,LT-MIA在0.1% FPR下实现了比最强基线高2.8倍的TPR。该方法也能够转移到代码(0.865 AUC),尽管只在自然语言文本上进行训练。代码和训练好的分类器可在https://github.com/JetBrains-Research/learned-mia上获得。
英文摘要:
All prior membership inference attacks for fine-tuned language models use hand-crafted heuristics (e.g., loss thresholding, Min-K\%, reference calibration), each bounded by the designer's intuition. We introduce the first transferable learned attack, enabled by the observation that fine-tuning any model on any corpus yields unlimited labeled data, since membership is known by construction. This removes the shadow model bottleneck and brings membership inference into the deep learning era: learning what matters rather than designing it, with generalization through training diversity and scale. We discover that fine-tuning language models produces an invariant signature of memorization detectable across architectural families and data domains. We train a membership inference classifier exclusively on transformer-based models. It transfers zero-shot to Mamba (state-space), RWKV-4 (linear attention), and RecurrentGemma (gated recurrence), achieving 0.963, 0.972, and 0.936 AUC respectively. Each evaluation combines an architecture and dataset never seen during training, yet all three exceed performance on held-out transformers (0.908 AUC). These four families share no computational mechanisms, their only commonality is gradient descent on cross-entropy loss. Even simple likelihood-based methods exhibit strong transfer, confirming the signature exists independently of the detection method. Our method, Learned Transfer MIA (LT-MIA), captures this signal most effectively by reframing membership inference as sequence classification over per-token distributional statistics. On transformers, LT-MIA achieves 2.8$\times$ higher TPR at 0.1\% FPR than the strongest baseline. The method also transfers to code (0.865 AUC) despite training only on natural language texts. Code and trained classifier available at https://github.com/JetBrains-Research/learned-mia.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。